A cross-session task wake-up method

CN122933715APending Publication Date: 2026-10-16XINJIANG ZHONGKE FUTURE RESEARCH & DEVELOPMENT CENTER CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610920113.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-24
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

未解决时序位置模糊问题:现有方案仅记录"当前节点标识"作为断点标记,未记录用户到达该节点的完整执行路径,也未对执行路径进行保序压缩编码

Benefits of technology

本发明通过双层领域层级图谱根据操作类型间的调用关系和数据依赖关系、以及任务参数的取值范围及约束关系自动构建,当任务流程或参数规则变更时,图谱自适应更新,无需人工维护。唤醒特征向量包含参数语义维、操作语义维、路径语义维及决策语义维,路径语义维为前置步骤序列经保序压缩编码后的序列标识,压缩后长度固定,且经解码可还原为步骤序号序列。匹配时先进行分支相容性判断,剔除分支链路不匹配的候选节点,再进行偏序相容判断,保留时序位置相关的节点子集,减少后续语义匹配的计算量。参数语义维与操作语义维在任务领域层级图谱中的节点距离,根据完全匹配、父子关系、间接祖先-后代关系及无关联关系分别量化,并采用双维度加权融合策略确定综合语义匹配度,实现近似语义词的层级化量化匹配。基于上述机制,系统能够定位用户真实中断节点并继承历史分支选择状态,实现跨会话任务的断点续行。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122933715A_ABST
    Figure CN122933715A_ABST
Patent Text Reader

Abstract

The application discloses a cross-session task wake-up method, relates to the technical field of distributed session management technology, and comprises the following steps: in the process of executing a task in an old session, a wake-up feature vector is generated according to the task parameter value, the operation type and the preposed sequence of a current node whenever the task enters a new node; the wake-up feature vector comprises a parameter semantic dimension, an operation semantic dimension and a path semantic dimension; the path semantic dimension is a sequence identifier obtained by performing a decodable and order-preserving compression encoding on the preposed sequence; and the wake-up feature vector is stored in association with the corresponding node, and the task interruption moment is recorded, so that the application realizes precise breakpoint continuation of a cross-session task, and effectively improves the wake-up accuracy and recovery fluency in a complex branch task scenario.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of distributed session management technology, specifically a method for waking up cross-session tasks. Background Technology

[0002] In distributed interaction platforms, session state data is typically stored across multiple service nodes. When a user resumes a task across sessions, the system needs to retrieve historical node states from distributed storage and reconstruct the execution path. Existing technologies suffer from the following technical drawbacks: The conflict between redundancy in path information storage and retrieval efficiency: Existing solutions use plaintext storage of the complete step sequence for execution paths. For complex tasks with multiple steps, the amount of path data increases linearly with the number of steps, causing the retrieval latency of distributed storage to increase significantly with the number of concurrent sessions, making it difficult to meet the response requirements of real-time wake-up.

[0003] Semantic matching lacks a hierarchical quantification mechanism: Existing solutions mostly use hard keyword matching or planar text similarity calculation, which cannot utilize the hierarchical relationship of task domain operation type and entity classification to quantify semantic distance, resulting in a high mismatch rate in synonym and hyponym / hypernym scenarios.

[0004] Unstructured coding of conditional branch links: The existing solution does not structure the branch conditions and user selection results of conditional branch nodes, and cannot verify the consistency of branch links during cross-session recovery, resulting in execution link disorder.

[0005] Existing session task breakpoint resume technology typically adopts the following approach: when a session is interrupted, the identification information of the current node (such as node ID and node name) and simple text parameters are recorded. After a new session is established, the broken node is located and the task is resumed by matching the keywords entered by the user with the recorded node identification or parameter text.

[0006] However, the aforementioned existing technologies have the following common drawbacks: The problem of ambiguous timing position remains unresolved: the existing solution only records the "current node identifier" as a breakpoint marker, without recording the complete execution path from which the user arrives at the node, nor performing order-preserving compression encoding on the execution path. When the user's wake-up statement contains relative timing indicators, the system cannot distinguish whether the user is pointing to the node at the time of the interruption or a previously visited node, resulting in a misaligned wake-up node.

[0007] Unresolved semantic approximation matching problem: Existing solutions mostly rely on hard keyword matching or planar text similarity calculation, lacking modeling of semantic hierarchical relationships and unable to handle semantically similar scenarios such as synonyms and hyponyms. Matching fails when the descriptive words in the user's wake-up statement have semantic differences from the system's preset keywords.

[0008] The problem of disordered conditional branching is not resolved: The existing solution does not record the branch selection results of conditional branch nodes, nor does it structure the branch conditions and user selection results. When a task contains conditional branches, the system cannot identify the user's historical branch path and can only recover from the last recorded node. If the meaning of the node data is different under different branches, it will lead to disordered execution links or data errors. Summary of the Invention

[0009] The purpose of this invention is to provide a cross-session task wake-up method to solve the technical problems mentioned in the background section.

[0010] A cross-session task wake-up method, characterized in that the method is executed by a computing device of an interactive platform, the interactive platform including a session management module, a feature encoding module, a distributed storage module, a semantic parsing module, a matching calculation module, and a task recovery module, the method comprising: S1: During the execution of a task in an old session, whenever a task enters a new node, the feature encoding module generates a wake-up feature vector based on the task parameter values, operation type, and preceding sequence of the current node; the wake-up feature vector includes parameter semantic dimension, operation semantic dimension, and path semantic dimension; the path semantic dimension is a sequence identifier obtained by performing decodable order-preserving compression encoding on the preceding sequence; S2: The feature encoding module associates the wake-up feature vector with the corresponding node and stores it in the distributed storage module, and the session management module records the task interruption time; S3: After receiving a wake-up statement input by the user in a new session, the semantic parsing module determines the relative position interval based on the temporal relationship between the relative timing indicator in the wake-up statement and the task interruption time, and determines the query operation type node and query parameter node based on the mapping relationship between the operation descriptor and parameter descriptor in the wake-up statement and the task domain hierarchy graph, and generates a query feature vector containing the relative position interval, the query operation type node and the query parameter node; S4: The matching calculation module performs a partial order compatibility judgment between the relative position interval in the query feature vector and the path semantic dimension in each candidate wake-up feature vector. Only when the sequence of the candidate path semantic dimension after decoding and restoration satisfies the prefix inclusion relationship or the same sequence relationship with the relative position interval will the candidate wake-up feature vector enter the subsequent matching. S5: The matching calculation module calculates the distance between the parameter semantic dimension and operation semantic dimension of the candidate wake-up feature vector after it has been filtered by S4 and the node distance of the query feature vector in the corresponding task domain hierarchical graph. Based on the node distance, the module determines the comprehensive semantic matching degree and selects the node corresponding to the candidate with the highest comprehensive semantic matching degree as the wake-up node. S6: The task recovery module resumes execution of the task from the wake-up node; The method compresses the sequence of preceding steps into a fixed-length encoded value (32 characters or 10 digits) by preserving the order of the path semantic dimension through order-preserving compression encoding. This reduces the path data storage overhead in distributed storage while maintaining the sequence's ability to be restored to a sequence number after decoding. Through decoding and restoration of the path semantic dimension and partial order compatibility judgment, the range of candidate wake-up nodes is reduced from all historical nodes to a subset of nodes that are temporally related to the relative position interval, reducing the computational load of subsequent semantic matching. By calculating the node distance in the task domain hierarchy graph using the parameter semantic dimension and operational semantic dimension, differentiated quantization methods are employed for complete matching, parent-child relationships, indirect ancestor-descendant relationships, and unrelated relationships. These methods use zero distance, a first threshold of 0.2, the product of the hierarchy depth difference and a proportional coefficient of 0.5, and an exclusion threshold of 10.0, respectively. This transforms abstract semantic similarity into a precisely calculable hierarchy distance value, achieving hierarchical quantization matching of approximate semantic words. This improves the accuracy of cross-session task wake-up and reduces the probability of node misalignment without relying on manually preset static keywords.

[0011] In some possible implementations, in S1, the decodable order-preserving compression code is a structure-preserving compression code, and the sequence identifier can be decoded back into a sequence number to support the partial order compatibility judgment.

[0012] In some possible implementations, structure-preserving compression coding employs any of the following methods: The operation semantic dimensions of each node in the preceding sequence are concatenated in the execution order and then reversibly compressed to obtain a fixed-length encoded value. Alternatively, the concatenated sequence can be mapped to a preset path encoding dictionary to obtain a fixed-length index value; the path encoding dictionary stores a bidirectional mapping relationship between the concatenated sequence and the index value.

[0013] In some possible implementations, in S1, the parameter semantic dimension is the node encoding of the task parameter value in the task domain entity classification hierarchy, and the operation semantic dimension is the node identifier of the operation type in the task domain operation type hierarchy graph.

[0014] In some possible implementations, in S4, the partial order compatibility determination includes: Decode the path semantic dimension of the candidate wake-up feature vector into a sequence of numbers; Determine whether the sequence number sequence and the query sequence represented by the relative position interval satisfy a prefix inclusion relationship or a same sequence relationship.

[0015] In some possible implementations, in S5, the node distance is determined based on the difference in hierarchical depth between the two nodes in the corresponding task domain hierarchy map; If two nodes are the same node, then the node distance is zero; If two nodes have a direct parent-child relationship, the node distance is a preset first threshold. If there is an indirect ancestor-descendant relationship between two nodes, the node distance is the product of the difference in level depth and a preset scaling factor. If two nodes have no hierarchical relationship, the distance between the nodes is either infinite or a preset exclusion threshold.

[0016] In some possible implementations, in S3, determining the relative position interval includes: If the relative timing indicator is "just now", then the relative position interval is the interval formed by the node where the task was interrupted and the two nodes before it. If the relative timing indicator is "before", then the relative position interval is the interval consisting of all nodes from the start of the historical session to the time when the task was interrupted; If the relative timing indicator is "then", then the relative position interval is the interval formed by the next node of the node where the task interruption time is located and the two nodes after it.

[0017] In some possible implementations, in S3, the node for determining the query operation type and the query parameter node includes: In the hierarchical graph of operation types in the task domain, find the operation type node corresponding to the operation descriptor. If there are multiple corresponding nodes, select the one with the highest level. If there is no direct correspondence, find the node corresponding to its superior and subordinate concept words as the query operation type node. In the entity classification hierarchy of the task domain, find the parameter node corresponding to the parameter descriptor. If there are multiple corresponding nodes, select the one with the highest level. If there is no direct correspondence, find the node corresponding to its superior and subordinate concept words as the query parameter node.

[0018] In some possible implementations, when a task in the old session contains a conditional branch node: The wake-up feature vector generated in S1 also includes a decision semantic dimension, which records the branch conditions of the condition branch node and the user's selection result at that node; The query feature vector generated in S3 also includes a query decision semantic dimension, which is generated based on the branch selection intent implicit in the wake-up statement; In S4, before performing partial order compatibility judgment, branch compatibility judgment is performed first: if the decision semantic dimension of the candidate wake-up feature vector is incompatible with the query decision semantic dimension, then the candidate wake-up feature vector is removed. The branch compatibility judgment filters out candidate nodes with mismatched branch links from the matching process in advance to reduce the probability of cross-branch erroneous wake-up.

[0019] In some possible implementations, the task domain hierarchy map includes a task domain operation type hierarchy map and a task domain entity classification hierarchy map; The task domain operation type hierarchy graph is automatically constructed based on the calling relationship and data dependency relationship between the operation types of each node in the task flow; The task domain entity classification hierarchy is automatically constructed based on the value range of task parameters in the task process and the constraint relationship between parameters.

[0020] The technical solutions provided by the embodiments of this disclosure have at least the following beneficial effects: This invention automatically constructs a two-layer domain hierarchy graph based on the call relationships and data dependencies between operation types, as well as the value range and constraints of task parameters. When the task flow or parameter rules change, the graph is adaptively updated without manual maintenance. The wake-up feature vector includes parameter semantic dimensions, operation semantic dimensions, path semantic dimensions, and decision semantic dimensions. The path semantic dimension is the sequence identifier of the preceding steps after order-preserving compression encoding. The compressed length is fixed and can be decoded back into a step number sequence. During matching, branch compatibility is first judged to eliminate candidate nodes with mismatched branch links, and then partial order compatibility is judged to retain a subset of nodes with temporal positional relevance, reducing the computational load of subsequent semantic matching. The node distances between the parameter semantic dimension and the operation semantic dimension in the task domain hierarchy graph are quantified according to complete matching, parent-child relationship, indirect ancestor-descendant relationship, and no-association relationship, and a two-dimensional weighted fusion strategy is used to determine the comprehensive semantic matching degree, achieving hierarchical quantification matching of approximate semantic words. Based on the above mechanism, the system can locate the user's actual interruption node and inherit the historical branch selection state, realizing breakpoint continuation across session tasks. Attached Figure Description

[0021] Figure 1 A flowchart of a cross-session task wake-up method provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the automatic construction process of the task domain operation type hierarchy map in an embodiment of the present invention; Figure 3 This is a schematic diagram of the automatic construction process of the task domain entity classification hierarchy in an embodiment of the present invention; Figure 4 This is a schematic diagram illustrating the generation and matching of wake-up feature vectors, taking an online insurance application task as an example, in an embodiment of the present invention. Detailed Implementation

[0022] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0023] This invention provides a cross-session task wake-up method applied to an interactive platform. The interactive platform can be a task system with multi-step processes and conditional branches, such as an insurance business processing platform, an e-commerce order processing platform, or a government approval platform. It can also be applied to oilfield digital twin collaborative systems, intelligent refining and chemical production scheduling systems, or real-time drilling decision-making systems in the oil extraction and processing field.

[0024] The interactive platform includes a session management module, a feature encoding module, a distributed storage module, a semantic parsing module, a matching calculation module, and a task recovery module.

[0025] The session management module is configured to: maintain the lifecycle state of user sessions, detect session interruption events, trigger the feature encoding module to generate wake-up feature vectors, and record the time of task interruption.

[0026] The feature encoding module is configured to receive node status data pushed by the session management module, perform parameter semantic encoding, operation semantic encoding, path order-preserving compression encoding and decision semantic encoding, generate a four-dimensional structured wake-up feature vector, and write the wake-up feature vector into the distributed storage module.

[0027] The distributed storage module is configured to store wake-up feature vectors in key-value pairs, where the key is a unique step node number and the value is a complete wake-up feature vector. Data writing is performed according to a hierarchical directory structure of session identifier, task identifier, and step node number.

[0028] The semantic parsing module is configured to: perform text segmentation on the wake-up statement, extract relative timing indicators, operation descriptors and parameter descriptors, and generate query feature vectors.

[0029] The matching calculation module is configured to perform branch compatibility judgment, partial order compatibility judgment and node distance calculation to determine the wake-up node.

[0030] The task recovery module is configured to: load the historical state data of the wake-up node, rebuild the task execution context, and drive the task flow to continue execution from the breakpoint.

[0031] The data interaction process between the modules is as follows: (I) Data Flow During Task Execution: During the execution of an old session task, each time a user enters a new step node, the session management module reads the task parameter values, operation type, and preceding step sequence from the current node's runtime cache in real time, and pushes this data to the feature encoding module in the form of a structured message. Upon receiving the structured message, the feature encoding module calls the parameter semantic encoding submodule, operation semantic encoding submodule, path order-preserving compression encoding submodule, and decision semantic encoding submodule to generate a four-dimensional wake-up feature vector. The feature encoding module binds the wake-up feature vector to the unique number of the current step node, calls the write interface of the distributed storage module, and persistently stores the wake-up feature vector in the distributed key-value database using "session identifier / task identifier / step node number" as the hierarchical directory.

[0032] (II) Data Flow in the Task Wake-up Phase: After the user inputs a wake-up statement in a new session, the semantic parsing module receives the text data of the wake-up statement and sequentially performs: text segmentation, extraction of relative temporal indicator words, extraction of operation descriptors and parameter descriptors, and identification of implicit branch intent. The semantic parsing module assembles the extracted results into a query feature vector and passes the query feature vector to the matching calculation module. The matching calculation module retrieves a set of all candidate wake-up feature vectors associated with the current historical task from the distributed storage module based on the session identifier and task identifier in the query feature vector. The matching calculation module sequentially performs branch compatibility judgment, partial order compatibility judgment, and node distance calculation on the candidate set, filters out the candidate vector with the highest comprehensive semantic matching degree, and returns the corresponding step node number as the wake-up node to the task recovery module. The task recovery module loads the historical state data corresponding to the node from the distributed storage module based on the wake-up node number, reconstructs the task execution context, and drives the task to continue execution.

[0033] Through the definition of data flow between the modules described above, those skilled in the art can clearly understand how the modules transmit data, call interfaces, and collaboratively complete the entire process of cross-session task wake-up.

[0034] An old session refers to a historical session that a user has established with the platform and is currently running, carrying out a complete business task. For example, in an oil extraction scenario, it is a real-time analysis task of logging-while-drilling data for a well in operation, or in a refining scenario, it is a monthly production scheduling optimization task for an atmospheric and vacuum distillation unit. A new session refers to a completely new session that a user has re-established with the platform. For example, it is a connection initiated by a drilling supervisor when logging back in after an interruption due to an emergency at the well site, or a connection initiated by a refining dispatcher when reconnecting to the system after handling an abnormal alarm at the unit.

[0035] The platform pre-configures a node type identifier for each process node to distinguish between ordinary execution nodes and conditional branch nodes. For example, a value of 1 indicates a conditional branch node, while a value of 0 indicates an ordinary execution node. Conditional branch nodes can correspond to different paths in drilling operations, such as selecting "continue drilling," "lift the drill bit to change the drill bit," or "adjust mud density" based on real-time formation pressure feedback. They can also correspond to different branches in refining and chemical production scheduling, such as selecting "switch processing scheme A / B / C" based on crude oil arrival and testing results.

[0036] A step node is the smallest execution unit after the task flow is broken down. The platform determines whether a task has entered a new step node through built-in flow status markers: when all operations in the previous node are completed and the process jumps to the next unit to be executed, it is determined that a new step node has been entered. For example, in the fracturing scheme approval process, "entry of fracturing pump injection program parameters", "selection of proppant type", and "verification of construction pressure curve" are three consecutive step nodes; in the drilling geological steering process, "reading of current well depth inclination data", "calculation of deviation between wellbore trajectory and design trajectory", and "generation of correction command" are three consecutive step nodes.

[0037] Step S1: Generate wake-up feature vector

[0038] During the execution of tasks in the old session, whenever a task enters a new step node, the system reads the valid data entries in the current node's runtime cache, obtains the task parameter values, operation type, and previous step sequence of the current step node, and generates a wake-up feature vector accordingly.

[0039] The wake-up feature vector comprises four dimensions: parameter semantic dimension, operation semantic dimension, path semantic dimension, and decision semantic dimension when the task includes conditional branch nodes. The specific generation steps for each dimension are as follows: The input data is the task parameter value of the current step node. The system uses the task parameter value as a query condition, searches within a pre-built task domain entity classification hierarchy, and locates the leaf node to which the parameter value belongs. Then, starting from that leaf node, it traces back up to the root node along the parent node pointer, sequentially concatenating the node codes of each level in the path to generate the encoded value of the parameter semantic dimension in the format of "root node code / intermediate node code / leaf node code". If the same task parameter value corresponds to multiple leaf nodes in the entity classification hierarchy (i.e., a polysemous case), the node with the smallest hierarchy depth (closest to the root node) is selected as the unique mapping target.

[0040] For example, if the task parameter value is "Policy No. P1234567890", it belongs to the leaf node under the path "Finance → Insurance → Policy" in the entity classification hierarchy. The leaf node is encoded as "ENT-Fin-Policy-001", then the parameter semantic dimension is encoded as "ENT-Fin-Policy-001".

[0041] The input data is the operation type name of the current step node. The system uses the operation type name as a query condition to search for nodes in a pre-built task domain operation type hierarchy graph and locate the graph node corresponding to the operation type. If multiple nodes with the same name exist, the node with the smallest hierarchy depth (closest to the root node) is selected as the unique mapping target. The unique identifier of this node is read as the encoded value of the operation semantic dimension.

[0042] In this embodiment, the semantic dimension of the operation adopts a three-digit encoding rule: the first digit represents the major category (1-query, 2-verification, 3-submission, 4-judgment, 5-modification), the second digit represents the subcategory (coded according to the business subdivision action), and the third digit represents the sequence number (the distinguishing sequence number under the same subcategory). For example, "query user identity information" is encoded as 101, "query policy information" is encoded as 102, and "submit application" is encoded as 301.

[0043] For example, if the operation type of the current node is "submit insurance application", and the corresponding node in the operation type hierarchy graph is identified as "003", then the operation semantic dimension is encoded as "003".

[0044] The input data is a sequence of preceding steps from the task start node to the current step node. The system first assigns a unique sequential number to each node in the preceding step sequence (based on the task start node, positive integers are assigned in ascending order of execution, starting from 1, with no repetition or skipping within the same task). Then, the unique sequential number of each node is sequentially combined with the operation semantic dimension code of that node to form a concatenated sequence of the form "[Sequence Number 1][Operation Semantic Dimension 1][Sequence Number 2][Operation Semantic Dimension 2]...".

[0045] The system performs decodable, order-preserving compression encoding on the concatenated sequence to generate a fixed-length sequence identifier as the path semantic dimension. This embodiment provides the following two compression methods: Method 1 (Reversible Compression): The concatenated sequence is compressed using the LZ77 lossless compression algorithm (sliding window size of 32KB, forward buffer size of 4KB) to obtain a fixed-length 32-character encoded value. If the compressed result is less than 32 characters, it is padded with null characters at the end; if it exceeds 32 characters, it is grouped into sets of 16 step nodes, each segment is compressed independently, and then concatenated in the original order. During decoding, the corresponding decoding algorithm of LZ77 is called to restore the concatenated sequence, and then the sequence number of each node is extracted according to a fixed offset (the first 3 bits of each segment are the sequence number, and the last 3 bits are the operation semantic dimension) to restore the step sequence number sequence.

[0046] Method 2 (Dictionary Mapping): Using the concatenated sequence as the key, a preset path encoding dictionary is queried to obtain the corresponding index value as the sequence identifier. The path encoding dictionary stores a bidirectional mapping relationship between the concatenated sequence and the ten-digit index value. For the first occurrence of a concatenated sequence, an unused index value is automatically assigned and written into the dictionary; for existing sequences, the existing index value is directly returned. During decoding, the original concatenated sequence is restored by looking up the dictionary in reverse using the index value, and then the sequence number is extracted according to the same rules to restore the step sequence number sequence.

[0047] For example, if the sequence of preceding steps for the current node is [Step 101 (Operation Semantics 001), Step 102 (Operation Semantics 002), Step 103 (Operation Semantics 004)], then the concatenated sequence is “101001102002103004”, which, after LZ77 compression, yields the 32-bit encoded value “a7f3e2d19c2b8e4d…” as the path semantic dimension.

[0048] The system checks whether the current node is a conditional branch node. If so, it reads the branch condition text of the node and the result identifier of the branch selected by the user at that node. The system generates a decision semantic dimension code according to the preset structured concatenation format "[condition type:condition value]|[result identifier]". Here, the condition type can be one of RULE (text rule), THRESHOLD (numerical threshold), or STATUS (status identifier); the condition value is the specific content code of the corresponding rule; the separator is fixed as a vertical bar "|"; and the result identifier is the unique number of the branch selected by the user. If the current node is a normal execution node, the decision semantic dimension is filled with an empty identifier "NULL".

[0049] For example, if the branch condition of a certain conditional branch node is "age > 60", the condition type is THRESHOLD, the condition value is encoded as "AGE_GT60", and the user selects "no" with the corresponding result identifier "NO", then the decision semantic dimension is encoded as "THRESHOLD:AGE_GT60|NO".

[0050] Through the above four-dimensional generation steps, the system transforms the original task parameters, operation types, execution paths, and branch decisions into structured, quantifiable, and computable wake-up feature vector data.

[0051] The unique sequential numbering rule is as follows: based on the task start node, positive integer numbers are assigned in ascending order of execution, and the numbers are not repeated or skipped within the same task process. For example, if a task contains 5 step nodes, the numbers are 1, 2, 3, 4, and 5 respectively; if node 3 is a conditional branch node and the user enters node 4 after selecting branch A and enters node 5 after selecting branch B, then the preceding sequences of the two branch paths are [1,2,3,4] and [1,2,3,5] respectively.

[0052] It is important to note that when the task flow includes conditional branch nodes, different branch choices lead to completely different sets of nodes traversed subsequently. Therefore, the preceding step sequence uniquely records the complete branch path traversed by the user from the start of the task to the current node. For example, if the user chooses branch A instead of branch B at a branch node, the preceding sequence will only include nodes under branch A and will not include any nodes under branch B. This characteristic ensures that the subsequent step S4 can naturally exclude candidate nodes that do not match the user's historical path through the partial order compatibility judgment of the path semantic dimension, without the need to additionally store the branch selection history.

[0053] The three-digit encoding rule for the semantic dimension of operations is as follows: the first digit represents the major category (1-query, 2-validation, 3-submission, 4-judgment, 5-modification), the second digit represents the subcategory (coded according to the business subdivision of the action), and the third digit represents the sequence number (the distinguishing sequence number within the same subcategory). For example, "querying user identity information" is encoded as 101, and "querying policy information" is encoded as 102.

[0054] The system takes the preceding sequence as input to the path semantic dimension and performs decodable order-preserving compression encoding to generate sequence identifiers.

[0055] The wake-up feature vector includes parameter semantic dimensions, operation semantic dimensions, and path semantic dimensions. When the task in the old session contains conditional branch nodes, the wake-up feature vector also includes a decision semantic dimension.

[0056] Automatic construction of task domain hierarchy graph

[0057] The task domain hierarchy map includes a task domain operation type hierarchy map and a task domain entity classification hierarchy map. The two are independent of each other and work together to complete semantic parsing and encoding mapping.

[0058] The task domain operation type hierarchy map is automatically constructed based on the calling relationships and data dependencies between the operation types of each step node in the task flow.

[0059] like Figure 2 As shown, the platform first traverses all step nodes of the current task flow, extracts each pair of operation types with a sequential calling order, and constructs a directed graph with operation types as vertices and calling order as edges. Then, it traverses the outgoing and incoming edges of each vertex in this directed graph. If the output data field of operation type A is called as the input data field of operation type B, a data dependency edge is added between vertex A and vertex B, and the name of the dependency field is recorded.

[0060] Then, a hierarchical algorithm based on topological sorting and modularity optimization is used to partition the constructed directed graph into layers: First, topological sorting is performed to initialize the in-degree count of all vertices. Vertices with an in-degree of zero are assigned to the first layer. After removing vertices from this layer, the in-degree of the remaining vertices is updated. Newly generated vertices with an in-degree of zero are assigned to the second layer, and so on iteratively until all vertices are layered. If there is a cyclic dependency during the iteration process, the Tarjan strongly connected component algorithm is used to shrink the vertices in the cycle into a single virtual node and then the layering is re-executed. After the layering is completed, the virtual node is expanded back to the original vertex and assigned the same layer number.

[0061] After topological sorting and layering, for nodes of operation types with multiple no direct calling relationships within the same layer, community partitioning is performed to refine the internal structure of the layer: nodes within the same layer are constructed as an undirected graph, with edge weights equal to the frequency of two nodes being called by the same upper-level node. A greedy optimization algorithm based on modularity gain is used for community partitioning. The modularity gain is calculated using the following simplified formula: Gain = (Actual number of cross-community connections - Expected number of cross-community connections) / Total number of connections in the entire graph. The expected number of connections is estimated as the ratio of the product of the total number of external connections of each community to the total number of connections in the entire graph. This simplified formula merges the internal community connection terms in the standard modularity formula into a constant (because in this scenario, intra-layer community partitioning only focuses on cross-community connection optimization). Under the condition that the set of nodes within a fixed layer remains unchanged, maximizing the gain is equivalent to maximizing the standard modularity. The simplified calculation does not affect the layering result. The gain threshold is set to 0.0001. Merging is only performed when the gain is greater than this threshold, iterating until no merging operation meets the condition. After community division, nodes within the same community are arranged in lexicographical order and assigned the same sub-level number. Nodes in different communities are arranged in descending order of average node call frequency within that community. Finally, the hierarchical and sub-level division results are persisted as a multi-level association graph, with each node assigned a unique identifier in the format of level number-sub-level number-sequence number. When tasks are added, deleted, or their operation types are adjusted, the platform re-triggers the above traversal-graph building-hierarchical process, synchronously updating the levels and node relationships.

[0062] The task domain entity classification hierarchy is automatically constructed based on the value range of task parameters in the task process and the constraint relationships between parameters.

[0063] like Figure 3 As shown, the platform first statistically analyzes the value characteristics of all task parameters. Numerical parameters are then binned according to a preset interval width, with the number of bins dynamically determined by the system based on the sample size of the parameter values: 5 bins for samples less than 100; 10 bins for samples between 100 and 1000; and 20 bins for samples greater than 1000. Bin boundaries are automatically calculated by the system according to the equal-frequency principle: parameter value samples are arranged in ascending order, and the theoretical sample size (total sample size / number of bins) for each bin is calculated. Samples are accumulated sequentially until the theoretical sample size is reached, at which point the upper bound of the current bin is determined. This upper bound also serves as the lower bound of the next bin. This process is repeated until all samples are allocated. If the same value crosses a bin boundary, that value is entirely assigned to the current bin. The last bin contains all remaining samples, ensuring a balanced sample size within each bin (the difference in sample size between bins does not exceed 1).

[0064] Text parameters are categorized into patterns according to preset rules. The system has a built-in template library that covers the following four common patterns: Pure numeric mode: Parameter values ​​consist of Arabic numerals 0 to 9, without any other characters; Pure letter mode: Parameter values ​​consist of English letters a to z or A to Z, without numbers or other characters; Alphanumeric mixed mode: The parameter value consists of a mixture of English letters and Arabic numerals, without spaces or special symbols; Date mode: Parameter values ​​conform to the year-month-day format, where the year is a four-digit number, the month is a two-digit number, and the day is a two-digit number, with each segment separated by a hyphen.

[0065] The parameter values ​​are matched sequentially with the four pattern rules mentioned above. Parameters that satisfy all the rules for a particular pattern are classified into that pattern; otherwise, they are classified into the "Other" category. The platform periodically calculates the unmatch rate of newly added parameters. When the unmatch rate exceeds 20%, the administrator adds new pattern rules or adjusts existing rules. After pattern classification is completed, initial value range labels for each parameter are generated.

[0066] Subsequently, the constraint relationships between parameters are extracted, and parameter pairs with linkage verification rules are constructed as edges in the constraint graph. The weight of the edge represents the constraint strength, and the formula for calculating the constraint strength is as follows: Constraint strength = 0.3 × frequency of co-occurrence + 0.7 × number of rule triggers. The frequency of co-occurrence refers to the number of times the two parameters appear simultaneously in the same task process. The number of rule triggers refers to the number of times the linkage verification rule between the two parameters is triggered and executed for verification in the actual task process. Multiple triggers in the same task process are accumulated according to the actual number of occurrences. Cases where only the rule is loaded but not actually executed for verification are not included.

[0067] Then, a greedy optimization algorithm based on modularity gain is used to divide the constraint graph into communities: each parameter is initialized as an independent community, and the modularity gain brought about by merging the parameter into an adjacent community is calculated iteratively; where, modularity gain = (actual number of cross-community constraints - expected number of cross-community constraints) / total number of constraints in the whole graph, and the expected number of constraints is estimated by the ratio of the product of the total number of external constraints of each of the two communities to the total number of constraints in the whole graph; the gain threshold is set to 0.001, and merging is only performed when the gain is greater than this threshold. The iteration continues until there is no merging operation that meets the conditions, resulting in several parameter communities.

[0068] The parameter community is then used as an intermediate node, the specific parameters within each community are used as leaf nodes, and the domain category to which the parameter belongs is used as the root node, constructing a three-layer classification hierarchy from top to bottom. When the parameter value range or constraint rules change, the platform re-executes the statistics-binding-graphing-clustering process, and the entity classification hierarchy is simultaneously and adaptively adjusted.

[0069] Therefore, compared to static dictionaries that rely on manual maintenance, the two-layer domain hierarchy graph in this embodiment can be automatically updated as the task flow and parameter rules change, reducing manual configuration costs and improving the adaptability between the semantic hierarchy and business tasks.

[0070] The semantic dimension of the parameter represents the node encoding of the task parameter value within the entity classification hierarchy of the task domain. The system retrieves the entity classification node to which the task parameter value belongs, extracts the unique code corresponding to that node, and completes the assignment. Each task parameter value corresponds to only one unique node code within the entity classification hierarchy. The semantic dimension of the parameter is represented using a fixed-length character encoding, and this unified encoding format facilitates subsequent data processing and matching.

[0071] The operation semantic dimension is the node identifier of the operation type in the task domain operation type hierarchy graph. The system matches the determined completed operation type to the corresponding node within the graph and reads the node's built-in identifier as the operation semantic dimension content. The operation semantic dimension uses a three-digit code to distinguish the node identifiers corresponding to different operation semantics.

[0072] The decision semantic dimension is configured for task flows containing conditional branch nodes. Branch conditions are pre-defined decision rules for each conditional branch node, recorded in three forms: text rules, numerical thresholds, and status identifiers. The user's selection result at this node is the specific execution branch chosen by the user, with each branch corresponding to a unique result identifier. The decision semantic dimension is generated using a structured concatenation encoding method, consisting of three ordered segments: a branch condition encoding field, a separator field, and a branch selection result encoding field. The length, position, and concatenation order of each field are preset and fixed by the system.

[0073] As a specific encoding example, the system predefines the following general format: [Condition Type:Condition Value]|[Result Identifier]. Here, the condition type can be one of RULE (text rule), THRESHOLD (numerical threshold), or STATUS (status identifier); the condition value is the specific content of the corresponding rule; the separator is fixed as a vertical bar "|"; and the result identifier is the unique number of the branch selected by the user. For example, for an age-based branch node, the branch condition is "age > 60", the condition type is THRESHOLD, the condition value is encoded as AGE_GT60, and the user selects "No", corresponding to the result identifier NO. Therefore, the decision semantic dimension is encoded as THRESHOLD:AGE_GT60|NO. For ordinary nodes without conditional branches, the decision semantic dimension is filled with an empty identifier (such as NULL).

[0074] The system checks whether the current node is a conditional branch node. If it is, it collects the corresponding branch conditions and user selection results in the above format and completes the encoding generation. If it is not, the decision semantic dimension is filled with an empty identifier.

[0075] The path semantic dimension is the sequence identifier obtained by performing decodable order-preserving compression encoding on the preceding step sequence. Each step node in the preceding step sequence is identified by a unique sequential number, and each sequential number corresponds to the operation semantic dimension of that step node. The order-preserving compression encoding is a structure-preserving compression encoding, which completely preserves the arrangement structure and sequence of the original sequence during the compression process, and can be restored to a step sequence number after decoding to support partial order compatibility judgment.

[0076] Order-preserving compression encoding can be achieved using one of the following two methods: Method 1: Reversible Compression Operation. The unique sequential numbers of each step node in the preceding step sequence and their corresponding operational semantic dimensions are combined and concatenated in the execution order to form a continuous sequence. Then, a reversible compression operation is performed on this combined sequence to obtain a fixed-length encoded value as the sequence identifier. The reversible compression operation uses a lossless reversible compression algorithm. In this embodiment, the LZ77 compression algorithm is used, with a sliding window size of 32KB and a forward buffer size of 4KB. The compression algorithm and the corresponding decoding algorithm have a one-to-one inverse operation relationship. The fixed-length encoded value is uniformly set to 32 characters, and all compression results are output according to this standard. If the length of the compressed result is less than 32 characters, null characters are added to the end to make it complete. If the number of steps exceeds thirty-two, each step is grouped into a preset number (e.g., sixteen) of nodes. Each segment is independently compressed using LZ77 and then concatenated in its original order to form a combined code. During decoding, the steps are restored sequentially and the step numbers are concatenated to ensure that the order is not affected by the segmentation. During decoding, the corresponding LZ77 decoding algorithm is called to restore the combined sequence, and the step number portion is extracted from the combined sequence to generate a step sequence number.

[0077] Method 2: Dictionary Mapping. The unique sequential numbers of each step node in the preceding sequence and their corresponding semantic dimensions are combined and concatenated in the execution order to form a continuous sequence. Then, a pre-defined path encoding dictionary is retrieved from the system to match and map the concatenated sequence to the dictionary content, outputting a fixed-length index value as the sequence identifier. The path encoding dictionary is a domain-specific mapping dictionary with automatic expansion and persistent update mechanisms. For newly appearing concatenated sequences, unused index values ​​are automatically generated and written to the dictionary, forming a bidirectional mapping relationship; existing sequences directly reuse existing index values. The index value uses a ten-digit encoding. When the used index exceeds 80% of the preset capacity limit, the system triggers dictionary reconstruction: low-frequency path mappings are cleaned up according to the least recently used principle, releasing index space for new sequences to reuse; if it is still insufficient after cleanup, the index digits are automatically expanded (from ten digits to twelve digits, and so on), and the index format of historical data is updated synchronously; when the index format is expanded, the system records a version identifier. During the coexistence of old and new format data, the decoding method is distinguished by the version identifier. After all historical data migration is completed, the old version identifier becomes invalid.

[0078] Within the same version, the index value maintains a fixed length, and after a version upgrade, the new length is adopted globally.

[0079] The path encoding dictionary stores a bidirectional mapping between concatenated sequences and index values. In the forward direction, the corresponding index value can be retrieved from the concatenated sequence; in the reverse direction, the original concatenated sequence can be reconstructed from the index value. The index values ​​are uniformly set to a fixed length of ten digits in the initial version. During decoding, relying on the reverse mapping relationship in the dictionary, the original concatenated sequence is retrieved from the index value, and then the step numbers are extracted to generate a step sequence number.

[0080] Therefore, by integrating task parameters, operation semantics, execution paths and branch decisions into structured vector data, and using order-preserving compression encoding to retain complete temporal logic, the problems of information fragmentation, semantic hierarchy rigidity and branch information loss under the traditional text log recording method are solved, providing quantifiable, comparable and decodeable underlying data support for subsequent cross-session wake-up matching.

[0081] Step S2: Associate storage and interruption time record

[0082] The system binds wake-up feature vectors to their corresponding step nodes, storing them as key-value pairs. The key is a unique step node number, and the value is the complete wake-up feature vector. Preferably, the platform's built-in distributed storage interface is invoked to write data according to a hierarchical directory structure of session identifier, task identifier, and step node number. If write timeouts or data loss occur, the platform automatically retryes the write operation twice. If both retries fail, the wake-up feature vector of the step node is temporarily stored in a local cache queue and marked as pending synchronization. Once the network recovers, the background synchronization thread rewrites it to the distributed storage, and a storage exception message is returned to the current session to trigger user confirmation.

[0083] The moment the task is interrupted is the instant the user terminates the old session or the system detects a connection loss. It is recorded in the format yyyy-MM-ddHH:mm:ss, with time precision down to the second.

[0084] Therefore, by precisely binding structured four-dimensional feature vectors with unique step nodes and using hierarchical directory storage to achieve physical isolation of data from different sessions, tasks, and steps, compared to the scattered storage of traditional streaming logs, targeted and precise retrieval can be achieved during the wake-up phase, reducing retrieval computational power consumption and ensuring that the historical task status can be completely reproduced.

[0085] Step S3: Generate query feature vector

[0086] After receiving the wake-up statement input by the user in a new session, the system performs text segmentation on the wake-up statement, extracts the relative timing indicator words, operation descriptor words and parameter descriptor words, and generates a query feature vector.

[0087] Determining the relative position range

[0088] The system determines the relative position range based on the temporal relationship between the relative timing indicator in the wake-up statement and the time of task interruption. The relative timing indicator is a word in the wake-up statement used to describe the order of task execution. This embodiment focuses on limiting three typical timing words: "just now," "before," and "then." If the relative timing indicator is "just now", then the relative position interval is the interval formed by the step node at the time of task interruption and the two step nodes before it. If the relative timing indicator is "before", then the relative position interval is the interval consisting of all step nodes between the start of the historical session and the time when the task was interrupted. If the relative timing indicator is "then", then the relative position interval is the interval formed by the next step node after the step node at the time of task interruption and the two step nodes after it.

[0089] Determining the query operation type node and query parameter node

[0090] The system searches for the operation type node corresponding to the operation descriptor in the task domain operation type hierarchy graph. If there are multiple corresponding nodes, the node with the highest level is selected, that is, the node with the smallest depth value and closest to the root node in the graph. This node covers the broadest semantic range, which can avoid missed matches caused by selecting overly fine-grained nodes. If there is no directly corresponding node, the system searches for the nodes corresponding to its superior and inferior concepts as the query operation type node. When there are multiple nodes corresponding to superior and inferior concepts, the node corresponding to the inferior concept or the node corresponding to the superior concept can be selected according to the matching accuracy requirements. In this embodiment, nodes corresponding to subordinate concept words (those with larger depth values) are preferentially selected. Using nodes corresponding to subordinate concept words as query targets can narrow the matching range and improve positioning accuracy. Similarly, in the entity classification hierarchy of the task domain, parameter nodes corresponding to parameter descriptors are searched. If there are multiple corresponding nodes, the one with the highest level is selected. If there is no direct correspondence, the nodes corresponding to its subordinate and superior concept words are searched as query parameter nodes, and the selection rules are the same as above.

[0091] The hypernyms and hyponyms are provided by a pre-defined domain knowledge graph. This knowledge graph constructs an ontology structure with operation types or parameter types as entities and "is-a" relationships as edges. Each node is associated with its direct hypernyms and direct hyponyms. During semantic expansion retrieval, the semantic similarity between the descriptive word and each concept word in the knowledge graph is calculated, using word vector cosine similarity as the metric. The word vectors are generated using a pre-trained Word2VecSkip-gram model with a vector dimension of 300. The training corpus consists of operation description text and parameter description text from historical task logs within the domain, with a corpus size of no less than 100,000 entries. During similarity calculation, the descriptive word and each concept word in the knowledge graph are mapped to word vectors, and the cosine similarity between the two vectors is calculated. A similarity threshold of 0.75 is set, and only concept words with a similarity greater than or equal to this threshold are included in the hypernym / hypernym expansion candidate set. Then, the first candidate word is selected in descending order of similarity to complete the node mapping.

[0092] When the task in the old session contains conditional branch nodes, the query feature vector also includes a query decision semantic dimension. The system identifies the implicit branch selection intent in the wake-up statement through semantic parsing and keyword extraction, combined with the task's preset branch options, and converts it into encoded data with the same format as the decision semantic dimension in step S1. If the wake-up statement does not identify a valid branch selection intent, the query decision semantic dimension is filled with a system-preset universal matching identifier. This universal matching identifier is a fixed preset, unified identifier character that does not conflict with all valid branch codes, used to represent a global matching state with no branch preference.

[0093] Therefore, by transforming temporal and directional intents, semantic approximation intents, and implicit branching intents in natural language into standardized query feature vectors, the problem of misjudgment and missed judgment caused by the inability to understand colloquial expressions under traditional keyword hard matching schemes is solved, and the wake-up adaptation capability in complex colloquial scenarios and branching task scenarios is improved.

[0094] Step S4: Partial order compatibility check and branch compatibility check

[0095] The system performs a partial order compatibility check between the relative position intervals in the query feature vector and the path semantic dimension in each candidate wake-up feature vector. Before performing the partial order compatibility check, if the task contains conditional branch nodes, a branch compatibility check is performed first.

[0096] The decision semantic dimension of the candidate wake-up feature vector is compared with the query decision semantic dimension of the query feature vector. If the branch conditions represented by the two are consistent with the branch selection result, they are considered compatible and the candidate is retained; otherwise, the candidate wake-up feature vector is directly removed and will not proceed to the next step.

[0097] The path semantic dimension of the candidate wake-up feature vector is decoded into a step number sequence. If the path semantic dimension is encoded using reversible compression, the corresponding reversible decoding algorithm is called to reconstruct the combined sequence, and the step number portion is extracted from the combined sequence to generate the step number sequence. If an index value is obtained using a path encoding dictionary, the original concatenated sequence is retrieved from the index value based on the reverse mapping relationship of the dictionary, and then the step numbers are extracted to generate the step number sequence. If decoding fails, the corresponding candidate wake-up feature vector is directly discarded.

[0098] The process determines whether the decoded step number sequence and the query step sequence represented by the relative position interval satisfy a prefix inclusion relationship or a identical sequence relationship. Specifically, numbers falling within the relative position interval are selected from the decoded step number sequence and formed into subsequences in their original order. If the first few characters of this subsequence are completely identical to the first few characters of the query step sequence (the subsequence length is less than or equal to the query sequence length), then a prefix inclusion relationship is satisfied. If the subsequence is of equal length to the query step sequence and its content is completely identical, then an identical sequence relationship is satisfied. Only when one of the above relationships is satisfied will the candidate wake-up feature vector proceed to subsequent matching.

[0099] Therefore, by first performing branch compatibility judgment to eliminate candidates with mismatched branch intentions, and then performing partial order compatibility judgment to eliminate candidates with mismatched temporal positions, compared with the traditional method of directly performing complex semantic calculations on all candidate data, the amount of subsequent fine matching calculations is reduced, the system response speed is improved, and cross-branch error wake-up and task link disorder are avoided from the source.

[0100] Step S5: Semantic matching degree calculation and wake-up node selection

[0101] For the candidate wake-up feature vectors filtered through step S4, calculate the distance between their parameter semantic dimension and operational semantic dimension and the node distance of the query feature vector in the corresponding task domain hierarchical graph, and then determine the comprehensive semantic matching degree.

[0102] The distance between nodes is determined based on the difference in hierarchical depth between the two nodes in the corresponding task domain hierarchy graph; the hierarchy depth starts from the top-level node of the graph and accumulates downwards. The specific rules are as follows: If two nodes are the same node, then the node distance is zero; If two nodes have a direct parent-child relationship, the node distance is a preset first threshold, which is 0.2. If two nodes have an indirect ancestor-descendant relationship, the node distance is the product of the difference in level depth and a preset scaling factor, with the scaling factor set to 0.5. For example, if the difference in level depth between two nodes is 2, then the node distance = 2 × 0.5 = 1.0. If two nodes have no hierarchical relationship, the node distance is set to a preset exclusion threshold, which is 10.0.

[0103] To more clearly illustrate the calculation process of the node distances mentioned above, two specific calculation examples are given below: Example 1 (Indirect Ancestor-Descendant Relationship): In the task domain operation type hierarchy graph, assume the "Submission Class" node is at level depth 1, and the "Insurance Application Submission" node is at level depth 3. They have an indirect ancestor-descendant relationship ("Submission Class" is the ancestor node of "Insurance Application Submission"), and the difference in level depth is 3 - 1 = 2. Therefore, the node distance is 2 × 0.5 = 1.0. When the query operation type is "Insurance Application Submission" and the candidate operation type is "Submission Class", the node distance is 1.0.

[0104] Example 2 (No Hierarchical Relationship): In the task domain entity classification hierarchy, assuming the "Policy Number" node is located under the path "Finance → Insurance → Policy" and the "ID Number" node is located under the path "User → Identity Information → Documents", and the two nodes are in different branches with no ancestor-descendant or parent-child relationship, then the node distance is the exclusion threshold of 10.0. When the query parameter is "Policy Number" and the candidate parameter is "ID Number", the node distance is 10.0, and this candidate will be directly excluded and will not participate in the subsequent comprehensive matching degree calculation.

[0105] Through the specific numerical examples above, those skilled in the art can clearly grasp the quantitative calculation rules for node distance and apply them to the actual matching process without creative effort.

[0106] The comprehensive semantic matching score is obtained by integrating the distance between parameter semantic nodes and the distance between operation semantic nodes. If either the distance between a candidate's parameter node or the distance between its operation node is less than the exclusion threshold, the candidate is directly determined to be unmatched and will not participate in subsequent calculations. Only when both are less than the exclusion threshold is the following formula used for calculation: Overall semantic matching degree = 1 - distance between parameter nodes × 0.6 - distance between operation nodes × 0.4 The weighting coefficients are determined by the system based on the statistical ratio of parameter matching errors to operation type matching errors in historical wake-up records: when the proportion of parameter matching errors is higher than the proportion of operation type matching errors, the parameter semantic distance weight is increased by 0.05 (upper limit 0.7), and vice versa, it is decreased by 0.05 (lower limit 0.5). The quantification range of the comprehensive semantic matching degree is 0 to 1, with the value closer to 1 indicating a better matching effect.

[0107] The statistical period for historical matching errors is the most recent 30 days, and the statistical dimensions include: parameter matching errors (e.g., incorrectly matching "policy number" as "application number") and operation type matching errors (e.g., incorrectly matching "submission type" as "modification type"). When the proportion of parameter matching errors is higher than the proportion of operation type matching errors, the parameter semantic distance weight is increased by 0.05 (upper limit 0.7), while the operation semantic distance weight is correspondingly decreased by 0.05 (lower limit 0.5). The adjusted weights take effect in the next statistical period. In the test environment, the initial weights of 0.6 / 0.4 stabilized at 0.65 / 0.35 after three dynamic adjustments, corresponding to a decrease in the validation set mismatch rate from the initial 5.2% to 3.8%.

[0108] The system compares the overall semantic matching score of all candidate objects, extracts the candidate with the highest score, and binds its associated step node as the wake-up node. If multiple candidate matching scores are the same, the node with the highest step number is selected as the wake-up node by default.

[0109] The first threshold, the proportional coefficient, and the exclusion threshold are all preset fixed parameters of the system. The first threshold is set to 0.2, the proportional coefficient to 0.5, and the exclusion threshold to 10.0. The above parameter values ​​are calibrated by the system according to the following procedure: Step 1: Collect wake-up records from the most recent N historical task cycles as a calibration sample set (N is 30 by default, covering no less than 1000 wake-up requests), and record the correctness or incorrectness of the parameter semantic matching result and operation semantic matching result in each request. Step 2: Calculate the mismatch rate of parent-child nodes, the mismatch rate of indirectly related nodes, and the mismatch rate of unrelated nodes. Mismatch rate = number of incorrect matches / total number of matches for this type of relationship. Step 3: With the goal of minimizing the overall mismatch rate, a grid search method (this embodiment uses the grid search method, but other embodiments may also use gradient descent, genetic algorithm, or other optimization methods) is used to traverse the first threshold [0.1, 0.3], the proportional coefficient [0.3, 0.7], the exclusion threshold [5.0, 15.0], and the semantic weight of the parameter [0.5, 0.7] within a preset value range, and select the combination that minimizes the mismatch rate of the validation set as the calibration result; Step four: Write the calibration results into the system configuration file and fix them. The calibration cycle is once every quarter. When changes in business domains cause changes in semantic accuracy requirements, the administrator can trigger immediate recalibration through the configuration interface.

[0110] In the insurance business testing environment, the calibration sample set covered 8,642 wake-up requests from the past 30 days. Through grid search traversal, the optimal parameter combination was determined to be: first threshold 0.2, proportional coefficient 0.5, exclusion threshold 10.0, and parameter semantic weight 0.6, corresponding to an overall false match rate of 3.8% for the validation set. Specifically, the false match rate for parent-child nodes was 2.1%, the false match rate for indirectly related nodes was 8.4%, and the false match rate for unrelated nodes was 0% (because the exclusion threshold effectively filtered out unrelated matches).

[0111] Therefore, by differentiating and quantifying node distances for four types of semantic relationships—complete matching, parent-child relationship, indirect association, and no association—and introducing a two-dimensional weighted fusion of parameter semantics and operational semantics, this method improves the distinguishability of similar semantic scenarios compared to traditional planar similarity calculation, avoids multiple candidate ties and matching drift, and ensures the uniqueness and accuracy of the awakened nodes.

[0112] Step S6: Task Resume Execution

[0113] The system uses the wake-up node as the first execution unit after task recovery. It reads the task parameters, operation instructions, branch conditions, and historical selection results corresponding to that node, loads the environmental data required for node operation, and executes all subsequent steps according to the original task flow and branch chain. If an abnormal running state occurs, such as missing parameters, failed instruction calls, or abnormal branch data, the platform pushes an error message to the user explaining the type of error (missing parameters / failed instruction / abnormal branch), and provides two recovery options: Option 1 is to re-execute the current wake-up node, and Option 2 is to return to the task's starting node and re-execute. When the user selects Option 1, the platform clears the current node's runtime cache and reloads historical parameters before execution; when Option 2 is selected, the platform resets the task state to the initial node. The platform records the user's selections and updates the historical branch decision data for that task.

[0114] Ultimately, by accurately identifying the user's actual interruption point and fully inheriting the historical branch selection state, cross-session task resume functionality was achieved. Compared to the traditional method of globally restarting tasks, this reduces redundant operations and improves the smoothness of recovery and user experience in complex branch task scenarios.

[0115] Experimental verification

[0116] To verify the technical effectiveness of the present invention, the following verifications were conducted in an insurance business testing environment: Verification 1: Path Storage Compression Effect. An insurance application task process containing multiple steps was selected, and the storage lengths of the complete step sequence stored in plaintext and after order-preserving compression were compared. Experiments show that after using LZ77 order-preserving compression encoding, the storage length of the path semantic dimension is fixed at 32 characters; or after using a path encoding dictionary mapping, the storage length of the path semantic dimension is fixed at a 10-digit index. Compared to plaintext storage, the compressed fixed-length encoding significantly reduces the storage overhead of a single path, and after decoding, it can be restored to the original step number sequence, supporting partial order compatibility judgment.

[0117] Verification 2: Semantic Matching Accuracy. In the insurance business testing environment, 8,642 wake-up requests from the past 30 days were collected as a calibration sample set. Based on the historical wake-up records, the proportion of parameter matching errors and operation type matching errors was statistically analyzed, and the semantic distance weights of parameters and operations were dynamically adjusted. Experiments show that the initial weights of 0.6 / 0.4 stabilized at 0.65 / 0.35 after three dynamic adjustments, corresponding to a decrease in the overall mismatch rate of the validation set from the initial 5.2% to 3.8%. Among them, the mismatch rate of parent-child nodes was 2.1%, the mismatch rate of indirectly related nodes was 8.4%, and the mismatch rate of unrelated nodes was 0% (because the exclusion threshold of 10.0 effectively filtered out unrelated matches).

[0118] Verification 3: Stability of Conditional Branch Recovery. Task flows containing conditional branch nodes were selected, and the cross-branch false wake-up rate was compared before and after adding the decision semantic dimension and branch compatibility judgment. Experiments show that filtering out candidate nodes with mismatched branch links from the matching process through branch compatibility judgment reduces the probability of cross-branch false wake-up.

[0119] Verification 4: Adaptive Update Efficiency of the Graph. In the insurance business test environment, a scenario was simulated where a new operation node was added to the task flow, and the adaptive update time of the hierarchical graph of the task domain operation type was recorded. The experiment shows that when a "beneficiary change" operation node is added to the task flow, the graph completes the adaptive update within 12 minutes without manual intervention.

[0120] The above verification results show that the present invention improves the accuracy and stability of cross-session task wake-up by reducing storage overhead through the synergistic effect of order-preserving compression coding, hierarchical distance quantization and branch compatibility judgment.

[0121] Differences from existing technologies

[0122] The core differences between this invention and existing session task recovery technologies are as follows: In terms of path storage, existing technologies mostly use plaintext storage of the complete sequence or simple hash digests. This invention uses structure-preserving compression coding (LZ77 order-preserving compression or path coding dictionary mapping), which compresses the path into a fixed-length code (thirty-two characters or ten-digit index) while maintaining the decodable and reproducible nature of the sequence. This ensures that the semantic dimension of the compressed path can still support partial order compatibility judgment, thus resolving the contradiction between compression and reproducibility.

[0123] Second, in terms of semantic matching, this invention introduces a node distance quantization mechanism in the task domain hierarchy graph. For complete matching, parent-child relationship, indirect ancestor-descendant relationship and no relationship, it adopts a differentiated quantization method with zero distance, first threshold of 0.2, product of hierarchy depth difference and proportional coefficient of 0.5, and exclusion threshold of 10.0 respectively. This transforms abstract semantic similarity into a hierarchical distance value that can be accurately calculated, thereby improving the distinguishability of similar semantic scenes.

[0124] Third, in terms of branch task recovery, this invention uses structured encoding of "condition type: condition value | result identifier" to generate decision semantic dimension, and performs branch compatibility judgment in advance before partial order compatibility judgment, so as to remove candidate nodes with mismatched branch links from the matching process in advance and avoid cross-branch error wake-up.

[0125] Fourth, in terms of graph maintenance, this invention adopts an automatic construction mechanism based on topological sorting and modularity optimization. It automatically constructs a hierarchical graph of task domain operation types according to the calling relationship and data dependency relationship between operation types, and automatically constructs a hierarchical graph of task domain entity classification according to the value range and constraint relationship of task parameters. When the task process or parameter rules change, the graph is synchronously and adaptively adjusted. Specific Implementation

[0127] The following uses an online insurance application task as an example to illustrate the embodiments of the present invention.

[0128] like Figure 4 As shown, the online insurance application process includes the following steps: Step 101 (Normal execution node, operation type: query): Query user identity information, task parameter value is user ID "U20240001"; Step 102 (Normal execution node, operation type: verification): Verify identity information, task parameter value is verification result "pass"; Step 103 (Conditional Branch Node, Operation Type: Judgment): Determine if the user's age is greater than 60 years old. The branch condition is "age > 60". The user selects "No" in the branch options. Step 104 (Normal execution node, operation type: submission): Submit the insurance application, the task parameter value is the policy number "P1234567890".

[0129] The user interrupted the session after executing step 104, and the system recorded the task interruption time as "2024-05-2014:35:22".

[0130] Awakening feature vector generation

[0131] The system pre-constructs a hierarchical map of operation types and a hierarchical classification of entities in the task domain using the automatic construction method in step S1. For example, the operation type "Query" corresponds to node identifier "001", "Verification" corresponds to "002", "Judgment" corresponds to "004", and "Submission" corresponds to "003"; the parameter "Policy Number" corresponds to node code "ENT-Fin-Policy-001" in the entity classification hierarchy.

[0132] For step 104, the wake-up feature vector generated by the system is as follows: Parameter semantic dimension: "ENT-Fin-Policy-001" (entity classification node code corresponding to the policy number); Operation semantic dimension: "003" (the node identifier of the operation type corresponding to the submission class); Path semantic dimension: The unique sequential number of step 101 (number 101, operation semantic dimension 001), step 102 (number 102, operation semantic dimension 002), step 103 (number 103, operation semantic dimension 004), and step 104 (number 104, operation semantic dimension 003) are concatenated with the corresponding operation semantic dimension to form "101001102002103004104003". After reversible compression operation, a 32-bit encoded value is obtained, for example, "a7f3e2d1...9c2b8e4d". Decision semantic dimension: For the conditional branch node in step 103, record the branch condition "age>60" and the selection result "no", encoded as "AGE_GT60|NO".

[0133] The system associates and stores the wake-up feature vector with step 104, and records the interruption time.

[0134] New session wake-up process

[0135] In the new session, the user enters the wake-up statement: "What was the policy number you just submitted?"

[0136] The system parses the wake-up statement: Extract the relative timing indicator word "just now" and determine the relative position interval as steps 102, 103, and 104 (the node where the task was interrupted and the two nodes before it). Extract the operation descriptor "submit" and map it to the "003" node in the task domain operation type hierarchy graph; Extract the parameter descriptor "policy number" and map it to the "ENT-Fin-Policy-001" node in the task domain entity classification hierarchy; No valid branch selection intent was identified; the query decision semantic dimension was filled with a generic matching identifier. (Example)

[0137] After generating the query feature vector, the system retrieves all candidate wake-up feature vectors related to the current historical task. First, a branch compatibility check is performed: the decision semantic dimension of step 104 in the candidate vector is "AGE_GT60|NO", and the query decision semantic dimension is " The two are compatible (the universal matching identifier is compatible with all valid branch codes). Then, a partial order compatibility check is performed: the path semantic dimension of step 104 is decoded: if the path semantic dimension uses LZ77 compression encoding, the corresponding decoding algorithm is called to restore the combined sequence 101001102002103004104003, and the step number portion is extracted from the combined sequence at a fixed offset (the first 3 bits of each segment are the step number, and the last 3 bits are the operation semantic dimension), resulting in the step number sequence 101, 102, 103, 104; if a path encoding dictionary is used, the original concatenated sequence is obtained by reverse lookup using the index value, and the step numbers are extracted according to the same rules, resulting in the step number sequence 101, 102, 103, 104. This sequence and the relative position interval 102-104 satisfy a prefix inclusion relationship (all sequence numbers fall within the interval and are the beginning part of the interval), thus passing the check.

[0138] It should be noted that the step numbers in this embodiment are encoded with three digits, and the number of digits can be dynamically adjusted according to the task size in the actual system.

[0139] Entering fine-grained semantic matching: The query operation type node "003" and the candidate operation semantic dimension "003" are the same node, with a node distance of 0; the query parameter node "ENT-Fin-Policy-001" and the candidate parameter semantic dimension "ENT-Fin-Policy-001" are the same node, with a node distance of 0. The overall semantic matching degree = 1 - 0 × 0.6 - 0 × 0.4 = 1.0.

[0140] The system selects step 104 as the wake-up node, resumes execution from this node, returns the policy number "P1234567890" to the user, and continues to advance the subsequent payment process.

[0141] This invention achieves real-time adaptation between semantic hierarchy and business tasks by automatically constructing a two-layer domain hierarchy graph; it transforms loose text into standardized encoded data that is quantifiable, comparable, and decodeable by constructing structured feature vectors that include parameter semantics, operation semantics, path timing, and branch decisions; and it achieves precise breakpoint continuation across session tasks through two-level progressive filtering of branch compatibility judgment and partial order compatibility judgment, as well as a hierarchical node distance quantization mechanism, effectively improving wake-up accuracy and recovery smoothness in complex branch task scenarios.

[0142] Based on the detailed description in the foregoing specification, and combined with common knowledge in the field of distributed session management (including but not limited to: key-value pair storage technology, vector space retrieval technology, hierarchical classification graph traversal and query technology, lossless compression / decompression algorithms such as LZ77, and string matching and parsing technology), those skilled in the art can fully implement the technical solution of this invention. Specifically: (1) The parameter semantic encoding and operation semantic encoding of the feature encoding module are essentially node search and path splicing in the constructed hierarchical graph, which are conventional data processing operations in this field. The encoding format and mapping rules have been given in the specification. (2) The path semantic dimension order-preserving compression encoding, the specification has given the specific parameters of the LZ77 compression algorithm (window size 32KB, buffer 4KB) and alternative schemes for dictionary mapping, and given the complete encoding-decoding logic. Those skilled in the art can directly call open source or self-developed compression libraries to implement it based on the above parameters. (3) The partial order compatibility judgment and node distance calculation of the matching calculation module are given in the specification with mathematical expressions, threshold parameters and calculation examples. Those skilled in the art can write corresponding computer programs to implement them according to the above rules. (4) Regarding the branch compatibility judgment, the specification has provided the structured encoding format of the decision semantic dimension, “[condition type:condition value]|[result identifier]”, and the comparison rules. Those skilled in the art only need to perform a precise comparison of the strings to complete the judgment.

[0143] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for waking up a task across sessions, characterized in that, The method is executed by the computing device of the interactive platform, which includes a session management module, a feature encoding module, a distributed storage module, a semantic parsing module, a matching calculation module, and a task recovery module. The method includes: S1: During the execution of a task in an old session, whenever a task enters a new node, the feature encoding module generates a wake-up feature vector based on the task parameter values, operation type, and preceding sequence of the current node; the wake-up feature vector includes parameter semantic dimension, operation semantic dimension, and path semantic dimension; the path semantic dimension is a sequence identifier obtained by performing decodable order-preserving compression encoding on the preceding sequence; S2: The feature encoding module associates the wake-up feature vector with the corresponding node and stores it in the distributed storage module, and the session management module records the task interruption time; S3: After receiving a wake-up statement input by the user in a new session, the semantic parsing module determines the relative position interval based on the temporal relationship between the relative timing indicator in the wake-up statement and the task interruption time, and determines the query operation type node and query parameter node based on the mapping relationship between the operation descriptor and parameter descriptor in the wake-up statement and the task domain hierarchy graph, and generates a query feature vector containing the relative position interval, the query operation type node and the query parameter node; S4: The matching calculation module performs a partial order compatibility judgment between the relative position interval in the query feature vector and the path semantic dimension in each candidate wake-up feature vector. Only when the sequence of the candidate path semantic dimension after decoding and restoration satisfies the prefix inclusion relationship or the same sequence relationship with the relative position interval will the candidate wake-up feature vector enter the subsequent matching. S5: The matching calculation module calculates the distance between the parameter semantic dimension and operation semantic dimension of the candidate wake-up feature vector after it has been filtered by S4 and the node distance of the query feature vector in the corresponding task domain hierarchical graph. Based on the node distance, the module determines the comprehensive semantic matching degree and selects the node corresponding to the candidate with the highest comprehensive semantic matching degree as the wake-up node. S6: The task recovery module resumes execution of the task from the wake-up node; The method employs order-preserving compression encoding of the path semantic dimension to compress the sequence of preceding steps into a fixed-length encoded value, reducing path data storage overhead in distributed storage while maintaining the sequence's reproducibility into a sequence number after decoding. Through decoding and partial order compatibility judgment of the path semantic dimension, the range of candidate wake-up nodes is reduced from all historical nodes to a subset of nodes temporally related to the relative position interval, reducing the computational load of subsequent semantic matching. By calculating node distances in the task domain hierarchy graph using the parameter semantic dimension and operational semantic dimension, differentiated quantization methods are employed for complete matching, parent-child relationships, indirect ancestor-descendant relationships, and unrelated relationships, respectively, using zero distance, a first threshold, the product of the hierarchy depth difference and a proportional coefficient, and an exclusion threshold. This transforms abstract semantic similarity into precisely calculable hierarchy distance values, achieving hierarchical quantization matching of approximate semantic words. Thus, without relying on manually preset static keywords, the accuracy of cross-session task wake-up is improved, and the probability of node misalignment is reduced.

2. The cross-session task wake-up method according to claim 1, characterized in that, In S1, the decodeable order-preserving compression code is a structure-preserving compression code, and the sequence identifier can be decoded back into a sequence number to support the partial order compatibility judgment.

3. The cross-session task wake-up method according to claim 2, characterized in that, Structure-preserving compression coding employs any of the following methods: The operation semantic dimensions of each node in the preceding sequence are concatenated in the execution order and then reversibly compressed to obtain a fixed-length encoded value. Alternatively, the concatenated sequence can be mapped to a preset path encoding dictionary to obtain a fixed-length index value; the path encoding dictionary stores a bidirectional mapping relationship between the concatenated sequence and the index value.

4. The method according to claim 1, characterized in that, In S1, the parameter semantic dimension is the node encoding of the task parameter value in the task domain entity classification hierarchy, and the operation semantic dimension is the node identifier of the operation type in the task domain operation type hierarchy graph.

5. The cross-session task wake-up method according to claim 1, characterized in that, In S4, the partial order compatibility judgment includes: Decode the path semantic dimension of the candidate wake-up feature vector into a sequence of numbers; Determine whether the sequence number sequence and the query sequence represented by the relative position interval satisfy a prefix inclusion relationship or a same sequence relationship.

6. The cross-session task wake-up method according to claim 1, characterized in that, In S5, the node distance is determined based on the difference in hierarchical depth between the two nodes in the hierarchical graph of the corresponding task domain; If two nodes are the same node, then the node distance is zero; If two nodes have a direct parent-child relationship, the node distance is a preset first threshold. If there is an indirect ancestor-descendant relationship between two nodes, the node distance is the product of the difference in level depth and a preset scaling factor. If two nodes have no hierarchical relationship, the distance between the nodes is either infinite or a preset exclusion threshold.

7. The cross-session task wake-up method according to claim 1, characterized in that, In S3, determining the relative position interval includes: If the relative timing indicator is "just now", then the relative position interval is the interval formed by the node where the task was interrupted and the two nodes before it. If the relative timing indicator is "before", then the relative position interval is the interval consisting of all nodes from the start of the historical session to the time when the task was interrupted; If the relative timing indicator is "then", then the relative position interval is the interval formed by the next node of the node where the task interruption time is located and the two nodes after it.

8. The cross-session task wake-up method according to claim 1, characterized in that, In S3, the node for determining the query operation type and the query parameter node includes: In the hierarchical graph of operation types in the task domain, find the operation type node corresponding to the operation descriptor. If there are multiple corresponding nodes, select the one with the highest level. If there is no direct correspondence, find the node corresponding to its superior and subordinate concept words as the query operation type node. In the entity classification hierarchy of the task domain, find the parameter node corresponding to the parameter descriptor. If there are multiple corresponding nodes, select the one with the highest level. If there is no direct correspondence, find the node corresponding to its superior and subordinate concept words as the query parameter node.

9. A cross-session task wake-up method according to claim 1, characterized in that, When a task in an older session contains a conditional branch node: The wake-up feature vector generated in S1 also includes a decision semantic dimension, which records the branch conditions of the condition branch node and the user's selection result at that node; The query feature vector generated in S3 also includes a query decision semantic dimension, which is generated based on the branch selection intent implicit in the wake-up statement; In S4, before performing partial order compatibility judgment, branch compatibility judgment is performed first: if the decision semantic dimension of the candidate wake-up feature vector is incompatible with the query decision semantic dimension, then the candidate wake-up feature vector is removed. The branch compatibility judgment filters out candidate nodes with mismatched branch links from the matching process in advance to reduce the probability of cross-branch erroneous wake-up.

10. A cross-session task wake-up method according to claim 1, characterized in that, The task domain hierarchy map includes a task domain operation type hierarchy map and a task domain entity classification hierarchy map. The task domain operation type hierarchy graph is automatically constructed based on the calling relationship and data dependency relationship between the operation types of each node in the task flow; The task domain entity classification hierarchy is automatically constructed based on the value range of task parameters in the task process and the constraint relationship between parameters.