Software operation prompt automatic optimization method and system based on context understanding

By constructing multi-dimensional context feature data and using multi-modal feature fusion networks and other technical means, dynamically adjusting the software operation prompt content, solving the problem that prompt content in the existing technology cannot be personalized, and achieving highly targeted prompts and adaptive optimization effects.

CN119598205AActive Publication Date: 2025-03-11北京科杰科技有限公司

Patent Information

Application Number
CN202510144049.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-10
Publication Date
2025-03-11
Estimated Expiration
2045-02-10

AI Technical Summary

Technical Problem

Existing software operation prompt technology cannot dynamically adjust the prompt content based on user usage habits and operation characteristics, resulting in insufficient targeted and personalized prompt information and lack of effective prompt optimization mechanism.

Method used

By collecting and constructing the user's multi-dimensional context feature data, the multi-modal feature fusion network and the two-way long and short-term memory network are used to capture the dynamic evolution laws of user operation behavior, and combine the multi-head attention mechanism and reinforcement learning method to dynamically adjust the prompt content and strategies.

Benefits of technology

It realizes accurate understanding and prediction of user operation intentions, improves the pertinence and accuracy of software operation prompts, and the generated prompt information is more personalized and practical, and the system can adaptively learn user preferences and continuously improve prompt effects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119598205A_ABST
    Figure CN119598205A_ABST
Patent Text Reader

Abstract

The invention provides a context understanding-based software operation prompt automatic optimization method and system, and relates to the technical field of artificial intelligence, and the method comprises the steps: collecting the multi-dimensional context feature data of user software operation, carrying out the feature coding through a multi-modal feature fusion network, modeling the time sequence dependence through a bidirectional long-short-term memory network, and carrying out the feature coding through the bidirectional long-short-term memory network. And a context semantic representation vector is generated based on a multi-head attention mechanism, and a prompt generation strategy is continuously optimized in combination with reinforcement learning. According to the method, personalized customization of software operation prompts can be realized, the accuracy and timeliness of prompt contents are improved, and the software use experience of a user is enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to artificial intelligence technology, and in particular to a method and system for automatically optimizing software operation prompts based on context understanding. Background Art

[0002] With the increasing complexity and functional diversity of software systems, various software systems have widely adopted operational prompts to assist users in better utilizing software functions. Traditional software operational prompts typically use preset, fixed prompt templates, triggering corresponding prompts when the user performs specific operations or enters specific interfaces. This prompt method can provide users with basic operational guidance, helping them understand the basic functions and operation methods of the software. Currently, some software systems have also introduced rule-based intelligent prompt mechanisms, which provide more targeted operational prompts by setting trigger conditions and prompt rules.

[0003] However, the existing software operation prompt technology still has the following shortcomings: Existing prompt methods often use static prompt strategies, failing to dynamically adjust prompt content based on user habits and operational characteristics. This results in insufficient targeting and personalization of prompt information. Prompt content is often fixed, pre-set text, lacking a deep understanding of the user's current operational context and failing to accurately grasp the user's actual needs and operational intent.

[0004] Traditional prompt systems usually only consider single-dimensional trigger conditions, such as interface status or operation sequence, and ignore the multi-dimensional contextual information behind user operation behaviors, including historical operation trajectories, environmental factors, etc. This makes it impossible for the prompt system to fully understand the user's operation scenario, reducing the accuracy and practicality of the prompts.

[0005] Existing technologies lack effective notification optimization mechanisms, making it difficult to continuously improve and optimize notification strategies based on user feedback. Most notification systems use fixed notification rules and lack adaptive learning capabilities, making it difficult to dynamically adjust to changes in user habits. This makes it difficult to continuously improve notification effectiveness. Summary of the Invention

[0006] The embodiments of the present invention provide a method and system for automatically optimizing software operation prompts based on context understanding, which can solve the problems in the prior art.

[0007] A first aspect of an embodiment of the present invention provides a method for automatically optimizing software operation prompts based on context understanding, comprising: Collecting and constructing a multi-dimensional context feature dataset of user software operations, the multi-dimensional context feature dataset including at least one of historical user operation sequence data within a preset time window, current software interface state data, user real-time interaction behavior data, and software operating environment data; performing data normalization and time sequence alignment on the multi-dimensional context feature dataset to generate pre-processed context feature data; The preprocessed context feature data is input into a multimodal feature fusion network, and feature encoding is performed on historical operation sequence data, interface state data, user real-time interaction behavior data, and software operating environment data to generate a multimodal feature vector; a bidirectional long short-term memory network is used to model the temporal dependency of the multimodal feature vector, capture the dynamic evolution of user operation behavior, and output temporal context features; based on a multi-head attention mechanism, the importance of different dimensions of the temporal context features is weighted to generate a fused context semantic representation vector; the context semantic representation vector is input into an intent classification network to predict user operation intentions and operation probability distribution; Based on the user's operation intention, similarity matching is performed in the prompt strategy library, and the prompt template with the highest matching degree is selected as the basic template; the operation probability distribution is used as the importance weight of the prompt content, and the prompt elements in the basic template are prioritized; the prompt generation strategy is continuously optimized using a reinforcement learning method, and the user's interactive feedback data on historical prompt information is used as a reward signal. The dynamic adjustment rules of the prompt content are learned through the policy network; the basic template is rewritten and supplemented according to the dynamic adjustment rules to generate personalized prompt information that conforms to the current context.

[0008] The historical operation sequence data records the access sequence of functional modules and the timestamps of operation events; the interface status data of the current software includes the hierarchical structure information of the interface functional modules and the spatial distribution information of the interactive controls; the real-time user interaction behavior data includes the coordinate sequence of the mouse movement trajectory, the operation dwell time statistics and the control triggering frequency; the software operating environment data includes the software version identification information, system configuration parameters and hardware equipment information.

[0009] A bidirectional long short-term memory network is used to model the temporal dependency of the multimodal feature vector, capture the dynamic evolution of user operation behavior, and output temporal context features. Based on a multi-head attention mechanism, the importance of different dimensions of the temporal context features is weighted to generate a fused context semantic representation vector. The context semantic representation vector is input into the intent classification network to predict the user's operation intention and operation probability distribution, including: Inputting the multimodal feature vector into a bidirectional long short-term memory network, the bidirectional long short-term memory network including a forward propagation layer and a backward propagation layer, performing time series modeling on the multimodal feature vector through the forward propagation layer and the backward propagation layer, respectively, to obtain high-level time series features, middle-level time series features, and fine-grained time series features, wherein the high-level time series features are used to represent function module selection information, the middle-level time series features are used to represent interface navigation information, and the fine-grained time series features are used to represent control operation information; Generate a query matrix, a key matrix and a value matrix based on the high-level temporal features, calculate the similarity between the query matrix and the key matrix to obtain a high-level attention weight, and weight the high-level attention weight and the value matrix to obtain a high-level context vector; splice the high-level context vector with the mid-level temporal features to generate a conditional query matrix, calculate the mid-level attention weight based on the conditional query matrix and obtain a mid-level context vector; splice the mid-level context vector with the fine-grained temporal features to generate a fine-grained conditional query matrix, calculate the fine-grained attention weight based on the fine-grained conditional query matrix and obtain a fine-grained context vector; Inputting the high-level context vector into the first fully connected layer of the intent classification network to obtain a high-level intent probability distribution; based on the combined features of the high-level intent probability distribution and the mid-level context vector, obtaining a mid-level intent probability distribution through the second fully connected layer; based on the combined features of the high-level intent probability distribution, the mid-level intent probability distribution, and the fine-grained context vector, obtaining a fine-grained intent probability distribution through the third fully connected layer; Calculate the cross entropy loss of the high-level intent probability distribution, the mid-level intent probability distribution and the fine-grained intent probability distribution relative to the true label, and calculate the relative entropy between the adjacent level intent probability distributions to obtain the hierarchical consistency constraint term; perform a weighted combination of the cross entropy loss and the hierarchical consistency constraint term to construct a joint loss function, and optimize the parameters of the bidirectional long short-term memory network, the first fully connected layer, the second fully connected layer and the third fully connected layer through the gradient descent algorithm.

[0010] Based on the user operation intention, similarity matching is performed in the prompt strategy library, and the prompt template with the highest matching degree is selected as the basic template; the operation probability distribution is used as the importance weight of the prompt content, and the prompt elements in the basic template are prioritized, including: Constructing a multi-level prompt strategy library, wherein the multi-level prompt strategy library includes multiple strategy templates, each strategy template includes a template body text, a prompt element set, and an element dependency matrix, wherein the element dependency matrix is ​​used to represent the association relationship between each prompt element in the prompt element set; Using a first semantic encoder to encode the user operation intention to obtain an intention semantic vector, using a second semantic encoder to encode the template body text of each policy template in the multi-level prompt policy library to obtain a template semantic vector; calculating the cosine similarity between the intention semantic vector and the template semantic vector to obtain a first similarity component, calculating the correlation between the intention semantic vector and each prompt element in the prompt element set to obtain a second similarity component, performing a weighted combination of the first similarity component and the second similarity component to obtain a comprehensive similarity, selecting the best matching policy template from the multi-level prompt policy library based on the comprehensive similarity, and selecting the prompt template with the highest matching degree as the basic template; Constructing an intent-element mapping matrix, performing matrix multiplication on the operation probability distribution and the intent-element mapping matrix to obtain an initial element weight vector; performing a weighted combination of the initial element weight vector and the element dependency matrix to obtain a fused element weight vector, wherein the fused element weight vector considers both intent relevance and element dependency; Based on the fusion element weight vector, the prompt element set in the optimal matching strategy template is sorted by importance to obtain an ordered prompt element sequence; according to the ordered prompt element sequence and the fusion element weight vector, the template body text of the optimal matching strategy template is reconstructed to generate importance-aware adaptive prompt content.

[0011] The prompt generation strategy is continuously optimized using reinforcement learning methods. The user's interactive feedback on historical prompt information is used as a reward signal. The policy network learns dynamic adjustment rules for prompt content. Based on the dynamic adjustment rules, the basic template is rewritten and supplemented to generate personalized prompt information that suits the current context. This includes: Construct a multi-dimensional reward function for user feedback, which includes click response rewards, stay time rewards, task completion rewards, and satisfaction score rewards. Calculate the user's interactive feedback score for historical prompt information based on the multi-dimensional reward function; Obtain current context features, historical interaction sequence codes, prompt template features, and user profile features, and combine the current context features, the historical interaction sequence codes, the prompt template features, and the user profile features to generate a state vector; construct an action space, where the action space includes modification operations, append operations, deletion operations, and reordering operations, and each operation includes an operation type parameter, a location information parameter, and a content feature parameter; Constructing a policy network and a value network, wherein the policy network is used to predict the execution probability distribution of each operation based on the state vector, and the value network is used to evaluate the value score of the state vector; calculating an advantage function value based on the interaction feedback score and the value score, performing a policy gradient update on the parameters of the policy network based on the advantage function value, and performing a value estimation update on the parameters of the value network based on the temporal difference error; Constructing a prompt adjustment rule set based on the updated policy network, wherein each rule in the prompt adjustment rule set includes a trigger condition, an adjustment action, and a rule priority; calculating an execution probability of each adjustment action based on the state vector, and multiplying the execution probability by a user personalized weight to obtain a comprehensive execution priority; Based on the comprehensive execution priority, the optimal adjustment action is selected from the action space, and the prompt template is dynamically adjusted according to the optimal adjustment action to generate personalized prompt content; the user's interactive feedback data on the personalized prompt content is input into the multi-dimensional reward function, and the parameters of the policy network and the value network are continuously optimized to achieve online learning of the prompt strategy.

[0012] A prompt adjustment rule set is constructed based on the updated policy network, where each rule in the prompt adjustment rule set includes a trigger condition, an adjustment action, and a rule priority; an execution probability of each adjustment action is calculated based on the state vector, and a comprehensive execution priority is obtained by multiplying the execution probability by the user personalized weight. Constructing a rule representation model, wherein the rule representation model includes a rule trigger condition set, an adjustment action description, a rule priority, and a rule credibility, wherein each trigger condition in the rule trigger condition set includes a feature attribute, a comparison operator, and a threshold parameter, and the rule trigger condition set is used to filter the state vector; The state vector is processed using a policy network to generate candidate actions and their corresponding action probabilities, and the gradient information of the state vector relative to each candidate action is calculated. The state-action pairs whose action probabilities are greater than a preset probability threshold and whose gradient significance is greater than a preset gradient threshold are used as initial adjustment rules; Evaluate the initial adjustment rule, calculate the rule confidence based on historical samples that meet the rule triggering condition set, calculate the rule support based on the historical triggering times of the initial adjustment rule, calculate the rule novelty based on the difference between the initial adjustment rule and the existing rule set, and perform a weighted combination of the rule confidence, the rule support, and the rule novelty to obtain a rule priority; Obtaining user interaction data, extracting multi-dimensional user features from the user interaction data to construct a user preference vector, mapping the candidate actions to a feature space using an action mapping function, mapping the user preference vector to the same feature space, and calculating a personalized weight based on a degree of matching between the two mapping results; Multiplying the action probability by the personalized weight and introducing a decay factor based on the complexity of the action to obtain a comprehensive execution priority of each candidate action, where the complexity of the action is determined according to the number of operation steps involved in the action; The rule set is dynamically maintained based on the comprehensive execution priority and the rule priority, a final priority score of each rule in the rule set is calculated, rules whose final priority scores are higher than a priority threshold and whose usage frequencies are higher than a usage frequency threshold are retained in the rule set, and a personalized prompt adjustment strategy is generated based on the rule set.

[0013] A second aspect of an embodiment of the present invention provides a system for automatically optimizing software operation prompts based on context understanding, including: The first unit is configured to collect and construct a multi-dimensional context feature dataset of user software operations, wherein the multi-dimensional context feature dataset includes at least one of historical operation sequence data of the user within a preset time window, interface state data of the current software, real-time user interaction behavior data, and software operating environment data; and perform data normalization and time sequence alignment processing on the multi-dimensional context feature dataset to generate pre-processed context feature data; The second unit is used to input the preprocessed context feature data into a multimodal feature fusion network, perform feature encoding on historical operation sequence data, interface state data, user real-time interaction behavior data, and software operating environment data, and generate a multimodal feature vector; use a bidirectional long short-term memory network to model the temporal dependency of the multimodal feature vector, capture the dynamic evolution of user operation behavior, and output temporal context features; based on a multi-head attention mechanism, the importance of different dimensions of the temporal context features is weighted to generate a fused context semantic representation vector; the context semantic representation vector is input into an intent classification network to predict user operation intentions and operation probability distribution; The third unit is used to perform similarity matching in the prompt strategy library based on the user's operation intention, select the prompt template with the highest matching degree as the basic template; use the operation probability distribution as the importance weight of the prompt content to prioritize the prompt elements in the basic template; use the reinforcement learning method to continuously optimize the prompt generation strategy, use the user's interactive feedback data on historical prompt information as a reward signal, and learn the dynamic adjustment rules of the prompt content through the strategy network; rewrite and supplement the basic template according to the dynamic adjustment rules to generate personalized prompt information that conforms to the current context.

[0014] The third aspect of the embodiment of the present invention An electronic device is provided, comprising: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the aforementioned method.

[0015] According to a fourth aspect of the embodiments of the present invention, A computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the method described above is implemented.

[0016] The present invention provides a method for automatically optimizing software operation prompts based on context understanding, which has the following beneficial effects: By constructing a multi-dimensional contextual feature dataset and preprocessing it, combined with a multimodal feature fusion network and a bidirectional long short-term memory network, it is possible to comprehensively capture users' operating behavior patterns and usage habits, accurately understand and predict users' operating intentions, and improve the pertinence and accuracy of software operation prompts.

[0017] A multi-head attention mechanism is used to weight the importance of temporal context features, and prompt elements are prioritized based on the operation probability distribution, so that the generated prompt information can highlight key content, avoid redundant information from interfering with users, and improve the practicality and readability of the prompt information.

[0018] By continuously optimizing the prompt generation strategy through reinforcement learning methods and using user feedback as a reward signal to dynamically adjust the prompt content, the system can adaptively learn user preferences and continuously improve the prompt effect, thus achieving personalized customization and dynamic optimization of software operation prompts, and significantly improving the user's software usage experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 Schematic diagram of a flow chart of a method for automatically optimizing software operation prompts based on context understanding according to an embodiment of the present invention; Figure 2 Schematic diagram of the structure of a system for automatically optimizing software operation prompts based on context understanding according to an embodiment of the present invention. DETAILED DESCRIPTION

[0020] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.

[0021] The following specific embodiments are used to describe the technical solution of the present invention in detail. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0022] Figure 1 FIG. 1 is a flow chart of a method for automatically optimizing software operation prompts based on context understanding according to an embodiment of the present invention. Figure 1 As shown, the method includes: S101. Collect and construct a multi-dimensional context feature dataset of user software operations, wherein the multi-dimensional context feature dataset includes at least one of historical user operation sequence data within a preset time window, current software interface status data, user real-time interaction behavior data, and software operating environment data; perform data normalization and time alignment processing on the multi-dimensional context feature dataset to generate pre-processed context feature data; S102. Input the preprocessed context feature data into a multimodal feature fusion network, perform feature encoding on historical operation sequence data, interface state data, user real-time interaction behavior data, and software operating environment data, and generate a multimodal feature vector; use a bidirectional long short-term memory network to perform temporal dependency modeling on the multimodal feature vector, capture the dynamic evolution of user operation behavior, and output temporal context features; based on a multi-head attention mechanism, perform importance weighting on different dimensions of the temporal context features to generate a fused context semantic representation vector; input the context semantic representation vector into an intent classification network to predict user operation intentions and operation probability distribution; S103. Based on the user's operation intention, similarity matching is performed in the prompt strategy library, and the prompt template with the highest matching degree is selected as the basic template; the operation probability distribution is used as the importance weight of the prompt content, and the prompt elements in the basic template are prioritized; the prompt generation strategy is continuously optimized using the reinforcement learning method, and the user's interactive feedback data on historical prompt information is used as a reward signal. The dynamic adjustment rules of the prompt content are learned through the strategy network; the basic template is rewritten and supplemented according to the dynamic adjustment rules to generate personalized prompt information that conforms to the current context.

[0023] In an optional embodiment, the historical operation sequence data records the access sequence of functional modules and the timestamps of operation events; the interface status data of the current software includes the hierarchical structure information of the interface functional modules and the spatial distribution information of the interactive controls; the real-time user interactive behavior data includes the coordinate sequence of the mouse movement trajectory, the operation dwell time statistics and the control triggering frequency; the software operating environment data includes the software version identification information, system configuration parameters and hardware equipment information.

[0024] The specific implementation of historical operation sequence data, which records the order of module accesses and operation event timestamps, utilizes an event listening mechanism. By embedding a listener at the entry point of each software module, the module identifier, entry timestamp, and exit timestamp of each user's access are recorded. This data is stored in JSON format and includes fields such as the module ID, access start time, and access end time. For example, an example of a record of a user accessing the System Settings module would look like this: {"moduleId": "systemSettings", "enterTime": "2024-03-21 10:30:15", "exitTime": "2024-03-21 10:35:20"}.

[0025] The current software interface status data is collected through DOM tree parsing. First, the DOM structure of the entire interface is obtained, the parent-child relationships between nodes at each level are parsed, and a hierarchical tree of the interface's functional modules is constructed. The coordinate position, size, and other spatial attributes of each interactive control are also recorded. Example interface status data: {"layout": {"header": {"height": 60, "children": ["logo", "menu"]}, "content": {"position": {"x": 0,"y": 60}, "width": 1200}}}

[0026] Real-time user interaction data is collected using event capture. By monitoring mouse movement events, mouse coordinates are sampled every 50 milliseconds to form a trajectory coordinate sequence. For control operations, the user's dwell time on each control is recorded, and the number of times each control is triggered is counted. Example interaction data: {"mouseTrack": [[100,200,0],[150,220,50],[180,225,100]], "dwellTime": {"button1": 2000, "input1": 5000}, "triggerCount": {"button1": 5, "button2": 2}}.

[0027] Software operating environment data is obtained through the system API. This includes reading the software version number, operating system type and version, CPU model, memory capacity, graphics card information, etc. Example environment data: {"softwareVersion": "2.1.0", "osInfo": {"type": "Windows", "version": "10"}, "hardware": {"cpu": "Inteli7", "memory": "16GB"}}.

[0028] All collected data is consolidated and stored through a unified data processing module. The raw data is first cleaned to remove outliers and redundant information. The processed data is then structured and stored according to a predefined format for easy subsequent analysis and use. Data storage utilizes a distributed database, supporting fast read and write speeds and historical data queries.

[0029] This application enables: By comprehensively recording user operation history and software operating status, it provides detailed data support for system optimization and problem diagnosis, improving software maintenance efficiency and service quality. Based on precise interface status and user behavior data, it can deeply analyze user usage habits and operating patterns, providing reliable decision-making basis for product improvements and enhancing the user experience. The use of distributed storage and real-time data processing mechanisms ensures the efficient collection and processing of large-scale data, ensuring stable and reliable system operation and good scalability.

[0030] In an optional embodiment, a bidirectional long short-term memory network is used to model the temporal dependency of the multimodal feature vector, capture the dynamic evolution of user operation behavior, and output temporal context features; based on a multi-head attention mechanism, the importance of different dimensions of the temporal context features is weighted to generate a fused context semantic representation vector; the context semantic representation vector is input into an intent classification network to predict the user operation intention and operation probability distribution, including: Inputting the multimodal feature vector into a bidirectional long short-term memory network, the bidirectional long short-term memory network including a forward propagation layer and a backward propagation layer, performing time series modeling on the multimodal feature vector through the forward propagation layer and the backward propagation layer, respectively, to obtain high-level time series features, middle-level time series features, and fine-grained time series features, wherein the high-level time series features are used to represent function module selection information, the middle-level time series features are used to represent interface navigation information, and the fine-grained time series features are used to represent control operation information; Generate a query matrix, a key matrix and a value matrix based on the high-level temporal features, calculate the similarity between the query matrix and the key matrix to obtain a high-level attention weight, and weight the high-level attention weight and the value matrix to obtain a high-level context vector; splice the high-level context vector with the mid-level temporal features to generate a conditional query matrix, calculate the mid-level attention weight based on the conditional query matrix and obtain a mid-level context vector; splice the mid-level context vector with the fine-grained temporal features to generate a fine-grained conditional query matrix, calculate the fine-grained attention weight based on the fine-grained conditional query matrix and obtain a fine-grained context vector; Inputting the high-level context vector into the first fully connected layer of the intent classification network to obtain a high-level intent probability distribution; based on the combined features of the high-level intent probability distribution and the mid-level context vector, obtaining a mid-level intent probability distribution through the second fully connected layer; based on the combined features of the high-level intent probability distribution, the mid-level intent probability distribution, and the fine-grained context vector, obtaining a fine-grained intent probability distribution through the third fully connected layer; Calculate the cross entropy loss of the high-level intent probability distribution, the mid-level intent probability distribution and the fine-grained intent probability distribution relative to the true label, and calculate the relative entropy between the adjacent level intent probability distributions to obtain the hierarchical consistency constraint term; perform a weighted combination of the cross entropy loss and the hierarchical consistency constraint term to construct a joint loss function, and optimize the parameters of the bidirectional long short-term memory network, the first fully connected layer, the second fully connected layer and the third fully connected layer through the gradient descent algorithm.

[0031] First, the user's multimodal feature vector is preprocessed. The multimodal feature vector contains visual, textual, and behavioral features of the user interface operation. Visual features are extracted using a convolutional neural network to extract image features from the interface screenshot. Textual features are encoded using a word embedding model. Behavioral features include numerical features such as click coordinates and operation time intervals. These features are normalized and concatenated into a unified feature vector.

[0032] The preprocessed multimodal feature vectors are then fed into a bidirectional long short-term memory (LSTM) network for temporal modeling. The bidirectional LSTM network consists of two propagation layers, forward and backward, each containing multiple LSTM units. Taking a time window of 10 time steps as an example, the forward propagation layer processes the feature sequence from left to right, while the backward propagation layer processes the feature sequence from right to left. The hidden states in both directions capture temporal dependencies of different granularities. Specifically, the shallow layers of the network encode high-level semantic information such as functional module selection, the middle layers encode interface navigation information, and the deep layers encode fine-grained control operation information.

[0033] The importance of temporal features at different levels is then weighted based on a multi-head attention mechanism. Taking eight attention heads as an example, high-level temporal features are first linearly transformed to obtain query, key, and value matrices. Attention weights are calculated by calculating the similarity between the query and key matrices, and the high-level context vector is obtained by multiplying the weights with the value matrix. Similarly, the high-level context vector is concatenated with the mid-level temporal features, and the mid-level attention weights and context vector are calculated through conditional queries. Finally, the mid-level context vector is concatenated with the fine-grained temporal features to obtain the fine-grained context vector.

[0034] Finally, a hierarchical intent classification network is used to predict user action intent. The network consists of three fully connected layers, each predicting intent at different granularities. The first layer selects intent based on the high-level context vector to predict the functional module. The second layer combines high-level intent probabilities with mid-level context vectors to predict interface navigation intent. The third layer integrates multiple layers of intent probabilities and fine-grained context vectors to predict specific control action intent. A joint loss function is constructed using cross-entropy loss and hierarchical consistency constraints, and model parameters are optimized using stochastic gradient descent.

[0035] For example, when a user performs continuous operations in an intelligent human-computer interaction system, the system first acquires multimodal interaction data, including features such as touch location coordinate sequences, interface state information, and control type. These raw features are then converted into fixed-dimensional multimodal feature vectors using a feature extraction module. For example, consider a user's operation sequence in a smart home control application, which includes opening the application, clicking on a device list, selecting an air conditioner, and adjusting the temperature.

[0036] A bidirectional long short-term memory (LSTM) network is used to model the temporal nature of these multimodal features. This network consists of two propagation layers, forward and backward, each containing multiple memory cells. Taking a 32-dimensional input feature vector as an example, the forward propagation layer processes the feature sequence from left to right, capturing contextual dependencies before the current moment; the backward propagation layer processes from right to left, capturing subsequent contextual information. The outputs from both directions are mapped to a 256-dimensional latent space, resulting in three levels of temporal features: The high-level temporal feature dimension is 256, which is used to represent the user's overall function selection intention, such as "adjust the air conditioner temperature"; the mid-level temporal feature dimension is 128, which represents the interface navigation path, such as "device list-air conditioner control panel"; the fine-grained temporal feature dimension is 64, which represents the specific control operation, such as "click the temperature plus button".

[0037] Next, a multi-head attention mechanism is used to weight the importance of temporal features at different levels. First, based on the high-level temporal features, three independent linear transformation layers are used to generate a query matrix, a key matrix, and a value matrix, all with dimensions of 256×256. The dot product of the query matrix and the key matrix is ​​calculated to obtain an attention score. After softmax normalization, the high-level attention weight is obtained. This weight is multiplied by the value matrix to obtain a high-level context vector.

[0038] The high-level context vector is concatenated with the mid-level temporal features to form a 384-dimensional conditional query matrix. A similar attention calculation process is repeated to obtain the mid-level context vector. The mid-level context vector is then concatenated with the fine-grained temporal features to form a 192-dimensional fine-grained conditional query matrix, and the fine-grained attention weights and context vector are calculated.

[0039] Finally, hierarchical intent recognition is performed through a three-layer fully connected network. The first layer receives a 256-dimensional high-level context vector and outputs a probability distribution for 10 categories of high-level intent. The second layer outputs 20 categories of mid-level intent probabilities based on the high-level intent probabilities and the 128-dimensional mid-level context vector. The third layer combines the results of the first two layers with the 64-dimensional fine-grained context vector to output a probability distribution for 50 categories of fine-grained action intent.

[0040] During the training phase, the cross-entropy loss between the predictions and the true labels at each of the three layers is calculated. A hierarchical consistency constraint is also introduced, requiring a certain correlation between the probability distributions of high-level and mid-level intents, and similar constraints between the mid-level and fine-grained layers. These loss terms are weighted and combined using weights of 0.4, 0.3, and 0.3 to construct the final optimization objective function. The model is trained using the Adam optimizer with a learning rate of 0.001, a batch size of 64, and 100 training epochs.

[0041] This application enables: The bidirectional long short-term memory network enables bidirectional modeling of user action sequences, effectively capturing both long-term and short-term temporal dependencies and improving the accuracy and robustness of intent recognition. A multi-head attention mechanism enables adaptive weighted fusion of temporal features at different levels, highlighting the contribution of important features, suppressing interference from irrelevant features, and enhancing the model's feature expression capabilities. A hierarchical intent classification network enables progressive intent prediction from coarse-grained to fine-grained. The introduction of hierarchical consistency constraints ensures semantic consistency across intent prediction results at different levels, improving the interpretability of intent recognition.

[0042] In an optional embodiment, similarity matching is performed in a prompt strategy library based on the user operation intention, and the prompt template with the highest matching degree is selected as the basic template; the operation probability distribution is used as the importance weight of the prompt content, and the prompt elements in the basic template are prioritized, including: Constructing a multi-level prompt strategy library, wherein the multi-level prompt strategy library includes multiple strategy templates, each strategy template includes a template body text, a prompt element set, and an element dependency matrix, wherein the element dependency matrix is ​​used to represent the association relationship between each prompt element in the prompt element set; Using a first semantic encoder to encode the user operation intention to obtain an intention semantic vector, using a second semantic encoder to encode the template body text of each policy template in the multi-level prompt policy library to obtain a template semantic vector; calculating the cosine similarity between the intention semantic vector and the template semantic vector to obtain a first similarity component, calculating the correlation between the intention semantic vector and each prompt element in the prompt element set to obtain a second similarity component, performing a weighted combination of the first similarity component and the second similarity component to obtain a comprehensive similarity, selecting the best matching policy template from the multi-level prompt policy library based on the comprehensive similarity, and selecting the prompt template with the highest matching degree as the basic template; Constructing an intent-element mapping matrix, performing matrix multiplication on the operation probability distribution and the intent-element mapping matrix to obtain an initial element weight vector; performing a weighted combination of the initial element weight vector and the element dependency matrix to obtain a fused element weight vector, wherein the fused element weight vector considers both intent relevance and element dependency; Based on the fusion element weight vector, the prompt element set in the optimal matching strategy template is sorted by importance to obtain an ordered prompt element sequence; according to the ordered prompt element sequence and the fusion element weight vector, the template body text of the optimal matching strategy template is reconstructed to generate importance-aware adaptive prompt content.

[0043] The prompt strategy optimization system based on user operation intent first builds a multi-level prompt strategy library. This library organizes multiple strategy templates in a tree structure. Each strategy template consists of a template body, a set of prompt elements, and a matrix of element dependencies. For example, in a dialogue system, the template body might be "Generate an answer based on the user's question." The prompt element set includes key elements such as question understanding, knowledge retrieval, and answer generation. The element dependency matrix describes the strength of the relationships between these elements.

[0044] The system uses a dual-encoder architecture for template matching. The first semantic encoder uses a pre-trained language model to encode the user's action intent, generating a fixed-dimensional intent semantic vector. The second semantic encoder also uses a pre-trained language model but is fine-tuned for the policy template to better capture the template's features. For example, if the user query is "How can I improve code performance?", the intent semantic vector will highlight semantic features relevant to performance optimization.

[0045] The system calculates the similarity between the intent's semantic vector and the template's semantic vector, while also considering the relevance of the intent to each of the prompt elements. For example, the performance optimization intent has a high correlation with code analysis and performance metrics. By weighting these two similarity components, the system selects the most appropriate policy template.

[0046] Next, we construct an intent-element mapping matrix, which describes the correspondence between the probability distribution of operations and the prompt elements. Initial element weights are obtained through matrix operations, and then weighted fusion is performed based on element dependencies. For example, the weight of the code analysis element will be increased due to its strong dependency on the performance measurement element.

[0047] Finally, the system ranks the prompt elements according to the weights of the fused elements and reconstructs the main text of the template accordingly. For performance optimization scenarios, the system prioritizes high-weighted elements such as code analysis and performance bottleneck identification to generate more targeted prompt content.

[0048] For example, we first build a multi-level prompt policy library, organizing policy templates in a three-tiered tree structure. Taking the intelligent customer service scenario as an example, the first tier represents task types, including consultation and inquiry, troubleshooting, and business processing; the second tier represents specific business scenarios, such as product consultation, order inquiry, and network failure; and the third tier represents detailed prompt templates. Each prompt template contains the template body text, a set of prompt elements, and a matrix of element dependencies.

[0049] Taking the "Network Troubleshooting" scenario template as an example, the main text of the template reads, "Diagnose the cause of the network fault based on the user's description and provide a solution." The prompt element set includes four core elements: fault symptom analysis, cause location, solution generation, and operational guidance. In the element dependency matrix, the correlation between fault symptom analysis and cause location is 0.8, the correlation between cause location and solution generation is 0.9, and the correlation between solution generation and operational guidance is 0.7.

[0050] After receiving the user's action intent, the BERT-based first semantic encoder encodes the user's intent. For example, if the user's feedback is "the mobile WiFi cannot connect to the router," the encoder converts it into a 768-dimensional intent semantic vector. Simultaneously, the second semantic encoder encodes the main text of all templates in the policy library, generating template semantic vectors of the same dimension.

[0051] The first similarity component is obtained by calculating the cosine similarity between the intent semantic vector and the template semantic vector. For the user intent described above, the similarity with the "Network Troubleshooting" template is 0.85. The second similarity component is also obtained by calculating the correlation between the intent semantic vector and each prompt element. For example, the correlation for fault phenomenon analysis is 0.9, and the correlation for cause location is 0.8. Combining these two similarity components with weights of 0.6 and 0.4 yields an overall similarity of 0.83.

[0052] Construct an intention-element mapping matrix that describes the correspondence between different operational intentions and prompt elements. Multiply the user's operational probability distribution by this mapping matrix to obtain the initial element weight vector. In this example, the weight for fault symptom analysis is 0.9, the weight for cause location is 0.8, the weight for solution generation is 0.7, and the weight for operational guidance is 0.6.

[0053] The initial factor weight vector and the factor dependency matrix are weighted and fused, with weights of 0.7 and 0.3, respectively, to obtain the fused factor weight vector. After fusion, the weight of fault phenomenon analysis is 0.85, the weight of cause location is 0.82, the weight of solution generation is 0.75, and the weight of operation guidance is 0.65.

[0054] The fused element weight vectors are used to rank the prompt elements by importance, resulting in an ordered sequence of prompt elements: fault symptom analysis, cause location, solution generation, and operational guidance. The template body is reconstructed based on this sequence and the weight vectors to generate importance-aware, adaptive prompt content: "Please first analyze the WiFi connection failure symptoms described by the user in detail (pay attention to signal strength, authentication status, etc.). Then, based on the symptoms, locate the possible causes, generate a targeted solution, and finally provide clear operational instructions."

[0055] This application enables: The accuracy and adaptability of the prompt strategy have been improved. Through multi-dimensional similarity matching and element importance ranking, the system can more accurately understand user intent and generate corresponding prompt content. The structured nature of prompt content has been enhanced. A weighted fusion mechanism based on element dependencies makes the generated prompts more logically coherent and the connections between elements closer. Dynamic optimization of the prompt strategy has been achieved, allowing the system to adaptively adjust the importance of prompt elements based on changes in user operational intent, improving the flexibility and efficiency of system responses.

[0056] In an optional embodiment, a reinforcement learning method is used to continuously optimize the prompt generation strategy, using user interactive feedback data on historical prompt information as a reward signal, and learning dynamic adjustment rules for prompt content through a policy network; rewriting and supplementing the basic template according to the dynamic adjustment rules to generate personalized prompt information that conforms to the current context includes: Construct a multi-dimensional reward function for user feedback, which includes click response rewards, stay time rewards, task completion rewards, and satisfaction score rewards. Calculate the user's interactive feedback score for historical prompt information based on the multi-dimensional reward function; Obtain current context features, historical interaction sequence codes, prompt template features, and user profile features, and combine the current context features, the historical interaction sequence codes, the prompt template features, and the user profile features to generate a state vector; construct an action space, where the action space includes modification operations, append operations, deletion operations, and reordering operations, and each operation includes an operation type parameter, a location information parameter, and a content feature parameter; Constructing a policy network and a value network, wherein the policy network is used to predict the execution probability distribution of each operation based on the state vector, and the value network is used to evaluate the value score of the state vector; calculating an advantage function value based on the interaction feedback score and the value score, performing a policy gradient update on the parameters of the policy network based on the advantage function value, and performing a value estimation update on the parameters of the value network based on the temporal difference error; Constructing a prompt adjustment rule set based on the updated policy network, wherein each rule in the prompt adjustment rule set includes a trigger condition, an adjustment action, and a rule priority; calculating an execution probability of each adjustment action based on the state vector, and multiplying the execution probability by a user personalized weight to obtain a comprehensive execution priority; Based on the comprehensive execution priority, the optimal adjustment action is selected from the action space, and the prompt template is dynamically adjusted according to the optimal adjustment action to generate personalized prompt content; the user's interactive feedback data on the personalized prompt content is input into the multi-dimensional reward function, and the parameters of the policy network and the value network are continuously optimized to achieve online learning of the prompt strategy.

[0057] First, a multi-dimensional reward function system was constructed. This system collected data on user click behavior in response to prompts, recorded the duration of user dwell time on the prompts, and collected task completion markers and ratings of prompt effectiveness. Click responses were assigned a base score of 10 points, with each valid click adding 2 points. Dwell time was accumulated at 1 point per 10 seconds. Task completion was assessed on a scale of 0-100 based on the achievement of pre-set task milestones. Satisfaction was rated on a five-star scale, with each star corresponding to 20 points. The scores from these four dimensions were normalized and weighted to form a comprehensive interaction feedback score.

[0058] Next, feature vectors are constructed and combined. Semantic, intent, and sentiment features are extracted from the current conversation to form a context feature vector. Historical interaction records are converted into fixed-dimensional sequence feature vectors using a sequence encoder. Template feature vectors are constructed by extracting structural and thematic features from the prompt template library. User profile feature vectors are constructed by collecting basic user attributes, behavioral habits, and preferences. These feature vectors are then concatenated and dimensionality reduced to generate the final state vector.

[0059] In the design of the action space, modification operations include parameters such as replacing words, adjusting tone, and changing sentence structure; append operations include parameters such as supplementary explanations, examples, and related recommendations; delete operations include parameters such as redundant information filtering and duplicate content removal; and reorder operations include parameters such as importance ranking, chronological ranking, and logical ranking. Each operation is configured with corresponding location index information and content feature descriptions.

[0060] The policy network uses a multi-layered neural network structure. The input layer receives the state vector, the intermediate layers extract and combine features, and the output layer generates a probability distribution for each action. The value network uses a similar network structure, but the output layer only generates a value evaluation score. Based on the user interaction feedback score and the value network evaluation score, the policy gradient is calculated and the network parameters are updated.

[0061] Based on the trained policy network, the weight parameters and decision rules are extracted to construct a prompt adjustment rule library. Each rule contains a specific description of the trigger condition, specific adjustment action instructions, and initial priority settings. In actual application, the current state vector is input into the policy network to obtain the execution probability of each action. This is then combined with the user's personalized weight parameters to calculate the final execution priority.

[0062] Finally, the highest-priority adjustment action is selected, and the basic prompt template is modified, appended, deleted, or reordered accordingly to generate personalized prompt content suitable for the current user and scenario. The system continuously collects new user feedback data and continuously optimizes the parameters of the policy network and value network to achieve dynamic adjustment of the prompt generation strategy.

[0063] For example, we first construct a multi-dimensional reward function to evaluate user feedback. Taking the intelligent customer service scenario as an example, click response rewards are calculated based on the user's behavior of clicking on the recommended link in the prompt content, with each click scoring 1 point. Stay time rewards are calculated based on the time the user spends reading the prompt content, with 0.5 points awarded for every 10 seconds of stay. Task completion rewards are calculated based on whether the user successfully solves the problem according to the prompt, with 5 points awarded for a complete solution and 3 points for a partial solution. Satisfaction score rewards are based on the user's conversion to a five-star rating, with 5 points awarded for a five-star rating, 4 points for a four-star rating, and so on.

[0064] In practice, suppose a user receives a network troubleshooting prompt, clicks the suggested troubleshooting link (1 point), pauses to read for 40 seconds (2 points), partially resolves the issue after following the prompt (3 points), and ultimately gives a four-star rating (4 points). The total reward score for this interaction is 10 points. By accumulating the reward points earned for each prompt in the historical interaction sequence, a benchmark for evaluating prompt effectiveness is established.

[0065] Acquire state representation information, including: current context features (such as the user's last three operations and the current interface state), historical interaction sequence encoding (converting the last 10 interaction records into feature vectors using a sequence encoder), prompt template features (template type, key elements, semantic vectors, etc.), and user profile features (usage habits, preferences, historical data, etc.). These features are concatenated to form a 512-dimensional state vector.

[0066] Build an action space to define optional adjustment actions: modify (replace specific content in the template, such as changing "Check Network Settings" to "Check WiFi Settings"), append (insert additional instructions at a specific location), delete (remove redundant or irrelevant content), and reorder (adjust the display order of content modules). Each action includes parameters such as the action type, location index, and specific content.

[0067] Establish the policy network and value network structures. The policy network uses a three-layer fully connected network. The input layer has 512 nodes that receive the state vector, the hidden layer has 256 nodes that use the ReLU activation function, and the output layer uses the Softmax function to obtain the action probability distribution corresponding to the action space dimension. The value network has a similar structure, but the output layer has only one node, which is used to predict the state value score.

[0068] For example, when processing network failure notifications, the policy network might predict the following actions after receiving the current state input: Changing "Network Settings" to "WiFi Settings" has a probability of 0.4, adding "Please confirm the router indicator status" has a probability of 0.3, deleting "Check the network cable connection" (which is irrelevant) has a probability of 0.2, and adjusting the ranking has a probability of 0.1. The value network also predicts a value score of 7.5 for the current state.

[0069] The advantage function is calculated based on the difference between the actual interaction feedback score and the value network's predicted score. For example, if the actual score is 10 and the predicted score is 7.5, the advantage value is 2.5. This advantage value is used to guide the policy network parameter update, increasing the probability of effective adjustment actions. The value network is also optimized using the temporal difference error to improve the accuracy of state value prediction.

[0070] Based on the updated policy network, action selection rules are extracted. For example, if a user is detected using mobile Wi-Fi, a rule is triggered to replace "Network Settings" with "Wi-Fi Settings" with a priority of 0.8. If a user views the same prompt multiple times, a rule is triggered to add additional instructions with a priority of 0.6. Personalized weights are calculated based on the user's historical operation habits. For example, if the user prefers concise prompts, the weight of the delete action is 1.2, and the weight of the add action is 0.8.

[0071] Multiply the operation probability by the personalized weight to obtain the final execution priority. The highest-priority adjustment operation is selected to dynamically optimize the prompt content. User feedback on the optimized prompt content is continuously collected and evaluated using a reward function. The policy network and value network parameters are continuously iterated to achieve adaptive learning of the prompt strategy.

[0072] This application enables: By designing and implementing a multi-dimensional reward function, we comprehensively assess users' acceptance of prompt content and its effectiveness, making the optimization direction of prompt strategies more accurate and significantly improving the quality and relevance of prompt content. Deep reinforcement learning methods are used to continuously optimize prompt strategies. The system can automatically learn patterns and rules from user interaction data, continuously improving the intelligence level of prompt generation and reducing the workload of manual adjustments. A personalized prompt generation mechanism based on user profiles and contextual features ensures that prompt content better meets the personalized needs of different users, improving user experience and satisfaction. It also significantly improves the timeliness and adaptability of prompt content to specific scenarios.

[0073] In an optional embodiment, a prompt adjustment rule set is constructed based on the updated policy network, where each rule in the prompt adjustment rule set includes a trigger condition, an adjustment action, and a rule priority; an execution probability of each adjustment action is calculated based on the state vector, and a comprehensive execution priority is obtained by multiplying the execution probability by a user personalized weight. Constructing a rule representation model, wherein the rule representation model includes a rule trigger condition set, an adjustment action description, a rule priority, and a rule credibility, wherein each trigger condition in the rule trigger condition set includes a feature attribute, a comparison operator, and a threshold parameter, and the rule trigger condition set is used to filter the state vector; The state vector is processed using a policy network to generate candidate actions and their corresponding action probabilities, and the gradient information of the state vector relative to each candidate action is calculated. The state-action pairs whose action probabilities are greater than a preset probability threshold and whose gradient significance is greater than a preset gradient threshold are used as initial adjustment rules; Evaluate the initial adjustment rule, calculate the rule confidence based on historical samples that meet the rule triggering condition set, calculate the rule support based on the historical triggering times of the initial adjustment rule, calculate the rule novelty based on the difference between the initial adjustment rule and the existing rule set, and perform a weighted combination of the rule confidence, the rule support, and the rule novelty to obtain a rule priority; Obtaining user interaction data, extracting multi-dimensional user features from the user interaction data to construct a user preference vector, mapping the candidate actions to a feature space using an action mapping function, mapping the user preference vector to the same feature space, and calculating a personalized weight based on a degree of matching between the two mapping results; Multiplying the action probability by the personalized weight and introducing a decay factor based on the complexity of the action to obtain a comprehensive execution priority of each candidate action, where the complexity of the action is determined according to the number of operation steps involved in the action; The rule set is dynamically maintained based on the comprehensive execution priority and the rule priority, a final priority score of each rule in the rule set is calculated, rules whose final priority scores are higher than a priority threshold and whose usage frequencies are higher than a usage frequency threshold are retained in the rule set, and a personalized prompt adjustment strategy is generated based on the rule set.

[0074] First, a rule representation model is constructed, employing a multi-layered design. The set of rule trigger conditions encompasses multiple feature dimensions, such as user behavior, environmental features, and interaction scenario features. Each trigger condition is defined using feature attributes, comparison operators, and threshold parameters, such as "user click count exceeds 10" or "session duration exceeds 5 minutes." These trigger conditions are used to filter the input state vector to determine which rules are likely to be activated.

[0075] The state vector is then processed using a deep policy network to generate candidate actions and their probability distributions. Taking a user interaction scenario as an example, the state vector contains information such as the user's current behavioral characteristics and historical interaction records. The network outputs possible prompt adjustment actions, such as "simplify prompt language" or "add example description." By calculating the sensitivity of the state vector to each candidate action, state-action pairs with an action probability exceeding 0.6 and a gradient significance greater than 0.3 are selected as the initial adjustment rules.

[0076] Conduct a multi-dimensional evaluation of the initial adjustment rules. Calculate the rule confidence based on historical data, such as the percentage of positive results after the rule was triggered in the past; calculate the rule support, which is the percentage of times the rule was triggered in the total sample; and calculate the rule novelty, measured by semantic similarity with the existing rule set. These three metrics are weighted in a 4:3:3 ratio to determine the rule priority.

[0077] User characteristics are extracted from user interaction data, including preferred topics, expression methods, and interaction frequency, to construct a user preference vector. Feature mapping is used to convert candidate actions into vector representations of the same dimensions, and the cosine similarity with the user preference vector is calculated as a personalized weight. For example, if the user prefers concise expression, actions that simplify the prompt will receive a higher weight.

[0078] The calculation of the overall execution priority takes into account the complexity of the action, which is determined by the number of steps involved. For example, the complexity of "adjusting the tone and intonation" is 1, and the complexity of "restructuring the prompt structure" is 3. The final priority is the product of the action probability, the personalization weight, and the complexity reduction factor.

[0079] The rule set is dynamically maintained based on the combined execution priority and rule priority. A final priority score is calculated for each rule, retaining those with a score above 0.7 and an average monthly usage frequency of more than 100 times. The resulting personalized notification adjustment strategy can adapt to the needs of different users.

[0080] For example, a rule representation model is constructed and the basic structure of the rules is designed. Taking the intelligent customer service scenario as an example, the rule trigger condition set includes user behavior characteristics, interface status characteristics, and time characteristics. For the "network troubleshooting" scenario, trigger conditions may include: a user submitting a similar question more than three times in a row, the question description contains the keyword "WiFi connection failure," and the page stay time in the last 10 minutes is less than 30 seconds. Each trigger condition is defined by a characteristic attribute (such as the number of submissions), a comparison operator (such as greater than), and a threshold parameter (such as 3 times).

[0081] Adjustment action descriptions include the action type, the action target, and specific parameters. For example, the action type might be "Replace Text," the action target a specific paragraph within the prompt, and the parameter the new content after the replacement. Rule priority, a value between 0 and 1, represents the importance of the rule, while rule credibility reflects its reliability.

[0082] The trained policy network processes the current state vector. For example, for a user feedback item like "My phone can't connect to Wi-Fi," the user's description, historical operation history, and interface status information are converted into a 512-dimensional state vector and fed into the policy network. The network outputs several candidate actions and their probability distributions: for example, the probability of "adding Wi-Fi troubleshooting steps" is 0.8, the probability of "simplifying technical terminology" is 0.6, and the probability of "adding graphic descriptions" is 0.5.

[0083] The gradient of the state vector for each candidate action is calculated, indicating the action's sensitivity to the current state. A probability threshold of 0.6 and a gradient threshold of 0.3 are set. The two actions, "Add WiFi troubleshooting steps" and "Simplify technical terminology," are selected as initial adjustment rules.

[0084] Perform a multi-dimensional evaluation of the initial adjustment rules. Assuming the "Add WiFi troubleshooting steps" rule has a user problem resolution rate of 85% after triggering in historical samples, the rule confidence is calculated to be 0.85. The rule's historical trigger count accounts for 30% of the total rule trigger count, resulting in a rule support of 0.3. The average text similarity with the existing rule base is 0.4, giving the rule novelty of 0.6.

[0085] By weighting the confidence, support, and novelty of the rule with weights of 0.5, 0.3, and 0.2, we obtain a rule priority of 0.66. Similarly, the priority of the "Simplify Professional Terminology" rule is 0.58.

[0086] Analyze historical user interaction data, extract user characteristics, and construct a preference vector. Feature dimensions include preference for graphic presentation (score 0.8), preference for concise descriptions (score 0.9), and expertise level (score 0.3). Use an action mapping function to transform candidate actions into the same feature space, and calculate the degree of match with user preferences as a personalization weight.

[0087] The personalized weight of the "Add WiFi troubleshooting steps" action is 0.7. Considering that this action contains three steps, a complexity reduction factor of 0.9 is introduced. The final action probability of 0.8 is multiplied by the personalized weight of 0.7, and the reduction factor is taken into account, resulting in an overall execution priority of 0.504. Similarly, the overall execution priority of the "Simplify professional terminology" action is calculated to be 0.486.

[0088] The priority threshold is set to 0.5, and the usage frequency threshold is set to 0.2. The rule set is filtered based on the combined execution priority and rule priority. The "Add WiFi troubleshooting steps" rule, whose final priority score exceeds the threshold and meets the usage frequency requirements, is retained in the rule set. Finally, a personalized prompt policy is generated based on the retained rule: "Please follow these steps to check your WiFi connection: 1. Confirm that WiFi on your phone is turned on; 2. Check the list of available networks; 3. Enter the correct network password."

[0089] This application enables: Through multi-dimensional evaluation and dynamic maintenance mechanisms, the accuracy and timeliness of prompt adjustment rules are improved, enabling the system to continuously optimize and maintain the high quality of the rule base. The introduction of user-specific weights and action complexity attenuation factors enables personalized customization of prompt adjustment strategies, improving the user experience while ensuring system efficiency. Automatically generating adjustment rules using a deep policy network approach reduces the cost of manual rule design while improving both the efficiency and quality of rule generation.

[0090] Figure 2 FIG. 1 is a structural diagram of a software operation prompt automatic optimization system based on context understanding according to an embodiment of the present invention. Figure 2 As shown, the system includes: The first unit is configured to collect and construct a multi-dimensional context feature dataset of user software operations, wherein the multi-dimensional context feature dataset includes at least one of historical operation sequence data of the user within a preset time window, interface state data of the current software, real-time user interaction behavior data, and software operating environment data; and perform data normalization and time sequence alignment processing on the multi-dimensional context feature dataset to generate pre-processed context feature data; The second unit is used to input the preprocessed context feature data into a multimodal feature fusion network, perform feature encoding on historical operation sequence data, interface state data, user real-time interaction behavior data, and software operating environment data, and generate a multimodal feature vector; use a bidirectional long short-term memory network to model the temporal dependency of the multimodal feature vector, capture the dynamic evolution of user operation behavior, and output temporal context features; based on a multi-head attention mechanism, the importance of different dimensions of the temporal context features is weighted to generate a fused context semantic representation vector; the context semantic representation vector is input into an intent classification network to predict user operation intentions and operation probability distribution; The third unit is used to perform similarity matching in the prompt strategy library based on the user's operation intention, select the prompt template with the highest matching degree as the basic template; use the operation probability distribution as the importance weight of the prompt content to prioritize the prompt elements in the basic template; use the reinforcement learning method to continuously optimize the prompt generation strategy, use the user's interactive feedback data on historical prompt information as a reward signal, and learn the dynamic adjustment rules of the prompt content through the strategy network; rewrite and supplement the basic template according to the dynamic adjustment rules to generate personalized prompt information that conforms to the current context.

[0091] According to a third aspect of the embodiments of the present invention, An electronic device is provided, comprising: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the aforementioned method.

[0092] According to a fourth aspect of the embodiments of the present invention, A computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the method described above is implemented.

[0093] The present invention may be a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present invention.

[0094] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for automatically optimizing software operation prompts based on context understanding, characterized in that: include: Collect and construct a multi-dimensional context feature data set of user software operations, wherein the multi-dimensional context feature data set includes at least one of historical operation sequence data of the user within a preset time window, interface state data of the current software, real-time user interaction behavior data, and software operating environment data; perform data standardization and time sequence alignment processing on the multi-dimensional context feature data set to generate pre-processed context feature data; Inputting the preprocessed context feature data into a multimodal feature fusion network, performing feature encoding on the historical operation sequence data, the interface state data, the user's real-time interactive behavior data, and the software running environment data, respectively, to generate a multimodal feature vector; A bidirectional long short-term memory network is used to model the temporal dependency of the multimodal feature vector, capture the dynamic evolution law of the user's operation behavior, and output the temporal context features; based on the multi-head attention mechanism, the importance of different dimensions of the temporal context features is weighted to generate a fused context semantic representation vector; the context semantic representation vector is input into the intention classification network to predict the user's operation intention and operation probability distribution; Based on the user operation intention, similarity matching is performed in the prompt strategy library, and the prompt template with the highest matching degree is selected as the basic template; Using the operation probability distribution as the importance weight of the prompt content, and prioritizing the prompt elements in the basic template; The reinforcement learning method is used to continuously optimize the prompt generation strategy. The user's interactive feedback data on historical prompt information is used as a reward signal. The dynamic adjustment rules of the prompt content are learned through the strategy network. The basic template is rewritten and supplemented according to the dynamic adjustment rules to generate personalized prompt information that conforms to the current context.

2. The method according to claim 1, characterized in that The historical operation sequence data records the access order of function modules and the timestamp of operation events; the interface status data of the current software includes the hierarchical structure information of the interface function modules and the spatial distribution information of the interactive controls; the real-time user interactive behavior data includes the coordinate sequence of the mouse movement trajectory, the operation dwell time statistics and the control triggering frequency; the software operating environment data includes the software version identification information, system configuration parameters and hardware equipment information.

3. The method according to claim 1, characterized in that A bidirectional long short-term memory network is used to model the temporal dependency of the multimodal feature vector, capture the dynamic evolution law of the user's operation behavior, and output the temporal context feature; based on the multi-head attention mechanism, the importance of different dimensions of the temporal context feature is weighted to generate a fused context semantic representation vector; Inputting the context semantic representation vector into the intention classification network, predicting the user operation intention and operation probability distribution includes: Inputting the multimodal feature vector into a bidirectional long short-term memory network, the bidirectional long short-term memory network includes a forward propagation layer and a backward propagation layer, and performing time series modeling on the multimodal feature vector through the forward propagation layer and the backward propagation layer, respectively, to obtain high-level time series features, middle-level time series features and fine-grained time series features, wherein the high-level time series features are used to characterize function module selection information, the middle-level time series features are used to characterize interface navigation information, and the fine-grained time series features are used to characterize control operation information; Generate a query matrix, a key matrix and a value matrix based on the high-level temporal features, calculate the similarity between the query matrix and the key matrix to obtain a high-level attention weight, and weight the high-level attention weight and the value matrix to obtain a high-level context vector; splice the high-level context vector with the middle-level temporal features to generate a conditional query matrix, calculate the middle-level attention weight based on the conditional query matrix and obtain the middle-level context vector; splice the middle-level context vector with the fine-grained temporal features to generate a fine-grained conditional query matrix, calculate the fine-grained attention weight based on the fine-grained conditional query matrix and obtain the fine-grained context vector; Input the high-level context vector into the first fully connected layer of the intent classification network to obtain a high-level intent probability distribution; based on the combined features of the high-level intent probability distribution and the middle-level context vector, obtain the middle-level intent probability distribution through the second fully connected layer; based on the combined features of the high-level intent probability distribution, the middle-level intent probability distribution and the fine-grained context vector, obtain the fine-grained intent probability distribution through the third fully connected layer; Calculate the cross entropy loss of the high-level intent probability distribution, the mid-level intent probability distribution and the fine-grained intent probability distribution relative to the true label, and calculate the relative entropy between adjacent level intent probability distributions to obtain the hierarchical consistency constraint term; perform a weighted combination of the cross entropy loss and the hierarchical consistency constraint term to construct a joint loss function, and optimize the parameters of the bidirectional long short-term memory network, the first fully connected layer, the second fully connected layer and the third fully connected layer through the gradient descent algorithm.

4. The method according to claim 1, characterized in that: Based on the user operation intention, similarity matching is performed in the prompt strategy library, and the prompt template with the highest matching degree is selected as the basic template; Using the operation probability distribution as the importance weight of the prompt content, and prioritizing the prompt elements in the basic template includes: Constructing a multi-level prompt strategy library, wherein the multi-level prompt strategy library includes a plurality of strategy templates, each of which includes a template body text, a prompt element set, and an element dependency matrix, wherein the element dependency matrix is ​​used to characterize the association relationship between each prompt element in the prompt element set; Using a first semantic encoder to encode the user operation intention to obtain an intention semantic vector, using a second semantic encoder to encode the template body text of each of the policy templates in the multi-level prompt policy library to obtain a template semantic vector; calculating the cosine similarity between the intention semantic vector and the template semantic vector to obtain a first similarity component, calculating the correlation between the intention semantic vector and each prompt element in the prompt element set to obtain a second similarity component, performing a weighted combination of the first similarity component and the second similarity component to obtain a comprehensive similarity, selecting the best matching policy template from the multi-level prompt policy library based on the comprehensive similarity, and selecting the prompt template with the highest matching degree as the basic template; Constructing an intention factor mapping matrix, performing matrix multiplication operation on the operation probability distribution and the intention factor mapping matrix to obtain an initial factor weight vector; performing weighted combination on the initial factor weight vector and the factor dependency matrix to obtain a fused factor weight vector, wherein the fused factor weight vector considers both intention relevance and factor dependency; Based on the fusion element weight vector, the prompt element set in the optimal matching strategy template is sorted by importance to obtain an ordered prompt element sequence; according to the ordered prompt element sequence and the fusion element weight vector, the template body text of the optimal matching strategy template is reconstructed to generate importance-aware adaptive prompt content.

5. The method according to claim 1, characterized in that The reinforcement learning method is used to continuously optimize the prompt generation strategy, and the user's interactive feedback data on historical prompt information is used as a reward signal. The dynamic adjustment rules of prompt content are learned through the strategy network; Rewriting and supplementing the basic template according to the dynamic adjustment rule to generate personalized prompt information that conforms to the current context includes: Construct a multi-dimensional reward function for user feedback, wherein the multi-dimensional reward function includes a click response reward, a stay time reward, a task completion reward, and a satisfaction score reward, and calculate the user's interactive feedback score for the historical prompt information based on the multi-dimensional reward function; Acquire current context features, historical interaction sequence codes, prompt template features, and user portrait features, and combine the current context features, the historical interaction sequence codes, the prompt template features, and the user portrait features to generate a state vector; construct an action space, the action space including modification operations, append operations, deletion operations, and reordering operations, and each operation includes an operation type parameter, a location information parameter, and a content feature parameter; Constructing a policy network and a value network, wherein the policy network is used to predict the execution probability distribution of each operation according to the state vector, and the value network is used to evaluate the value score of the state vector; calculating the advantage function value based on the interactive feedback score and the value score, performing policy gradient update on the parameters of the policy network according to the advantage function value, and performing value estimation update on the parameters of the value network according to the temporal difference error; Constructing a prompt adjustment rule set based on the updated policy network, wherein each rule in the prompt adjustment rule set includes a trigger condition, an adjustment action, and a rule priority; calculating an execution probability of each adjustment action according to the state vector, and multiplying the execution probability by a user personalized weight to obtain a comprehensive execution priority; Based on the comprehensive execution priority, an optimal adjustment action is selected from the action space, and the prompt template is dynamically adjusted according to the optimal adjustment action to generate personalized prompt content; the user's interactive feedback data on the personalized prompt content is input into the multi-dimensional reward function, and the parameters of the policy network and the value network are continuously optimized to realize online learning of the prompt strategy.

6. The method according to claim 5, characterized in that Building a prompt adjustment rule set based on the updated policy network, each rule in the prompt adjustment rule set includes a trigger condition, an adjustment action, and a rule priority; Calculating the execution probability of each adjustment action according to the state vector, and multiplying the execution probability by the user personalized weight to obtain a comprehensive execution priority includes: Constructing a rule representation model, wherein the rule representation model includes a rule trigger condition set, an adjustment action description, a rule priority, and a rule credibility, wherein each trigger condition in the rule trigger condition set includes a feature attribute, a comparison operator, and a threshold parameter, and the rule trigger condition set is used to filter the state vector; The state vector is processed by using a policy network to generate candidate actions and their corresponding action probabilities, the gradient information of the state vector relative to each candidate action is calculated, and the state-action pair whose action probability is greater than a preset probability threshold and whose gradient significance is greater than a preset gradient threshold is used as an initial adjustment rule; The initial adjustment rule is evaluated, rule confidence is calculated based on historical samples that meet the rule triggering condition set, rule support is calculated based on the historical triggering times of the initial adjustment rule, rule novelty is calculated based on the difference between the initial adjustment rule and the existing rule set, and rule confidence, rule support and rule novelty are weightedly combined to obtain rule priority; Acquire user interaction data, extract multi-dimensional user features from the user interaction data to construct a user preference vector, map the candidate actions to a feature space using an action mapping function, map the user preference vector to the same feature space, and calculate a personalized weight based on the matching degree of the two mapping results; Multiplying the action probability by the personalized weight and introducing a decay factor based on the complexity of the action to obtain a comprehensive execution priority of each of the candidate actions, wherein the complexity of the action is determined according to the number of operation steps involved in the action; The rule set is dynamically maintained based on the comprehensive execution priority and the rule priority, a final priority score of each rule in the rule set is calculated, rules whose final priority scores are higher than a priority threshold and whose usage frequencies are higher than a usage frequency threshold are retained in the rule set, and a personalized prompt adjustment strategy is generated based on the rule set.

7. A software operation prompt automatic optimization system based on context understanding, used to implement the method according to any one of claims 1 to 6, characterized in that: include: The first unit is used to collect and construct a multi-dimensional context feature data set of user software operations, wherein the multi-dimensional context feature data set includes at least one of historical operation sequence data of the user within a preset time window, interface state data of the current software, real-time user interaction behavior data, and software operating environment data; and perform data standardization and time sequence alignment processing on the multi-dimensional context feature data set to generate pre-processed context feature data; The second unit is used to input the preprocessed context feature data into a multimodal feature fusion network, perform feature encoding on the historical operation sequence data, the interface state data, the user's real-time interactive behavior data and the software running environment data, and generate a multimodal feature vector; A bidirectional long short-term memory network is used to model the temporal dependency of the multimodal feature vector, capture the dynamic evolution law of the user's operation behavior, and output the temporal context features; based on the multi-head attention mechanism, the importance of different dimensions of the temporal context features is weighted to generate a fused context semantic representation vector; the context semantic representation vector is input into the intention classification network to predict the user's operation intention and operation probability distribution; A third unit is used to perform similarity matching in a prompt strategy library based on the user operation intention, and select a prompt template with the highest matching degree as a basic template; Using the operation probability distribution as the importance weight of the prompt content, and prioritizing the prompt elements in the basic template; The reinforcement learning method is used to continuously optimize the prompt generation strategy. The user's interactive feedback data on historical prompt information is used as a reward signal. The dynamic adjustment rules of the prompt content are learned through the strategy network. The basic template is rewritten and supplemented according to the dynamic adjustment rules to generate personalized prompt information that conforms to the current context.

8. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Long text user opinion understanding method and system based on memory enhancement

    CN119293148A

  • Live broadcast room content identification and intelligent distribution method and system based on multi-modal fusion

    CN119377895A

  • Contextual Prediction of User Words and User Actions

    US20060247915A1

  • Composite symbolic and non-symbolic artificial intelligence system for advanced reasoning and semantic search

    US20240386015A1

  • Constructing prompt information for submission to a language model by dynamically compressing source

    WO2024243106A1

Cited By

  • User desktop interaction control device and method based on AI

    CN120371677A

  • AI-based user desktop interactive control device and method

    CN120371677B

  • Control method and system of intelligent mouse

    CN120743131A

  • Operation guiding method and device, equipment, storage medium and computer program product

    CN121029306A

  • Operation guiding method, device, equipment, storage medium and computer program product

    CN121029306B