Heterogeneous graph-based examination and approval route recommendation method and device, electronic equipment and medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-13
- Publication Date
- 2026-08-11
AI Technical Summary
[0006]然而,上述第一类固定规则方法虽稳定可控,但仅能回答“制度上允许谁审批”,无法在多个都合法的候选审批人中进一步甄别“谁更适合当前这一具体业务”
[0063](1)本发明通过“合规候选生成+任务相关局部异构图建模”的组合方式,先依据流程节点的角色约束和组织权限约束从全量用户中筛选出制度上合法的候选审批人,再围绕当前审批任务构建局部异构图进行评分排序,使得推荐结果在满足制度合规性的前提下进一步实现业务适配性优化,显著缩小了候选空间并提高了推荐命中率,降低了因选错审批人导致的流程退回和转办概率。
Smart Images

Figure CN122550106A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of big data processing technology, and in particular to an approval route recommendation method, apparatus, electronic device and storage medium based on heterogeneous graphs. Background Technology
[0002] In daily business operations, multi-level approval scenarios such as seal approval, procurement approval, expense reimbursement approval, and contract approval are common. These approval processes typically require applicants to select a specific approver from multiple candidates who meet the system requirements when submitting the application or at a certain stage of the process. Under the premise of satisfying organizational authority and procedural regulations, how to reduce the applicant's burden of selecting an approver, improve the efficiency of the approval process, and reduce process returns, transfers, or repeated communication caused by selecting the wrong approver are practical problems faced by existing approval systems.
[0003] Currently, common approval routing implementation methods are mainly divided into two categories.
[0004] The first type is the approval routing method based on fixed rules. This method involves writing the approver, approval role, department head, or processing variables into the node configuration during the process definition phase. When a user initiates a process, the system automatically binds the approver according to preset rules, or simply provides a static candidate range for manual selection. This method is simple to implement, highly controllable, and widely used in existing office automation systems or business process management systems.
[0005] The second category is approval assistance methods based on historical statistics or general recommendation algorithms. These methods typically analyze statistics such as the number of people processed, the number of processing attempts, and the average processing time for a particular process over a recent period, and then rank candidates based on these statistics. Some solutions also incorporate form text or business keywords into the recommendation logic to improve the matching ability for similar business processes.
[0006] However, while the first type of fixed-rule method is stable and controllable, it only answers the question of "who is legally allowed to approve," failing to further differentiate among multiple legitimate candidate approvers as "who is more suitable for the current specific business." Furthermore, this method cannot leverage real-world historical processing experience, resulting in recommendations that, while formally compliant, may not accurately reflect actual business needs. In multi-level approval scenarios, the appropriate approvers often differ at different stages, and static role or responsible person configurations are insufficient to accommodate variations in stage location, historical habits, and business themes. Moreover, once the preset rules fail to cover the actual situation, the system can only revert to manual selection, hindering continuous optimization.
[0007] While the second type of methods, based on historical statistics or general recommendation algorithms, are more flexible than fixed rules, they rely solely on tabular statistical features such as processing frequency, completion rate, or average duration. This makes it difficult to depict the complex relationship of "at what process node, in what role, for what business topic, and for which department has someone processed an approval," thus failing to accurately reflect the true constraints of approval behavior. Directly submitting form text to a generative large language model to determine the approver introduces risks of uncontrollable, unauditable, and difficult-to-reproduce results. Furthermore, while some general graph recommendation methods have the ability to process relational data, their applications are mostly concentrated in e-commerce recommendations, content distribution, or social recommendations. Their graph structures typically only contain two types of nodes: users and items, with relatively simple edge relationships. They do not consider information specific to approval scenarios, such as process node order, role constraints, organizational hierarchy, processing variables, and policy fallback rules.
[0008] In summary, existing technologies have at least the following shortcomings in approval route recommendation: they fail to jointly model multiple dimensions such as process node role constraints, organizational hierarchy constraints, process node sequence, historical approval relationships, business theme associations, failure degradation, and evidence output, making it difficult for recommendation results to simultaneously take into account institutional compliance, business adaptability, and interpretability.
[0009] Therefore, how to accurately, efficiently, and interpretably rank the compliant candidate approvers at the current approval node while satisfying the constraints of process node roles, organizational authority, and processing variables has become a pressing technical problem to be solved in this field. Summary of the Invention
[0010] To overcome the shortcomings of the prior art, the present invention provides an approval route recommendation method, apparatus, electronic device and storage medium based on heterogeneous graphs.
[0011] The technical solution adopted by this invention to solve its technical problem is:
[0012] According to one aspect of this application, an approval route recommendation method based on heterogeneous graphs is provided, comprising:
[0013] Obtain the task information for the current process task, which includes at least the process identifier, the current node identifier, the applicant identifier, and the applicant department identifier;
[0014] Based on the role constraints and organizational permission constraints corresponding to the current node identifier, compliant candidate approvers are selected from all users to form a candidate set;
[0015] Retrieve historical approval records, organizational relationship data, and business theme data associated with the task information;
[0016] Construct a task-related local heterogeneous approval relationship graph. The graph uses the applicant corresponding to the applicant identifier as the applicant node, the department corresponding to the applicant department identifier as the application department node, the process corresponding to the process identifier as the process definition node, and the node corresponding to the current node identifier as the current process node. It also includes business theme nodes extracted from the business theme data and candidate approver nodes corresponding to each candidate approver in the candidate set. The graph has edges of multiple relationship types.
[0017] On the task-related local heterogeneous approval relationship graph, based on the task query vector of the task information, relationship-aware message propagation is performed to obtain the graph embedding representation of each candidate approver node;
[0018] Calculate the graph matching score for each candidate approver by using the task representation of the current process node and the graph embedding representation of each candidate approver node;
[0019] The graph matching score is fused with the historical statistical score, organizational constraint score, and load adjustment score to obtain a comprehensive score for each candidate approver, and the approval route recommendation result is output based on the comprehensive score.
[0020] In one optional implementation, the task information further includes:
[0021] A process structure snapshot, used to represent the node order, the relationship between preceding and following nodes, and the current node position in the current process definition;
[0022] Candidate role constraint snapshot, used to characterize the set of roles allowed by the current node, the handler variable, or the scope of authorization;
[0023] Rule constraint snapshots are used to characterize organizational hierarchy rules, role rules, and fallback rules that need to be met.
[0024] In one optional implementation, the step of selecting compliant candidate approvers from all users based on the role constraints and organizational permission constraints corresponding to the current node identifier includes:
[0025] Parse the role constraints and organizational permission constraints corresponding to the current node identifier to determine the range of candidate roles and candidate organizations;
[0026] Users who simultaneously meet the criteria of the candidate role range and the candidate organization range will be identified as the compliance candidate approvers.
[0027] In one alternative implementation, the business topic data is obtained in the following way:
[0028] The form fields associated with the task information are segmented and keywords are extracted.
[0029] The extracted keywords are encoded into topic vectors or keyword sets to serve as the data corresponding to the business topic nodes.
[0030] In one alternative implementation, the edges of the multiple relation types include:
[0031] User approval edge, user's department edge, department hierarchy edge, user role edge, role-to-process node mapping edge, process node sequence edge, process node-to-process definition belonging edge, business theme association edge.
[0032] In one optional implementation, the task query vector based on task information performs relationship-aware message propagation, including:
[0033] Based on the task query vector, attention weights are calculated for edges of different relationship types in the task-related local heterogeneous approval relationship graph; the task query vector is obtained by fusing the representation of the current process node, the representation of the applicant corresponding to the applicant identifier, the representation of the application department corresponding to the applicant department identifier, the representation of the process definition corresponding to the process identifier, and the representation of the business theme node;
[0034] Based on the attention weights and transformation matrices of different types of relation edges, multiple rounds of message aggregation and updating are performed on each node to obtain the graph embedding representation of each candidate approver node.
[0035] In one optional implementation, the model parameters involved in the relationship-aware message propagation are obtained through offline training, specifically including:
[0036] For each historical process node sample, based on the process structure snapshot, candidate role constraint snapshot and rule constraint snapshot at the corresponding moment of the sample, a set of compliant candidate approvers corresponding to the sample is generated. The approvers who were actually selected at the historical process node are taken as positive samples, and other candidate approvers who meet the system constraints but were not actually selected at the same process node and at the same moment are taken as negative sample sets.
[0037] A joint loss function is constructed, which includes ranking loss and organizational constraint regularization term. The ranking loss is constructed based on the difference between the predicted score of the positive sample and the predicted score of each candidate approver in the negative sample set. The organizational constraint regularization term is constructed based on the degree of role matching between the candidate approver and the current node, the management chain relationship with the applicant, the historical collaboration strength with the applicant department, and the degree of matching with the current node's permission requirements.
[0038] The model parameters are optimized based on the joint loss function so that the model learns the organizational institutional boundaries during the training phase.
[0039] In one optional implementation, the historical statistical score is calculated based on the candidate approver's total number of historical processing attempts, number of valid completions, recent processing time decay value, and average processing time.
[0040] The organizational constraint score is calculated based on the role matching degree between the candidate approver and the current node, the management chain relationship between the candidate approver and the applicant, the historical collaboration strength between the candidate approver and the applicant department, and the matching degree between the candidate approver's organizational level and the current node's permission requirements.
[0041] The load adjustment score is calculated based on the candidate approver's current number of pending tasks, recent task reception density, and cross-process busyness.
[0042] In an optional implementation, the method further includes:
[0043] Extract the meta-paths that contribute the highest to the graph matching score;
[0044] The statistical information from the metapath and the historical statistical scores is filled into a preset explanation template to generate an interpretable description corresponding to the approval route recommendation result.
[0045] In an optional implementation, the method further includes:
[0046] If the comprehensive score calculation fails, the candidate set is empty, or the number of historical approval records is lower than a preset threshold, the final approver is determined according to a preset downgrade order, which includes: the applicant's direct superior, the head of the applying department, and the preset role person in charge of the current process node.
[0047] According to another aspect of this application, the present invention provides an approval route recommendation device based on heterogeneous graphs, comprising:
[0048] The information acquisition module is used to acquire the task information of the current process task. This task information includes at least the process identifier, the current node identifier, the applicant identifier, and the applicant department identifier.
[0049] The candidate generation module is used to select compliant candidate approvers from all users based on the role constraints and organizational permission constraints corresponding to the current node identifier, and form a candidate set.
[0050] The data retrieval module is used to retrieve historical approval records, organizational relationship data, and business theme data associated with the task information.
[0051] The graph construction module is used to construct a task-related local heterogeneous approval relationship graph. The graph uses the applicant corresponding to the applicant identifier as the applicant node, the department corresponding to the applicant department identifier as the application department node, the process corresponding to the process identifier as the process definition node, and the node corresponding to the current node identifier as the current process node. It also includes business theme nodes extracted from the business theme data and candidate approver nodes corresponding to each candidate approver in the candidate set. The graph has edges of multiple relationship types.
[0052] The graph propagation module is used to perform relationship-aware message propagation based on the task query vector of the task information on the task-related local heterogeneous approval relationship graph to obtain the graph embedding representation of each candidate approver node.
[0053] The graph matching module is used to calculate the graph matching score of each candidate approver by using the task representation of the current process node and the graph embedding representation of each candidate approver node.
[0054] The fusion and sorting module is used to fuse the graph matching score with the historical statistical score, organizational constraint score, and load adjustment score to obtain a comprehensive score for each candidate approver, and output the approval route recommendation result based on the comprehensive score.
[0055] In one alternative embodiment, the device further includes:
[0056] The explanation generation module is used to extract several meta-paths that contribute the most to the graph matching score, and fill the meta-paths and statistical information from the historical statistical scores into a preset explanation template to generate an interpretable description corresponding to the approval route recommendation result.
[0057] In one alternative embodiment, the device further includes:
[0058] The downgrade processing module is used to determine the final approver according to a preset downgrade order when the comprehensive score calculation fails, the candidate set is empty, or the number of historical approval records is lower than a preset threshold. The downgrade order includes: the applicant's direct superior, the head of the applying department, and the preset role person in charge of the current process node.
[0059] In one optional implementation, the information acquisition module, the data retrieval module, and the fusion sorting module are uniformly orchestrated and scheduled by an intelligent agent. The intelligent agent calls the process history query service and the organizational structure query service through the model context protocol tool to obtain the historical approval records and the organizational relationship data.
[0060] According to another aspect of this application, an electronic device is provided, comprising: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to perform the above-described method.
[0061] According to another aspect of this application, a non-volatile computer-readable storage medium is provided, on which computer program instructions are stored, wherein the computer program instructions, when executed by a processor, implement the above-described method.
[0062] The positive effects of this invention:
[0063] (1) This invention uses a combination of “compliance candidate generation + task-related local heterogeneous graph modeling” to first select legally compliant candidate approvers from all users based on the role constraints and organizational permission constraints of process nodes, and then construct a local heterogeneous graph around the current approval task for scoring and ranking. This allows the recommendation results to further optimize business adaptability while meeting the requirements of compliance, significantly reducing the candidate space and improving the recommendation hit rate, and reducing the probability of process return and transfer due to the wrong approver selection.
[0064] (2) The present invention introduces a task-aware relationship attention mechanism based on task query vector on the local heterogeneous approval relationship graph. It can dynamically adjust the attention weight of different relationship types according to the overall context of the current approval task, so that the contribution of the same relationship under different tasks varies, thereby improving the model's generalization ability and recommendation accuracy for different process nodes, different business types and different organizational relationship scenarios.
[0065] (3) This invention weights and fuses graph matching score, historical statistical score, organizational constraint score, and load adjustment score to form a comprehensive score. This fusion scoring mechanism not only utilizes the deep relationship patterns captured by the relationship propagation on heterogeneous graphs, but also takes into account the historical processing experience of candidate approvers, organizational system matching degree, and real-time workload. This ensures that the recommendation results reflect relationship patterns while conforming to organizational system boundaries and avoiding task congestion risks, which helps to shorten the average dwell time of approval nodes.
[0066] (4) This invention extracts the meta-path that contributes the most to the graph matching score and generates an interpretable description by combining the structured statistical information in the historical statistical scores. This allows the recommendation reasons to correspond to specific relationship links and statistical facts, improving the verifiability and traceability of the recommendation results. It is also easier for business personnel to understand and audit, and overcomes the defect of unverifiable interpretation results in existing recommendation methods.
[0067] (5) In case of abnormal situations such as insufficient historical samples, empty candidate set or failure of score calculation, the present invention can determine the final approver according to the preset demotion order (such as the applicant's direct superior, the head of the applying department, and the preset role of the current process node), ensuring that the approval process is not interrupted due to abnormalities in the recommendation module, and improving the stability and availability of the system in a real enterprise environment.
[0068] In summary, this invention significantly improves the efficiency of approver selection. The system no longer requires applicants to rely entirely on human experience to judge among multiple legally compliant candidates; instead, it can automatically sort candidates from a compliant candidate set, thus reducing the burden of manual selection and lowering the threshold for initiating processes. This invention is applicable to multi-level approval scenarios with various sequential or conditional branches, such as seal approval, procurement approval, and contract approval. It has good versatility and scalability; adding new approval processes does not require redesigning the entire recommendation chain, reducing system maintenance and expansion costs. Attached Figure Description
[0069] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0070] Figure 1 This is a schematic diagram of the overall system architecture provided in the embodiments of the present invention;
[0071] Figure 2 This is a flowchart illustrating the approval route recommendation method provided in an embodiment of the present invention;
[0072] Figure 3 This is a timing diagram illustrating the collaboration between an intelligent agent and a tool, provided in an embodiment of the present invention.
[0073] Figure 4 This is a schematic diagram of the process for seal approval in an embodiment of the present invention;
[0074] Figure 5 This is a schematic diagram of the structure of the task-related local heterogeneous approval relationship diagram provided in an embodiment of the present invention;
[0075] Figure 6 A block diagram of the approval route recommendation device provided in this embodiment of the invention. Detailed Implementation
[0076] The prior art and the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. 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.
[0077] Furthermore, to better illustrate this application, numerous specific details are provided in the following detailed embodiments. Those skilled in the art should understand that this application can be implemented without certain specific details. In some instances, methods, means, components, and circuits well-known to those skilled in the art have not been described in detail in order to highlight the main points of this application.
[0078] The technical problem this invention aims to solve is how to perform low-latency, high-precision sorting of compliant candidate approvers for the current approval node in a computer system, while satisfying constraints on process node roles, organizational permissions, and processing variables. More specifically, while existing technologies can provide a feasible range of approvers through fixed roles, department heads, or static variables, they struggle to accurately characterize the multiple relationship couplings between the applicant, the applying department, the current process node, the process definition, and the business subject within this range. Therefore, it is difficult to reliably select the most suitable approver from multiple legitimate candidate approvers for the current task.
[0079] To address the aforementioned main technical problems, this invention further solves three sub-technical problems. First, how to unify the organization of process structures, organizational relationships, historical approval behaviors, and business themes from scattered data sources, enabling the system to characterize node locations, role mappings, departmental collaboration links, and business theme associations within the same computational framework. Second, how to output verifiable and traceable structured evidence under online inference conditions, rather than simply returning a black-box recommendation result with no identifiable source. Third, how to maintain the stability of approval routing even when there is insufficient sample size, scoring failure, or abnormal tool calls, allowing the system to smoothly revert from intelligent recommendation to organizational rule routing without disrupting process execution.
[0080] Therefore, the purpose of this invention is not merely to "recommend an approver," but to provide a method for ranking compliant candidate approvers based on task-related local heterogeneous graphs under institutional constraints, and to further output structured statistical evidence and graph path evidence, and to perform stable degradation under abnormal conditions, thereby forming a controllable, explainable, and deployable approval routing recommendation scheme applicable to real OA systems.
[0081] This invention employs an approval routing recommendation technology based on "compliance candidate generation + task-related local heterogeneous graph scoring and ranking." The overall approach is neither open recommendation directly among all organizational users nor simply handing form content to a generative model to determine approvers. Instead, it first generates a set of compliant candidate approvers within the boundaries of process regulations and organizational rules. Then, it constructs a task-related local heterogeneous approval relationship graph around the current approval task, and performs relationship-aware propagation and fusion scoring on this local graph to obtain the final ranking result. After ranking, the system extracts structured statistical evidence and high-contribution graph path evidence to generate verifiable explanations; if the sample is insufficient or the model is abnormal, a downgraded route is executed according to preset organizational rules.
[0082] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0083] Reference Figure 1 , Figure 1 The diagram illustrates a system architecture according to an embodiment of the present invention. The system architecture, from top to bottom, includes a front-end presentation layer, a unified interface layer for intelligent agents, an approval, routing, and recommendation intelligent agent layer, a tool layer, a data layer, and a scoring and explanation engine layer.
[0084] The front-end presentation layer is used to display user-facing approval business pages, such as seal approval forms, purchase requisition forms, approval details pages, and recommendation result display pages. When an applicant or process initiator triggers an approval process at this layer, the system generates task information related to the current process task.
[0085] The unified interface layer for intelligent agents is used to receive approval and recommendation requests initiated by the front end. It provides ordinary dialogue interfaces and streaming dialogue interfaces, and forwards the standardized requests to the approval routing and recommendation intelligent agent layer for processing.
[0086] The approval routing recommendation agent layer is responsible for receiving the context of the task information, scheduling the tools in the tool layer as needed to obtain the required data, generating a set of compliant candidate approvers, and triggering the scoring and interpretation engine layer to execute subsequent sorting and interpretation outputs. This agent acts as the scheduling hub, coordinating the calling relationships and data flow between various modules.
[0087] The tool layer includes a process history query tool and an organizational structure query tool, which interact with the workflow history database and organizational structure and user basic data services in the data layer to obtain historical approval records and organizational relationship data. The tool layer can also be extended to connect to other business tools to meet the data needs of different approval scenarios.
[0088] The scoring and interpretation engine layer executes the core scoring logic of this application, including: generating structured candidates based on role constraints and organizational permission constraints; performing graph model scoring on the constructed task-related local heterogeneous approval relationship graph; performing comprehensive scoring and Top-K ranking of each candidate approver after integrating historical statistical scores, organizational constraint scores, and load adjustment scores; and generating recommendation results that include approver identification, scores, interpretation text, and structured evidence.
[0089] The recommendation results are ultimately returned to the front-end display layer via the unified interface layer of the intelligent agent, and presented to the user on the approval details page or recommendation result display page, so that the user can select or the system can automatically bind them to the handler field of the process node.
[0090] The aforementioned system architecture decouples data acquisition, intelligent scheduling, algorithm scoring, and result output into layers, enabling the approval route recommendation method provided in this application to be stably deployed and run in a real enterprise environment, and possessing good scalability and governance capabilities.
[0091] It should be noted that the following diagram shows one possible sequence of steps, and it is not strictly necessary to follow this order. Some steps can be executed in parallel without interdependence.
[0092] Specifically, Figure 2 A flowchart illustrating an approval route recommendation method based on a heterogeneous graph according to an embodiment of this application is shown. Figure 2 As shown, the method includes:
[0093] S201. Obtain the task information of the current process task. The task information includes at least the process identifier, the current node identifier, the applicant identifier, and the applicant's department identifier. The task information also includes: a process structure snapshot, which is used to represent the node order, the relationship between preceding and subsequent nodes, and the position of the current node in the current process definition; a candidate role constraint snapshot, which is used to represent the set of roles allowed for the current node, the handler variable, or the scope of authorization; and a rule constraint snapshot, which is used to represent the organizational hierarchy rules, role rules, and fallback rules that need to be met.
[0094] Specifically, the system can receive a structured task object, which, in addition to the aforementioned information items, may also include one or more of the following: process instance identifier, current node name, form field key-value pairs, tenant identifier, session identifier, and context filtering conditions. The process structure snapshot describes the sequential order of nodes in the current process definition and the current node's position within the entire process chain; the candidate role constraint snapshot limits the current node to one or more roles, handler variables, or authorized scope permitted by regulations; the rule constraint snapshot expresses the organizational hierarchy rules, role rules, and fallback rules activated when recommendations are not possible. By acquiring the above task information, the system not only grasps the basic context of the current process task, including the initiator, department, and current node, but also clarifies which personnel are permitted to participate in the approval competition at the regulatory level, thus providing a basis for subsequent candidate generation and accurate recommendations within compliance boundaries.
[0095] S202. Based on the role constraints and organizational permission constraints corresponding to the current node identifier, select compliant candidate approvers from all users to form a candidate set, including:
[0096] Parse the role constraints and organizational permission constraints corresponding to the current node identifier to determine the range of candidate roles and candidate organizations;
[0097] Users who simultaneously meet the criteria of the candidate role range and the candidate organization range will be identified as the compliance candidate approvers.
[0098] During implementation, the system first parses the allowed role scope, handler variables, or organizational constraints of the current process node and its associated process definition. Then, based on organizational structure information, users clearly outside the effective organizational scope are filtered out. Next, based on the role-node matching relationship, personnel with approval experience but unsuitable for the current node are excluded. Preferably, candidate generation follows a hierarchical selection order: candidates are prioritized from historical samples of the same process, theme, and department; if the sample size is insufficient, selection is back to the same process and department; if still insufficient, selection is further back to the same role pool; if still insufficient candidates are obtained, selection is back to the applicant's direct superior, the head of the applying department, or the preset role leader of the current node. Through this method, the system ultimately obtains a set of candidate approvers that meets regulatory compliance requirements and is of appropriate size, rather than performing unconstrained sorting of all organizational users.
[0099] S203. Retrieve historical approval records, organizational relationship data, and business theme data associated with the task information.
[0100] Specifically, the system can call the MCP tool to obtain the required data from the workflow history database and the organizational structure basic data service.
[0101] For historical approval records, the system retrieves historical approval instances under the same or similar processes based on the current process identifier, preset time window, and application department scope. The obtained historical samples may include process instance identifier, process name, process identifier, approver identifier, node name, process status, applicant information, and approval creation and update times. Preferably, the system can also combine subject terms, application types, or keywords in the form to retrieve similar business samples by subject code, thereby expanding historical reference information related to the current task.
[0102] For organizational relationship data, the system obtains information such as the applicant's department chain, department tree, the department to which the candidate approver belongs, and its superior department, in order to depict the organizational hierarchy among the applicant, the applying department, and the candidate approver.
[0103] For business-themed data, the system obtains it by performing word segmentation and keyword extraction on the form fields associated with the task information. In one implementation, fields such as file name, content summary, approval authority, and application reason can be processed by Chinese word segmentation. Then, based on a preset dictionary, word frequency-inverse document frequency weighting, or keyword rules, high-frequency or high-weight words with distinguishing value are selected. Subsequently, the selection results are encoded into a keyword set or topic vector, which serves as the data corresponding to the business-themed node and is used to establish a topic-dimensional association with historical business records and candidate approvers. Through the above method, the system provides a sufficient foundation of historical behavior, organizational structure, and business semantic data for the subsequent construction of a task-related local heterogeneous approval relationship diagram.
[0104] S204. Construct a task-related local heterogeneous approval relationship graph. The graph uses the applicant corresponding to the applicant identifier as the applicant node, the department corresponding to the applicant department identifier as the application department node, the process corresponding to the process identifier as the process definition node, and the node corresponding to the current node identifier as the current process node. It also includes business theme nodes extracted from the business theme data and candidate approver nodes corresponding to each candidate approver in the candidate set. Furthermore, the graph has edges of various relationship types.
[0105] Specifically, the edges of the various relationship types may include: user approval edges, user department affiliation edges, department hierarchy edges, user role edges, role-to-process node mapping edges, process node sequence edges, process node-to-process definition affiliation edges, and business theme association edges. Furthermore, the graph may also include other edge types reflecting historical collaboration relationships, such as historical co-occurrence edges from departments to users.
[0106] It should be noted that this invention does not directly perform reasoning on the full enterprise organizational graph. Instead, it constructs a local heterogeneous approval relationship graph closely related to the current approval task, centered around the current applicant, applying department, process definition, current process node, business theme, and all compliant candidate approvers. This local graph construction method is adopted because the relationships and interactions truly valuable to the current approval task are highly concentrated around the task's periphery. Propagating these relationships and interactions on the full enterprise graph would not only introduce a large amount of irrelevant nodes and relationship noise but also incur unnecessary computational overhead. By constructing a task-related local graph, the system can more efficiently and accurately capture structural information and semantic associations related to the current task within a streamlined relationship space, laying the foundation for subsequent relationship-aware message propagation and graph embedding representation learning.
[0107] S205. On the task-related local heterogeneous approval relationship graph, perform relationship-aware message propagation based on the task query vector of the task information to obtain the graph embedding representation of each candidate approver node;
[0108] Specifically, the task query vector based on task information performs relationship-aware message propagation, including:
[0109] Based on the task query vector, attention weights are calculated for edges of different relationship types in the task-related local heterogeneous approval relationship graph; the task query vector is obtained by fusing the representation of the current process node, the representation of the applicant corresponding to the applicant identifier, the representation of the application department corresponding to the applicant department identifier, the representation of the process definition corresponding to the process identifier, and the representation of the business theme node;
[0110] Based on the attention weights and transformation matrices of different types of relation edges, multiple rounds of message aggregation and updating are performed on each node to obtain the graph embedding representation of each candidate approver node.
[0111] In one alternative implementation, the system uses different transformation matrices and attention parameters for message propagation based on different relationship types. (Based on nodes...) For example, let it be in the first... The graph embedding representation of the layer is as follows Then in the first The layer is updated as follows:
[0112]
[0113] in, Indicates the relation type, Represents a node In relation The set of neighboring nodes below, Representing relations In the The transformation matrix of the layer, A matrix representing the retention of information about the nodes themselves. This represents the activation function (e.g., ReLU or LeakyReLU). Representing neighboring nodes Through relationships For the target node Attention weights are dynamically calculated values used to adjust the contribution of different neighbors in the current task context.
[0114] To reflect the impact of the current approval task context on the importance of different relationship types, the above attention weights... It is not a fixed value, but rather dynamically calculated based on the current task query vector. Specifically, let the current task query vector be... Target node with neighboring nodes The representations after relational transformation are as follows: and Then the original attention score of relation perception for:
[0115]
[0116] in, For relationship The corresponding attention parameter vector, For a trainable weight matrix, This is the hyperbolic tangent activation function, used to introduce nonlinearity.
[0117] The original score is then normalized to obtain the final attention weight. :
[0118]
[0119] in This represents an exponential function with the natural constant e as the base. Through this calculation, the attention weights can be determined based on the current task query vector. Dynamic adjustment allows the same relation edge (e.g., "user approval edge") to acquire different weight values when it involves different business themes or different process nodes, thereby achieving task-aware neighbor information aggregation.
[0120] After completing the pre-defined number of relationship-aware message propagation layers (e.g., 2 or 3 layers), each node in the system obtains a graph embedding representation that integrates local structural information and task context information. To obtain a unified representation of the current task, the system embeds the graph representation of the current process node... The applicant's graph embedding representation The embedded representation of the application department's graph Graph embedding representation of process definition And graph embedding representation of business topic nodes Perform splicing (referred to as splicing operation) The data is then fed into a multilayer perceptron (MLP) for fusion to obtain a unified task representation. :
[0121]
[0122] This unified task indicates It condenses the core information of the current approval task in multiple dimensions such as process structure, participants, organizational affiliation, and business semantics.
[0123] S206. Calculate the graph matching score of each candidate approver by using the task representation of the current process node and the graph embedding representation of each candidate approver node.
[0124] Specifically, for the first candidate in the candidate set... One candidate approver The graph embedding representation obtained after the above graph propagation is denoted as Then the original graph matching score of the candidate approver It can be obtained through bilinear transformation:
[0125]
[0126] in, Transpose for a unified task representation; A graph matching weight matrix is used to characterize the interaction between the task representation and the candidate approver representation; This is a bias term.
[0127] The calculated graph matching score reflects the comprehensive degree of matching between the candidate approver and various aspects such as the current task context, current process nodes, business themes, and the applicant. This score will serve as one of the important components of the subsequent comprehensive evaluation.
[0128] S207. The graph matching score is fused with the historical statistical score, organizational constraint score, and load adjustment score to obtain a comprehensive score for each candidate approver, and the approval route recommendation result is output based on the comprehensive score.
[0129] Specifically, for the first candidate in the candidate set One candidate approver Its overall score The following weighted fusion method can be used for calculation:
[0130]
[0131] in, The graph matching score calculated in step S206; Historical statistical scores; Organizational constraint score; Adjust the score for the load. Let be the weighting coefficients for each score, and satisfy . The specific values of each weighting coefficient can be determined through experience or parameter optimization based on the actual application scenario.
[0132] Furthermore, the weighted portion of the graph matching score can be defined as:
[0133]
[0134] The weighted portion of the structured score is defined as:
[0135] Then we have:
[0136]
[0137] The calculation method for each item's score is explained below:
[0138] The historical statistical score is calculated based on the candidate approver's total number of processing attempts, number of valid completions, recent processing time decay value, and average processing time. The historical statistical score is used to characterize the candidate approver's processing experience and efficiency. In one optional implementation, the historical statistical score... It can be calculated using the following formula:
[0139]
[0140] in, as a candidate approver Total number of historical processing times; The number of times the work is completed is valid; The time decay value between the most recent processing and the current time is preferably calculated using a time decay function, and the collection time point is the current online inference time. This represents the average processing time. β1 represents the normalization function, preferably the minimum-maximum normalization or standardization function, used to map statistics of different dimensions to the same numerical range; β2, β3, and β4 are the weighting coefficients of each factor, used to adjust the contribution of each statistic to the historical score.
[0141] The organizational constraint score is calculated based on the role matching degree between the candidate approver and the current node, the management chain relationship between the candidate approver and the applicant, the historical collaboration strength between the candidate approver and the applicant department, and the matching degree between the candidate approver's organizational level and the current node's permission requirements. In an optional implementation, the organizational constraint score... It can be calculated using the following formula:
[0142]
[0143] in, Indicates candidate approver Does it belong to a role allowed by the current node? This indicates whether there is a parent chain or authorization chain relationship between the candidate and the applicant. This indicates the strength of the historical collaboration between the candidate and the applying department. This indicates whether the candidate's organizational level matches the permission requirements of the current approval node. These are the weighting coefficients for each factor.
[0144] The load adjustment score is calculated based on the candidate approver's current number of pending tasks, recent task reception density, and cross-process busyness. In one optional implementation, the load adjustment score... It can be calculated using the following formula:
[0145]
[0146] in, Indicates candidate approver The current number of tasks to be completed. This indicates the order density within the most recent time window. This indicates the overall busyness of the candidate across all process dimensions, and the preferred time for collecting each data item is the current online inference time or the time of its most recent cache refresh. These are the weighting coefficients for each factor. Since all the above factors reflect the busyness of the candidate approvers, they have a negative impact on the recommendation priority. Therefore, each factor is preceded by a negative sign to indicate that the score decreases as the busyness level increases.
[0147] The system assigns a comprehensive score to all candidate approvers in the candidate set as described above. Sort the data in descending order and select the top K (Top-K) candidate approvers with the highest scores as the approval route recommendation results for output. The value of K can be preset according to actual business needs, such as outputting the top 3 or top 5 for users to choose from, or directly taking the highest score as the default approver and automatically filling it into the process node.
[0148] S208. Extract several meta-paths that contribute the most to the graph matching score; fill the meta-paths and statistical information from the historical statistical scores into a preset explanation template to generate an interpretable description corresponding to the approval route recommendation result.
[0149] Specifically, for any candidate approver output after sorting in step S207 The system first retains structured statistical evidence related to the candidate approver, such as the total number of historical processing sessions in the past N days, the number of valid completions, the average processing time, the historical collaboration frequency between the candidate approver and the applying department, the historical hit frequency of the candidate approver at the current process node, and the role matching status between the candidate approver and the current node. This statistical information can be directly extracted from the historical approval records retrieved in step S203 and from the calculation of various scores in step S207.
[0150] At the same time, the system calculates the graph matching score obtained in step S207. (Right now Further decomposition allows us to approximate it as the sum of the contribution values of several high-contribution metapaths:
[0151]
[0152] in, Indicates and candidate The relevant set of high-contribution metapaths, Indicates a certain metapath The contribution of the candidate approver's graph matching score.
[0153] In one optional implementation, the contribution of meta-paths can be calculated as follows: Several meta-path patterns highly relevant to the approval recommendation scenario are predefined, such as "Application Department → Role → Candidate User," "Business Theme → Process Definition → Process Node → Candidate User," and "Applicant → Department → Superior Department → Candidate User." Then, based on factors such as the relational attention weight corresponding to each meta-path on the task-related local heterogeneous approval relationship graph, the intensity of the path's occurrence in historical samples, and the feature matching strength of the nodes at both ends of the path, the contribution value of each meta-path is comprehensively calculated. Finally, the top few meta-paths with the highest contribution values are extracted as graph path evidence to support the recommendation results.
[0154] After obtaining structured statistical evidence and graph path evidence, the system can use a template-based interpretation method to generate interpretable descriptions. This involves filling the aforementioned statistical information (such as the number of processing times, average processing time, etc.) and meta-path information (such as "application department → role → candidate user") into a preset natural language template to generate recommendation reasons that are easy for business personnel to understand, such as "processed X similar approvals in the past 30 days, with an average processing time of Y hours, and has a high-frequency collaborative relationship with the application department."
[0155] Optionally, the system may also use a generative interpretation module for interpretation output, but constraints must be imposed on the input and output of this module: its input must be structured JSON format data (including candidate approver identifiers, various statistical values, meta-path lists and their contribution values, etc.), and its output must be validated by field whitelist, candidate set order consistency, and fact backfilling to ensure that the interpretation module will not modify the candidate approver set or ranking results in the recommendation results, nor will it fabricate non-existent statistical facts or relationship paths.
[0156] In this way, while outputting recommendation results, the system can provide users or auditors with clear, verifiable, and traceable recommendation basis, making the approval route recommendation process highly interpretable.
[0157] S209. In the event that the comprehensive score calculation fails, the candidate set is empty, or the number of historical approval records is lower than a preset threshold, the final approver shall be determined according to a preset demotion order, which includes: the applicant's direct superior, the head of the applying department, and the preset role person in charge of the current process node.
[0158] Specifically, during the execution of steps S201 to S208, the system may encounter various anomalies or insufficient data situations, such as: the number of historical approval samples is lower than the preset minimum threshold; the candidate set generated by step S202 is empty; the graph model scoring process in steps S205 to S206 fails to calculate; a tool execution anomaly occurs when obtaining process history or organizational structure data through the MCP tool in step S203; missing organizational relationship data prevents the construction of a complete departmental chain or hierarchical relationship; or the current process node does not have enough role candidates configured in terms of regulations. When any of the above situations occur, the system triggers a degradation mechanism.
[0159] After a downgrade is triggered, the system attempts to roll back in a pre-defined, fixed order to determine a backup final approver. Specifically, the rollback order may be as follows: first, try to determine the applicant's direct supervisor as the final approver; if the direct supervisor is unavailable due to resignation, job transfer, or missing data, then roll back to the head of the applicant's department; if the head of the department is still unavailable, then roll back further to the preset role of the person in charge of the current process node; if none of the above rollbacks can obtain a valid approver, an empty list is returned, and the front-end page prompts the user to make a manual selection.
[0160] In the downgraded recommendation results, the system explicitly returns a downgrade flag, such as setting the fallback field to true, so that the front-end presentation layer and the business process side can recognize that the current output approval result is a backup route result generated by the downgrade strategy, rather than an intelligent recommendation result generated by normal scoring and sorting. Through the above downgrade mechanism, this application can ensure the continuity and stability of the approval process in marginal situations such as insufficient samples or system anomalies, and avoid business process interruption due to recommendation module failure.
[0161] Furthermore, in an optional implementation, the model parameters involved in the relationship-aware message propagation are obtained through offline training. Specifically, for each historical process node sample, the system performs a candidate generation process consistent with the online phase based on the process structure snapshot, candidate role constraint snapshot, and rule constraint snapshot at the corresponding moment of the sample, to obtain the set of compliant candidate approvers corresponding to that sample. The approvers actually selected at that historical process node are recorded as positive samples, and other candidate approvers at the same process node and at the same moment who meet the institutional constraints but were not actually selected are recorded as the negative sample set.
[0162] In one alternative implementation, the ranking loss The pairwise sorting loss is used, and its form is:
[0163]
[0164] in, Indicates training samples, This indicates the approver of the positive samples in the training samples. This represents the set of negative samples corresponding to the training samples. The model represents the candidate approvers. The predicted score (a comprehensive score that integrates the graph matching score with the historical statistical score, organizational constraint score, and load adjustment score).
[0165] To ensure consistency between the training and online inference phases, the organizational constraint regularization term is preferably constructed based on organizational constraint factors that are of the same origin as the organizational constraint scores in the online phase. Specifically, for any candidate approver... Its organizational constraint supervision signal can be defined as:
[0166]
[0167] in, This indicates the degree of match between the candidate approver and the role requirements of the current node. This indicates the management chain relationship between the candidate approver and the applicant. This indicates the historical level of cooperation between the candidate approver and the applicant department. This indicates the degree of match between the candidate approver's organizational level and the current node's permission requirements. Therefore, it can be seen that the organizational constraint regularization term is consistent with the online inference stage. Homologous factor definition is used to ensure that the training objective is consistent with the online scoring logic.
[0168] In one alternative implementation, the organizational constraint regularization term can be expressed as:
[0169]
[0170] in, Indicates training samples The corresponding candidate set, This represents the result after normalization of organizational constraint and supervision signals. This represents the sample weight.
[0171] Therefore, the joint loss function can be expressed as:
[0172]
[0173] in, This represents the weight of the regularization term for organizational constraints. This represents the regularization coefficient of the parameter. This represents the parameters of the model to be optimized.
[0174] During parameter updates, when a candidate approver's predicted score is high while their organizational constraint supervision signal is low, the organizational constraint regularization term prompts the model to lower the candidate approver's predicted score; conversely, when a candidate approver's organizational constraint supervision signal is high while their predicted score is low, the organizational constraint regularization term prompts the model to raise the candidate approver's predicted score. This approach enables the model to learn organizational institutional boundaries during the training phase, rather than relying solely on rule filtering after inference.
[0175] See Figure 4 and Figure 5 To illustrate the working principle of this invention more intuitively, the following describes in detail the approval route recommendation method provided in this application embodiment in conjunction with a specific seal approval scenario.
[0176] This example applies to the seal approval process within an enterprise office automation system. The seal approval form includes the following fields: applicant unit, unit category, document name, content summary, approval authority, applicant, contact number, remarks, and four key approval node handler fields: unit head, supervisor, principal leader, and archivist. This process is defined as a standard serial multi-level approval structure. After the process instance is started, it sequentially goes through the following nodes: applicant completion, unit head approval, supervisor approval, principal leader approval, and archivist processing. Figure 4 As shown, the approval route recommendation module can be called before the process is initiated or before the process flows to any node. It generates a candidate recommendation list for the applicant field of that node. The recommendation results can be directly bound to the process variables for users to select or automatically filled by the system.
[0177] The following example, which describes the specific implementation process of this application method, shows how a candidate approver is recommended when the workflow reaches the "supervisor in charge" node.
[0178] First, the system obtains the task information for the current process. This task information includes: process identifier (seal approval process), current node identifier (supervisor node), applicant identifier (Zhang), applicant department identifier (Administration Department), and form field key-value pairs (document name "Notice on Issuing the Annual Assessment Plan", approval authority "Official Seal of the Unit", etc.). Simultaneously, the system also obtains a snapshot of the process structure to represent the node order and the position of the supervisor node in the current process definition; a snapshot of candidate role constraints to represent the set of roles allowed by the supervisor node (e.g., the "Supervisor" role); and a snapshot of rule constraints to represent the organizational hierarchy rules and fallback rules that must be met.
[0179] Next, based on the role constraints and organizational permission constraints corresponding to the supervising leader node, the system filters out compliance candidate approvers from all users, forming a candidate set. Specifically, the system parses the role constraints of this node to determine the candidate role range as "supervising leader"; it parses the organizational permission constraints to determine the candidate organizational range as covering relevant departments that have a management or collaborative relationship with the applying department's administrative department. The system identifies users who simultaneously meet the above role and organizational requirements as compliance candidate approvers.
[0180] Subsequently, the system retrieves historical approval records, organizational relationship data, and business theme data associated with the current task information. For historical approval records, the system searches for historical approval instances under the same process based on the process identifier (approval with official seal), preset time window (e.g., the last 30 days), and the scope of the applying department, obtaining information such as the total number of historical processing attempts, the number of valid completions, and the average processing time for each candidate approver. For organizational relationship data, the system obtains the department chain of the administrative department to which the applicant Zhang belongs, as well as the department to which the candidate approver belongs and its superior department information. For business theme data, the system performs word segmentation and keyword extraction on fields such as file name, content summary, and approval authority in the form, obtaining high-value keywords such as "annual assessment" and "official seal of the unit," and encodes them into theme vectors or keyword sets as the data corresponding to the business theme nodes.
[0181] Based on this, the system constructs a task-related local heterogeneous approval relationship graph. For example... Figure 5 As shown, the graph includes: applicant node (Zhang), applicant department node (Administration Department), process definition node (seal approval), current process node (supervisor), business topic node (generated from keywords such as "annual assessment" and "official seal"), and nodes corresponding to each candidate approver in the candidate set (such as Li and Wang). The graph has edges with various relationship types. For example, Li is connected to the supervisor's process node via a user approval edge, indicating that Li has approved this node; he is connected to the administration department node via a historical co-occurrence edge (department-to-user historical co-occurrence edge), indicating that Li has a historical collaborative relationship with the administration department; and he is connected to the "official seal" topic node via a topic association edge, indicating that Li's historical approval business is related to the official seal. In addition, the graph also includes other relationship edges such as Wang's user role edge (connected to the supervisor's role node) and departmental hierarchy edge.
[0182] On the task-related local heterogeneous approval relationship graph, the system performs relationship-aware message propagation based on the task query vector of the current task information to obtain the graph embedding representation of each candidate approver node. The task query vector is obtained by fusing the representations of the supervising leader node, the applicant Zhang, the applying department (administration department), the seal approval process definition, and the business topic node. The system calculates attention weights for edges of different relationship types in the graph based on the task query vector, and performs multiple rounds of message aggregation and updating for each node based on the attention weights and corresponding transformation matrices. Since Li has multiple strong association edges with the administration department and the unit's official seal topic, his attention weight is relatively high, thus obtaining richer contextual information during message propagation.
[0183] After message propagation, the system calculates the graph matching score for each candidate approver by using the task representation of the supervising leader node and the graph embedding representation of each candidate approver node. Subsequently, the system integrates the graph matching score, historical statistical score, organizational constraint score, and load adjustment score to obtain a comprehensive score for each candidate approver. Specifically, the historical statistical score is calculated based on Li's six approvals of seal-use applications initiated by the administrative department within the past 30 days, the number of valid completions, and the average processing time; the organizational constraint score is calculated based on Li's role matching degree with the supervising leader node, his management chain relationship with applicant Zhang, and the historical collaboration strength and authority requirement matching degree with the administrative department; the load adjustment score is calculated based on Li's current number of pending tasks and workload. Although Wang also belongs to the supervising leader role, his historical approval records are mainly concentrated in finance-related business, with a weaker connection to the administrative department and the unit's official seal theme. He lacks corresponding historical co-occurrence edges and theme-related edges in the graph, therefore his graph matching score and organizational constraint score are both lower than Li's. After weighted merging, Li's overall score was significantly higher than Wang's, resulting in a higher final ranking.
[0184] Before outputting the recommendation results, the system extracts several meta-paths that contribute the most to the graph matching score. In this embodiment, the high-contribution meta-paths corresponding to Li include: "Application Department (Administration Department) → Role (Supervisor) → Candidate User (Li)", "Business Theme (Official Seal) → Process Definition (Seal Approval) → Process Node (Supervisor) → Candidate User (Li)", and "Applicant (Zhang) → Department (Administration Department) → Superior Department → Candidate User (Li)". The system fills the above meta-path information, along with historical statistics such as the number of processing times and average processing time in the past 30 days, into a preset explanation template to generate an interpretable description corresponding to the recommendation results.
[0185] Finally, the system outputs the following example recommendation results:
[0186] {
[0187] "recommendations": [
[0188] {
[0189] "userId":"203521200000000003",
[0190] "score": 0.873
[0191] "reason": "Having processed similar seal-related approvals continuously for the past 30 days, and possessing considerable experience in approving related matters for the current applicant."
[0192] },
[0193] {
[0194] "userId":"203521200000000006",
[0195] "score": 0.812,
[0196] "reason": "High historical hit rate among leaders in charge, stable processing time, and high degree of matching with current business themes."
[0197] }
[0198] ],
[0199] "fallback": false
[0200] }
[0201] The recommendation result can be directly returned to the front-end approval page for the applicant or process initiator to select, or the system can automatically fill the first-ranked Li Mou into the handler field of the supervisor node, thereby completing the approval route recommendation.
[0202] As can be seen from the above embodiments, the approval route recommendation method provided in this application can accurately score and rank candidate approvers based on task-related local heterogeneous graphs within the constraints of the system, and provide traceable and understandable structured recommendation reasons, which significantly improves the intelligence level of the approval process and the user experience.
[0203] Figure 6 A block diagram of an approval route recommendation apparatus based on a heterogeneous graph according to an embodiment of this application is shown. Figure 6 As shown, the device may include:
[0204] The information acquisition module is used to acquire the task information of the current process task. This task information includes at least the process identifier, the current node identifier, the applicant identifier, and the applicant department identifier.
[0205] The candidate generation module is used to select compliant candidate approvers from all users based on the role constraints and organizational permission constraints corresponding to the current node identifier, and form a candidate set.
[0206] The data retrieval module is used to retrieve historical approval records, organizational relationship data, and business theme data associated with the task information.
[0207] The graph construction module is used to construct a task-related local heterogeneous approval relationship graph. The graph uses the applicant corresponding to the applicant identifier as the applicant node, the department corresponding to the applicant department identifier as the application department node, the process corresponding to the process identifier as the process definition node, and the node corresponding to the current node identifier as the current process node. It also includes business theme nodes extracted from the business theme data and candidate approver nodes corresponding to each candidate approver in the candidate set. The graph has edges of multiple relationship types.
[0208] The graph propagation module is used to perform relationship-aware message propagation based on the task query vector of the task information on the task-related local heterogeneous approval relationship graph to obtain the graph embedding representation of each candidate approver node.
[0209] The graph matching module is used to calculate the graph matching score of each candidate approver by using the task representation of the current process node and the graph embedding representation of each candidate approver node.
[0210] The fusion and sorting module is used to fuse the graph matching score with the historical statistical score, organizational constraint score and load adjustment score to obtain the comprehensive score of each candidate approver, and output the approval route recommendation result based on the comprehensive score;
[0211] The explanation generation module is used to extract several meta-paths that contribute the most to the graph matching score, and fill the meta-paths and statistical information from the historical statistical scores into a preset explanation template to generate an interpretable description corresponding to the approval route recommendation result;
[0212] The downgrade processing module is used to determine the final approver according to a preset downgrade order when the comprehensive score calculation fails, the candidate set is empty, or the number of historical approval records is lower than a preset threshold. The downgrade order includes: the applicant's direct superior, the head of the applying department, and the preset role person in charge of the current process node.
[0213] In one optional implementation, the information acquisition module, the data retrieval module, and the fusion sorting module are uniformly orchestrated and scheduled by an intelligent agent. The intelligent agent calls the process history query service and the organizational structure query service through the model context protocol tool to obtain the historical approval records and the organizational relationship data.
[0214] Specifically, in one optional implementation, the information acquisition module is responsible for extracting process identifiers, current node identifiers, applicant identifiers, applicant department identifiers, form fields, and constraint snapshot information from front-end requests, process engine contexts, or middleware messages, and generating structured task objects.
[0215] The data retrieval module is responsible for initiating requests to the process history query service, organizational structure query service and other business data services based on the structured task object, and standardizing the returned results into historical approval records, organizational relationship data and business theme data.
[0216] The candidate generation module is responsible for selecting a set of candidate approvers who are compliant with regulations from all users based on the role constraints, organizational permission constraints, and processing variable constraints of the current node.
[0217] The graph construction module, graph propagation module, graph matching module, and fusion ranking module together constitute the scoring calculation layer. Specifically, the graph construction module is responsible for constructing a task-related local heterogeneous approval relationship graph; the graph propagation module is responsible for propagating execution relationship-aware messages; the graph matching module is responsible for calculating the graph matching score of candidate approvers; and the fusion ranking module is responsible for fusing graph matching scores, historical statistical scores, organizational constraint scores, and load adjustment scores and outputting the ranking results.
[0218] The explanation generation module is responsible for generating a description of the recommendation reason based on structured statistical evidence and high-contribution metapaths; the downgrade processing module is responsible for outputting the backup approver in a preset order when there are insufficient historical samples, an empty candidate set, a failed tool call, missing organizational relationship data, or abnormal scores.
[0219] The intelligent agent is located outside the aforementioned functional modules. As a unified orchestration and control layer, it is responsible for module scheduling, tool invocation, result verification, anomaly detection, retry control, cache reading, degradation triggering, and result feedback. It does not replace the graph propagation module, graph matching module, and fusion sorting module in performing specific scoring calculations.
[0220] It should be noted that, Figure 6 The division and connection relationships of the modules shown are merely illustrative. In actual implementation, those skilled in the art can merge, split, or recombine the modules according to specific design requirements. For example, the graph propagation module and the graph matching module can be merged into a unified graph scoring module, or the interpretation generation module and the degradation processing module can be deployed as separate microservices. The connection relationships between the modules can also be adaptively adjusted according to the data flow and processing logic. For example, the data retrieval module can be directly connected to the graph propagation module to provide the auxiliary data required for relationship propagation, and the output of the fusion sorting module can be simultaneously fed back to the information acquisition module for subsequent task information optimization, etc. Therefore, Figure 6 The specific structure shown does not constitute a limitation on the scope of protection of this application. Any functional module division method and connection relationship that can realize the method described in the embodiments of this application shall fall within the scope of protection of this application.
[0221] Please see Figure 3 , Figure 3A timing diagram illustrating the collaboration between an intelligent agent and a tool according to an embodiment of this application is shown. In an optional implementation provided in this application, the information acquisition module, the data retrieval module, and the fusion and sorting module can be uniformly orchestrated and scheduled through an intelligent agent. The intelligent agent invokes a process history query service and an organizational structure query service through a model context protocol tool to obtain the historical approval records and the organizational relationship data. Figure 3 As shown, the specific collaborative process is as follows:
[0222] Users submit approval recommendation requests through the front-end page. These requests carry task information such as process codes, form data, application department identifiers, and session identifiers. Upon receiving the request, the unified interface layer of the intelligent agent routes the request to the approval routing recommendation intelligent agent based on the intelligent agent identifier in the request.
[0223] The approval route recommendation agent first invokes the process history query tool, which initiates a query to the workflow history database via the model context protocol to obtain historical approval samples from the past N days that match the current process identifier and the scope of the applying department. These historical approval samples include at least information such as process instance identifier, approver identifier, node name, process status, and approval time.
[0224] Subsequently, the approval routing recommendation agent calls the organizational structure query tool and initiates a query to the organizational structure basic data service through the model context protocol to obtain organizational relationship data such as the applicant's organizational chain information, department tree structure, the department to which the candidate approver belongs and its superior department information.
[0225] After acquiring the aforementioned data, the approval route recommendation agent submits the task information, along with the retrieved historical approval records, organizational relationship data, and business topic data, to the scoring and interpretation engine. The scoring and interpretation engine then sequentially performs candidate generation, graphical model scoring, fusion ranking, and interpretation generation, ultimately outputting a recommendation result that includes Top-K candidate approver identifiers, a comprehensive score, an interpretability description, and a downgrade flag.
[0226] The approval route recommendation agent returns the above recommendation results and associated metadata to the agent's unified interface layer, which then forwards them to the front-end page for display. The front-end page can present the user with a list of recommendation approvers, explanations of the recommendation reasons, and summary information of evidence supporting the recommendation conclusions.
[0227] Through the collaborative architecture of the aforementioned intelligent agent and model context protocol tools, this application decouples data acquisition, intelligent scheduling, algorithm scoring, and result output into layers, enabling recommendation capabilities to be consolidated into enterprise-grade reusable infrastructure. Different approval processes can share the same recommendation framework, and there is no need to redesign the entire recommendation chain when adding a new approval process, demonstrating good scalability and governance capabilities. Simultaneously, this architecture ensures that the approval recommendation algorithm does not operate in isolation, but rather forms an online recommendation closed loop completed on a unified tool protocol and standardized interface.
[0228] In one optional implementation, the approval route recommendation agent, acting as an orchestration control layer, does not directly perform graph propagation calculation, graph matching calculation, or fusion scoring calculation. Instead, it is responsible for receiving recommendation requests, assembling structured task objects, scheduling process history query tools and organizational structure query tools, returning results from verification tools, executing retry strategies, triggering degradation mechanisms, and sending back result metadata.
[0229] When the process history query tool or organizational structure query tool fails to return results, returns an abnormal status code, fails authentication, or returns a message that does not meet the preset data format within a preset time limit, the approval routing recommendation agent preferentially executes a retry strategy. The retry strategy may adopt an exponential backoff method, retrying at time intervals of Δt, 2Δt, and 4Δt, with a maximum number of retries of a preset number M.
[0230] When a retry is successful, the approval route recommendation agent continues to submit task information, historical approval records, organizational relationship data, and business topic data to the scoring and explanation engine to perform candidate generation, graph model scoring, fusion sorting, and explanation generation; when the retry still fails after reaching the maximum number of attempts, the approval route recommendation agent triggers a degradation process.
[0231] In one optional implementation, when historical approval data acquisition fails, the system reads the most recently valid cached historical statistical data or skips the calculation of historical statistical scores; when organizational relationship data acquisition fails, the system reads the most recently valid organizational snapshot or directly performs a rollback according to preset organizational rules; when the scoring engine malfunctions, the system directly calls the downgrade processing module to output the backup approver.
[0232] In the degradation output, the system preferably returns a degradation flag and anomaly reason information, wherein the anomaly reason information includes at least one of tool status, number of retries, and failure reason, so that the front-end presentation layer and the business process side can identify whether the current result is an abnormal degradation result.
[0233] To further verify the technical effects of the heterogeneous graph-based approval route recommendation method provided in this application, the beneficial effects achievable by the embodiments of this application are explained below in conjunction with specific experimental data and comparison results.
[0234] 1. Dataset Description
[0235] This experiment constructs three subset datasets based on anonymized approval log data from a company's OA system, each corresponding to different approval business scenarios. The data comes from a medium-to-large enterprise with approximately 1,500 employees and over 80 departments, covering approval workflow records spanning 18 months.
[0236] 1.1 Dataset Statistics
[0237]
[0238] 1.2 Statistical Information of Heterogeneous Diagrams
[0239]
[0240] 1.3 Data Partitioning
[0241] A strict time segmentation strategy is adopted:
[0242] Training set: The first time period (12 consecutive months), accounting for approximately 67% of the total sample;
[0243] Validation set: The second time period immediately following the first time period (two consecutive months), accounting for approximately 11% of the total sample;
[0244] Test set: The third period (4 consecutive months) immediately following the second period, accounting for approximately 22% of the total sample.
[0245] For each test sample, the actual approver is used as the positive sample (ground truth), and other compliant candidate approvers at the same node are used as negative samples.
[0246] 2. Evaluation Indicator System
[0247] 2.1a Recommended accuracy metrics
[0248] The metric is used to measure whether the model can rank the actual approvers at the top of the candidate list.
[0249]
[0250] The reason for selecting these three indicators is that HR@K measures "whether the right people can be found", MRR measures "where the right people are ranked", and NDCG@K measures "overall ranking quality". The three complement each other.
[0251] 2.1b Constrained Accuracy Metrics
[0252] One of the essential aspects of approval route recommendation is "candidate ranking under institutional constraints," rather than finding people in an open domain. To more accurately reflect this characteristic, this experiment introduces a constraint hit rate metric.
[0253]
[0254] In the ablation experiment, a slight increase in HR@1 but a sharp drop in compliance rate was observed with w / o Compliance, indicating that the hit rate can be artificially inflated when unconstrained. C-HR@K embeds compliance into the accuracy metric, making it impossible to obtain high scores by "trading compliance for hit rate," and more realistically reflecting the actual effect in constrained recommendation scenarios.
[0255] 2.2 Compliance Indicators
[0256] To assess whether the recommendation results meet organizational constraints.
[0257]
[0258] 2.3 Interpretability Indicators
[0259] Measure the fidelity and comprehensibility of the reasons for recommendation.
[0260]
[0261] Evaluation Design: 200 recommendations were randomly selected, and 3 reviewers with approval business experience were invited to score them independently. The average score was taken and the Fleiss' Kappa consistency coefficient was reported.
[0262] 2.4 Efficiency Indicators
[0263] Measure the real-time performance of online reasoning.
[0264]
[0265] 2.5 Robustness and Degradation Indicators
[0266] Measure the system's performance under conditions of sparse or abnormal data.
[0267]
[0268] 2.6 Load Balancing Metrics
[0269] The measure is whether the recommendation results avoid concentrating the task on a small number of approvers.
[0270]
[0271] 3. Comparison Methods (Baselines)
[0272] 3.1 Method List
[0273]
[0274] 3.2 Implementation Instructions for the Comparison Method
[0275] Fairness guarantee:
[0276] • The graph methods of B5–B7 all use the same node feature initialization and training data partitioning as those of this invention;
[0277] • The candidate space of B5–B7 is set to the full candidate set (without compliance pre-screening) to reflect the value of the compliance candidate generation mechanism of this invention; at the same time, an additional set of results of running B5–B7 within the compliance candidate set is reported to isolate the contributions of “compliance screening” and “graph algorithm” respectively.
[0278] • All methods measure latency and throughput under the same hardware environment.
[0279] 3.3 Reasons for choosing the comparison method
[0280] B1 Rule-Based — Validating whether "pure rules are sufficient" (patent motivation);
[0281] B2 Freq-Based — Validating whether "pure statistics are sufficient" (patent motivation);
[0282] B3 Freq+Time – Eliminating the argument that "adding a time decay is enough";
[0283] B4 UserCF—Validating the applicability of general recommendation methods in approval scenarios;
[0284] B5 GCN – Validates whether it is necessary to distinguish relation types;
[0285] B6 R-GCN—Verifying whether task-aware attention is still needed after distinguishing relationships;
[0286] B7 HAN – Verifying the difference between “metapath + attention but non-task awareness” and the present invention;
[0287] B8 LambdaMART – dispelling the claim that "the benefits come solely from more comprehensive feature engineering rather than graph modeling".
[0288] 4. Experimental Results
[0289] Table 4-1: Comparison of Recommendation Accuracy in the Main Experiment (Dataset-A, Seal Approval, Full Candidate Space)
[0290] All values are mean ± standard deviation (SSD) from 5 independent runs. † indicates that Ours (the present invention) is significantly improved relative to the method by paired t-test at the p < 0.01 level; ‡ indicates that it is significant at the p < 0.05 level.
[0291]
[0292] The results show that: - Ours (the present invention) significantly outperforms all baselines across all metrics (p<0.01). - LambdaMART uses the exact same structured features as Ours (the present invention) (historical frequency, completion rate, role matching, departmental collaboration, workload, topic similarity, etc.), achieving an HR@1 of 0.561, higher than HAN (0.549), indicating that feature engineering itself has some value. However, Ours (the present invention) still outperforms LambdaMART by 4.7pp (HR@1), demonstrating that the relationship modeling gain brought by graph propagation and task-aware attention exceeds the upper limit achievable by pure tabular feature ranking. - C-HR@K perspective: The C-HR@1 of general graph methods (GCN / R-GCN / HAN) is significantly lower than their HR@1 (e.g., GCN: 0.409 vs 0.487, a difference of 7.8pp), because they frequently recommend non-compliant personnel when ranking among all candidates. Ours (the present invention) HR@1 is almost identical to C-HR@1 (0.608 vs 0.605), indicating that compliance pre-screening highly aligns accuracy and compliance.
[0293] Table 4-2: Comparison of Recommendation Accuracy in the Main Experiment (Dataset-B, Procurement Approval, Full Candidate Space)
[0294]
[0295] The results show that the procurement approval candidate space is larger (average 11.2 people / node), and the absolute values of all methods are lower than Dataset-A. However, Ours (the present invention) has a more significant relative advantage (HR@1 is +4.6pp compared to LambdaMART, and +6.1pp compared to HAN), indicating that relationship modeling is more beneficial in complex scenarios. The gap between C-HR@1 and HR@1 is particularly prominent among general graph methods (GCN: 8.1pp difference), while Ours (the present invention) is only 0.3pp behind.
[0296] Table 4-3: Comparison of Recommendation Accuracy in the Main Experiment (Dataset-C, Contract Approval, Full Candidate Space)
[0297]
[0298] Dataset-C has the smallest data size, but Ours (the present invention) still maintains a stable advantage (HR@1 is +4.7pp compared to LambdaMART), and the difference between C-HR@1 and HR@1 is only 0.3pp, indicating that the method is not sensitive to data size and has highly stable compliance.
[0299] 5. Case Analysis
[0300] Case 1: Correct Recommendation (Seal Approval - Supervisor's Node)
[0301] Scenario: Applicant Zhang (Administration Department) submits a seal approval form. The document title is "Notice on Issuing the Annual Assessment Plan". The approval authority is "Official Seal of the Unit". The current node is "Supervisor in Charge".
[0302] Compliance candidate set (generated in step S202, 6 people in total): Li, Wang, Zhao, Liu, Chen, and Zhou.
[0303] Top-3 rating details:
[0304]
[0305] Li's high-contribution metapath: 1. Administration Department → [Department Historical Co-occurrence] → Li → [User Approval] → Supervisor Node (ω = 0.138) 2. Annual Performance Appraisal Theme → [Theme Association] → Seal Approval Process → [Process Attribution] → Supervisor Node → [User Approval] ← Li (ω = 0.112) 3. Zhang → [User Attribution] → Administration Department → [Department Historical Co-occurrence] → Li (ω = 0.077)
[0306] Template recommendation reason: > "Li approved 6 applications for seal use initiated by the administration department in the past 30 days (100% completion rate, average 2.3 hours), and has high-frequency approval experience in annual assessment-related topics, which is the most relevant to the current application department and business topic."
[0307] Actual approver: Li Mou
[0308] Case 2: Downgrade Scenario
[0309] Scenario: The applicant is a newly hired employee (Technology R&D Department 3, a newly established department), submitting an approval form for the use of company seals. The historical sample of this department and its supervising leader is 0.
[0310] Downgrading process: 1. In step S203, retrieve historical samples → return 0 records → less than the threshold (3 records); 2. Trigger the downgrading mechanism (step S209); 3. First-level fallback: Search for the direct superior of the applicant → Sun, the department manager → not in the list of leadership roles in charge → skip; 4. Second-level fallback: Search for the person in charge of the department → Wu, the person in charge of the Third R & D Department → not in the list of leadership roles in charge → skip; 5. Third-level fallback: Search for the person in charge of the preset role at the current node → Qian, the technology in-charge leader → role match .
[0311] Output: { "recommendations": [{"userId": "Qian", "score": null, "reason": "Insufficient historical data at the current node, recommend the preset in-charge leader of the node according to organizational rules"}], "fallback":true}
[0312] Case 3: Comparative analysis (This invention vs Rule-Based vs HAN)
[0313] Scenario: Zhou (Finance Department), the applicant, submits an official seal approval form with the content of "Application for Allocating Special Training Funds", and the current node is "in-charge leader".
[0314]
[0315] It can be seen from the results that Rule-Based only knows the preset roles and does not distinguish business themes. HAN spreads across the entire graph, and the attention is dominated by the high-frequency approval records of the Administration Department, recommending an irrelevant Li. Ours (this invention) correctly identifies the matching relationship between Sun and the current task through the association path of the business theme node (training funds) and the department node (Finance Department) in the local graph.
[0316] 6. Experimental environment
[0317] [[ID=According to an embodiment of this application, an electronic device for approving route recommendations is provided. This electronic device can be a terminal and may include a processor, memory, network interface, display screen, and input device connected via a system bus. The processor of the electronic device provides computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The network interface of the electronic device is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements an approval route recommendation method. The display screen of the electronic device can be a liquid crystal display (LCD) or an e-ink display. The input device of the electronic device can be a touch layer covering the display screen, or buttons, a trackball, or a touchpad mounted on the casing of the electronic device, or an external keyboard, touchpad, or mouse, etc.
[0319] Those skilled in the art will understand that the structure of the above-described electronic device is only a partial structure related to the present disclosure and does not constitute a limitation on the electronic device to which the present disclosure is applied. A specific electronic device may include more or fewer components than the aforementioned components, or combine certain components, or have different component arrangements.
[0320] In an exemplary embodiment, an electronic device is also provided, including: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to execute the instructions to implement the approval route recommendation method as described in the embodiments of this application.
[0321] In an exemplary embodiment, a storage medium is also provided, which, when the instructions in the storage medium are executed by the processor of an electronic device, enables the electronic device to execute the approval route recommendation method in the embodiments of this application.
[0322] In an exemplary embodiment, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute the approval route recommendation method in the embodiments of this application.
[0323] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0324] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein.
[0325] The above description is only a preferred embodiment of the present invention. It should be understood that the above description of the embodiments is only for the purpose of helping to understand the method and core idea of the present invention, and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, etc. made within the idea and principle of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for approving routes based on heterogeneous graphs, characterized in that, include: Obtain the task information for the current process task, which includes at least the process identifier, the current node identifier, the applicant identifier, and the applicant department identifier; Based on the role constraints and organizational permission constraints corresponding to the current node identifier, compliant candidate approvers are selected from all users to form a candidate set; Retrieve historical approval records, organizational relationship data, and business theme data associated with the task information; Construct a task-related local heterogeneous approval relationship graph. The graph uses the applicant corresponding to the applicant identifier as the applicant node, the department corresponding to the applicant department identifier as the application department node, the process corresponding to the process identifier as the process definition node, and the node corresponding to the current node identifier as the current process node. It also includes business theme nodes extracted from the business theme data and candidate approver nodes corresponding to each candidate approver in the candidate set. The graph has edges of multiple relationship types. On the task-related local heterogeneous approval relationship graph, based on the task query vector of the task information, relationship-aware message propagation is performed to obtain the graph embedding representation of each candidate approver node; Calculate the graph matching score for each candidate approver by using the task representation of the current process node and the graph embedding representation of each candidate approver node; The graph matching score is fused with the historical statistical score, organizational constraint score, and load adjustment score to obtain a comprehensive score for each candidate approver, and the approval route recommendation result is output based on the comprehensive score.
2. The approval route recommendation method based on heterogeneous graphs according to claim 1, characterized in that, The task information also includes: A process structure snapshot, used to represent the node order, the relationship between preceding and following nodes, and the current node position in the current process definition; Candidate role constraint snapshot, used to represent the set of roles allowed by the current node, the handler variable, or the scope of authorization; Rule constraint snapshots are used to characterize organizational hierarchy rules, role rules, and fallback rules that need to be met.
3. The approval route recommendation method based on heterogeneous graphs according to claim 1, characterized in that, The process of selecting compliant candidate approvers from all users based on the role constraints and organizational permission constraints corresponding to the current node identifier includes: Parse the role constraints and organizational permission constraints corresponding to the current node identifier to determine the range of candidate roles and candidate organizations; Users who simultaneously meet the criteria of the candidate role range and the candidate organization range will be identified as the compliance candidate approvers.
4. The approval route recommendation method based on heterogeneous graphs according to claim 1, characterized in that, The business topic data is obtained through the following methods: The form fields associated with the task information are segmented and keywords are extracted. The extracted keywords are encoded into topic vectors or keyword sets to serve as the data corresponding to the business topic nodes.
5. The approval route recommendation method based on heterogeneous graphs according to claim 1, characterized in that, The various relationship types of edges include: User approval edge, user's department edge, department hierarchy edge, user role edge, role-to-process node mapping edge, process node sequence edge, process node-to-process definition belonging edge, business theme association edge.
6. The approval route recommendation method based on heterogeneous graphs according to claim 1, characterized in that, The task query vector based on task information performs relationship-aware message propagation, including: Based on the task query vector, attention weights are calculated for edges of different relationship types in the task-related local heterogeneous approval relationship graph; the task query vector is obtained by fusing the representation of the current process node, the representation of the applicant corresponding to the applicant identifier, the representation of the application department corresponding to the applicant department identifier, the representation of the process definition corresponding to the process identifier, and the representation of the business theme node; Based on the attention weights and transformation matrices of different types of relation edges, multiple rounds of message aggregation and updating are performed on each node to obtain the graph embedding representation of each candidate approver node.
7. The approval route recommendation method based on heterogeneous graphs according to claim 1, characterized in that, The model parameters involved in the relationship-aware message propagation are obtained through offline training, specifically including: For each historical process node sample, based on the process structure snapshot, candidate role constraint snapshot and rule constraint snapshot at the corresponding moment of the sample, a set of compliant candidate approvers corresponding to the sample is generated. The approvers who were actually selected at the historical process node are taken as positive samples, and other candidate approvers who meet the system constraints but were not actually selected at the same process node and at the same moment are taken as negative sample sets. A joint loss function is constructed, which includes ranking loss and organizational constraint regularization term. The ranking loss is constructed based on the difference between the predicted score of the positive sample and the predicted score of each candidate approver in the negative sample set. The organizational constraint regularization term is constructed based on the degree of role matching between the candidate approver and the current node, the management chain relationship with the applicant, the historical collaboration strength with the applicant department, and the degree of matching with the current node's permission requirements. The model parameters are optimized based on the joint loss function so that the model learns the organizational institutional boundaries during the training phase.
8. The approval route recommendation method based on heterogeneous graphs according to claim 1, characterized in that, The historical statistical score is calculated based on the candidate approver's total number of historical processing sessions, number of valid completions, recent processing time decay value, and average processing time. The organizational constraint score is calculated based on the role matching degree between the candidate approver and the current node, the management chain relationship between the candidate approver and the applicant, the historical collaboration strength between the candidate approver and the applicant department, and the matching degree between the candidate approver's organizational level and the current node's permission requirements. The load adjustment score is calculated based on the candidate approver's current number of pending tasks, recent task reception density, and cross-process busyness.
9. A heterogeneous graph-based approval route recommendation method according to any one of claims 1-8, characterized in that, The method further includes: Extract the meta-paths that contribute the highest to the graph matching score; The statistical information from the metapath and the historical statistical scores is filled into a preset explanation template to generate an interpretable description corresponding to the approval route recommendation result.
10. A heterogeneous graph-based approval route recommendation method according to any one of claims 1-8, characterized in that, The method further includes: If the comprehensive score calculation fails, the candidate set is empty, or the number of historical approval records is lower than a preset threshold, the final approver is determined according to a preset downgrade order, which includes: the applicant's direct superior, the head of the applying department, and the preset role person in charge of the current process node.
11. An approval route recommendation device based on heterogeneous graphs, characterized in that, include: The information acquisition module is used to acquire the task information of the current process task. This task information includes at least the process identifier, the current node identifier, the applicant identifier, and the applicant department identifier. The candidate generation module is used to select compliant candidate approvers from all users based on the role constraints and organizational permission constraints corresponding to the current node identifier, and form a candidate set. The data retrieval module is used to retrieve historical approval records, organizational relationship data, and business theme data associated with the task information. The graph construction module is used to construct a task-related local heterogeneous approval relationship graph. The graph uses the applicant corresponding to the applicant identifier as the applicant node, the department corresponding to the applicant department identifier as the application department node, the process corresponding to the process identifier as the process definition node, and the node corresponding to the current node identifier as the current process node. It also includes business theme nodes extracted from the business theme data and candidate approver nodes corresponding to each candidate approver in the candidate set. The graph has edges of multiple relationship types. The graph propagation module is used to perform relationship-aware message propagation based on the task query vector of the task information on the task-related local heterogeneous approval relationship graph to obtain the graph embedding representation of each candidate approver node. The graph matching module is used to calculate the graph matching score of each candidate approver by using the task representation of the current process node and the graph embedding representation of each candidate approver node; The fusion and sorting module is used to fuse the graph matching score with the historical statistical score, organizational constraint score, and load adjustment score to obtain a comprehensive score for each candidate approver, and output the approval route recommendation result based on the comprehensive score.
12. The approval route recommendation device based on heterogeneous graphs according to claim 11, characterized in that, The device further includes: The explanation generation module is used to extract several meta-paths that contribute the most to the graph matching score, and fill the meta-paths and statistical information from the historical statistical scores into a preset explanation template to generate an interpretable description corresponding to the approval route recommendation result.
13. The approval route recommendation device based on heterogeneous graphs according to claim 11, characterized in that, The device further includes: The downgrade processing module is used to determine the final approver according to a preset downgrade order when the comprehensive score calculation fails, the candidate set is empty, or the number of historical approval records is lower than a preset threshold. The downgrade order includes: the applicant's direct superior, the head of the applying department, and the preset role person in charge of the current process node.
14. A heterogeneous graph-based approval route recommendation device according to claim 11, 12, or 13, characterized in that, The information acquisition module, the data retrieval module, and the fusion sorting module are uniformly orchestrated and scheduled by the intelligent agent. The intelligent agent calls the process history query service and the organizational structure query service through the model context protocol tool to obtain the historical approval records and the organizational relationship data.
15. An electronic device comprising: processor; A memory for storing processor-executable instructions; characterized in that the processor is configured to perform the method of any one of claims 1-10.
16. A non-volatile computer-readable storage medium storing computer program instructions thereon, characterized in that, When the computer program instructions are executed by the processor, they implement the method of any one of claims 1-10.