User intent processing method and device based on large language model, equipment and medium
By employing a user intent processing method based on a large language model, the problems of cumbersome traditional form systems and insufficient integration with AI systems are solved, enabling efficient and accurate form filling and menu operations, thereby improving the efficiency of enterprise business processing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING LE MA SHI INTELLIGENT TECH CO LTD
- Filing Date
- 2026-06-24
- Publication Date
- 2026-07-24
Smart Images

Figure CN122450573A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of form processing, and in particular to a method, apparatus, device, and medium for processing user intent based on a large language model. Background Technology
[0002] As an important tool for data collection and processing in enterprise business processes, the level of intelligence of forms directly affects business efficiency.
[0003] Traditional form systems suffer from problems such as cumbersome creation, complex filling, and data silos. While AI dialogue systems can understand user intent, they lack the ability to deeply integrate with business form systems, resulting in poor efficiency in users' business processing.
[0004] Therefore, there is an urgent need for a user intent processing method based on a large language model to improve the efficiency and accuracy of user business processing. Summary of the Invention
[0005] The purpose of this application is to provide a user intent processing method, apparatus, device, and medium based on a large language model, which can improve the efficiency and accuracy of user business processing.
[0006] To achieve the above objectives, this application provides the following solution: Firstly, this application provides a user intent processing method based on a large language model, including: Upon receiving the instruction text input by the user, the target intent category corresponding to the instruction text is determined based on the pre-trained first language model and the first preset prompt word template. When the target intent category is a menu intent, obtain multiple structured routing information; based on the instruction text, determine the target structured routing information from the multiple structured routing information; based on the target structured routing information, open the target menu; When the target intent category is form intent, based on the pre-trained second language model and the second preset prompt word template, the target form corresponding to the instruction text and the entity of the instruction text mapped by the fields in the target form are determined; based on the instruction text, the target form, and the entity of the instruction text mapped by the fields in the target form, an interactive component is generated; Among them, the first large language model is obtained by fine-tuning the initial large language model based on multiple sample data pairs. The sample data pairs are used to indicate the mapping relationship between user commands and intent categories. The first preset prompt word template is used to instruct the first large language model to determine the target intent category corresponding to the command text based on the command text. The second large language model is obtained by fine-tuning the initial large language model based on multiple sample question-answer pairs; the sample question-answer pairs include form knowledge question-answer pairs, form matching question-answer pairs, and field mapping question-answer pairs; the second preset prompt word template is used to instruct the second large language model to determine the target form corresponding to the instruction text and the entity of the instruction text mapped by the fields in the target form based on the instruction text.
[0007] Furthermore, when determining the target form corresponding to the instruction text, the second major language model is specifically used for: Based on the instruction text, multiple candidate forms and candidate confidence scores are determined from all forms. The candidate confidence score is used to indicate the similarity between the candidate form and the instruction text. Based on the candidate confidence level, the target form is determined from multiple candidate forms.
[0008] Furthermore, based on the instruction text, the target structured routing information is determined from multiple structured routing information sets, including: Based on the instruction text, determine the instruction vector corresponding to the instruction text; Based on multiple structured routing information, determine multiple routing vectors corresponding to the multiple structured routing information; Calculate multiple similarities between the instruction vector and multiple routing vectors; Based on multiple similarities, the target structured routing information is determined from multiple structured routing information.
[0009] Furthermore, after generating interactive components, the user intent processing method based on the large language model also includes: Based on the target form's field metadata and business logic, validate the content of the fields in the interactive components to determine the validity of the content and identify invalid content.
[0010] Furthermore, when the content of a field in an interactive component is invalid, the prompt statement is determined and rendered based on the field in the interactive component and the preset field-prompt mapping relationship.
[0011] Furthermore, user intent processing methods based on large language models also include: Record the user's command text and operation data of interactive components, and determine the user's behavior pattern based on the user's command text and operation data of interactive components; Generate a personalized shortcut rule base based on user behavior patterns; Based on a personalized shortcut rule base, quick interaction components are matched for users when they enter command text.
[0012] Secondly, this application provides a user intent processing device based on a large language model, comprising: The intent module is used to determine the target intent category corresponding to the instruction text after receiving the instruction text input by the user, based on the pre-trained first large language model and the first preset prompt word template. The menu module is used to retrieve multiple structured routing information when the target intent category is menu intent; determine the target structured routing information from the multiple structured routing information based on the instruction text; and open the target menu based on the target structured routing information. The form module is used to determine the target form corresponding to the instruction text and the entity of the instruction text mapped by the fields in the target form when the target intent category is form intent, based on the pre-trained second language model and the second preset prompt word template; and to generate interactive components based on the instruction text, the target form, and the entity of the instruction text mapped by the fields in the target form. Among them, the first large language model is obtained by fine-tuning the initial large language model based on multiple sample data pairs. The sample data pairs are used to indicate the mapping relationship between user commands and intent categories. The first preset prompt word template is used to instruct the first large language model to determine the target intent category corresponding to the command text based on the command text. The second large language model is obtained by fine-tuning the initial large language model based on multiple sample question-answer pairs; the sample question-answer pairs include form knowledge question-answer pairs, form matching question-answer pairs, and field mapping question-answer pairs; the second preset prompt word template is used to instruct the second large language model to determine the target form corresponding to the instruction text and the entity of the instruction text mapped by the fields in the target form based on the instruction text.
[0013] Thirdly, this application provides a computer 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 the steps of the user intent processing method based on a large language model as described above.
[0014] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the user intent processing method based on a large language model described above.
[0015] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the user intent processing method based on a large language model as described above.
[0016] According to the specific embodiments provided in this application, the following technical effects are disclosed: This application provides a user intent processing method based on a large language model. By pre-tuning the initial large language model according to sample data pairs indicating the mapping relationship between user instructions and intent categories, a first large language model that has learned the association pattern between semantic features and intent categories is obtained. This first large language model can accurately determine the intent category corresponding to the text. Thus, after receiving the instruction text input by the user, the target intent category corresponding to the instruction text can be accurately determined based on the first large language model and the first preset prompt words. By fine-tuning the initial large language model in advance based on form knowledge question-and-answer pairs, form matching question-and-answer pairs, and field mapping question-and-answer pairs, a second large language model is obtained. This model learns forms and form knowledge, text-to-form matching rules, and text-to-entity mapping rules to form fields. This allows the second large language model to accurately determine the target form corresponding to the text and the entity of the instruction text mapped by the fields in the target form. Thus, when the target intent category is a form intent, the second large language model and the second preset prompt words can accurately determine the target form corresponding to the instruction text and the entity of the instruction text mapped by the fields in the target form. Based on the instruction text, the target form, and the entities of the instruction text mapped to the fields in the target form, interactive components can be quickly generated to allow users to fill in the expected form, enabling users to complete the form quickly and improving business processing efficiency and accuracy.
[0017] Meanwhile, when the target intent category is menu intent, the target structured routing information can be determined based on the instruction text, and the target menu can be opened so that the user can view the expected information, thereby improving the efficiency and accuracy of business processing. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 An application environment diagram for the user intent processing method based on a large language model provided in the embodiments of this application; Figure 2 A flowchart illustrating the user intent processing method based on a large language model provided in this application embodiment; Figure 3 A schematic diagram of the functional modules of the user intent processing device based on a large language model provided in the embodiments of this application; Figure 4This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0020] The technical solutions of the embodiments 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, and 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.
[0021] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0022] The user intent processing method based on a large language model provided in this application can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be set up independently, integrated into server 104, or placed in the cloud or on another server. Terminal 102 can send received user-input command text to server 104. After receiving the user-input command text, server 104 determines the intent category based on a first major language model. Under menu intent, it determines the target structured routing information based on the command text; under form intent, it determines the target form and the entity of the command text mapped to the fields in the target form based on the first major language model, generating an interactive component. Server 104 can then feed back the obtained target structured routing information or interactive component to terminal 102. In addition, in some embodiments, the user intent processing method based on the large language model can also be implemented by the server 104 or the terminal 102 separately. For example, the terminal 102 can directly process the received user input instruction text, or the server 104 can obtain the user input instruction text from the data storage system and perform video tag processing on the user input instruction text.
[0023] The terminal 102 can be, but is not limited to, various desktop computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, and smart in-vehicle devices. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted devices. The server 104 can be implemented using a standalone server or a server cluster composed of multiple servers, or it can be a cloud server.
[0024] In one exemplary embodiment, such as Figure 2 As shown, a user intent processing method based on a large language model is provided. This method is executed by a computer device, specifically a terminal or server, or both. In this embodiment, the method is applied to... Figure 1 Taking terminal 103 as an example, the following steps S201 to S203 are described below.
[0025] S201. Upon receiving the instruction text input by the user, determine the target intent category corresponding to the instruction text based on the pre-trained first language model and the first preset prompt word template.
[0026] The target intent category can include menu intent and form intent; the first large language model is obtained by fine-tuning the initial large language model based on multiple sample data pairs. The sample data pairs are used to indicate the mapping relationship between user commands and intent categories. The first preset prompt word template is used to instruct the first large language model to determine the target intent category corresponding to the command text based on the command text.
[0027] For example, the execution device (i.e., the terminal) can provide an input box component to the user to receive instruction text input by the user.
[0028] For example, the initial large language model can be a general-purpose large language model with semantic understanding capabilities, such as LLaMA, ChatGLM, or the Qwen series of large language models.
[0029] For example, sample data pairs may include "Open Employee Roster" corresponding to "Menu Intent", "Request Leave" corresponding to "Form Intent", etc.
[0030] For example, when fine-tuning the initial large language model based on sample data, multiple sample data pairs can be formatted into a training format file (usually a JSONL file) containing multiple training data; multiple training data pairs correspond one-to-one with multiple sample data pairs.
[0031] For example, the format file may include: {"instruction": "You are the intent recognition assistant of the enterprise intelligent management system. Please classify user instructions as 'menu intent' or 'form intent'.", "input": "Open employee roster", "output": "menu intent"}; {"instruction": "You are the intent recognition assistant of the enterprise intelligent management system. Please classify user instructions as 'menu intent' or 'form intent'.", "input": "I want to request leave", "output": "form intent"}.
[0032] For example, the initial large language model can be fine-tuned and trained based on the training format file using full parameter fine-tuning or LoRA fine-tuning to obtain the first large language model.
[0033] It should be noted that fine-tuning a large language model based on the training format file is a common technique used by those skilled in the art, and the specific process of fine-tuning will not be elaborated here.
[0034] It is understandable that the first large language model, obtained by fine-tuning the initial large language model based on multiple sample data, can learn the association pattern between semantic features and intent categories, which is reflected in the weight matrix of the model output layer in the first large language model.
[0035] For example, the first preset prompt template can be "You are the intent recognition assistant of the enterprise intelligent management system. Please classify the user instruction as 'menu intent' or 'form intent'. The user instruction is: 'instruction text'". It is understandable that after receiving the instruction text input by the user, the execution device can combine the instruction text with the first preset prompt word template to obtain the input text of the first language model. The input text is then sent to the first language model, which performs deep semantic analysis on the instruction text (calling the embedding interface of the first language model) to obtain the semantic feature vector corresponding to the instruction text (such as parsing the subject-verb-object structure of the sentence, identifying entities (such as names, project names, dates, and amounts), understanding contextual relationships (such as which time range "last week" refers to), capturing the user's true needs (whether it is "applying" for a matter or "querying" a status), and determining the names of relevant professional terms, abbreviations, and conventional names, etc.). The semantic feature vector corresponding to the instruction text is calculated as the dot product of the pre-trained weight matrix, and then the similarity confidence between the semantic feature vector corresponding to the instruction text and the two intent categories is obtained through the softmax function. The intent category with a higher similarity confidence than a preset threshold is determined as the target intent category.
[0036] It should be noted that when the similarity confidence between the semantic feature vector corresponding to the instruction text and the two intent categories is not greater than the preset threshold, it indicates that the intent of the instruction text is too ambiguous, and clarification should be sought from the user.
[0037] For example, rules and keywords can also be used for auxiliary judgment: as a fallback or quick way, simple rules or keywords can be combined to match the corresponding intent category (e.g., if the instruction text contains words such as "open" or "jump to", it is determined to be a menu intent; if the instruction text contains words such as "table" or "fill in", it is determined to be a form intent).
[0038] S202. When the target intent category is menu intent, obtain multiple structured routing information; determine the target structured routing information from the multiple structured routing information according to the instruction text; open the target menu according to the target structured routing information.
[0039] For example, multiple structured routing information can be stored in the terminal's memory and retrieved directly when the target intent category is a menu intent.
[0040] It is understandable that structured routing information can include sub-information such as name, function description, associated tags, and page path.
[0041] Specifically, based on the instruction text, the target structured routing information is determined from multiple structured routing information sets, including: Based on the instruction text, determine the instruction vector corresponding to the instruction text; based on multiple structured routing information, determine multiple routing vectors corresponding to the multiple structured routing information; calculate multiple similarities between the instruction vector and the multiple routing vectors; based on the multiple similarities, determine the target structured routing information from the multiple structured routing information.
[0042] For example, the embedding interface of the first language model can be called to extract the instruction vector corresponding to the instruction text (that is, the semantic feature vector corresponding to the aforementioned instruction text).
[0043] For example, the sub-information in the structured routing information can be concatenated into a routing description text, and the embedding interface of the first language model can be called to extract multiple routing vectors corresponding to multiple structured routing information.
[0044] For example, the cosine similarity between the instruction vector and multiple routing vectors can be calculated to obtain multiple similarities.
[0045] For example, the structured routing information corresponding to the routing vector with the highest similarity can be determined as the target structured routing information.
[0046] It's understandable that opening the target menu will display the information the user expects.
[0047] S203. When the target intent category is a form intent, based on the pre-trained second language model and the second preset prompt word template, determine the target form corresponding to the instruction text and the entity of the instruction text mapped by the fields in the target form; generate an interactive component based on the instruction text, the target form, and the entity of the instruction text mapped by the fields in the target form.
[0048] The second language model is obtained by fine-tuning the initial large language model based on multiple sample question-answer pairs. The sample question-answer pairs include form knowledge question-answer pairs, form matching question-answer pairs, and field mapping question-answer pairs. The second preset prompt word template is used to instruct the second language model to determine the target form corresponding to the instruction text and the entity of the instruction text mapped by the fields in the target form based on the instruction text.
[0049] For example, form knowledge question-and-answer pairs are used to indicate the correspondence between forms and form descriptions, form matching question-and-answer pairs are used to indicate the matching rules between instruction text and forms, and field mapping question-and-answer pairs are used to indicate the mapping rules between entities corresponding to instruction text and form fields.
[0050] For example, a form knowledge question and answer pair could include: "Input: Table name: Employee table; Fields: Employee ID (primary key, integer, unique identifier), Name (string), Department ID (foreign key, integer, associated department table). Please describe this table. Output: The Employee table stores basic employee information, including Employee ID, Name, and Department ID. Employee ID is the primary key, and Department ID is associated with the Department table." Form matching question-and-answer pairs can include: "Input: I want to apply for a three-day leave starting tomorrow. Which form should I use? Output: I should use 'Leave Application Form'." The field mapping question-and-answer pair can include: "Input: I want to take sick leave from May 10th to May 12th. Please map this to the fields in the leave application form. Output: Leave type "-"Sick leave", "Start date"-"2026-05-10", "End date"-"2026-05-12". For example, the initial large language model can be fine-tuned and trained based on sample question-answer pairs through full parameter fine-tuning or LoRA fine-tuning to obtain the second large language model.
[0051] It should be noted that fine-tuning a large language model based on question-answer pairs is a common technique used by those skilled in the art, and the specific process of fine-tuning will not be elaborated here.
[0052] It is understandable that the second large language model, obtained by fine-tuning the initial large language model based on multiple sample question-answer pairs, can learn forms and form knowledge, matching rules between instruction text and forms, and mapping rules between entities corresponding to instruction text and form fields.
[0053] For example, the second preset prompt template could be: "You are an enterprise form intelligent matching assistant. Please strictly adhere to the following requirements when outputting: 1. Must use standard JSON format and must not add any additional explanatory text. 2. Must include the following fields: Matching Form: String type, enter the full name of the identified form; Confidence: Floating-point type, range 0-1, indicating the accuracy of the match; Field Mapping: Object type, the key is the form field name, and the value is the corresponding content extracted from the user command. The user command is: "Command Text". It is understandable that the target form is the form that the user expects to fill out.
[0054] It is understandable that when the target intent category is a form intent, the executing device can combine the instruction text with the second preset prompt word template to obtain the input text of the second language model, send the input text to the second language model, and the second language model performs deep semantic analysis on the instruction text (calls the embedding interface of the second language model) to obtain the semantic feature vector corresponding to the instruction text, and then determines the target form based on the semantic feature vector corresponding to the instruction text.
[0055] For example, when determining the target form corresponding to the instruction text, the second language model is specifically used for: Based on the instruction text, multiple candidate forms and candidate confidence scores are determined from all forms. The candidate confidence score is used to indicate the similarity between the candidate form and the instruction text. Based on the candidate confidence level, the target form is determined from multiple candidate forms.
[0056] For example, the second language model can learn the form knowledge corresponding to all forms through fine-tuning. It can calculate the cosine similarity between the semantic feature vector corresponding to the instruction text and the form knowledge feature vector corresponding to the form knowledge of all forms. The form corresponding to the form knowledge feature vector with a similarity greater than a preset threshold with the semantic feature vector is determined as a candidate form. Then, the candidate form with the highest similarity and a similarity difference with other candidate forms greater than a preset difference threshold is determined as the target form.
[0057] It should be noted that if there is no candidate form or no candidate form with the highest similarity and a similarity difference greater than the preset difference threshold with other candidate forms, it means that the form indicated by the instruction text is unclear and clarification can be sought from the user.
[0058] For example, when determining the entity of the instruction text mapped to a field in the target form, for any field, the semantic similarity between the field and each entity corresponding to the instruction text can be calculated to find the entity that best matches the field, and the best matching entity is determined as the entity of the instruction text mapped to the field.
[0059] For example, after obtaining the target form and the entity of the instruction text mapped to the fields in the target form, a form template for rendering can be generated, and then the form template can be rendered to obtain an interactive component so that the user can fill in the expected form.
[0060] It is understandable that the form template contains pre-filled values corresponding to the fields (and entities of the instruction text mapped to the fields).
[0061] For example, the form can be rendered as a standard web form component (i.e., an interactive component), which may include input fields, dropdown lists, date pickers, etc. Each field sub-component is populated with a mapped initial value (i.e., the entity mapped to the corresponding field in the sub-component).
[0062] In this way, all operations, from dialogue to form filling, modification, submission, and result feedback, are completed within a unified dialogue interface. This maintains the continuity of user attention and provides a smooth experience similar to communicating with a real assistant, without the need to switch back and forth between different pages. Users can also directly modify the pre-filled content and receive instant verification feedback. The interaction method is intuitive and reduces the learning curve.
[0063] In this embodiment, the initial large language model is fine-tuned in advance based on sample data pairs indicating the mapping relationship between user instructions and intent categories to obtain a first large language model that has learned the association pattern between semantic features and intent categories. This allows the first large language model to accurately determine the intent category corresponding to the text. Thus, after receiving the instruction text input by the user, the target intent category corresponding to the instruction text can be accurately determined based on the first large language model and the first preset prompt words. By fine-tuning the initial large language model in advance based on form knowledge question-and-answer pairs, form matching question-and-answer pairs, and field mapping question-and-answer pairs, a second large language model is obtained. This model learns forms and form knowledge, text-to-form matching rules, and text-to-entity mapping rules to form fields. This allows the second large language model to accurately determine the target form corresponding to the text and the entity of the instruction text mapped by the fields in the target form. Thus, when the target intent category is a form intent, the second large language model and the second preset prompt words can accurately determine the target form corresponding to the instruction text and the entity of the instruction text mapped by the fields in the target form. Based on the instruction text, the target form, and the entities of the instruction text mapped to the fields in the target form, interactive components can be quickly generated to allow users to fill in the expected form. This enables users to quickly complete the form, avoiding errors caused by users manually selecting incorrect options from numerous forms or misunderstanding the meaning of fields when filling in the form, thus improving business processing efficiency and accuracy.
[0064] Meanwhile, when the target intent category is menu intent, the target structured routing information can be determined based on the instruction text, and the target menu can be opened so that the user can view the expected information, thereby improving the efficiency and accuracy of business processing.
[0065] Understandably, this method can interface with existing enterprise business systems such as OA, CRM, and ERP, providing users with a unified, natural language-based intelligent operation portal. This effectively integrates information silos and simplifies the complexity of the enterprise's IT architecture. Simultaneously, it allows business personnel to complete complex data queries and business operations through natural expression, without needing in-depth understanding of the backend database structure or precise memorization of menu paths, thus popularizing the usability of enterprise systems.
[0066] In some possible embodiments, the second preset prompt word template can also be used to instruct the second large language model to determine the associated form corresponding to the instruction text based on the instruction text and the pre-built inter-table knowledge graph.
[0067] For example, an inter-table knowledge graph can be constructed in the following way: Retrieve metadata: Read metadata from all forms in the database; For example: The employee table contains the fields: Employee ID (primary key), Name, and Department ID. The leave application table contains the fields: Application ID, Employee ID (foreign key, related to the employee table), Leave Type, Start Date, End Date, and Project ID (foreign key, related to the project table, used to associate the reason for leave). The project table contains the fields: Project ID (primary key) and Project Name. Constructing a relational graph: Based on foreign key relationships, construct a structured graph; For example: Nodes: Employee table, Leave application form, Project table; Edges (relationships): The [Employee ID] of the Leave Application Form is associated with the [Employee ID] of the Employee Table, and the [Project ID] of the Leave Application Form is associated with the [Project ID] of the Project Table.
[0068] For example, the second preset prompt template may also include "The relationships between the forms are known: 'Inter-form knowledge graph'. Please understand the user's business request based on this knowledge."
[0069] It is understandable that after the executing entity determines the associated form corresponding to the instruction text based on the second major language model, it can determine the content of the fields in the target form based on the content of the fields in the associated form.
[0070] For example, the instruction text is "Reimburse the travel expenses for the project 'Chenxi' to Beijing last week, totaling 4200 yuan." The corresponding target form is the travel expense reimbursement form, and the associated form is the project table for the project "Chenxi." Since no specific employee appears in the instruction text, the entity mapped to the employee ID field in the travel expense reimbursement form is empty. However, the project table for the associated form "Chenxi" indicates the employee IDs included in that project. Therefore, the employee IDs included in the project "Chenxi" can be used as the entity mapped to the employee ID field in the travel expense reimbursement form, thereby obtaining more pre-filled data.
[0071] This can improve business efficiency.
[0072] In some possible embodiments, after generating interactive components, the user intent processing method based on a large language model further includes: Based on the target form's field metadata and business logic, validate the content of the fields in the interactive components to determine the validity of the content and identify invalid content.
[0073] For example, field metadata can be used to indicate the data attributes of a field, such as its data type.
[0074] For example, for a travel expense reimbursement form, the "Reimbursement Amount" field has the data format DECIMAL(10,2) and the business rule is "must be greater than 0"; the "Travel End Date" field has the data type DATE and the business rule is "must be later than or equal to the travel start date".
[0075] Here are a few examples of validation: Scenario 1 (Format Error): The user changed the content of the "Reimbursement Amount" field to "abc", which does not meet the data format of DECIMAL(10,2), so the content is invalid; Scenario 2 (Business rule error): The user changed the content of the "Reimbursement Amount" field to "-100", which does not meet the business rule that "must be greater than 0", so the content is invalid; Scenario 3 (Association Validation): The user changes the content of the "Business Trip End Date" field to "2026-05-09", while the content of the "Business Trip Start Date" field is "2026-05-10". This does not meet the requirement of "must be later than or equal to the business trip start date", so the content is invalid.
[0076] For example, invalid content can be identified by color, symbols, etc., to remind the user to make corrections.
[0077] In this way, users can receive real-time feedback on errors in the fields of the form, improving user efficiency and avoiding the submission of invalid data.
[0078] Furthermore, when the content of a field in an interactive component is invalid, the prompt statement is determined and rendered based on the field in the interactive component and the preset field-prompt mapping relationship.
[0079] For example, continuing with the above example of verifying travel expense reimbursement forms, the preset field-prompt mapping relationship can include "The prompt corresponding to the "Reimbursement Amount" field is "Please enter a number not less than 0". Therefore, in scenario 1, the prompt statement is "Please enter a number not less than 0".
[0080] For example, the prompt statement can be rendered and displayed near the component corresponding to the invalid content, prompting the user to modify the field content.
[0081] This can improve the efficiency of user modifications.
[0082] In some possible embodiments, the user intent processing method based on a large language model further includes: Record the user's command text and operation data of interactive components, and determine the user's behavior pattern based on the user's command text and operation data of interactive components; Generate a personalized shortcut rule base based on user behavior patterns; Based on a personalized shortcut rule base, quick interaction components are matched for users when they enter command text.
[0083] For example, it is possible to continuously record user behavior data such as historical input (i.e., historical input instruction text), form selection, field modification (which belongs to operation data of interactive components), and adjustment of the size of interactive components (which belongs to operation data of interactive components).
[0084] For example, after a certain period of recording, this behavioral data can be cleaned and organized (e.g., filtering invalid operations (accidental clicks, duplicate submissions, test data), correcting typos, filling in missing timestamps and user IDs, and removing outliers (e.g., extreme form scaling ratios in a single instance)).
[0085] For example, behavioral data can be analyzed and organized to identify high-frequency operations, user-preferred interaction patterns, user-preferred form-filling methods, and other scenarios.
[0086] Specifically, user interaction behavior can be collected from multiple dimensions, and the raw logs can be transformed into structured behavioral data, including at least the following categories: Page-level behavioral data: page access path, page dwell time, page zoom ratio change trajectory, page refresh and back behavior; Element-level behavioral data: unique identifier of the clicked element, click coordinates, scroll distance and direction, and hover duration; Form-level behavioral data: form field access order, field dwell time, number of times input content was changed, undo / redo operation records, submission time; Time-dimensional behavioral data: operation occurrence time, time interval between adjacent operations, and periodic repetition characteristics.
[0087] After the collected data is cleaned, denoised, and time-aligned, it forms a behavioral event sequence data structure (i.e., behavioral data) based on users.
[0088] Based on structured behavioral data, the following types of quantitative features are extracted to construct a user behavior feature system: Frequency-based features: the number of times each type of operation occurs, the number of times the page zoom threshold is triggered, and the access frequency of specific modules; Time-series characteristics: pre-operation relationship, field jump pattern, typical operation chain length, and operation cycle stability; Preference-related features: frequently accessed module set, commonly used field combinations, default operation path; Stable characteristics: Indicators of repeatability and consistency of the same behavior across different time windows.
[0089] This feature system supports both group statistical analysis and individual long-term behavior modeling.
[0090] Multiple modeling techniques can be used to jointly analyze behavioral characteristics: (1) Frequency statistics and association rule mining: Frequency statistics are performed on all user behavior data to identify high-frequency operation combinations and strongly correlated behaviors, which are used to discover general interaction patterns at the system level. For example: most users first access the "Work Hours" field after entering the form page, and the proportion of users who trigger zoom operations within a short period of time after the page loads.
[0091] (2) Operation sequence modeling: Based on the historical operation sequence of a single user, its representative behavioral paths and periodic patterns are mined to characterize the long-term usage habits of individual users. For example: User A fills in work hours around 17:00 every Friday; User B always prioritizes completing key fields when filling in the form.
[0092] (3) User clustering analysis: Based on user behavior feature vectors, an unsupervised clustering algorithm is used to divide the user group into several subclasses with similar interaction characteristics. For example: "Accessibility preference type" (high frequency zooming, slow operation pace); "high frequency work hour filling type"; "quick completion type" and "repeated modification type", etc.
[0093] By fusing the above modeling results, a two-layer user behavior cognitive model covering both group commonalities and individual differences can be constructed to obtain user behavior patterns.
[0094] Next, the modeling results can be mapped to executable policy rules (i.e., a personalized shortcut rule base) and adaptively adjusted at the following levels: Interface presentation layer: Automatically adjusts page zoom level, font size, button size, and information density based on user preferences; Interaction process layer: dynamically adjust form field order constraints, validation prompt strength, and operation guidance methods; Function guidance layer: Automatically increases the visibility of relevant function entry points during typical operation periods, providing quick access or pre-filled content.
[0095] Based on the user's current behavioral characteristics, corresponding strategies can be invoked in real time or periodically to form a closed-loop optimization mechanism from behavior perception to system response.
[0096] For example, here are a few typical cases: Example 1: Adaptive page display for visual assistance needs: Monitor user page zooming behavior across multiple sessions, and statistically analyze the distribution and triggering timing of zoom ratios; when a user is detected to continuously adjust the page zoom ratio above a preset threshold, accompanied by a longer page dwell time and lower operation density, it is determined that the user has a tendency to require visual assistance; in subsequent visits, automatically apply the magnified display configuration, including increasing font size, expanding the clickable area, optimizing contrast, and simplifying page information density when necessary, thereby providing an accessible access experience that conforms to the user's usage habits without requiring explicit user settings; Example 2: Intelligent guidance for users who frequently fill in work hours: Record the frequency of users' access to work hour-related forms, the time period for filling in forms, and the continuity of their operations; when it is identified that a user performs work hour filling-related operations multiple times within a fixed time period on weekdays and forms a stable operation sequence pattern, the user is classified as a "high-frequency work hour filling user"; for this type of user, automatically improve the visibility of the work hour function during their typical operation period, such as providing quick access, pre-filling historical work hour data, or automatically popping up reminders to fill in, thereby reducing the cost of repetitive input and improving the execution efficiency of key tasks; Example 3: Optimization of interaction strategy based on form filling preferences: Modeling and analyzing the field access order, modification frequency and filling rhythm of different users in the form filling process, identifying several typical filling styles: For users who skip fields, the system appropriately relaxes the field order constraints and allows non-linear filling paths; for users who repeatedly modify fields, the system provides stronger validation prompts and error warnings when key fields lose focus.
[0097] It is understood that the following model and algorithm combination can be used to implement this embodiment: Association rule mining (such as Apriori or FP-Growth) is used for global high-frequency operation identification; sequence pattern mining (such as PrefixSpan) is used for individual operation habit modeling; clustering algorithms (such as KMeans or DBSCAN) are used for user behavior grouping; classification models (such as XGBoost / Logistic Regression) are used for user type discrimination and preference prediction; statistical analysis methods are used for behavioral feature stability evaluation and rule generation.
[0098] For example, a specific example will be used to illustrate this.
[0099] Scenario: Finance staff member D (user D) often handles the summarization and review of departmental expense reimbursements.
[0100] Recommendation trigger: One Monday morning, user D has just logged into the system and is about to type at the cursor in the AI dialog box.
[0101] Recommended Action: Based on D's historical behavior model, the system predicts that D's most likely current intention is "process expense reimbursement summary". Therefore, below or above the input box, quick interactive components such as "Generate last week's department expense reimbursement summary with one click", "Review pending expense reports", and "Open financial expense reimbursement review interface" are displayed as "quick phrases" or "recommended questions".
[0102] User interaction: User D only needs to click on one of the recommendations to directly trigger the corresponding function, without having to manually enter a complete natural language command. This significantly reduces the amount of user input and improves operational efficiency.
[0103] For example, the user's evaluation of each interaction can be fed back to the machine learning model to continuously optimize the recommendation function.
[0104] This reduces user input and operation costs, provides customized services that match individual user habits, and improves business efficiency.
[0105] Based on the same inventive concept, this application also provides a user intent processing device based on a large language model for implementing the user intent processing method based on a large language model as described above. The solution provided by this device is similar to the solution described in the above method. Therefore, the specific limitations of one or more user intent processing device embodiments based on a large language model provided below can be found in the limitations of the user intent processing method based on a large language model above, and will not be repeated here.
[0106] In one exemplary embodiment, such as Figure 3 As shown, a user intent processing device based on a large language model is provided, including: The intent module 301 is used to determine the target intent category corresponding to the instruction text based on the pre-trained first large language model and the first preset prompt word template after receiving the instruction text input by the user. Menu module 302 is used to obtain multiple structured routing information when the target intent category is menu intent; determine the target structured routing information from the multiple structured routing information according to the instruction text; and open the target menu according to the target structured routing information. Form module 303 is used to determine the target form corresponding to the instruction text and the entity of the instruction text mapped by the fields in the target form when the target intent category is form intent, based on the pre-trained second language model and the second preset prompt word template; and generate interactive components based on the instruction text, the target form and the entity of the instruction text mapped by the fields in the target form. Among them, the first large language model is obtained by fine-tuning the initial large language model based on multiple sample data pairs. The sample data pairs are used to indicate the mapping relationship between user commands and intent categories. The first preset prompt word template is used to instruct the first large language model to determine the target intent category corresponding to the command text based on the command text. The second large language model is obtained by fine-tuning the initial large language model based on multiple sample question-answer pairs; the sample question-answer pairs include form knowledge question-answer pairs, form matching question-answer pairs, and field mapping question-answer pairs; the second preset prompt word template is used to instruct the second large language model to determine the target form corresponding to the instruction text and the entity of the instruction text mapped by the fields in the target form based on the instruction text.
[0107] The specific implementation methods and beneficial effects of this device embodiment can be found in the foregoing method embodiments, and will not be repeated here.
[0108] In one exemplary embodiment, a computer device is provided, which may be a server or a terminal, and its internal structure diagram may be as follows. Figure 4As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements the aforementioned user intent processing method based on a large language model.
[0109] Those skilled in the art will understand that Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0110] In one exemplary embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0111] In one exemplary embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0112] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0113] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0114] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).
[0115] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0116] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0117] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A user intent processing method based on a large language model, characterized in that, The user intent processing method based on a large language model includes: Upon receiving the instruction text input by the user, the target intent category corresponding to the instruction text is determined based on the pre-trained first large language model and the first preset prompt word template. When the target intent category is a menu intent, multiple structured routing information is obtained; based on the instruction text, the target structured routing information is determined from the multiple structured routing information; based on the target structured routing information, the target menu is opened; When the target intent category is a form intent, based on the pre-trained second language model and the second preset prompt word template, the target form corresponding to the instruction text and the entity of the instruction text mapped by the fields in the target form are determined; based on the instruction text, the target form, and the entity of the instruction text mapped by the fields in the target form, an interactive component is generated; The first large language model is obtained by fine-tuning an initial large language model based on multiple sample data. The sample data is used to indicate the mapping relationship between user commands and intent categories. The first preset prompt word template is used to instruct the first large language model to determine the target intent category corresponding to the command text based on the command text. The second large language model is obtained by fine-tuning the initial large language model based on multiple sample question-answer pairs; the sample question-answer pairs include form knowledge question-answer pairs, form matching question-answer pairs, and field mapping question-answer pairs; the second preset prompt word template is used to instruct the second large language model to determine the target form corresponding to the instruction text and the entity of the instruction text mapped by the fields in the target form based on the instruction text.
2. The user intent processing method based on a large language model according to claim 1, characterized in that, When determining the target form corresponding to the instruction text, the second large language model is specifically used for: Based on the instruction text, multiple candidate forms and candidate confidence scores are determined from all forms, wherein the candidate confidence scores are used to indicate the similarity between the candidate forms and the instruction text; The target form is determined from multiple candidate forms based on the candidate confidence level.
3. The user intent processing method based on a large language model according to claim 1, characterized in that, The step of determining the target structured routing information from the plurality of structured routing information based on the instruction text includes: Based on the instruction text, determine the instruction vector corresponding to the instruction text; Based on the multiple structured routing information, determine multiple routing vectors corresponding to the multiple structured routing information; Calculate multiple similarities between the instruction vector and the plurality of routing vectors; Based on the multiple similarities, the target structured routing information is determined from the multiple structured routing information.
4. The user intent processing method based on a large language model according to claim 1, characterized in that, After generating interactive components, the user intent processing method based on a large language model further includes: Based on the field metadata of the target form and the business logic, the content of the fields in the interactive component is validated to determine the validity of the content of the fields in the interactive component and invalid content is identified.
5. The user intent processing method based on a large language model according to claim 4, characterized in that, When the content of a field in the interactive component is invalid, a prompt statement is determined and rendered based on the field in the interactive component and the preset field-prompt mapping relationship.
6. The user intent processing method based on a large language model according to claim 1, characterized in that, The user intent processing method based on a large language model also includes: Record the user's command text and operation data of interactive components, and determine the user's behavior pattern based on the user's command text and operation data of interactive components; Generate a personalized shortcut rule base based on user behavior patterns; Based on the personalized shortcut rule base, quick interaction components are matched for the user when the user enters command text.
7. A user intent processing device based on a large language model, characterized in that, The user intent processing device based on the large language model includes: The intent module is used to determine the target intent category corresponding to the instruction text after receiving the instruction text input by the user, based on the pre-trained first large language model and the first preset prompt word template. The menu module is used to: acquire multiple structured routing information when the target intent category is a menu intent; determine the target structured routing information from the multiple structured routing information according to the instruction text; and open the target menu according to the target structured routing information. The form module is used to determine the target form corresponding to the instruction text and the entity of the instruction text mapped by the fields in the target form, based on the pre-trained second language model and the second preset prompt word template when the target intent category is a form intent; and to generate an interactive component based on the instruction text, the target form, and the entity of the instruction text mapped by the fields in the target form. The first large language model is obtained by fine-tuning an initial large language model based on multiple sample data. The sample data is used to indicate the mapping relationship between user commands and intent categories. The first preset prompt word template is used to instruct the first large language model to determine the target intent category corresponding to the command text based on the command text. The second large language model is obtained by fine-tuning the initial large language model based on multiple sample question-answer pairs; the sample question-answer pairs include form knowledge question-answer pairs, form matching question-answer pairs, and field mapping question-answer pairs; the second preset prompt word template is used to instruct the second large language model to determine the target form corresponding to the instruction text and the entity of the instruction text mapped by the fields in the target form based on the instruction text.
8. A computer device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the steps of the user intent processing method based on a large language model as described in any one of claims 1-6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the steps of the user intent processing method based on a large language model as described in any one of claims 1-6.
10. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the steps of the user intent processing method based on a large language model as described in any one of claims 1-6.