A state diagram-based conversational AI task execution method and system
By dynamically decomposing and adjusting the state diagram, and combining user intent and cognitive analysis, the problem of insufficient dynamic interaction in conversational AI task execution is solved, achieving continuity and efficiency improvement in task guidance, and making it suitable for complex task scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGDONG SANDING INTELLIGENT INFORMATION TECH CO LTD
- Filing Date
- 2025-10-10
- Publication Date
- 2026-04-10
AI Technical Summary
Existing conversational AI task execution systems lack dynamic interaction when handling complex tasks, making it difficult to flexibly adjust task guidance paths based on user feedback. This leads to user disorientation and inefficiency, and the lack of fine-grained management of user cognitive load affects the smoothness of task completion.
By extracting user intent and task status through natural language processing, dynamically decomposing the state diagram, generating task guidance information that adapts to the user's cognitive ability, and adjusting the granularity and order of information presentation in real time, combined with user profile models and feedback processing, the deviation from the path is corrected, and context-related task instructions are generated.
It enables personalized and precise task guidance, improving user task completion rate and interactive experience, and is particularly suitable for complex, multi-stage task scenarios.
Smart Images

Figure CN121255397B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of artificial intelligence, and in particular to a state diagram-based conversational AI task execution method and system. BACKGROUND
[0002] Conversational artificial intelligence task execution is an important research direction in the field of artificial intelligence, and its core is to guide users to complete complex tasks through natural language interaction. It is widely used in intelligent customer service, education guidance, and medical assistance, and its key lies in improving user experience and task efficiency.
[0003] However, existing methods often face the problem of insufficient dynamic interaction when dealing with complex tasks, and it is difficult to flexibly adjust the task guidance path according to the real-time feedback of users, resulting in users easily losing direction or being inefficient when facing complex tasks. In addition, many systems lack fine management of user cognitive load in task guidance, which can easily reduce user engagement due to improper information presentation.
[0004] In the state diagram-based conversational artificial intelligence task execution, the core challenge lies in how to achieve dynamic segmentation management of the state diagram and adaptability of user interaction. As a structured representation of task execution, the state diagram can clearly describe each stage of the task and its transition logic. However, if the complete state diagram is presented at once, users may feel overwhelmed due to the large amount of information. For example, in an intelligent customer service scenario, a user needs to complete a multi-step account setup task. If the system directly displays a state diagram containing dozens of nodes, the user may give up the task due to the inability to quickly understand the next step. Dynamic segmentation management requires the system to gradually reveal partial information of the state diagram based on real-time interaction feedback from the user, while adaptability requires the system to adjust the level of detail and presentation of the segmented content based on the user's understanding and task execution ability. If dynamic segmentation management cannot be effectively achieved, the system will have difficulty balancing the coherence of task guidance and the control of user cognitive load; if adaptability is insufficient, the user may receive inappropriate information at different task stages, affecting the smoothness of task completion. These two technical factors are interrelated: dynamic segmentation management provides the basis for adaptability, while the implementation of adaptability in turn depends on the flexibility of segmentation management.
[0005] Therefore, how to design a mechanism that can dynamically segment and publish state diagrams based on real-time user interaction in conversational artificial intelligence task execution, and adaptively adjust the level of detail and presentation of the segmented content, becomes a key problem in this research. SUMMARY
[0006] The first aspect of the present application provides a state diagram-based conversational AI task execution method, comprising:
[0007] S1, obtaining real-time interaction data from user input through natural language processing, extracting user intent and task execution status by semantic analysis, obtaining user's current task stage and feedback content; S2, according to the user's current task stage and feedback content, decomposing the pre-established state diagram, generating a partial state diagram containing the current task node and the next node; S3, extracting node conversion logic from the partial state diagram, combining user intent to determine the priority path of task guidance, determining the segmented content of the next task guidance; S4, for the determined segmented content, obtaining the user's historical interaction record and task execution ability data, using the user portrait model to analyze the user's understanding degree, obtaining the adjustment parameter of the content detail degree; S5, dynamically generating the presentation mode of the segmented content through the adjustment parameter, controlling the granularity and order of information presentation, generating task guidance information suitable for user cognitive load; S6, extracting key task instructions from the generated guidance information, combining real-time feedback processing results to determine whether the user deviates from the expected path, if deviates, re-generate the corrected partial state diagram; S7, according to the corrected partial state diagram, adjusting the coherence of task guidance, generating the next task instruction containing context association, outputting the final task guidance content; S8, extracting user response data from the final task guidance content, combining semantic analysis to judge the user's understanding degree of the guidance content, generating updated user interaction adaptation parameters; S9, through the updated user interaction adaptation parameters, re-generate the next round of partial state diagram, output the dynamically adjusted task guidance information.
[0008] Optionally, the step S5, dynamically generating the presentation mode of the segmented content through the adjustment parameter, controlling the granularity and order of information presentation, generating task guidance information suitable for user cognitive load, comprising:
[0009] Step S51, obtaining dynamic adjustment parameters by analyzing user input data, generating initial segmented content;
[0010] Step S52, calculating the presentation granularity for the initial segmented content, determining the content hierarchical structure;
[0011] Step S53, if the presentation granularity is higher than the preset granularity threshold, adjusting the initial segmented content sequence to obtain the optimized presentation sequence;
[0012] Step S54, obtaining user cognitive load indicators from the optimized presentation sequence, judging the task guidance information adaptation degree;
[0013] Step S55, dynamically adjusting the task guidance information through the adaptation degree evaluation result, generating the final presentation content;
[0014] Step S56, extracting user feedback data from the final presentation content, updating the dynamic adjustment parameters using the linear regression model, generating the optimized segmented content.
[0015] Optionally, the step S52 of determining the content hierarchical structure according to the presentation granularity of the initial segmented content comprises: the presentation granularity is equal to the number of content units divided by the hierarchical depth.
[0016] Optionally, the step S54 of obtaining the user cognitive load index from the optimized presentation sequence to determine the task guidance information adaptation degree comprises: the cognitive load index is equal to the sequence length multiplied by the complexity coefficient.
[0017] Optionally, the step S8 of extracting user response data from the final task guidance content, combining semantic analysis to determine the understanding degree of the user to the guidance content, and generating updated user interaction adaptation parameters comprises:
[0018] Step S81: obtaining the original data stream from the user interaction behavior, separating the effective response content, and obtaining the initial response data set;
[0019] Step S82: performing semantic analysis on the initial response data set, extracting a semantic feature vector, and determining the user intention distribution;
[0020] Step S83: if the cosine similarity of the semantic feature vector is higher than the preset feature vector threshold, calculating the understanding degree score to obtain the user understanding level;
[0021] Step S84: adjusting the presentation mode of the interaction content according to the user understanding level, and generating the preliminary adaptation parameters;
[0022] Step S85: updating the interaction adaptation parameters from the preliminary adaptation parameters combined with the user feedback data to obtain the optimized parameter set;
[0023] Step S86: adjusting the interaction behavior guidance logic through the optimized parameter set to generate updated interaction data stream, and completing the user interaction optimization.
[0024] Optionally, the step S83 of calculating the understanding degree score to obtain the user understanding level if the cosine similarity of the semantic feature vector is higher than the preset feature vector threshold comprises: the understanding degree score is the proportion of the dominant intention in the intention distribution multiplied by the average value of the semantic feature vector dimension.
[0025] Optionally, the step S85 of updating the interaction adaptation parameters from the preliminary adaptation parameters combined with the user feedback data to obtain the optimized parameter set comprises:
[0026] The updated interaction adaptation parameters are calculated using the following weighted average formula:
[0027] U=(P+F) / 2,
[0028] Wherein, U is an updated interactive adaptation parameter, P is a preliminary adaptation parameter, and F is a feedback data value.
[0029] Optionally, the step S9 comprises: regenerating a next round of partial state graph by using the updated user interactive adaptation parameter, and outputting the dynamically adjusted task guide information, which comprises:
[0030] Step S91: obtaining a behavior sequence from the user interactive data.
[0031] Step S92: classifying the behavior sequence to obtain a user behavior pattern.
[0032] Step S93: if the user behavior pattern matches a preset pattern threshold, updating parameters of an OpenCV image segmentation function according to a classification result to generate an optimized state segmentation result.
[0033] Step S94: extracting a state transition sequence from the optimized state segmentation result.
[0034] Step S95: predicting a structure of a next round of state graph from the state transition sequence to obtain a partial state graph.
[0035] Step S96: calculating a state transition probability from the partial state graph.
[0036] Step S97: adjusting a task guide parameter according to the state transition probability to determine a guide parameter set.
[0037] Step S98: if a deviation of the guide parameter set from a current user behavior pattern exceeds a preset pattern deviation threshold, extracting a behavior feature from the user interactive data to update the task guide parameter to obtain an adjusted task guide parameter.
[0038] Step S99: generating a guide information sequence according to the adjusted task guide parameter to output the dynamically adjusted task guide information.
[0039] Step S910: extracting user response data from the task guide information to update the user behavior pattern.
[0040] Step S911: generating input data of a next round of OpenCV image segmentation function from the updated user behavior pattern.
[0041] Optionally, the step S96 comprises: the state transition probability is equal to a transition number of each state to a next state / total transition number.
[0042] In a second aspect, the application provides a state graph-based conversational AI task execution system for executing a state graph-based conversational AI task using the method described above, comprising: a natural language processing module for obtaining real-time interaction data from user input through natural language processing, extracting user intent and task execution state using semantic analysis, and obtaining the user's current task stage and feedback content; a state graph segmentation module for decomposing a pre-established state graph using a state graph segmentation algorithm according to the user's current task stage and feedback content, and generating a partial state graph containing the current task node and the next node; a node transition logic extraction module for extracting node transition logic from the partial state graph, determining the priority path of task guidance in combination with user intent, and determining the segmented content of the next task guidance; a user portrait analysis module for obtaining the user's historical interaction records and task execution ability data for the determined segmented content, analyzing the user's understanding level using a user portrait model, and obtaining an adjustment parameter for the content detail level; a dynamic content generation module for dynamically generating the presentation mode of the segmented content through the adjustment parameter, controlling the granularity and order of information presentation using an information layering algorithm, and generating task guidance information that adapts to the user's cognitive load; a path deviation detection module for extracting key task instructions from the generated guidance information, determining whether the user deviates from the expected path in combination with the real-time feedback processing result, and regenerating a corrected partial state graph if the user deviates; a guidance optimization module for adjusting the coherence of task guidance using a guidance optimization algorithm according to the corrected partial state graph, generating the next task instruction containing context association, and outputting the final task guidance content; a response data analysis module for extracting user response data from the final task guidance content, determining the user's understanding level of the guidance content in combination with semantic analysis, and generating updated user interaction adaptation parameters; and an interaction adaptation module for regenerating the next round of partial state graphs using the updated user interaction adaptation parameters in combination with the state graph segmentation algorithm, and outputting the dynamically adjusted task guidance information. The technical solution provided by the application has the following beneficial effects:
[0043] The application discloses a state graph-based conversational AI task execution method and system, which is aimed at the task deviation problem caused by unclear intent, unclear feedback or excessive cognitive load of users in complex task execution, extracts user intent and task state through semantic analysis, and generates a dynamic task guidance path in combination with a state graph segmentation algorithm. The application uses a user portrait model to analyze the user's understanding level, dynamically adjusts the granularity and order of information presentation, and ensures that the guidance content adapts to the user's cognitive ability. At the same time, through real-time feedback processing and a guidance optimization algorithm, the deviated path is corrected and context-associated task instructions are generated, thereby improving the coherence and efficiency of task execution.
[0044] The application realizes personalized and accurate task guidance through adaptive adjustment and dynamic optimization, significantly improves user task completion rate and interaction experience, and is particularly suitable for complex multi-stage task scenarios. BRIEF DESCRIPTION OF DRAWINGS
[0045] Figure 1 A flowchart of a state diagram-based conversational AI task execution method of the application.
[0046] Figure 2 A schematic diagram of a state diagram-based conversational AI task execution method of the application.
[0047] Figure 3 Another schematic diagram of a state diagram-based conversational AI task execution method of the application.
[0048] Figure 4 A structural schematic diagram of a state diagram-based conversational AI task execution system of the application. DETAILED DESCRIPTION
[0049] In order for those skilled in the art to better understand the technical solutions in the specification, the technical solutions in the specification will be described clearly and completely in the following with reference to the drawings in the embodiments of the specification. Obviously, the described embodiments are only some of the embodiments of the specification, not all. Based on the embodiments in the specification, all other embodiments obtained by those skilled in the art without creative labor should be within the scope of protection of the specification.
[0050] As Figures 1-3 shown, the first aspect of the application provides a state diagram-based conversational AI task execution method, which comprises:
[0051] S1, obtaining real-time interaction data from user input through natural language processing, extracting user intent and task execution state by semantic analysis, obtaining user current task stage and feedback content.
[0052] Optionally, this step further comprises:
[0053] Step S11, obtaining real-time interaction data from user input through natural language processing, extracting user intent and task state by using a word segmentation tool, obtaining initial intent description and state description.
[0054] Step S12, if the user input contains explicit instructions, using a pre-trained BERT model to perform word segmentation and semantic encoding on the input text to obtain user intent vectors and task state vectors.
[0055] Step S13, according to the user intention vector and the task state vector, the correlation weight of the intention and the state is calculated by using a softmax function, a weighted state vector is generated, and the current task stage of the user is determined.
[0056] Step S14, if the correlation weight exceeds a preset correlation threshold, the weighted state vector is divided by a support vector machine, and a specific task stage label is obtained.
[0057] Step S15, according to the task stage label, the user feedback content is extracted from the interaction data, the keyword weight of the feedback text is calculated by using a TF-IDF vectorizer, and a feedback keyword vector is obtained.
[0058] Step S16, the sentiment tendency of the feedback keyword vector is analyzed by using a TextBlob tool, the positive and negative emotions of the feedback content are judged, and the satisfaction of the user to the task stage is determined.
[0059] Step S17, according to the satisfaction result, the state record in the user interaction data is updated, the dynamic adjustment parameter of the task stage is generated by using the updated state record, and the subsequent interaction process is optimized according to the adjustment parameter.
[0060] For example, natural language processing extracts real-time interaction data from user input, and the core is to understand user intention and task state.
[0061] For example, in an online customer service system, the user inputs “I want to query the order status, but the page shows an error”, and the input can be split into keywords such as “query”, “order status”, “page”, “error” by a word segmentation tool such as Jieba, and the initial intention is “query order status” and the task state is “encounter problem”. This word segmentation method can quickly capture user demand and reduce ambiguity, providing clear input for subsequent processing.
[0062] In a possible implementation, if the user input contains an explicit instruction such as “help me check the status of order 12345”, a pre-trained BERT model will perform word segmentation and semantic encoding on the text to generate an intention vector and a task state vector.
[0063] For example, BERT encodes “check order 12345” as a vector representing the query intention, and the state vector reflects the “to be queried” state. The vector dimension may be 768, which contains semantic information. The correlation weight of the two vectors is calculated by using a softmax function. Assuming that the correlation weight of the query intention and the to-be-queried state is 0.85, which exceeds the preset correlation threshold of 0.7, indicating that the user clearly wants to enter the order query stage. This weight calculation ensures that the system accurately determines the current task stage of the user and avoids misjudgment.
[0064] Specifically, the SVM classifies the weighted state vector into a task phase label, such as "querying", "pending", or "completed".
[0065] For example, the user inputs "Order 12345 has not arrived", and the SVM may classify it as the "logistics tracking" phase. The SVM ensures accurate classification through high-dimensional space division, adapting to complex semantic scenarios. This step effectively maps user needs to specific task processes, improving interaction efficiency.
[0066] For example, from the interaction data, the user feedback such as "query result is slow" is extracted, and the TF-IDF vectorizer calculates the keyword weight. "Slow" may have a higher weight of 0.6, reflecting the user's focus. The TextBlob tool further analyzes the feedback sentiment, determining that "slow" is a negative emotion, and concluding that the user's satisfaction with the query phase is low. This sentiment analysis can accurately capture user emotions and assist the system in optimizing services.
[0067] In one possible implementation, the state record in the interaction data is updated according to the satisfaction result.
[0068] For example, low satisfaction triggers record updates, marked as "optimize query speed". The dynamic adjustment data is generated, such as shortening the query response time to within 2 seconds. The optimized interaction process can preferentially call cached data, reducing database query time. This adjustment significantly improves user experience and reduces churn rate.
[0069] It can be understood that the above-mentioned technologies work together to form a closed loop, from intent recognition to sentiment analysis to process optimization, with each step connected to the next.
[0070] For example, the customer service system quickly identifies query intent, accurately classifies task phases, analyzes user dissatisfaction, and finally dynamically adjusts response strategies, not only improving efficiency but also enhancing user stickiness. This multi-faceted support scheme ensures that the technical effect is maximized, with a rigorous logic and adaptability to actual scenarios.
[0071] S2, according to the user's current task phase and feedback content, using a state graph segmentation algorithm to decompose the pre-established state graph, generating a partial state graph containing the current task node and the next node.
[0072] Optionally, this step further includes:
[0073] Step S21, obtain task phase information from user tasks and feedback content, load the pre-established state graph using the NetworkX library, and query the current task node based on the task phase information.
[0074] Step S22, if the current task node exists in the pre-established state diagram, the next node associated with the current task node is obtained by BFS traversal of the pre-established state diagram, and the node relationship is obtained.
[0075] Step S23, according to the node relationship, the pre-established state diagram is decomposed using the subgraph function of NetworkX to generate a partial state diagram containing the current task node and the next node.
[0076] Step S24, the state transition condition is extracted from the partial state diagram, and it is judged whether the state transition condition satisfies the constraint of the feedback content to obtain a state transition path.
[0077] Step S25, if the state transition path satisfies the constraint, the partial state diagram is adjusted by Dijkstra algorithm to determine the optimized node sequence.
[0078] Step S26, according to the optimized node sequence, the dynamic update of the task flow is generated to obtain the final partial state diagram.
[0079] For example, the pre-established state diagram can be loaded by NetworkX library to realize dynamic tracking of user task stages. The state diagram is a directed graph, the node represents the task stage, and the edge represents the transition condition between stages. Assuming that in the task management scene of an online learning platform, the user needs to complete three stages of course learning, test and certificate acquisition. The state diagram contains nodes "start learning", "complete test" and "acquire certificate", and the edges define that "test score higher than 80 points" can enter "acquire certificate" from "complete test". By loading such a state diagram, the system can clearly map the current task node of the user.
[0080] In a possible implementation, the current task node is queried based on the task stage information.
[0081] For example, the user submits the test answer, and the system confirms that the user is currently located at the "complete test" node by analyzing the feedback content. Using the BFS traversal algorithm of NetworkX, the system starts from the "complete test" node to find the associated next node "acquire certificate". BFS traversal ensures that the adjacent node is obtained in the shortest path, which is suitable for quickly positioning the next step in the task flow. The advantage of this method is that it can efficiently determine the direct subsequent stage of the task and avoid the interference of irrelevant nodes.
[0082] Specifically, the subgraph function of NetworkX is used to decompose the state diagram to generate a partial state diagram containing the current node and the next node.
[0083] For example, extract a subgraph containing only "complete test" and "get certificate" from the entire course task state graph. The subgraph retains edges and transition conditions between nodes, such as "test score higher than 80 points". This process reduces computational complexity, focuses on the core path related to the current task, and helps the system quickly respond to user needs.
[0084] For example, extract state transition conditions and determine whether they meet feedback constraints. Suppose the user submits a test score of 85 points, and the system checks the transition condition "score higher than 80 points" in the subgraph, confirming that the condition is met, and generating a state transition path from "complete test" to "get certificate". This path clearly indicates the user's task progress direction, ensuring that the system logic is consistent with the user's actual behavior. Such a judgment mechanism improves the accuracy of task management.
[0085] In one possible implementation, adjust part of the state graph through Dijkstra's algorithm to optimize the node sequence.
[0086] For example, there may be multiple paths from "complete test" to "get certificate" in the system, such as directly getting a certificate or needing to complete additional exercises. If the user feedback shows that time is tight, Dijkstra's algorithm will prefer the shortest path, i.e., directly entering "get certificate", rather than the additional exercise path. The optimized node sequence ensures efficient task flow and reduces user waiting time.
[0087] Specifically, generate dynamic updates of the task flow according to the optimized node sequence.
[0088] For example, the system generates a notification according to the "get certificate" node, prompting the user to download the certificate, and updates the user's progress record in the state graph to "completed". The final partial state graph only contains completed and upcoming nodes, clearly reflecting the task status. The benefit of such dynamic updates is to maintain the real-time nature of the task flow and improve the smoothness of the user experience.
[0089] For example, the overall advantage of the above method is to achieve precise management of task stages through state graphs and graph algorithms. Whether it is node query, path optimization or dynamic update, it revolves around user feedback and task goals, ensuring that the system response is highly consistent with user intent. This method is particularly suitable for task scenarios that require real-time tracking and adjustment, such as online learning or project management, significantly improving the flexibility and efficiency of task management.
[0090] S3, extract node transition logic from the partial state graph, combine user intent to determine the priority path of task guidance, and determine the segmented content of the next task guidance.
[0091] Optionally, this step further includes:
[0092] Step S31, obtain node transition data from the state diagram, use the breadth-first search algorithm to analyze the transition relationship between nodes, and obtain a transition logic set.
[0093] Step S32, if the transition logic set contains multiple paths, use the BERT model to analyze the input data to determine the priority path weight.
[0094] Step S33, according to the priority path weight, use the sorted function of Python to sort the path and obtain the highest weight path to determine the task guide path.
[0095] Step S34, extract the node sequence from the task guide path, use the dynamic programming algorithm to divide the node sequence, and obtain a segmented task set.
[0096] Step S35, if there are conflict nodes in the segmented task set, adjust the segmentation according to the preset node compatibility matrix to determine the optimized segmented content.
[0097] Step S36, according to the optimized segmented content, generate segmented instruction sequence of task guidance, and obtain the final task guidance output.
[0098] For example, in the task state management scenario, the state diagram is often used to describe the transition relationship between nodes in the task flow. When obtaining node transition data, the breadth-first search algorithm can be used to traverse the state diagram to ensure that all possible transition paths are identified. Assuming that a task management system is used for customer order processing, the state diagram contains nodes such as "order creation", "payment confirmation", "logistics distribution", and "order completion". The breadth-first search starts from "order creation" and identifies the next node "payment confirmation" and the possible abnormal node "order cancellation", forming a transition logic set. This way can fully cover the direct and indirect relationships between nodes, ensuring the completeness of the transition logic set.
[0099] In one possible implementation, if the transition logic set contains multiple paths, such as "order creation" to "payment confirmation" through "pending payment" or "payment audit", the BERT model is used to analyze the input data to determine the priority path weight. The input data may include user feedback, such as "customer requires fast payment" or "payment audit needs to be strict". BERT gives the "pending payment" path a higher weight through semantic analysis, as it better meets the fast processing requirement. Then, using the sorted function of Python, the path "order creation-pending payment-payment confirmation" is selected as the highest weight path, which is determined as the task guide path. This method can dynamically adjust the path selection according to the context.
[0100] Specifically, the sequence of nodes in the task guide path, such as "order creation-pending payment-payment confirmation", can be divided into a segmented task set by a dynamic programming algorithm. Dynamic programming divides the sequence into two segments, "order creation-pending payment" and "pending payment-payment confirmation", by evaluating the time cost or resource demand of each node, ensuring that each segment of tasks is independent and efficient. If there are conflicting nodes in the segmented task set, for example, "pending payment" and "payment audit" conflict due to resource competition, then the segmentation is adjusted according to the preset node compatibility matrix. The compatibility matrix may specify that "pending payment" has priority over "payment audit", thereby redefining the segments and generating optimized segmented content. This adjustment can reduce resource conflicts during task execution.
[0101] For example, the optimized segmented content can generate a segmented instruction sequence for task guidance. For the "order creation-pending payment" segment, the instruction may be "prompt the customer to complete payment"; for the "pending payment-payment confirmation" segment, the instruction is "verify payment status and update order". The final task guide output is a clear instruction sequence, ensuring that tasks are efficiently pushed forward according to the priority path. This way, the user's operation is clearly guided by the segmented instructions, improving the smoothness of task completion.
[0102] In one possible implementation, if the customer feedback emphasizes "fast delivery", the BERT model can further analyze the feedback and dynamically adjust the path weight to prefer paths that include "logistics distribution". Dynamic programming can also redivide the node sequence according to time constraints to ensure that the segmented task set meets the delivery time limit. The compatibility matrix can be dynamically updated according to business rules to adapt to different scenario requirements. This multi-level analysis and adjustment can effectively handle complex task scenarios and improve the flexibility and efficiency of task management.
[0103] S4, for the determined segmented content, obtain the user's historical interaction record and task execution ability data, analyze the user's understanding degree using the user portrait model, and obtain the adjustment parameter of the content detail degree.
[0104] Optionally, this step further includes:
[0105] Step S41, obtain the user's historical interaction data and task execution ability data from the storage system, and extract the user's behavior record and execution result of the segmented content to obtain structured user data.
[0106] Step S42, for the structured user data, use the K-means clustering algorithm for feature extraction, calculate the Euclidean distance between user behavior vectors, cluster the data into groups, and determine the user's understanding degree according to the clustering result.
[0107] Step S43, according to the user's understanding, the content detail degree requirement is judged through the preset interaction threshold value, if the user's understanding is lower than the interaction threshold value, the content detail degree is increased, and the preliminary adjustment parameter is obtained.
[0108] Step S44, for the preliminary adjustment parameter, the semantic features of the segmented content are combined, and a support vector machine algorithm is used to train a classifier, the preliminary adjustment parameter and the semantic feature vector are input, and the final adjustment parameter is output.
[0109] Step S45, the presentation mode of the segmented content is modified through the final adjustment parameter, and the content structure adapted to the user's understanding is generated.
[0110] Step S46, the feedback data of the content structure is obtained, the parameters of the K-means clustering algorithm are updated according to the feedback data, and the updated K-means clustering algorithm is obtained.
[0111] In a possible implementation, when the user historical interaction data and the task execution ability data are obtained from the storage system, the data integrity and real-time performance need to be ensured.
[0112] For example, the system records the user's click, browsing time and task completion in the task guidance system, assuming that a user completes an average of 3 tasks in the past 10 interactions, each interaction lasts an average of 2 minutes, and the completion rate is 70%. These data are extracted through database query and structured as user behavior records containing interaction frequency, task completion rate and dwell time. The execution result records the correctness of the task, such as the number of times the user selects the correct option in the segmented task. The generation of structured user data helps to provide standardized input for subsequent analysis and ensures the accuracy of behavior analysis.
[0113] Specifically, when the K-means clustering algorithm is used to extract user behavior features, the user behavior vector can be defined as a vector containing interaction frequency, completion rate and dwell time.
[0114] For example, a user vector is [3 times / day, 70%, 2 minutes], by calculating the Euclidean distance between vectors, the algorithm divides the users into three groups of high understanding, medium understanding and low understanding. Assuming that a user is divided into the low understanding group, it indicates that the behavior mode of the user is biased towards low-frequency interaction and low completion rate. This clustering method can effectively identify the ability difference of users and provide a basis for personalized content adjustment.
[0115] In an embodiment, after determining the user's understanding according to the clustering result, the content detail degree is judged through the preset interaction threshold value.
[0116] For example, the interaction threshold is set to 60% completion rate and 1.5 minutes of dwell time. If the user has a 50% completion rate and a 1-minute dwell time, it is determined that the user has low understanding, and the content detail level needs to be increased, such as changing the guide content from a brief prompt to a detailed step-by-step explanation. This adjustment is achieved through parameterization, such as setting the detail level to 1-5 levels, with level 5 corresponding to low understanding users, including more examples and explanations. This method can significantly improve user understanding and completion efficiency of tasks.
[0117] For example, when using a support vector machine algorithm in combination with the semantic features of segmented content, keywords and logical relationships in the content can be extracted as feature vectors. Assuming that a certain segmented content is "select task target", the semantic features include keywords such as "target" and "selection". The support vector machine outputs the final adjustment parameter, such as recommending a detailed description and adding a diagram, by training a classifier and inputting the preliminary adjustment parameter (such as a 5-level detail level) and the semantic feature vector. This approach ensures that the content presentation matches user needs and improves the effectiveness of task guidance.
[0118] Specifically, when generating a content structure that adapts to the user's understanding level, the presentation method can be adjusted according to the final adjustment parameter.
[0119] For example, low understanding users receive a content structure that includes step-by-step guidance, with each step containing text and image explanations, while high understanding users only need brief prompts. Feedback data such as an increase in user completion rate to 80% or an increase in dwell time to 2.5 minutes can be used to update K-means algorithm parameters, such as adjusting the initial cluster center, to optimize the accuracy of user grouping. This continuous optimization mechanism can improve the system's ability to adapt to user behavior and enhance the relevance of task guidance.
[0120] In one possible implementation, the collection and utilization of feedback data is a closed-loop guarantee of the entire process.
[0121] For example, after the user completes the task, the system records their feedback score and completion time. If the score improves from 3 to 4, it indicates that the content adjustment is effective. These data are re-input into the K-means algorithm to update the clustering model, making subsequent task guidance more tailored to the user's actual needs. This dynamic adjustment mechanism improves the system's intelligence level and the coherence of user experience by continuously learning user behavior.
[0122] S5, dynamically generating the presentation method of the segmented content by adjusting the parameters, using an information layering algorithm to control the granularity and order of information presentation, and generating task guidance information that adapts to the user's cognitive load.
[0123] Optionally, this step further includes:
[0124] Step S51, generating initial segmented content by analyzing user input data to obtain dynamic adjustment parameters.
[0125] Step S52, using K-means clustering algorithm to calculate the presentation granularity G equal to the number of content units divided by the hierarchical depth, determine the content hierarchy for the initial segmented content.
[0126] Optionally, the number of content units and the hierarchical depth are extracted from the initial segmented content.
[0127] Step S53, if the presentation granularity is higher than the preset granularity threshold, adjust the order of the initial segmented content to obtain the optimized presentation sequence.
[0128] Step S54, obtain the user cognitive load index C equal to the sequence length multiplied by the complexity coefficient from the optimized presentation sequence, judge the task guidance information adaptation degree.
[0129] Optionally, the sequence length and the complexity coefficient are extracted from the initial segmented content.
[0130] Step S55, dynamically adjust the task guidance information through the adaptation degree evaluation result, generate the final presentation content.
[0131] Step S56, extract user feedback data from the final presentation content, update the dynamic adjustment parameter using the linear regression model, and generate the optimized segmented content.
[0132] For example, when analyzing user input data, behavior patterns can be extracted by analyzing user interaction logs to generate dynamic adjustment parameters. Assuming that the user input of an education platform includes browsing time, click frequency and task completion rate, the system can extract features such as the average duration of each user browsing course, the click frequency of 3 times per minute, and the completion rate of 80%. These data are used to generate dynamic adjustment parameters to determine the granularity and presentation method of content segmentation. The initial segmented content can be generated according to the user input, for example, the course is divided into three modules: introduction, core knowledge points and exercises.
[0133] In one possible implementation, the K-means clustering algorithm is used to calculate the presentation granularity G. Assuming that the number of content units is 12 and the hierarchical depth is 3, the presentation granularity G value is 12 divided by 3 equal to 4. If the preset granularity threshold is 5, the presentation granularity G value is lower than the granularity threshold, indicating that the segmented content granularity is fine, and there is no need to adjust the order. But if the presentation granularity G value is 6, which is higher than the granularity threshold, the content order needs to be rearranged, and the core knowledge points are presented first to reduce the difficulty of user understanding.
[0134] For example, the optimized presentation sequence can place the introduction at the beginning, followed by the core knowledge points, and the exercise module at the end, ensuring clear content logic.
[0135] Specifically, the calculation of the cognitive load indicator C is based on the optimization of the presentation sequence. Assuming the sequence length is 10 content units, the complexity coefficient is 0.8, and the cognitive load indicator C value is 10 times 0.8, which equals 8. If the preset cognitive load threshold is 10, the cognitive load indicator C value indicates that the user's cognitive load is moderate, and the task guidance information adaptation degree is high.
[0136] For example, the task guidance information can be designed as concise prompt text, such as "Please read the core knowledge points first, and then try the exercises", to avoid lengthy explanations. Conversely, if the cognitive load indicator C value is 12, the guidance information needs to be simplified, such as reducing the number of prompt text, to ensure that the user can easily understand.
[0137] For example, when dynamically adjusting the task guidance information, the content presentation form can be adjusted according to the adaptation degree evaluation results. If the evaluation shows that the user prefers visual content, the system can increase the number of charts or video guides.
[0138] For example, in an educational platform, if user feedback shows that they prefer video explanations, the system can replace the text knowledge points with a 3-minute video module to ensure that the content is easier to absorb. After the final presentation content is generated, user feedback data is extracted, such as the user's viewing time of the video module being 90% and the completion rate of the text module being only 60%. These data are used to update the dynamic adjustment parameters through a linear regression model.
[0139] For example, model analysis shows that the weight of the video module should be increased to 0.7 and the weight of the text module should be reduced to 0.3, thereby optimizing the segmented content.
[0140] In one possible implementation, continuous collection of feedback data can further optimize the content.
[0141] For example, if the user's correct rate for completing the exercise module is 85%, it indicates that the content difficulty is moderate, and the system can maintain the current segmentation granularity. If the correct rate drops to 60%, additional guidance information needs to be added, such as example question explanations before the exercises. This way ensures that the content always meets the user's needs, improving learning efficiency and satisfaction.
[0142] S6, from the generated guidance information, extract key task instructions, and combine real-time feedback processing results to determine whether the user deviates from the expected path. If deviated, re-generate the corrected partial state diagram.
[0143] Optionally, this step further includes:
[0144] Step S61, obtain user instructions from input data, parse text structure using spaCy, extract key task descriptions, and obtain task instruction set.
[0145] Step S62, according to the task instruction set, match from the preset task template library to determine the expected execution path of the task.
[0146] Step S63, real-time feedback data is obtained from the expected execution path, noise is removed by using Pandas, and a standardized feedback dataset is obtained.
[0147] Step S64, if the cosine similarity of the standardized feedback dataset and the expected execution path is lower than the preset execution path threshold, it is judged that the user behavior deviates, and a deviation state identifier is obtained.
[0148] Step S65, according to the deviation state identifier, a state graph corresponding to the current feedback data is generated by using Hidden Markov Model, and a preliminary state graph is obtained.
[0149] Step S66, for the preliminary state graph, the nodes that do not conform to the preset path are adjusted by using Graphviz, and a corrected state graph is generated.
[0150] Step S67, the task instruction set is updated through the corrected state graph, and an adjusted execution path is obtained.
[0151] For example, in the field of task instruction processing, text analysis based on user input is a core link. When spaCy is used to analyze the structure of the text, the natural language input by the user is decomposed into words, phrases and syntactic relationships, and the key task description is extracted.
[0152] For example, the user inputs "arrange a meeting tomorrow morning and discuss project progress", and spaCy identifies "arrange a meeting" and "discuss project progress" as core tasks, and generates a task instruction set. This process decomposes complex sentences into operational task units through part-of-speech tagging and dependency syntax analysis, which helps to clarify the user's intention.
[0153] In one possible implementation, when matching the expected execution path from the task template library, the key description of the task instruction set can be used to search for the preset template.
[0154] For example, for the "arrange a meeting" task, the template library may include sub-tasks such as "meeting time arrangement" and "participant confirmation", forming an initial execution path. This path design is based on historical task data and can quickly generate an execution scheme that conforms to the user's habits.
[0155] Specifically, when obtaining real-time feedback data and using Pandas to process noise, it is assumed that the user feedback includes "meeting time adjustment to afternoon", and Pandas filters out irrelevant information such as adverbs or repetitive descriptions to generate a standardized feedback dataset.
[0156] For example, the original feedback may contain "Please change the meeting to the afternoon, thank you", and after processing, only "Meeting time is adjusted to the afternoon" is retained. This step ensures that the data is clear and easy to analyze later.
[0157] In one possible implementation, when calculating the cosine similarity between the standardized feedback dataset and the expected execution path, if the similarity is lower than the execution path threshold of 0.8, it indicates that the user behavior deviates.
[0158] For example, the expected path is "morning meeting", and the feedback requires "afternoon meeting", and the similarity may drop to 0.6, triggering the deviation state identification. This judgment method ensures that the system can timely discover changes in user demand through quantitative comparison.
[0159] For example, when generating a state diagram based on Hidden Markov Model, the system will construct a state transition sequence according to the feedback data. Assuming that the feedback shows that the user adjusts the meeting time multiple times, the state diagram may contain nodes such as "time pending" and "time confirmed". This model shows the user behavior trajectory clearly through probability derivation of state changes, which facilitates the system to understand dynamic demand.
[0160] Specifically, when adjusting the state diagram using Graphviz, nodes that do not conform to the preset path can be modified.
[0161] For example, if the state diagram shows that the "time pending" node remains unresolved, Graphviz will optimize the node connection to generate a "time confirmed" node that conforms to the preset path better. This visual adjustment ensures that the state diagram is logically clear and reduces invalid states.
[0162] In one possible implementation, when updating the task instruction set, the modified state diagram generates a new execution path.
[0163] For example, based on the "afternoon meeting" feedback, the system updates the instruction set to "arrange an afternoon meeting and confirm the attendees". This dynamic update method ensures that the task instructions always meet the latest user demand, improving the adaptability of task execution.
[0164] For example, the feedback data may also contain user supplements to the meeting content, such as "add budget discussion". The system extracts these data to rematch the template library and generates a path containing the "budget discussion" subtask. This method continuously optimizes the instruction set to improve the flexibility and accuracy of task guidance.
[0165] S7, according to the modified part of the state diagram, the coherence of the task guidance is adjusted by using a guidance optimization algorithm, a next task instruction containing context association is generated, and the final task guidance content is output.
[0166] Optionally, this step further includes:
[0167] Step S71, obtain node states and edge weights from the state graph correction data, use the Pandas library to remove outliers, and obtain a standardized state data set.
[0168] Step S72, by standardizing the state data set, use the Apriori algorithm to extract the context association pattern between task instructions, and determine the instruction sequence feature.
[0169] Step S73, if the instruction sequence feature does not match the preset coherence threshold, use genetic algorithm to adjust the instruction order, and obtain the optimized instruction sequence.
[0170] Step S74, according to the optimized instruction sequence, generate the next task instruction containing context association, and output the preliminary task guidance content.
[0171] Step S75, extract semantic features from the preliminary task guidance content, use cosine similarity calculation to verify the relevance with the state graph correction data, and judge the validity of the guidance content.
[0172] Step S76, if the guidance content validity passes the verification, merge the optimized instruction sequence and context information through Jupyter Notebook to obtain the final task guidance content.
[0173] Step S77, use Kafka to transmit the final task guidance content to the target execution module, complete the task guidance deployment.
[0174] For example, from the state graph correction data, obtain node states and edge weights, use the Pandas library to remove outliers, and obtain a standardized state data set.
[0175] For example, in a task management system, the state graph represents the process of tasks from "to be processed" to "completed", the node states may include "to be processed", "in progress", "completed", and the edge weights reflect the priority or time consumption of task conversion. Using the Pandas library, outliers can be removed through statistical analysis, such as a task that takes much longer than the average, which may be due to data entry errors and needs to be removed to ensure data accuracy. This can improve the reliability of subsequent analysis. By standardizing the state data set, use the Apriori algorithm to extract the context association pattern between task instructions, and determine the instruction sequence feature.
[0176] For example, in a task management system, the Apriori algorithm can analyze historical task data and discover that the transition from "pending" to "in progress" is often accompanied by a "allocate resources" instruction. By mining these patterns, the dependencies between instructions can be clarified, such as "allocate resources" often being followed by "start execution." This helps optimize task scheduling logic and ensures that the instruction sequence conforms to actual business needs. If the characteristics of the instruction sequence do not match a preset coherence threshold, a genetic algorithm is used to adjust the instruction order to obtain an optimized instruction sequence.
[0177] For example, if it is found that "start execution" is not followed by "allocate resources" but instead jumps to "complete" incorrectly, the genetic algorithm can adjust the order of instructions through iterative optimization to ensure the continuity of the task flow.
[0178] Preferably, this adjustment reduces logical errors during task execution and improves process efficiency. Based on the optimized instruction sequence, a next task instruction containing contextual relationships is generated, and preliminary task guidance content is output.
[0179] For example, based on the optimized sequence, the system generates the instruction "Start the task immediately after resource allocation," along with context such as "Resource availability needs to be confirmed." This ensures the instruction is clear and actionable. Semantic features are extracted from the initial task guidance content, and cosine similarity calculation is used to verify the correlation with the state diagram correction data, thus determining the validity of the guidance content.
[0180] For example, the semantic vector of the "allocate resources" instruction is extracted and compared with the cosine similarity of the transition vector from "pending" to "in progress" in the state diagram. If the similarity is higher than the transition vector threshold, it indicates that the guidance content and state are similar. Figure 1 This ensures the generated instructions closely match the actual task flow. The optimized instruction sequence is then merged with context information using Jupyter Notebook to obtain the final task guidance content.
[0181] For example, in Jupyter Notebook, instruction sequences and context information are integrated into a visual flowchart, making it easier for users to intuitively understand task steps. This approach improves the readability and executability of instructions. The final task guidance content is then transmitted to the target execution module using Kafka, completing the task guidance and deployment.
[0182] For example, Kafka pushes task instructions to the execution module in real time, ensuring that the task management system can respond and execute instructions quickly.
[0183] Preferably, this approach supports high-concurrency task processing, improving system real-time performance and stability.
[0184] S8, extracting user response data from the final task guidance content, combining semantic analysis to judge the user's understanding of the guidance content, and generating updated user interaction adaptation parameters.
[0185] Optionally, this step also includes:
[0186] Step S81, obtaining the original data stream from the user interaction behavior, using regular expressions to separate the effective response content, and obtaining the initial response data set.
[0187] Step S82, performing semantic analysis on the initial response data set by BERT, extracting semantic feature vectors, and determining user intent distribution.
[0188] Step S83, if the cosine similarity of the semantic feature vector is higher than the preset feature vector threshold, calculating the understanding score according to the intent distribution, the understanding score S being the proportion of the dominant intent in the intent distribution multiplied by the average value of the semantic feature vector dimension, and obtaining the user understanding level.
[0189] Step S84, adjusting the presentation mode of the interaction content according to the user understanding level, and generating preliminary adaptation parameters using K-nearest neighbor algorithm.
[0190] Step S85, updating the interaction adaptation parameters from the preliminary adaptation parameters combined with the user feedback data, and obtaining the optimized parameter set.
[0191] Preferably, the following weighted average formula is used to calculate the updated interaction adaptation parameters:
[0192] U=(P+F) / 2,
[0193] Wherein, U is the updated interaction adaptation parameter, P is the preliminary adaptation parameter, and F is the feedback data value.
[0194] Step S86, adjusting the interaction behavior guidance logic through the optimized parameter set, generating updated interaction data stream, and completing user interaction optimization.
[0195] Illustratively, the original data stream is obtained from the user interaction behavior, the effective response content is separated by using regular expressions, and the initial response data set is obtained.
[0196] For example, in a task management system, the user generates interaction behavior by clicking, inputting text or switching pages, and the original data stream may include the timestamp of the user clicking the "submit" button, the input task description text, etc. Regular expressions can be used to filter out effective response content, such as extracting user input task title or description, and filtering out invalid empty input or format error text.
[0197] Preferably, specific patterns such as "task name:. *" or "priority: high | medium | low" are matched through regular expression to obtain an initial response dataset containing fields such as task name, priority, etc. This approach ensures clear data structure and provides a reliable foundation for subsequent analysis. Through BERT, semantic parsing is performed on the initial response dataset to extract semantic feature vectors and determine user intent distribution.
[0198] For example, the user's input text "urgent complete report" is parsed by BERT into a semantic feature vector, capturing the semantic relationship between "urgent" and "report".
[0199] It should be noted that BERT converts text into high-dimensional vectors through pre-trained models, which can identify the association between "urgent" and high-priority tasks, and generate intent distribution such as 80% for "create high-priority task" and 20% for "query task status". This semantic parsing helps accurately understand user needs and avoid ambiguity. If the cosine similarity of the semantic feature vector is higher than the preset feature vector threshold, the understanding degree score is calculated according to the intent distribution.
[0200] For example, assuming the feature vector threshold is 0.85, if the cosine similarity of the two semantic vectors is 0.9, it indicates that the user's intent is highly consistent. The understanding degree score S is the dominant intent proportion 0.8 multiplied by the average value of the vector dimension, such as 300-dimensional semantic feature vector average value 1.2, resulting in an understanding degree score S = 0.96.
[0201] Preferably, a high score indicates that the user's intent is clear, such as the user explicitly requesting "create task", and the system can directly generate relevant instructions, rather than ambiguous intent that needs further confirmation when the score is low. According to the user's understanding level, the K-nearest neighbor algorithm is used to adjust the presentation mode of the interaction content and generate preliminary adaptation parameters.
[0202] For example, if the understanding degree score S = 0.96, it indicates that the user is familiar with system operation, and the K-nearest neighbor algorithm can recommend a concise interface based on historical interaction data, such as reducing prompt text and directly displaying the task creation page. Conversely, if the understanding degree score S is low, a detailed guidance page may be presented.
[0203] It should be noted that K-nearest neighbors find the most similar K = 5 neighbors by comparing the current user behavior with historical behavior, determine the priority of the presentation mode, such as adjusting font size or button position, and generate preliminary adaptation parameters. From the preliminary adaptation parameters, update the interaction adaptation parameters by combining user feedback data.
[0204] For example, the user feedback shows a preference for larger font size, and the preliminary parameter of font size 12px combined with the feedback value 16px is calculated to obtain the updated parameter 14px through the weighted average formula.
[0205] Preferably, such an update balances system recommendations and user preferences, ensuring personalization of the interactive experience. By optimizing the parameter set, the interactive behavior guidance logic is adjusted, generating an updated interactive data stream.
[0206] For example, based on a 14px font size, the system adjusts the display logic of the task creation interface, generating an interactive data stream containing the new font size, simplified prompts, and ultimately presenting them to the user.
[0207] It should be noted that such an optimized data stream can more efficiently guide the user to complete task creation, improving the smoothness of the interaction.
[0208] S9, by updating the user interaction adaptation parameters, combined with the state graph segmentation algorithm, the next round of partial state graphs is regenerated, and the dynamically adjusted task guidance information is output.
[0209] Optionally, this step also includes:
[0210] Step S91, obtain the behavior sequence from the user interaction data.
[0211] Step S92, classify the behavior sequence using the k-means clustering algorithm to obtain the user behavior pattern.
[0212] Step S93, if the user behavior pattern matches the preset pattern threshold, update the parameters of the OpenCV image segmentation function according to the classification result to generate an optimized state segmentation result.
[0213] Step S94, extract the state transition sequence from the optimized state segmentation result.
[0214] Step S95, use the Markov chain model to predict the structure of the next round of state graphs from the state transition sequence to obtain partial state graphs.
[0215] Step S96, calculate the state transition probability from the partial state graphs.
[0216] Optionally, the state transition probability is equal to the number of transitions from each state to the next state / total number of transitions.
[0217] Step S97, adjust the task guidance parameters using the Bellman equation solver according to the state transition probability to determine the guidance parameter set.
[0218] Step S98, if the guidance parameter set deviates from the current user behavior pattern by more than the preset pattern deviation threshold, extract the behavior features from the user interaction data to update the task guidance parameters, and obtain the adjusted task guidance parameters.
[0219] Step S99, generate guidance information sequence according to adjusted task guidance parameters, output dynamically adjusted task guidance information.
[0220] Step S910, extract user response data from task guidance information, update user behavior pattern.
[0221] Step S911, generate input data for next round of OpenCV image segmentation function from updated user behavior pattern.
[0222] For example, when obtaining behavior sequences from user interaction data, we can record the user's click, swipe and dwell time operations on the interaction interface to form an ordered behavior sequence. Assuming that the user operates in an image processing application, the behavior sequence may include "select image - adjust brightness - apply filter - save image". These behaviors are recorded by timestamp and operation type to form a complete behavior sequence dataset. This way can clearly capture the user's operation habits and provide a basis for subsequent analysis.
[0223] In one possible implementation, when using k-means clustering algorithm to classify behavior sequences, the operation type and time interval in the behavior sequence can be used as feature vectors.
[0224] For example, user A's sequence may be "select image and dwell for 2 seconds - adjust brightness for 5 seconds - apply filter for 3 seconds", while user B may be "select image and dwell for 10 seconds - save directly". Through k-means clustering, users can be classified into two behavior patterns: "fast operation type" and "cautious adjustment type". This classification helps to identify the user's operation preference, thereby providing a basis for personalized guidance.
[0225] Specifically, if the user behavior pattern matches the preset pattern threshold, for example, the total operation time of "fast operation type" users is less than 10 seconds, the parameters of OpenCV image segmentation function can be updated according to the classification results.
[0226] For example, for fast operation type users, the segmentation threshold of OpenCV can be set to lower sensitivity to speed up processing, while cautious adjustment type users may need higher segmentation accuracy to ensure the preservation of image details. This parameter adjustment can improve the smoothness and accuracy of user experience.
[0227] In one embodiment, when extracting state transition sequences from the optimized state segmentation results, different stages of image segmentation can be regarded as states.
[0228] For example, the initial image loading is state A1, the foreground separation after segmentation is state A2, and the background separation is state A3. The state transition sequence can be A1 to A2, and then to A3. Based on this, a Markov chain model is used to predict the structure of the next round of state diagram.
[0229] For example, analysis shows that 80% of users go directly from A1 to A2, and the next round of state diagram is predicted to be dominated by A2. This prediction helps to optimize the guidance logic in advance and reduce user waiting time.
[0230] For example, when calculating the state transition probability, the number of transitions from each state to the next state can be counted.
[0231] For example, in 100 interactions, there are 80 transitions from A1 to A2, with a probability of 0.8. This probability is used to adjust the task guidance parameters in the Bellman equation solving tool.
[0232] For example, if the probability shows that users tend to complete segmentation quickly, the system will preferentially recommend simplified guidance information, such as "click to confirm segmentation" instead of detailed adjustment options, thereby improving operation efficiency.
[0233] Specifically, if the deviation between the guidance parameter set and the current user behavior pattern exceeds the pattern deviation threshold, for example, a fast operation type user is incorrectly assigned complex guidance, the system will extract behavior characteristics from interaction data, such as the user frequently skipping complex options, and adjust the guidance parameters to more concise prompts. This dynamic adjustment ensures that the guidance information is highly matched with the user's habits.
[0234] In one possible implementation, when generating a sequence of guidance information according to the adjusted task guidance parameters, a prompt sequence similar to "fast segmentation mode enabled, please confirm" can be generated. These sequences are dynamically generated based on user behavior patterns to ensure that the information is concise and intuitive. The behavior patterns are updated from user response data, for example, it is found that users prefer automatic segmentation, and the system will further optimize the input data to preferentially provide image data for automatic segmentation, thereby forming an efficient interaction closed loop.
[0235] For example, the system can generate a sequence of guidance information based on the adjusted task guidance parameters, such as "fast segmentation mode enabled, please confirm" and "click to confirm segmentation". These sequences are dynamically generated based on user behavior patterns to ensure that the information is concise and intuitive. The behavior patterns are updated from user response data, for example, it is found that users prefer automatic segmentation, and the system will further optimize the input data to preferentially provide image data for automatic segmentation, thereby forming an efficient interaction closed loop. Figure 4As shown, in the second aspect of the present application, a state diagram-based conversational AI task execution system is provided, which performs a state diagram-based conversational AI task by using the method as described above, and mainly comprises: a natural language processing module, which is used to obtain real-time interaction data from user input by natural language processing, extract user intent and task execution state by using semantic analysis, and obtain the current task stage and feedback content of the user; a state graph segmentation module, which is used to decompose a pre-established state graph by using a state graph segmentation algorithm according to the current task stage and feedback content of the user, and generate a partial state graph containing the current task node and the next node; a node conversion logic extraction module, which is used to extract node conversion logic from the partial state graph, determine the segmented content of the next task guidance by combining the user intent to judge the priority path of the task guidance, and determine the segmented content of the next task guidance; a user portrait analysis module, which is used to obtain the historical interaction records and task execution ability data of the user for the determined segmented content, analyze the user understanding degree by using a user portrait model, and obtain the adjustment parameter of the content detail degree; a dynamic content generation module, which is used to dynamically generate the presentation mode of the segmented content by using the adjustment parameter, control the granularity and order of information presentation by using an information layering algorithm, and generate task guidance information that is adapted to the cognitive load of the user; a path deviation detection module, which is used to extract key task instructions from the generated guidance information, judge whether the user deviates from the expected path by combining the real-time feedback processing result, and regenerate a corrected partial state graph if the user deviates; a guidance optimization module, which is used to adjust the coherence of the task guidance by using a guidance optimization algorithm according to the corrected partial state graph, generate the next task instruction containing context association, and output the final task guidance content; a response data analysis module, which is used to extract user response data from the final task guidance content, judge the understanding degree of the user to the guidance content by combining semantic analysis, and generate updated user interaction adaptation parameters; an interaction adaptation module, which is used to regenerate the next round of partial state graph by using the updated user interaction adaptation parameters and combining the state graph segmentation algorithm, and output the dynamically adjusted task guidance information. The preferred embodiments of the present application disclosed above are only used to help explain the present application. The preferred embodiments do not describe all the details, nor limit the present application to the specific embodiments. Obviously, many modifications and changes can be made according to the contents of the present application. The present application selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present application, so that those skilled in the art can well understand and utilize the present application. The present application is limited by the claims and their full scope and equivalents.
Claims
1. A conversational AI task execution method based on state diagrams, characterized in that, The method includes: S1 obtains real-time interactive data from user input through natural language processing, extracts user intent and task execution status through semantic analysis, and obtains the user's current task stage and feedback content; S2, based on the user's current task stage and feedback content, decompose the pre-established state diagram and generate a partial state diagram containing the current task node and the next node; S3: Extract node transition logic from a partial state diagram, combine it with user intent to determine the priority path of task guidance, and determine the segmented content of the next task guidance step. S4. For the defined segmented content, obtain the user's historical interaction records and task execution ability data, use the user profile model to analyze the user's level of understanding, and obtain the adjustment parameters for the level of content detail; S5 dynamically generates segmented content presentation by adjusting parameters, controls the granularity and order of information presentation, and generates task guidance information that adapts to the user's cognitive load. S6: Extract key task instructions from the generated guidance information, and combine the real-time feedback processing results to determine whether the user has deviated from the expected path. If the user has deviated, regenerate the corrected partial state diagram. S7. Based on the revised partial state diagram, adjust the coherence of the task guidance, generate the next task instruction containing contextual relationships, and output the final task guidance content. S8 extracts user response data from the final task guidance content, combines semantic analysis to determine the user's understanding of the guidance content, and generates updated user interaction adaptation parameters. S9 regenerates the next round of partial state diagrams by updating the user interaction adaptation parameters and outputs dynamically adjusted task guidance information; Step S5 involves dynamically generating segmented content presentation methods by adjusting parameters, controlling the granularity and order of information presentation, and generating task guidance information adapted to the user's cognitive load, including: Step S51: By parsing user input data, obtain dynamic adjustment parameters and generate initial segmented content; Step S52: Calculate the presentation granularity for the initial segmented content and determine the content layering structure; Step S53: If the granularity of the presentation is higher than the preset granularity threshold, the order of the initial segmented content is adjusted to obtain an optimized presentation sequence. Step S54: Obtain user cognitive load indicators from the optimized presentation sequence and determine the suitability of task guidance information; Step S55: Based on the adaptation evaluation results, dynamically adjust the task guidance information and generate the final presentation content; Step S56: Extract user feedback data from the final presented content, use a linear regression model to update the dynamically adjusted parameters, and generate optimized segmented content.
2. The dialogic AI task execution method based on state diagrams according to claim 1, characterized in that, Step S52, which calculates the presentation granularity for the initial segmented content and determines the content layering structure, includes: the presentation granularity is equal to the number of content units divided by the layer depth.
3. The dialogic AI task execution method based on a state diagram according to claim 2, characterized in that, Step S54, obtaining the user cognitive load index from the optimized presentation sequence and determining the suitability of the task guidance information, includes: the cognitive load index is equal to the sequence length multiplied by the complexity coefficient.
4. The dialogic AI task execution method based on state diagrams according to claim 1, characterized in that, Step S8 involves extracting user response data from the final task guidance content, combining it with semantic analysis to determine the user's level of understanding of the guidance content, and generating updated user interaction adaptation parameters, including: Step S81: Obtain the raw data stream from user interaction behavior, separate the valid response content, and obtain the initial response dataset; Step S82: Perform semantic parsing on the initial response dataset, extract semantic feature vectors, and determine the distribution of user intent; Step S83: If the cosine similarity of the semantic feature vector is higher than the preset feature vector threshold, then calculate the understanding score to obtain the user's understanding level. Step S84: Adjust the presentation of interactive content according to the user's level of understanding and generate preliminary adaptation parameters; Step S85: Based on the initial adaptation parameters and user feedback data, update the interaction adaptation parameters to obtain the optimized parameter set; Step S86: Adjust the interactive behavior guidance logic by optimizing the parameter set, generate an updated interactive data stream, and complete the user interaction optimization.
5. The dialogic AI task execution method based on a state diagram according to claim 4, characterized in that, In step S83, if the cosine similarity of the semantic feature vector is higher than the preset feature vector threshold, the understanding score is calculated to obtain the user's understanding level, including: the understanding score is the proportion of the dominant intent in the intent distribution multiplied by the average dimension of the semantic feature vector.
6. The dialogic AI task execution method based on a state diagram according to claim 5, characterized in that, Step S85 involves updating the interaction adaptation parameters from the initial adaptation parameters and combining them with user feedback data to obtain an optimized parameter set, including: The updated interaction adaptation parameters are calculated using the following weighted average formula: U=(P+F) / 2, Where U represents the update interaction adaptation parameters, P represents the initial adaptation parameters, and F represents the feedback data value.
7. The dialogic AI task execution method based on state diagrams according to claim 1, characterized in that, Step S9 involves regenerating the next round of partial state diagrams using the updated user interaction adaptation parameters and outputting dynamically adjusted task guidance information, including: Step S91: Obtain the behavior sequence from the user interaction data; Step S92: Classify the behavior sequences to obtain user behavior patterns; Step S93: If the user behavior pattern matches the preset pattern threshold, update the parameters of the OpenCV image segmentation function according to the classification result and generate an optimized state segmentation result. Step S94: Extract the state transition sequence from the optimized state segmentation result; Step S95: Predict the structure of the next round of state diagram from the state transition sequence to obtain a partial state diagram; Step S96: Calculate the state transition probabilities from the partial state diagram; Step S97: Adjust the task guidance parameters according to the state transition probability to determine the guidance parameter set; Step S98: If the deviation between the guidance parameter set and the current user behavior pattern exceeds a preset pattern deviation threshold, then extract behavioral features from the user interaction data to update the task guidance parameters and obtain the adjusted task guidance parameters. Step S99: Generate a sequence of guidance information based on the adjusted task guidance parameters, and output the dynamically adjusted task guidance information; Step S910: Extract user response data from the task guidance information and update the user behavior pattern; Step S911: Generate input data for the next round of OpenCV image segmentation functions from the updated user behavior patterns.
8. The dialogic AI task execution method based on a state diagram according to claim 7, characterized in that, Step S96, calculating the state transition probability from the partial state diagram, includes: the state transition probability is equal to the number of transitions from each state to the next state / the total number of transitions.
9. A conversational AI task execution system based on state diagrams, characterized in that, The system performs state-graph-based conversational AI tasks using the method described in any one of claims 1-8, the system comprising: The natural language processing module is used to obtain real-time interactive data from user input through natural language processing, extract user intent and task execution status through semantic analysis, and obtain the user's current task stage and feedback content. The state diagram segmentation module is used to decompose a pre-established state diagram based on the user's current task stage and feedback content, and generate a partial state diagram that includes the current task node and the next node. The node transition logic extraction module is used to extract node transition logic from a partial state diagram, combine it with user intent to determine the priority path of task guidance, and determine the segmented content of the next task guidance step. The user profile analysis module is used to obtain users' historical interaction records and task execution ability data for a given segment of content, and to analyze the user's level of understanding using a user profile model to obtain adjustment parameters for the level of detail in the content. The dynamic content generation module is used to dynamically generate segmented content presentation by adjusting parameters. It uses an information layering algorithm to control the granularity and order of information presentation and generate task guidance information that adapts to the user's cognitive load. The path deviation detection module is used to extract key task instructions from the generated guidance information, and combine the real-time feedback processing results to determine whether the user has deviated from the expected path. If the user has deviated, a corrected partial state diagram will be regenerated. The guidance optimization module is used to adjust the coherence of task guidance based on the corrected partial state diagram using the guidance optimization algorithm, generate the next task instruction containing contextual association, and output the final task guidance content. The response data analysis module is used to extract user response data from the final task guidance content, combine semantic analysis to determine the user's understanding of the guidance content, and generate updated user interaction adaptation parameters. The interaction adaptation module is used to regenerate the next round of partial state diagrams by combining the updated user interaction adaptation parameters with the state diagram segmentation algorithm, and output dynamically adjusted task guidance information.
Citation Information
Patent Citations
Conversational AI multi-intention understanding and decision-making method for tourism scene
CN120429392A
Multi-modal task interaction assisting method and system and computer equipment
CN120704520A