CN-121743608-B - Dynamic travel scenario task logic judgment method based on vertical large model and user feedback
Abstract
The invention belongs to the technical field of travel scenario task management, and discloses a dynamic travel scenario task logic judgment method based on a vertical large model and user feedback; the method comprises the steps of generating a behavior sample sequence in the execution process of a travel scenario task, constructing a user intention state vector, constructing a scenario state diagram based on a preset travel scenario task, calculating an reachable matrix, taking a static reachable matrix as a screening basis, executing dynamic constraint filtering, generating a state constraint vector, inputting a structured prompt text of a current travel scenario task node into the static reachable matrix to obtain a real-time candidate logic judgment rule set, analyzing the candidate logic judgment rule set to generate a structured conditional expression tree to form a final effective rule set, screening by using the structured conditional expression tree corresponding to the structured conditional expression tree, selecting a rule with the highest priority as a rule to be executed, updating the node, and realizing the dynamic travel scenario task logic judgment of a vertical large model and user feedback.
Inventors
- WU KEHUA
- CHEN SHIJIE
Assignees
- 源之宇宙(福建)科技集团有限公司
- 源之宇宙(福建)科技创新有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20260227
Claims (8)
- 1. A dynamic travel scenario task logic judging method for a vertical large model and user feedback is characterized by comprising the following steps: S1, acquiring behavior data of a user from a mobile terminal according to a preset time window in the execution process of a travel scenario task, and generating a behavior sample sequence; S2, based on the behavior sample sequence, extracting behavior characteristics and identifying user intention category labels, and constructing a user intention state vector; S3, constructing a scenario state diagram comprising a plurality of scenario nodes and directed edges among the nodes based on a preset travel scenario task, and calculating an reachable matrix based on the scenario state diagram; S4, identifying the current travel scenario task node of the user, based on the accessed node set and the residual available time, taking a static reachable matrix as a screening basis, and executing dynamic constraint filtering to generate a state constraint vector; S5, carrying out multi-layer vertical training based on a transducer architecture to obtain a vertical field large model with a double-task processing mode, and inputting a structured prompt text of a current travel scenario task node into the vertical field large model to obtain a real-time candidate logic judgment rule set; S6, analyzing the rule set based on candidate logic judgment, generating a structural conditional expression tree, carrying out validity check on the number of the target node of each rule, and carrying out grouping preference on the reserved rules to form a final effective rule set; S7, screening each rule in the final effective rule set by using a corresponding structured conditional expression tree, and selecting the rule with the highest priority as a rule to be executed; the behavior data comprise task node progress, explicit operation instructions, geographical track point columns and stay time information of a user, wherein the explicit operation instructions comprise completion, giving up or skipping; According to the respective time stamps of the data types, uniformly aligning the data types to the same reference time axis; taking a preset fixed duration as a time window, sliding on a reference time axis with a preset step length, and executing for each time window: Extracting core features in the time window, wherein the core features comprise the progress of task nodes at the starting time and the ending time of the time window, explicit operation instructions and the times of the explicit operation instructions, total displacement calculated by a geographical track point array and accumulated stay time around the travel scenario task nodes and related interest points, and packaging the core features together with window numbers and starting time stamps of the time window to generate a behavior sample; Sequencing a plurality of continuously generated behavior samples according to the sequence of a time window, associating each behavior sample with a travel scenario task node where a user is located in the time window, and outputting a behavior sample sequence; the structure of the structured prompt text adopts three sections, including an intention explanation section, a state constraint section and an output format constraint section; The intention explanation section is used for mapping key dimensions and intention category labels in the behavior characteristic sub-vectors into natural language texts describing the current behavior state of the user based on the user intention state vector; The state constraint segment lists the NODE number, the shortest accumulated transfer time, the scenic spot theme label and the must-reach NODE mark of each NODE in the current reachable NODE set in a tabular form based on the state constraint vector, and explicitly informs the model next_node that the must-be selected from the table NODEs; The output format constraint segment is used for definitely requiring a candidate logic judgment RULE set of model output to be represented by a RULE text with a RULE of a RULE head, an output template of the RULE text is defined as [ RULE: IF conditional expression, THEN, next_node=node number, hit_type=prompt TYPE identifier ], and the predefined prompt TYPE identifier comprises position deviation correction, rhythm acceleration, interest recommendation and safety prompt.
- 2. The method for determining the logic of the dynamic travel scenario task based on the vertical big model and the user feedback according to claim 1, wherein S2 comprises: For each behavior sample in a behavior sample sequence, acquiring behavior characteristics, wherein the behavior characteristics comprise calculating average moving speed and speed variance in a time window of the behavior sample according to a geographical track point row in the behavior sample, calculating the maximum distance of a user track deviating from a preset route according to the geographical track point row and the preset route of a current travel scenario task node, identifying the accumulated stay time of a user in a non-task target point and the number of non-task stay hot spots in the time window, combining the behavior characteristics with task progress change rate and explicit skip instruction times reflected in the behavior sample, and forming behavior characteristic sub-vectors corresponding to the behavior sample; inputting behavior feature sub-vectors into a vertical field model, and outputting at least one user intention type label which comprises lost, uninteresting, time urgent, temporary detouring and active exploration; Normalizing each dimension value in the behavior feature sub-vector to a 0-1 interval, distributing independent one-dimensional independent thermal codes for each intention type label, and splicing the two to form an intention state vector.
- 3. The method according to claim 2, wherein S3 comprises pre-decomposing the travel scenario task into a plurality of travel scenario task nodes, and defining each travel scenario task node as a node in the scenario state diagram; recording the space coordinates, recommended stay time, scenic spot theme labels and a preposed node list for each node, wherein the preposed node list comprises all preposed nodes which are needed to be completed for executing the node; judging whether a space-time reachable condition is met from a preface node to a subsequent node according to a pre-defined node execution sequence of a travel scenario task flow, if so, establishing a directed edge in the direction of the preface node to the subsequent node, and recording an attribute set for each directed edge, wherein the attribute set comprises estimated transfer time and scenario consistency weight; Based on all nodes and directed edges in the scenario state diagram, calculating a static reachable matrix of the whole diagram, wherein the calculation method of the static reachable matrix comprises the steps of identifying all possible subsequent nodes when time constraint is not considered from any given node, setting the Boolean value of the subsequent nodes in the matrix to be 1, and otherwise setting the Boolean value to be 0.
- 4. The method for judging the task logic of the dynamic travel scenario fed back by the user and the vertical large model according to claim 3, wherein the generation process of the accessed node set comprises the steps of extracting the travel scenario task nodes marked as completed or skipped according to an explicit operation instruction triggered by the user in the task execution process, and counting and combining the nodes into a set; The generation process of the residual available time comprises the steps of obtaining a task starting time stamp of a user for starting a current travel scenario task and a time stamp of a current travel scenario task node of the user, taking the difference value of the task starting time stamp and the time stamp as the used time, and subtracting the used time from the total completion time preset by the travel scenario task to obtain the residual available time; The method comprises the steps of selecting a static reachable matrix, wherein the task node of a travel scenario where a user is currently located is taken as a starting point, and querying all nodes which can reach from the starting point in the static reachable matrix and marking the nodes as a candidate node set; The dynamic constraint filtering comprises the steps of checking whether each node in a node preposed node list is contained in a visited node set or not for each node in a candidate node set, if so, reserving the node, otherwise, rejecting the node, calculating the shortest accumulated transfer time from the current travel scenario task node to the node for the reserved node, adding the shortest accumulated transfer time to the recommended residence time of the node, if the added value is less than or equal to the remaining available time, reserving the node, otherwise, rejecting the node, counting all the finally reserved nodes, and recording the nodes as a current reachable node set; The generation process of the state constraint vector comprises the steps of extracting the node number, the shortest accumulated transfer time from the current travel scenario task node to the node, the subject similarity of the node and the current travel scenario task node and the must-reach node mark for each node in the current reachable node set, combining the length-fixed sub-vectors of the node, and splicing the length-fixed sub-vectors of all the nodes in the current reachable node set according to the ascending order of the node numbers to form the state constraint vector, wherein the must-reach node mark means that if the node is defined as a forced completion node in scenario design, the value is 1, otherwise, the value is 0.
- 5. The method for judging the logic of the dynamic travel scenario task fed back by the user and the vertical large model according to claim 4 is characterized in that the vertical large model adopts a Transformer architecture as a base, proper nouns in the travel field are injected through field self-adaptive pre-training and word list expansion to form the vertical large model facing the travel scenario task, the model is set into a dual-task processing mode, comprises an intention classification mode and a rule generation mode, two input types are identified through task prefix tokens, and the corresponding modes are automatically selected; The input of the rule generation mode is a structured prompt text, the TASK prefix token is [ TASK: RULEGEN ], and the output is a candidate logic judgment rule set; The model jointly trains two types of tasks through the fine adjustment of the multi-task instruction, shares bottom parameters and automatically routes to corresponding functional branches according to task prefixes during reasoning, wherein the fine adjustment of the multi-task instruction is used for constructing an intention classification sample and a rule generation sample, the intention classification sample comprises behavior feature sub-vectors in a real user behavior log and labeled user intention labels, and the rule generation sample comprises structured prompt texts in the real user behavior log and a candidate logic judgment rule set correspondingly constructed.
- 6. The method for judging the task logic of the dynamic travel scenario with the vertical large model and the user feedback according to claim 1, wherein the forming the final effective RULE set comprises dividing the candidate logic judgment RULE set according to rows, and reserving only rows beginning with [ RULE ], extracting a conditional expression, a field value corresponding to NEXT_NODE and a field value corresponding to HINT_TYPE for each reserved row; Mapping a comparison operator and a feature name in the conditional expression to corresponding dimensions and a judgment threshold value in the user intention state vector to generate a structured conditional expression tree; Judging whether the NEXT_NODE field value exists in the current reachable NODE set, if not, discarding the rule, and if so, reserving the rule; And in the same prompt TYPE grouping, if a plurality of rules pointing to different NEXT_NODE exist, preferentially reserving one rule according to the following priority order: Priority 1, the must-reach node mark of the target node is 1; Priority 2, the topic similarity between the target node and the current node is highest; and combining all the finally reserved rules to generate a final effective rule set.
- 7. The method of claim 6, wherein mapping the comparison operator and feature names in the conditional expression to corresponding dimensions and decision thresholds in the user intent state vector generates a structured conditional expression tree, comprising: Converting each feature name in the conditional expression into a corresponding dimension index in the user intention state vector through a predefined feature-dimension mapping table; if the feature name is a continuous feature, converting an original threshold value in the conditional expression into a normalized threshold value consistent with a user intention state vector value interval according to a normalized parameter preset by the feature, and replacing the original threshold value with the normalized threshold value; Generating an abstract syntax tree based on the conditional expression character string after mapping and normalization, wherein leaf nodes of the abstract syntax tree are characteristic index nodes or constant nodes, and internal nodes are comparison operator nodes or logic operator nodes; The abstract syntax tree is packaged into a structured conditional expression tree supporting vector evaluation, wherein each node of the structured conditional expression tree contains explicit node type identification and attribute information required for evaluation.
- 8. The method for determining the dynamic travel scenario task logic based on the vertical large model and the user feedback according to any one of claims 1 to 7, wherein the filtering using the corresponding structured conditional expression tree comprises: Traversing each rule in the final effective rule set, inputting a structured conditional expression tree corresponding to the rule into a rule evaluation engine, executing subsequent traversal evaluation by taking the current user intention state vector as input, and outputting a Boolean value result, marking the rule with all the value results being True as triggerable rules, and sequencing all triggerable rules from high to low according to the following priority order: the first priority is that the must-reach node mark of the target node of the rule is 1; the second priority is that the prompt type of the rule is marked as a safety prompt; the third priority is that the topic similarity between the target node of the rule and the task node of the current travel scenario is highest; the fourth priority, namely marking the prompting type of the rule as position deviation correction, rhythm acceleration or interest recommendation; otherwise, selecting the rule that is ranked first in the final valid rule set.
Description
Dynamic travel scenario task logic judgment method based on vertical large model and user feedback Technical Field The invention relates to the technical field of travel scenario task management, in particular to a dynamic travel scenario task logic judgment method based on a vertical large model and user feedback. Background With the deep penetration of the mobile internet and the intelligent terminal in the travel scene, the travel scenario task class application based on the geographic position is increasingly popular. The application combines scenic spot tour with scenario puzzle solving and task break-in, and pushes a series of task nodes with space-time sequence and logic association to the user through the mobile terminal, so that the user is guided to complete exploration in a real scene. To enhance user experience and task completion rates, existing enterprises have begun to attempt to dynamically adjust task logic based on user real-time behavior, such as pushing auxiliary prompts when a user has stayed at a node for too long, or re-planning paths when the user deviates from a predetermined route. However, in the prior art, the real psychological state of the user cannot be accurately identified from the fuzzy and ambiguous operation signals (such as 'skip'), so that the task logic adjustment is lack of pertinence, further, the subsequent feedback data according to the multi-mode behaviors of the user is insufficient in utilization, and the real demand state of the user under the time and space is difficult to be obtained. In view of this, a dynamic travel scenario task logic judgment method with a vertical large model and user feedback is designed. Disclosure of Invention In order to overcome the defects in the prior art and achieve the purposes, the invention provides the following technical scheme that the dynamic travel scenario task logic judging method based on the vertical large model and user feedback comprises the following steps: S1, acquiring behavior data of a user from a mobile terminal according to a preset time window in the execution process of a travel scenario task, and generating a behavior sample sequence; S2, based on the behavior sample sequence, extracting behavior characteristics and identifying user intention category labels, and constructing a user intention state vector; S3, constructing a scenario state diagram comprising a plurality of scenario nodes and directed edges among the nodes based on a preset travel scenario task, and calculating an reachable matrix based on the scenario state diagram; S4, identifying the current travel scenario task node of the user, based on the accessed node set and the residual available time, taking a static reachable matrix as a screening basis, and executing dynamic constraint filtering to generate a state constraint vector; S5, carrying out multi-layer vertical training based on a transducer architecture to obtain a vertical field large model with a double-task processing mode, and inputting a structured prompt text of a current travel scenario task node into the vertical field large model to obtain a real-time candidate logic judgment rule set; S6, analyzing the rule set based on candidate logic judgment, generating a structural conditional expression tree, carrying out validity check on the number of the target node of each rule, and carrying out grouping preference on the reserved rules to form a final effective rule set; And S7, screening each rule in the final effective rule set by using the corresponding structured conditional expression tree, selecting the rule with the highest priority as the rule to be executed, and updating the nodes according to the rule. Preferably, the behavior data comprises task node progress, explicit operation instructions, geographical track point columns and stay time information of a user, and the explicit operation instructions comprise completion, abandonment or skipping; According to the respective time stamps of the data types, uniformly aligning the data types to the same reference time axis; taking a preset fixed duration as a time window, sliding on a reference time axis with a preset step length, and executing for each time window: Extracting core features in the time window, wherein the core features comprise task node progress at the starting time and the ending time of the time window, explicit operation instructions and the times of the explicit operation instructions, total displacement calculated by a geographical track point array, and accumulated stay time around a travel scenario task node and an associated interest point, and packaging the core features together with window numbers and starting time stamps of the time window to generate a behavior sample; Sequencing a plurality of continuously generated behavior samples according to the sequence of a time window, associating each behavior sample with a travel scenario task node where a user is located in the time window, and outpu