A Method and System for Automated Generation of Menu Structure Based on Task Submission Configuration
By constructing directed decision growth forests and decision trees, the automatic generation and dynamic optimization of menu structures were achieved, solving the problem of insufficient synchronization between menus and reporting tasks, and improving menu generation efficiency and system security.
Patent Information
- Application Number
- CN202511249059.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-03
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2045-09-03
AI Technical Summary
In existing technologies, the dynamic synchronization between the menu structure and the reporting tasks is insufficient, which causes the menu to fail to respond automatically to adjustments in the reporting tasks, increasing the adjustment costs for maintenance personnel and affecting the continuity of user experience.
A directed decision-growing forest is constructed using an association parsing algorithm. Combined with the Kahn algorithm and decision trees, the menu structure is automatically generated and dynamically optimized. Simulation algorithms are used to test function mapping and permission constraints, and anomalies are corrected in real time and synchronized to the menu structure.
It enables automated and precise generation of menu structures, improving generation efficiency and accuracy, reducing manual intervention costs, and enhancing system security and menu structure stability.
Smart Images

Figure CN120762667B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of report menu configuration technology, and in particular relates to a method and system for automatically generating menu structures based on reporting task configuration. Background Technology
[0002] In various reporting systems, menu management of subsystems and forms is a core component. In the traditional model, operations and maintenance personnel need to manually create corresponding menus after creating a new subsystem or form. This is not only cumbersome and labor-intensive, but also prone to errors due to human intervention, leading to menu mismatches with business objects and impacting system efficiency and accuracy. As reporting tasks become increasingly complex, the need for automated menu structure generation is becoming more urgent to reduce manual intervention and improve configuration efficiency. In existing automated testing, the dynamic synchronization between menu structure and reporting task configuration is insufficient. When the classification, reports, and other configurations of reporting tasks are adjusted, the menu cannot automatically respond to the changes, requiring manual modification of menu levels and relationships. This results in a disconnect between the menu and actual business configuration, increasing adjustment costs for operations and maintenance personnel and affecting user continuity. Summary of the Invention
[0003] To address the shortcomings of existing technologies, this invention proposes an automated menu structure generation method and system based on reporting task configuration. This method responds to the menu creation requirements of the target subsystem by using a relational parsing algorithm to perform directed hierarchical parsing from the root node, obtaining a hierarchical functional node tree, directed functional dependencies, and a functional permission constraint space. Based on the Kahn algorithm and decision trees, a directed decision growth forest is constructed, mapping the permission constraint space to functional association strength to control connection relationships, resulting in the directed decision growth forest. The menu structure is generated through hierarchical relational mapping and an automatic generation algorithm. Simultaneously, the completeness, accuracy, and stability of functions are debugged forward along the growth tree, while the permission constraints and anti-tampering properties are tested backward. Anomalies are located and corrected in real-time using a policy library, synchronized to the menu structure, until the reporting subsystem requirements are met, achieving automated, precise generation and dynamic optimization of the menu structure.
[0004] To achieve the above objectives, the present invention provides the following technical solution:
[0005] An automated menu structure generation method based on reporting task configuration includes:
[0006] In response to the menu creation requirements of the target subsystem, a directed hierarchical parsing algorithm is used to perform a hierarchical parsing from the root node of the target subsystem to obtain the hierarchical functional node tree, directed functional dependencies, and functional permission constraint space.
[0007] Based on the hierarchical functional node tree and directed functional dependencies, a directed decision growth forest is constructed using the Kahn algorithm, decision tree, and growth rules. The functional permission constraint space is mapped to the functional association strength and mapped to the connection relationship between the upper and lower levels and the functions at the same level in the directed decision growth forest. The length of the corresponding connection relationship is controlled to obtain the directed decision growth forest.
[0008] Based on directed decision-growing forest, the menu structure of the target subsystem is obtained by performing function mapping and permission mapping through hierarchical association mapping combined with automatic generation algorithm; hierarchical association mapping includes function mapping and permission mapping.
[0009] Specifically, the method for automatically generating menu structures based on reporting task configurations also includes:
[0010] Based on the menu structure of the target subsystem, the target subsystem is simulated and debugged along the forward direction of the directed decision growth forest to ensure the integrity, accuracy and stability of the menu function mapping. At the same time, along the reverse direction of the directed decision growth forest, the scope of permission constraints and anti-tampering of the debugged upper and lower level functions and the same level functions are tested to obtain a list of abnormal type nodes.
[0011] The list of anomaly type nodes is fed back to the corresponding branch function decision nodes of the directed decision growth forest and combined with the configured anomaly adjustment strategy library for real-time anomaly correction. At the same time, the corrected subsystem parameters are synchronously mapped to the menu structure of the target subsystem until the current corrected menu structure of the target subsystem meets the corresponding requirements of the reporting subsystem in real time.
[0012] Specifically, the process of constructing a directed decision-making growth forest includes:
[0013] The system calls the subsystem configuration interface to obtain the global configuration file of the target subsystem, extracts the root node metadata through the XML syntax parser, encapsulates the root node metadata into a root node data structure and stores it in a tree database; the root node metadata includes the subsystem's unique task ID, creation timestamp, global permission mask and enable status indicator, where the global permission mask uses 32-bit binary encoding to represent system-level permission constraints;
[0014] Based on the functional classification management field in the global configuration file of the target subsystem, starting from the root node, the functional classification hierarchy is traversed using a depth-first search algorithm to extract the ID, name, parent category ID, and sort number of each category function, and a branch node sequence is generated according to the hierarchical depth. The hierarchical depth is calculated by recursively tracing the different levels of atomic sub-functions in the branch node sequence by the parent category ID.
[0015] Specifically, the process of constructing a directed decision-driven growth forest also includes:
[0016] Simultaneously, iterate through the configuration list of the corresponding atomic sub-functions under each branch node sequence, extract the atomic sub-function ID, name, category function ID, type identifier, data source address and access path length, and perform association matching with the branch node sequence based on the category function ID and the access path as the connection relationship to generate the leaf node tree corresponding to each branch node. The atomic sub-function is an indivisible function that can only realize a minimum business closed loop at most.
[0017] Based on the branch node sequence and the leaf node tree corresponding to each branch node, starting from the root node, a hierarchical functional node tree is generated by combining the tree database in the order of root node, branch node, and leaf node hierarchy. Each node in the hierarchical functional node tree carries a hierarchy depth parameter.
[0018] Specifically, the process of constructing a directed decision-driven growth forest also includes:
[0019] Based on the hierarchical functional node tree, the dependency setting fields and data flow attributes in the corresponding functional configuration of the target subsystem are parsed, and the pre-dependencies between the corresponding atomic sub-functions of the same level and different levels of leaf nodes under the same branch node are extracted. At the same time, the dependency relationships between the functional categories of the corresponding atomic sub-functions of the same level and different levels of leaf nodes of different branch nodes are extracted, and a dependency relationship set including [dependency ID, dependency direction, dependent ID] is generated.
[0020] Based on all dependency sets, using branch node IDs and corresponding leaf node IDs as nodes, the Tarjan algorithm is used to detect and eliminate cyclic dependencies, resulting in a directed acyclic dependency graph.
[0021] Specifically, the process of constructing a directed decision-driven growth forest also includes:
[0022] Based on the hierarchical functional node tree combined with the directed acyclic dependency graph, the length weight of the connection relationship within the hierarchical functional node tree is constructed using the preceding dependency relationship as the adjustment coefficient for the access path length between different leaf nodes within the hierarchical functional node tree. At the same time, the access path adjustment coefficient between functional categories is constructed using the dependency relationship between functional categories. The hierarchical functional node forest is constructed by combining graph neural network and random forest algorithm.
[0023] Based on the global permission mask file in the hierarchical functional node tree, the visible role group attributes contained in the category configuration of the branch node are parsed to generate a branch node permission constraint set with role ID and permission operation code as the dimensions.
[0024] Simultaneously, based on the permission configuration files of the corresponding atomic sub-functional nodes of all leaf nodes under each branch node in the global permission mask file, the granular parameters of operation permissions are extracted, and combined with the permission constraint set of the branch node, the permission constraint set of the leaf node is generated through the permission inheritance algorithm.
[0025] Specifically, the process of constructing a directed decision-driven growth forest also includes:
[0026] Based on the permission constraint set of all nodes, construct a functional permission constraint space indexed by branch node ID or leaf node ID, which stores the permission boundaries and inheritance paths of the corresponding nodes.
[0027] The functional permission constraint space is mapped to the access path corresponding to the hierarchical functional node forest, and used as the dependency constraint adjustment coefficient between access relationship and access path length to obtain a hierarchical functional node forest with permission constraints.
[0028] Based on a hierarchical functional node forest with permission constraints, combined with simulation algorithms, CART decision trees, a preset simulation debugging scenario space, and hierarchical functional node tree growth rules, simulation debugging training is conducted to ensure functional integrity, configuration accuracy, stability, permission constraint scope, and tamper-proof performance. The trained CART decision tree model is then configured into each branch node of the hierarchical functional node forest with permission constraints, resulting in a directed decision growth forest that includes branch functional decision nodes.
[0029] The simulated debugging scenario space includes a directed decision growth forest, a menu structure for the target subsystem, and debugging scenario requirements.
[0030] The hierarchical functional node tree growth rule is constructed by combining the corresponding abnormal scenario and scenario parameters with the correction strategies extracted from the preset correction strategy library and the decision parameters generated by the CART decision tree model. It is used to adjust the nodes and dependencies in the hierarchical functional node forest under the corresponding abnormal scenario, and synchronously adjust the menu structure of the corresponding target subsystem according to the adjustment results. The menu structure of the target subsystem is then mapped to the subsystem configuration interface for iterative simulation until the requirements of the target subsystem are met.
[0031] Specifically, the process of obtaining the dependency set includes:
[0032] Analyze the set of dependencies in a directed acyclic dependency graph that includes [dependency ID, dependency direction, dependent ID], where the dependency ID and dependent ID each correspond to at least one branch node or leaf node ID;
[0033] The number of times each branch node or leaf node is dependent on by the remaining nodes in the directed decision growth forest is counted as the in-degree value. An in-degree table is constructed with node ID as the key and in-degree value as the value, where the in-degree value of the root node is set to 0.
[0034] Extract the root node from the node pool constructed by the directed decision-making growth forest, add the root node ID to the initialization queue, where the initialization queue is processed according to the first-in-first-out principle, the root node is the first node to be mounted, and its level is preset to level 0.
[0035] Take the first node from the queue and mark it as the current node. Record the current node ID and the current level. At the same time, traverse all dependencies in the directed acyclic dependency graph with the current node as the dependent party and extract the dependent party ID, which is the child node ID of the current node.
[0036] For each dependent node, if it is a branch node, the level of the current branch node is set to the current node level + 1. If it is a leaf node, the level of the leaf node is set to the level of the branch node it belongs to + 1. At the same time, the level information of the child node is temporarily stored in a temporary level table, where the branch node it belongs to is determined by associating with the category function ID in the leaf node's metadata.
[0037] The automated menu structure generation system based on reporting task configuration includes: a parsing module, a topology module, and a mapping module.
[0038] The parsing module is used to respond to the menu creation requirements of the target subsystem. It performs directed hierarchical parsing from the root node of the target subsystem through an association parsing algorithm to obtain the hierarchical functional node tree, directed functional dependencies, and functional permission constraint space.
[0039] The topology module, based on the hierarchical functional node tree and directed functional dependencies, constructs a directed decision growth forest through the Kahn algorithm, decision tree, and growth rules. It maps the functional permission constraint space to the functional association strength and maps it to the connection relationship between the upper and lower levels and the functions at the same level in the directed decision growth forest. It controls the length of the corresponding connection relationship to obtain the directed decision growth forest.
[0040] The mapping module, based on directed decision-growing forest, performs function mapping and permission mapping through hierarchical association mapping combined with automatic generation algorithms to obtain the menu structure of the target subsystem.
[0041] Specifically, the automated menu structure generation system based on the reporting task configuration also includes: a simulation module and a feedback adjustment module;
[0042] The simulation module, based on the menu structure of the target subsystem, combines the target subsystem with simulation algorithms to perform simulation debugging of the integrity, configuration accuracy and stability of menu function mapping along the forward direction of the directed decision growth forest. At the same time, it performs permission constraint range and anti-tampering test on the upper and lower level functions and the same level functions along the reverse direction of the directed decision growth forest, and obtains a list of abnormal type nodes.
[0043] The feedback adjustment module is used to feed back the list of anomaly type nodes to the corresponding branch function decision nodes of the directed decision growth forest and combine them with the configured anomaly adjustment strategy library for real-time anomaly correction. At the same time, the corrected subsystem parameters are synchronously mapped to the menu structure of the target subsystem until the current corrected menu structure of the target subsystem meets the corresponding requirements of the reporting subsystem in real time.
[0044] Compared with the prior art, the beneficial effects of the present invention are:
[0045] This invention addresses the shortcomings of existing technologies by employing a relational parsing algorithm to achieve structured parsing of the target subsystem's functions and permissions. It combines the Kahn algorithm with a directed decision-growing forest constructed from decision trees to accurately map functional levels, dependencies, and permission constraints, ensuring the hierarchical rationality and permission-relatedness of the menu structure. Through forward simulation debugging and reverse testing, it covers functional integrity, configuration accuracy, stability, permission constraints, and tamper resistance, achieving comprehensive anomaly detection. Real-time correction and parameter synchronization are achieved using an anomaly adjustment strategy library, ensuring the menu structure dynamically adapts to reporting requirements. The entire process is automated throughout the parsing, construction, testing, and correction stages, significantly improving menu generation efficiency and accuracy, reducing manual intervention costs, and enhancing system security through permission constraints and tamper resistance mechanisms, ensuring the final menu structure stably meets the functional and permission requirements of the reporting subsystem. Attached Figure Description
[0046] Figure 1 This is a flowchart of the automated menu structure generation method based on reporting task configuration in Embodiment 1 of the present invention;
[0047] Figure 2 This is a diagram illustrating the architecture of the directed decision-making growth forest construction process in Embodiment 1 of the present invention.
[0048] Figure 3 This is a module diagram of the automated generation system for the menu structure based on the reporting task configuration in Embodiment 2 of the present invention. Detailed Implementation
[0049] Example 1
[0050] In traditional subsystem menu generation, the access path length is calculated solely based on the physical path, without considering business dependency priorities. This results in high-frequency dependent functions being placed deep within the menu due to physical hierarchy limitations, while low-frequency functions may occupy shallower menus, violating actual operational priorities. Cross-level and cross-category related functions are poorly defined, leading to scattered organization in the menu and a disconnect between the menu structure and business processes. Users are forced to navigate multiple times, reducing efficiency and adaptability. In particular, cyclic dependencies can cause logical contradictions in dependency relationships, resulting in chaotic topology hierarchy division, broken permission inheritance chains, and function scheduling deadlocks. This significantly reduces the efficiency of menu generation in the reporting subsystem. Therefore, please refer to [link / reference needed]. Figure 1 The present invention provides an embodiment of an automated menu structure generation method based on reporting task configuration, comprising the following steps:
[0051] S1. Responding to the menu creation requirements of the target subsystem, the system performs directed hierarchical parsing from the root node of the target subsystem using an association parsing algorithm to obtain the hierarchical functional node tree, directed functional dependencies, and functional permission constraint space.
[0052] S2. Based on the hierarchical functional node tree and directed functional dependencies, a directed decision growth forest is constructed using the Kahn algorithm, decision tree, and growth rules. The functional permission constraint space is mapped to the functional association strength and mapped to the connection relationship between the upper and lower levels and the functions at the same level in the directed decision growth forest. The length of the corresponding connection relationship is controlled to obtain the directed decision growth forest.
[0053] S3. Based on directed decision-making growth forest, the menu structure of the target subsystem is obtained by performing function mapping and permission mapping through hierarchical association mapping combined with automatic generation algorithm; hierarchical association mapping includes function mapping and permission mapping.
[0054] S4. Based on the menu structure of the target subsystem, the target subsystem is simulated and debugged along the forward direction of the directed decision growth forest to ensure the integrity, accuracy and stability of the menu function mapping. At the same time, along the reverse direction of the directed decision growth forest, the scope of permission constraints and anti-tampering of the debugged upper and lower level functions and the same level functions are tested to obtain a list of abnormal type nodes.
[0055] S5. Feed back the list of abnormal type nodes to the corresponding branch function decision nodes of the directed decision growth forest and combine them with the configured abnormal adjustment strategy library to perform real-time abnormal correction. At the same time, synchronize the corrected subsystem parameters to the menu structure of the target subsystem until the current corrected menu structure of the target subsystem meets the corresponding requirements of the reporting subsystem in real time.
[0056] Further explanation is needed; please refer to [link / reference]. Figure 2 The construction process of the directed decision-making growth forest in this embodiment includes:
[0057] The system calls the subsystem configuration interface to obtain the global configuration file of the target subsystem, extracts the root node metadata through the XML syntax parser, encapsulates the root node metadata into a root node data structure and stores it in a tree database; the root node metadata includes the subsystem's unique task ID, creation timestamp, global permission mask and enable status indicator, where the global permission mask uses 32-bit binary encoding to represent system-level permission constraints;
[0058] It should be further explained that the unique task ID of the subsystem in this embodiment is used to uniquely identify the target subsystem, providing a unique identification benchmark for subsequent node association, dependency tracing, and tree structure indexing; the creation timestamp is used to record the root node generation time, supporting version tracing and time-based configuration change auditing; the 32-bit binary encoded global permission mask defines the system-level basic permission range, serving as the initial benchmark for permission inheritance between branch nodes and leaf nodes, and realizing permission constraint transmission through bitwise operations; the activation status flag controls the activation status of the root node, directly determining whether the corresponding subsystem is enabled or not, providing an activation status basis for menu structure generation.
[0059] Based on the functional classification management field in the global configuration file of the target subsystem, starting from the root node, the functional classification hierarchy is traversed using a depth-first search algorithm to extract the ID, name, parent category ID, and sort number of each category function, and a branch node sequence is generated according to the hierarchical depth. It should be further noted that in this embodiment, the hierarchical depth is calculated by recursively tracing the parent category ID to different levels of atomic sub-functions in the branch node sequence.
[0060] It should be further explained that, in this embodiment, the ID of the classification function is a unique identifier, supporting association and indexing; the name is used for classification identification; the parent category ID clearly defines the hierarchical relationship and is the core link of the hierarchical relationship; the sort number determines the arrangement order of categories at the same level; the hierarchical depth is recursively calculated through the parent category ID, which clarifies the hierarchical position of the classification; the branch node sequence is the result of sorting according to the hierarchical depth, providing an ordered foundation for the subsequent construction of the node tree; the atomic sub-functions are recursively traced through the parent category ID to help ensure the accuracy of the hierarchical depth calculation.
[0061] It should be further explained that the implementation process of the functional classification hierarchy structure in this embodiment includes:
[0062] S1.1 Based on the unique task ID of the root node, obtain the list of first-level functional categories directly associated with the root node by parsing the functional category management field of the target subsystem configuration file, and set the root node level depth to 0 as the starting point for depth-first search.
[0063] S1.2 Based on the ID of the current functional category, extract its metadata to obtain the category functional ID, name, parent category ID and sort number, where the parent category ID is the ID of the upper-level functional category. Set the level depth of the current category to the parent category level depth + 1, and generate a branch node data structure containing the above information; where the parent category ID of the subcategory of the root node is the unique task ID of the root node.
[0064] S1.3. Based on the ID of the current functional category, retrieve the list of its directly subordinate subcategories by searching the functional category management field. If a subcategory exists, use that subcategory as the current node and repeat the operation in S1.2 until the current category has no subordinate subcategories. The parent category ID of the subcategory is the same as the ID of the current category.
[0065] S1.4 After completing the traversal of the subcategories of the current branch, backtrack to the next level category. Based on the sort number of the category, select the next untraversed sibling category as the current node in ascending order, and repeat the operations from S1.2 to S1.3.
[0066] S1.5. Based on the data structure of all branch nodes generated by traversal, arrange them in ascending order of level depth and sorting number within the same level to obtain the branch node sequence.
[0067] S1.6 Simultaneously traverse the configuration list of the corresponding atomic sub-functions under each branch node sequence, extract the atomic sub-function ID, name, category function ID, type identifier, data source address and access path length, perform association matching with the branch node sequence based on the category function ID and combine the access path as the connection relationship, generate the leaf node tree corresponding to each branch node, and the atomic sub-function is an indivisible function that can only implement a minimum business closed loop at most.
[0068] It should be further explained that the atomic sub-function in this embodiment is a functional unit that can only complete a single, indivisible, minimum business operation and form an independent business closed loop (the result can be independently verified). Among its related variables, the atomic sub-function ID is used for unique indexing, the name supports intuitive identification, the category function ID realizes the hierarchical association with the branch node, the type identifier matches the interaction logic, the data source address provides data support, and the access path length is used as the connection relationship weight parameter; for example, in the financial reporting subsystem, "single employee monthly salary details query" only completes a single query operation and the result can be verified, which meets the definition of atomic sub-function. All variables together support its accurate positioning and functional implementation in the leaf node tree.
[0069] It should be further explained that the process of obtaining the leaf node tree corresponding to each branch node in this embodiment includes:
[0070] Based on each branch node ID in the branch node sequence, the basic data of the leaf node to be processed is obtained by traversing its corresponding atomic sub-function configuration list, extracting the atomic sub-function ID, name, category function ID, type identifier, data source address and access path length.
[0071] Based on the category function ID in the leaf node basic data, the atomic sub-functions are associated with the corresponding branch nodes by precise matching with the branch node ID in the branch node sequence, i.e., the category function ID is consistent with the branch node ID, thus obtaining the leaf node set grouped by branch node and the corresponding access priority.
[0072] Based on the access path length in the leaf node set, by setting the mapping rule between path length and connection weight, the access path is transformed into the basic length of the connection relationship between leaf nodes, and the leaf node connection relationship is obtained.
[0073] Based on the set of branch nodes and associated leaf nodes, with the branch node as the root, the leaf node tree corresponding to each branch node is obtained through the leaf node connection relationship and the corresponding access priority. The structure of the leaf node tree includes the leaf node level, connection relationship length and associated atomic sub-functional attributes.
[0074] Based on the branch node sequence and the leaf node tree corresponding to each branch node, starting from the root node, and combining with the tree database in the order of root node, branch node, and leaf node hierarchy, a hierarchical functional node tree is generated. Each node in the hierarchical functional node tree carries a hierarchy depth parameter.
[0075] Based on the hierarchical functional node tree, the dependency setting fields and data flow attributes in the corresponding functional configuration of the target subsystem are parsed. Precursor dependencies between atomic sub-functions corresponding to the same and different levels of leaf nodes under the same branch node are extracted. Simultaneously, the dependency relationships between functional categories between atomic sub-functions corresponding to the same and different levels of leaf nodes under different branch nodes are extracted, generating a dependency set including [dependency ID, dependency direction, dependent ID]. The dependency setting fields include the `predecessor_ids` array (precursor dependency ID array), recording the atomic sub-function IDs that the current function must complete beforehand. The data flow attributes include `source_id` (source function ID) and `target_id` (target function ID), indicating that data flows from the source function to the target function. The `precursor dependency ID` array is essentially an array for storing IDs. Its core function is to record the unique identifiers of all atomic sub-functions that must be completed before the current function can be executed, i.e., atomic sub-function IDs. Simply put, only when all atomic sub-functions corresponding to all IDs in this array are completed can the current function meet the conditions for starting or executing, thus clarifying the precursor order constraints for function execution. The source function ID is a unique ID identifier; it is specifically used to indicate the starting function of the data flow, that is, the unique identifier of the function that initially generates or initiates the flow of data. Through this ID, the source function of the data can be accurately located, and it can be determined from which function the data comes. The target function ID corresponds to the source_id and is also a unique ID identifier; its function is to indicate the ending function of the data flow, that is, the unique identifier of the function that receives the data transmitted from the source function (the function corresponding to source_id). Through this ID, the receiving function of the data can be accurately located, and it can be determined from which function the data goes.
[0076] It should be further explained that the process of obtaining the dependency set in this embodiment includes:
[0077] The set of dependency relationships in the directed acyclic dependency graph includes [dependency ID, dependency direction, dependent ID], where the dependency ID and dependent ID each correspond to at least one branch node or leaf node ID. It should be further noted that the dependency direction in this embodiment is consistent with the functional control logic direction, that is, the function of the upper-level node depends on the function of the lower-level node to be implemented.
[0078] It should be further explained that the specific process of parsing the set of dependency relationships including [dependency ID, dependency direction, dependent ID] in the directed acyclic dependency graph in this embodiment includes:
[0079] If the leaf node's predecessor_ids contains the IDs of other leaf nodes in the same branch, then generate [dependency leaf node ID, forward, dependent leaf node ID];
[0080] If the source_id of a branch node points to the ID of another branch node, then generate [source branch node ID, forward, target branch node ID];
[0081] If the leaf node's predecessor_ids contains the ID of the parent branch node, then generate [leaf node ID, forward, parent branch node ID];
[0082] Obtain the initial dependency list, where the dependent ID and the dependent ID are both branch node IDs or leaf node IDs;
[0083] The in-degree value is calculated by counting the number of times each branch node or leaf node is dependent on the remaining nodes in the directed decision-growing forest. An in-degree table is constructed with node ID as the key and in-degree value as the value, where the root node's in-degree value is set to 0. For example, if the dependency relationship is [B001→B002, L001→B002, L002→L001], then the in-degree table is {B002:2, L001:1, L002:0, B001:0, R001:0}; where B001 represents the branch node with label 001, and L001 represents the leaf node with label 001. Further explanation is needed. In this embodiment, in the dependency relationship [B001→B002, L001→B002, L002→L001], the in-degree value of B002 is 2: because branch node B001 depends on B002 and leaf node L001 depends on B002, a total of 2 nodes point to B002, so the number of times it is depended on is 2; the in-degree value of L001 is 1: because leaf node L002 depends on L001, there is 1 node pointing to L001, so the number of times it is depended on is 1; the in-degree value of R001 (root node) is 0: as the starting node of the forest, no node depends on it, so the number of times it is depended on is 0. The in-degree value of L002 is 0: no node depends on L002, and no node points to it, so the number of times it is depended on is 0. The in-degree value of B001 is 0: no node depends on B001, and no node points to it, so the number of times it is depended on is 0.
[0084] Extract the root node from the node pool constructed by the directed decision-making growth forest, add the root node ID to the initialization queue, where the initialization queue is processed according to the first-in-first-out principle, the root node is the first node to be mounted, and its level is preset to level 0.
[0085] Take the first node from the queue and mark it as the current node. Record the current node ID and the current level. At the same time, traverse all dependencies in the directed acyclic dependency graph with the current node as the dependent party and extract the dependent party ID, which is the child node ID of the current node.
[0086] For each child node corresponding to a dependency ID, if it is a branch node, the level of the current branch node is set to the current node level + 1; if it is a leaf node, the level of the leaf node is set to the level of its own branch node + 1. At the same time, the level information of the child node is temporarily stored in a temporary level table, where the own branch node is determined by associating with the category function ID in the leaf node metadata.
[0087] For each extracted current child node, query the current in-degree value from the in-degree table and decrement it by 1. When the in-degree value is 0, add the child node ID to the queue. Repeat this process until the queue is empty.
[0088] The parent node ID of the branch node is set to the temporary ID of the current node. The parent node temporary ID of the leaf node is matched with the corresponding branch node ID through the category function ID. The parent node ID of each node is associated with the hierarchical information to form a temporary topology table.
[0089] Based on the node ID, level number, and parent node ID in the temporary topology table, redundant information is removed to generate a topology level table that supports quick querying of levels and parent node relationships by node ID; where the level number is 0 for the root node and the child node level = parent node level + 1.
[0090] Based on all dependency sets, using branch node IDs and corresponding leaf node IDs as nodes, the Tarjan algorithm is used to detect and eliminate cyclic dependencies, resulting in a directed acyclic dependency graph.
[0091] In this embodiment, cyclic dependencies can lead to logical contradictions in dependency relationships, causing problems such as chaotic topology hierarchy partitioning, broken permission inheritance chains, and deadlocks in function scheduling. It is necessary to eliminate cyclic dependencies to ensure the executability and orderliness of dependency relationships. Based on a weighted directed graph, the Tarjan algorithm is used to accurately identify strongly connected components (SCCs) through depth-first traversal and low link value calculation, thereby locating cyclic dependencies. Then, by retaining the edge with the largest weight in the cyclic dependency SCC and deleting the other edges, the closed loop is broken, and finally a directed acyclic dependency graph is generated, which not only eliminates logical contradictions but also ensures that the retained dependency relationships conform to the actual business priorities.
[0092] It should be further explained that the implementation process for detecting and eliminating loop dependencies in this embodiment includes:
[0093] Based on the dependency set [dependency ID, dependency direction, dependent ID] and the access path length of the leaf node tree, a weighted directed graph adjacency list is constructed with branch node ID and leaf node ID as vertices. The weighted directed graph adjacency list is in the format [start ID, end ID, weight], where the weight is 1 / access path length and the shorter the path, the greater the weight.
[0094] Based on a weighted directed graph, the initialized Tarjan algorithm parameters are obtained by assigning a unique index value to each node (incrementing lexicographically by node ID), initializing the low link value (initially equal to the index value), creating an empty stack (to store nodes of the current traversal path), and adding stack markers (boolean values). The low link value refers to the smallest index value that a node can trace back to in its strongly connected component, which is used to identify the strongly connected component. The stack markers are used to indicate whether a node is in the stack of the current traversal path.
[0095] Based on the initialized Tarjan algorithm parameters, a depth-first traversal is performed starting from the first unvisited node. The node index and low-link value are recorded, pushed onto a stack and marked. When traversing out edges, the low-link value is recursively updated (taking the minimum value). When the node index equals the low-link value, the node is popped from the stack to form a strongly connected component (SCC). An SCC containing cyclic dependencies is obtained, that is, an SCC with two or more nodes. Here, a strongly connected component refers to the largest subset of nodes that can reach each other in a directed graph, and a cyclic SCC is an SCC that contains cyclic dependencies.
[0096] Based on the SCC with cyclic dependency and all directed edges in the cyclic dependency, the edge with the largest weight is selected and retained, which corresponds to the connection with the shortest access path. The remaining edges are deleted to break the closed loop and obtain the edge set after eliminating the cyclic dependency.
[0097] Based on the edge set after eliminating cyclic dependencies, including non-cyclic edges and edges retained within cycles, a directed acyclic dependency graph without cyclic dependencies is obtained by reconstructing the adjacency list of the directed graph. Here, a directed acyclic dependency graph refers to a directed graph without cyclic dependencies, where the dependencies between any nodes are unidirectional and without closed loops.
[0098] Based on the hierarchical functional node tree combined with the directed acyclic dependency graph, the length weight of the connection relationship within the hierarchical functional node tree is constructed using the preceding dependency relationship as the adjustment coefficient for the access path length between different leaf nodes within the hierarchical functional node tree. At the same time, the access path adjustment coefficient between functional categories is constructed using the dependency relationship between functional categories. The hierarchical functional node forest is constructed by combining graph neural network and random forest algorithm.
[0099] Because the access path length in the existing hierarchical functional node tree is calculated only based on the physical path and does not associate with business dependency priority, and a single model is insufficient to capture complex node relationships, high-frequency dependent functions are placed deep in the menu due to physical hierarchy limitations (long access paths), while low-frequency functions may occupy shallow positions, violating the actual business operation priority. Simultaneously, cross-level and cross-category related functions lack effective organization in the menu due to inaccurate relationship characterization; for example, strongly dependent functions are scattered across different menu branches, ultimately causing the generated menu structure to become disconnected from the actual business process. Users need to jump multiple times to complete a coherent operation, significantly reducing menu efficiency and business adaptability. It should be further noted that the detailed construction process of the hierarchical functional node forest in this embodiment includes:
[0100] Based on the pre-dependency relationship in the directed acyclic dependency graph, the first dependency strength between different leaf nodes under the same branch node is extracted, where the dependency strength is the ratio of the number of times it is depended on to the total number of times it is depended on.
[0101] Based on the first dependency strength, the adjustment coefficient K1 for the access path length between leaf nodes is obtained; where the larger the value of K1, the shorter the path length after adjustment.
[0102] The dependency relationships between branch nodes are extracted based on the directed acyclic dependency graph, and the categorical dependency strength is defined, where the categorical dependency strength is the ratio of the data flow frequency to the total interaction frequency.
[0103] Based on the strength of the category dependency, obtain the adjustment coefficient K2 for the access path between category functions; where the larger the value of K2, the shorter the path length after adjustment.
[0104] Based on the hierarchical functional node tree, the access path length between leaf nodes is scaled by adjustment factor K1, and the access path length between category functions is scaled by adjustment factor K2.
[0105] The scaled path length is used as the input feature of the graph neural network to train and obtain the initial node association weights.
[0106] Then, using the random forest algorithm, with the scaling error of the path length between nodes as the optimization weight, multiple optimized node association models are output. These models are integrated to form a hierarchical functional node forest, where each model corresponds to a tree in the forest, including the scaling path length and node association relationship. The input features include node features, including the level depth and type identifier, and the edge feature is the scaling path length.
[0107] Based on the global permission mask file in the hierarchical functional node tree, the visible role group attributes included in the categorized configuration of the branch nodes are parsed to generate a branch node permission constraint set with role ID and permission operation code as the dimensions. It should be further explained that the branch node permission constraint set with role ID and permission operation code as the dimensions in this embodiment includes two core parts: first, a list of role IDs, exemplified by unique role identifiers such as "Finance Group ID" and "Administrator Group ID," used to clearly define the scope of roles allowed to access the branch node; only roles within the list can obtain basic access permissions for that branch. Second, a set of permission operation codes associated with each role ID, exemplified by binary codes for operations such as "View=0x01," "Edit=0x02," and "Delete=0x04," used to refine the types of operations that each role can perform under the branch node, limiting the functional operation boundaries of the role on the branch node; for example, only the "Finance Group" is allowed to perform the "View" operation, and "Delete" is prohibited. The combination of these two forms the permission control benchmark for the branch node, both defining the access subjects and standardizing the scope of operations for those subjects, providing a constraint source for subsequent leaf node permission inheritance.
[0108] This process extracts the first dependency strength and the classification dependency strength to generate adjustment coefficients K1 and K2, scaling the access path length between leaf nodes and between classification functions according to business dependency priority. The stronger the dependency, the shorter the adjusted path length, improving the efficiency of function scheduling. Using the scaled path length and node features as input, the initial association weights are trained through a graph neural network, and the path length error is optimized by combining a random forest. The resulting hierarchical functional node forest can accurately characterize the node association relationship, and the integration of multiple models can cover complex business scenarios. It provides a basic model that fits the actual business for subsequent permission constraint mapping and menu structure generation, ensuring that node association and path length meet the business priority requirements.
[0109] Simultaneously, based on the permission configuration files of the corresponding atomic sub-functional nodes of all leaf nodes under each branch node in the global permission mask file, the granular parameters of operation permissions are extracted, and combined with the permission constraint set of the branch node, the permission constraint set of the leaf node is generated through the permission inheritance algorithm.
[0110] It should be further explained that the process of obtaining the leaf node permission constraint set in this embodiment includes:
[0111] Based on the atomic sub-function node permission configuration files corresponding to all leaf nodes under each branch node in the global permission mask file, the operation permission granularity parameters of the leaf nodes are extracted by parsing the operation_rights field in the file to obtain the initial permission configuration of the leaf nodes. It should be further noted that the operation permission granularity parameters include the set of permission opcodes for executable operations and the default permission range of the corresponding role ID. The operation_rights field is the core field in the atomic sub-function permission configuration file corresponding to the leaf node, specifically used to store operation permission-related information for that leaf node (i.e., atomic sub-function). The core function of this field is to provide data support for extracting the operation permission granularity parameters of the leaf nodes. By parsing it, two key pieces of information can be obtained: first, the set of permission opcodes corresponding to all operations that can be executed by the leaf node, such as the binary encoding of operations like view, edit, and delete; second, the default permission range for the leaf node for different role IDs, i.e., the default operation boundaries that different roles can execute on the leaf node. Finally, the initial permission configuration of the leaf nodes is formed based on this information.
[0112] Based on the branch node permission constraint set, the range of roles that can be inherited by the leaf node is filtered out by matching the role ID in the initial permission configuration of the leaf node with the list of role IDs of the branch node, thus obtaining the list of valid roles for the leaf node; it should be further noted that the range of roles that can be inherited by the leaf node only retains the role IDs allowed by the branch node.
[0113] Based on the list of valid roles, for each role ID, the permission opcode in the initial permission configuration of the leaf node is concatenated and aligned with the permission opcode of the corresponding role of the branch node through a bitwise AND operation to obtain the permission opcode inherited by the leaf node, ensuring that the permissions of the leaf node do not exceed the allowed range of the branch node.
[0114] If the initial permission configuration of the leaf node contains a role ID or operation code that is not included in the permission constraint set of the branch node, the corrected leaf node permission configuration can be obtained by removing the role ID and the corresponding operation code, or by forcibly pruning the operation code to a subset allowed by the branch node, marking the "permission out of bounds" exception.
[0115] Based on the revised leaf node permission configuration, the role ID and the corresponding inherited permission operation code are integrated to form a leaf node permission constraint set with the role ID as the key and the permission operation code set as the value, ensuring that the operation permissions of each role are fully inherited from the branch node and do not exceed its constraint range.
[0116] Based on the permission constraint set of all nodes, construct a functional permission constraint space indexed by branch node ID or leaf node ID, which stores the permission boundaries and inheritance paths of the corresponding nodes.
[0117] The functional permission constraint space is mapped to the access path corresponding to the hierarchical functional node forest, and used as the dependency constraint adjustment coefficient between access relationship and access path length to obtain a hierarchical functional node forest with permission constraints.
[0118] It should be further explained that the process of obtaining the hierarchical functional node forest with permission constraints in this embodiment includes:
[0119] Based on the functional permission constraint space (indexed by node ID, including permission boundaries and inheritance paths), for each pair of nodes (u, v) with access paths in the hierarchical functional node forest, by querying the permission boundaries of u and v, the intersection of the common role ID and corresponding operation code of the two is extracted, that is, the roles and operation range that u→v are allowed to access at the same time, and permission matching information is obtained, including the number of common roles and the proportion of operation code intersection.
[0120] Based on permission matching information, the permission matching degree is defined as follows: Permission matching degree = Number of common roles / Total number of roles × w1 + Percentage of intersection of operation codes × w2; where w1 and w2 are weighting coefficients. In this embodiment, w1 and w2 are determined by analyzing historical permission allocation data, including but not limited to the frequency of role allocation and the frequency of operation code usage, and by using regression analysis.
[0121] The permission matching degree is converted into the permission constraint adjustment coefficient K3. Specifically, K3 = permission matching degree. The larger K3 is, the stronger the permission compatibility of u→v. K3 is obtained for each pair of nodes (u, v).
[0122] Based on the scaled path length of nodes (u, v) in the hierarchical functional node forest, the final path length is calculated using the formula: final path length = scaled path length × (1-K3). A second scaling is performed, where the stronger the permission compatibility, the larger K3 is, and the shorter the final path length, thus obtaining the access path length with permission constraints.
[0123] K3 is added as a new edge feature, and together with the original node features (including but not limited to level depth and type identifier) and the access path length with permission constraints, it is input into the graph neural network to retrain the initial node association weights.
[0124] Then, using the random forest algorithm, the weights are optimized with the path length error with permission constraints as the optimization objective, and multiple optimized node association models are output.
[0125] Based on the optimized model (where each model contains access path length with permission constraints, node association and permission matching information), a hierarchical functional node forest with permission constraints is formed to ensure that the access path length and node association are simultaneously constrained by business dependency priority (K1, K2) and permission compatibility (K3).
[0126] Based on a hierarchical functional node forest with permission constraints, combined with simulation algorithms, CART decision trees, a preset simulation debugging scenario space, and hierarchical functional node tree growth rules, simulation debugging training is conducted to ensure functional integrity, configuration accuracy, stability, permission constraint scope, and tamper-proof performance. This yields a trained CART decision tree model, which is then configured into each branch node of the hierarchical functional node forest with permission constraints, resulting in a directed decision growth forest including branch functional decision nodes. It should be further noted that this directed decision growth forest uses the CART decision tree model in each branch functional decision node to perform anomaly correction under different scenarios and automatically synchronize and modify menu results, achieving rapid menu generation and rapid function synchronization.
[0127] It should be further explained that the specific process of building and training the CART decision tree model in this embodiment includes:
[0128] Based on the list of abnormal node types and corresponding correction strategies, sample data is extracted. Each sample contains input features and output labels. Input features include abnormal type, node level depth, node type, associated node ID, permission matching degree of the abnormal node (K3), path adjustment coefficient (K1, K2), and node activation status. The output label is the correction strategy for the corresponding abnormality. For example, calling the `generate_missing_node` method or performing bitwise AND operations to correct permission opcodes. It should be further noted that abnormal types include, but are not limited to, missing function mapping, incorrect mapping content, and permission inheritance exceeding the boundary. Node types include branch nodes or leaf nodes. `generate_missing_node` is the core processing method for function mapping missing anomalies. When a leaf node or branch node is detected as not associated with a corresponding menu item ID, this method is called to automatically generate metadata for the missing node based on the node's category ID, node name, and node type identifier (such as branch node / leaf node). This metadata includes, but is not limited to, basic information such as ID, name, and category, providing a data foundation for subsequent menu binding and function mapping completion.
[0129] The bitwise AND operation corrects the permission opcode. Specifically, the bitwise AND operation is a binary-level logical operation (the result is 1 when the corresponding bits of two binary numbers are both 1, otherwise it is 0). Here, it is used to correct permission inheritance out-of-bounds exceptions. When the permission opcode of a leaf node exceeds the permission range of the parent node, the permission opcode of the leaf node is bitwise ANDed with the permission opcode of the corresponding parent node. This forcibly prunes the permission of the leaf node to a subset of the permission of the parent node, retaining only the operation permissions that are common to both, ensuring that the permission of the child node does not exceed the permission constraints of the parent node.
[0130] The collected input features are quantized, and the anomaly type is converted into a discrete code. For example, missing function mapping = 1, incorrect mapping content = 2. The node type is converted into a binary identifier. For example, branch node = 1, leaf node = 0. The node level depth, K1, K2, K3 retain their original values. The associated node ID is converted into an identifier indicating whether it is a bidirectional anomaly, where yes = 1, no = 0. The activation state is converted into binary, where active = 2, inactive = 3. The integrated features form a feature vector.
[0131] The correction strategies are categorized by operation type and assigned unique identifiers. For example, the generation node is 101, the correction permission operation code is 102, the path level adjustment is 103, etc., so that the output label of each sample corresponds to a unique correction strategy identifier.
[0132] The processed sample data is divided into training and test sets according to a certain ratio. The training set is used for model training, and the test set is used for model validation.
[0133] Based on the training set, a decision tree is initialized using the Gini coefficient as the splitting criterion, setting the maximum tree depth and the minimum number of split samples. The initial decision tree is constructed by recursively partitioning the feature space, with the feature vector as input and the modified policy label as output.
[0134] For each node, calculate the Gini coefficient gain of all features, select the feature with the largest gain and the splitting threshold to split the node, until the maximum depth is reached or the number of samples is less than the minimum number of split samples.
[0135] Based on the initial decision tree, the split threshold is iteratively adjusted using the training set. The tree structure is optimized by minimizing the deviation between the predicted correction policy label and the actual label. For each leaf node, the majority correction policy label of the samples contained in that node is taken as the output of that node.
[0136] Input the test set into the optimized decision tree and calculate the percentage of samples that correctly predict the correction strategy. If the accuracy is lower than the preset threshold, increase the maximum tree depth or decrease the minimum number of split samples, and retrain the model until the accuracy reaches the target.
[0137] Based on the preset simulation debugging scenario space, the feature vectors corresponding to the scenario are extracted and input into the model to verify whether the correction strategy output by the model can eliminate the anomaly. For example, after the node is generated, the menu mapping is complete and the permission operation code is corrected to meet the inheritance rules. For scenarios that fail, the corresponding samples are added to the training set and the model is retrained.
[0138] The validated CART decision tree model is serialized and configured into each branch node of a hierarchical functional node forest with permission constraints. This allows the branch nodes to receive feature vectors from abnormal nodes, including but not limited to abnormality type and hierarchical depth. The model outputs a corresponding correction strategy identifier to trigger correction operations, such as calling interfaces or updating permission configurations, thus forming branch functional decision nodes and creating a directed decision growth forest.
[0139] It should be further noted that the simulated debugging scenario space described in this embodiment includes a directed decision growth forest, a menu structure of the target subsystem, and debugging scenario requirements;
[0140] It should be further explained that the hierarchical functional node tree growth rule in this embodiment is constructed based on the abnormal scenario, scenario parameters, and correction strategies extracted from the preset correction strategy library, combined with the decision parameters generated by the CART decision tree model. It is used to adjust the nodes and dependencies of the hierarchical functional node forest under the corresponding abnormal scenario, and synchronously adjust the menu structure of the corresponding target subsystem according to the adjustment result. The menu structure of the target subsystem is then mapped to the subsystem configuration interface for iterative simulation until the requirements of the target subsystem are met.
[0141] This process extracts and encapsulates root node metadata by calling the subsystem configuration interface, using a unique task ID to uniquely identify the subsystem and provide a benchmark for node association and dependency tracing. A timestamp is created to support version tracing and configuration auditing. A global permission mask defines the system-level permission benchmark using 32-bit binary encoding, and bitwise AND operations ensure hierarchical transmission of permission constraints. Status identifiers are enabled to precisely control the subsystem's activation status, providing a reliable basis for subsequent menu generation. A depth-first search traverses the functional classification hierarchy to generate a sequence of branch nodes, arranged in order of hierarchy depth and sort number. This ensures both the clarity of the functional classification hierarchy and the consistency of the classification logic through recursive tracing of hierarchy depth, avoiding confusion and misalignment of functional classifications. Secondly, basic data is extracted by traversing the atomic sub-function configuration list. Based on the precise matching of the category function ID and branch node ID, the atomic sub-functions of the smallest business loop are accurately associated with the corresponding branch nodes. This clarifies the function affiliation and provides a quantitative basis for the association between leaf nodes through the mapping rules of access path length and connection weight, ensuring the orderliness of the leaf node tree structure and the accurate positioning of functional units. The generation of the hierarchical functional node tree starts from the root node, arranges it hierarchically and carries a depth parameter, providing structured support for functional positioning, hierarchical management and subsequent dependency resolution; Third, by parsing the functional configuration, the pre-dependencies and data flow are extracted to generate a dependency relationship set, clarifying the interaction logic and sequence between functions; The Tarjan algorithm is used to detect and eliminate cyclic dependencies. By binding weights to directed edges (the shorter the path, the greater the weight), the edge with the largest weight in the strongly connected components is retained, which not only eliminates logical contradictions, topological chaos and scheduling deadlocks caused by dependency loops, but also ensures that the retained dependencies conform to the actual business priority, making the dependencies executable and reasonable; Fourth, the construction of the hierarchical functional node forest combines graph neural networks and random forest algorithms. K1 coefficients are generated based on the strength of pre-dependencies to adjust the path length of leaf nodes, and K2 coefficients are generated based on the classification dependency degree to adjust the path length between categories, so that the path length is associated with the business dependency priority, solving the scheduling inefficiency problem caused by the traditional physical path not considering business priority. The multi-model integrated forest structure accurately captures complex node relationships, providing a relationship model that fits the actual business for cross-level and cross-class functional interactions, thus improving the efficiency of function scheduling; Fifth, by parsing the global permission mask file to generate a branch node permission constraint set, the role scope and operation boundaries are clearly defined; Based on the permission inheritance algorithm, through role matching and bitwise AND operation, the permissions of leaf nodes are strictly inherited from the branch nodes, illegal roles and out-of-bounds operation codes are eliminated, ensuring the consistency and security of permission inheritance.The functional permission constraint space is constructed using node IDs as indexes to store permission boundaries and inheritance paths. A secondary scaling of the forest access paths is applied using the K3 coefficient, ensuring that path lengths are constrained by both business dependencies and permission compatibility. This guarantees precise permission control while optimizing the efficiency of legitimate access paths through permission compatibility optimization. Finally, based on the hierarchical functional node forest with permission constraints, multi-dimensional simulation debugging and training are conducted using simulation algorithms, CART decision trees, and preset scenarios. The generated decision tree model is configured to branch nodes to form branch functional decision nodes. This verifies functional completeness, configuration accuracy, stability, and permission security, and provides a decision-making basis for anomaly correction, significantly improving the system's stability, tamper resistance, and business adaptability.
[0142] It should be further explained that the process of obtaining the menu structure of the target subsystem in this embodiment includes:
[0143] Based on the name field of the branch node or the name of the leaf node, the menu display text is obtained by filtering special characters, such as removing commas.
[0144] The menu route URL is generated by concatenating the access path of the leaf node (from the basic data of the leaf node) with the system domain name (the domain name associated with the unique task ID of the subsystem);
[0145] Based on the type identifier of the branch node or leaf node, where the branch node is the category type and the leaf node is the atomic sub-function type, the preset icon mapping table is queried, the type identifier is associated with the SVG icon code, and the corresponding icon code is obtained.
[0146] Based on the set of permission opcodes in the branch node permission constraint set or the permission opcodes in the leaf node permission constraint set, such as 0x01 and 0x02, they are converted into resource granularity tags that the permission system can recognize; such as "view" and "edit".
[0147] Based on the branch node ID or leaf node ID and resource granularity label, send a POST request to the permission center, submit the function ID and resource granularity label, and obtain the resource registration ID (associated with the permission boundary in the permission constraint space).
[0148] Based on the menu display text, route URL, icon code, and parent node ID, the menu service creation interface is called to obtain the menu item ID; the parent node ID of a branch node is the ID of the parent branch node or the unique task ID of the root node, and the parent node ID of a leaf node is the ID of the branch node to which it belongs.
[0149] Insert a record into the relationship table, associate it with the function ID (branch node ID or leaf node ID), menu item ID, and resource registration ID, and set the activation status to false. The initial inactivation is associated with the root node's activation status identifier.
[0150] Based on the permission boundaries of nodes in the functional permission constraint space (including the set of role IDs and permission operation codes), by associating the resource registration ID with the role permission table of the permission center, the routing URL corresponding to the menu item ID is only open to the role ID in the permission boundary, and the operation scope is limited to the resource granularity tag corresponding to the permission operation code. For example, only the "finance group ID" is allowed to perform the "view" operation.
[0151] Based on the node relationships (including hierarchy depth and parent node ID) and activation status in the hierarchical functional node forest with permission constraints, the menu items are arranged in ascending order by hierarchy depth from smallest to largest, and within the same hierarchy by branch node sort number or leaf node access path length (after adjustment by K1, K2, K3), and integrated to form the menu structure of the target subsystem, including but not limited to hierarchy relationships, routing URLs, icons and permission control rules.
[0152] It should be further explained that the process of obtaining the list of exception type nodes in this embodiment includes:
[0153] Based on the node relationships (including but not limited to hierarchy depth and parent node ID) of each model in the hierarchical functional node forest, the node sequence is extracted in the order from the root node to the leaf node corresponding to the corresponding atomic sub-function of each model. The node sequences of all models are integrated to obtain the forward traversal path set.
[0154] Based on the menu structure of the target subsystem, for each node in the model, query the relationship table to see if there is an associated menu item ID: if a node in any model has no associated menu item ID, it is marked as a missing function mapping exception; if it exists, verify whether the menu display text, route URL, icon code and the name, access path and type identifier of the node metadata are consistent. If they are inconsistent in any model, it is marked as a mapping content error exception.
[0155] Based on the dependency set of the hierarchical functional node forest, check whether the predecessor dependency nodes of the current node exist and are active in the menus of all related models: if the predecessor node is missing or not active in any model, it is marked as a predecessor dependency configuration error; verify whether the path length of the node after adjustment by K1, K2, and K3 is consistent with the menu hierarchy depth; if it is inconsistent in any model, it is marked as a path configuration deviation error.
[0156] For each node in the model, simulate M consecutive accesses to the menu route and count the total number of response failures for all models. If the total failure rate exceeds the preset failure rate, it is marked as an abnormal function stability, and the abnormal node ID and the failure log of each model are recorded.
[0157] Based on the node association relationships of each model in the hierarchical functional node forest, according to the hierarchical relationship of each model, the corresponding node sequence is extracted from the path association relationship from each leaf node to the root node, and the node sequences of all models are integrated to obtain the reverse tracing path set.
[0158] Based on the permission boundaries in the functional permission constraint space, check whether the permission boundaries of all parent nodes on the inheritance path of each node in each model include the permissions of the current node. Specifically, verify the inclusion relationship between the opcode of the current node and the opcode of the parent node through bitwise AND operation. If the condition is not met in any model, it is marked as a permission inheritance out-of-bounds exception. Check whether the node contains a role ID outside the permission constraint space. If the ID exists in any model, it is marked as an illegal role permission exception.
[0159] Compare the current permission configuration of each node in each model with the original configuration in the global permission mask file. Based on the creation timestamp, trace the historical version and verify whether there is any unauthorized modification by comparing the hash value. Specifically, if the hash value is inconsistent in any model and there is no legitimate modification record, it is marked as an abnormal permission configuration tampering.
[0160] The intersection of the abnormal node IDs obtained from forward debugging and reverse testing is performed to identify nodes that exhibit both forward and reverse anomalies in all relevant models, and these nodes are marked as bidirectional abnormal nodes.
[0161] For abnormal nodes that appear only in the forward or reverse direction, trace their upper and lower level nodes in each model. Specifically: if the upper level node in any model is bidirectionally abnormal, then the current node is marked as an association propagation abnormality; if there are multiple abnormal nodes at the same level in any model that share the same parent node, then they are marked as cluster abnormalities at the same level.
[0162] Based on the abnormal nodes in all models, classify them by abnormal type, record the node ID, abnormal description, positive / negative abnormal identifier in each model and associated node ID, and obtain a list of abnormal type nodes.
[0163] It should be further explained that the process of feeding back the list of anomaly type nodes to the corresponding branch function decision nodes of the directed decision growth forest and combining it with the configured anomaly adjustment strategy library for real-time anomaly correction in this embodiment includes:
[0164] When a missing function mapping exception occurs, the `generate_missing_node` method is called based on the missing function mapping exception node ID in the exception type node list. This generates leaf node or branch node metadata according to the node's category ID, name, and type identifier. The function and menu binding logic (resource registration, menu item creation, and relationship table association) is triggered, and the generated node is attached to the corresponding parent node. The menu structure of the target subsystem is updated synchronously, and the `verify_completion` check (simulating access to verify the mapping validity) is performed until the node is associated with a menu item ID and displayed in the menu.
[0165] When a mapping content error occurs, based on the mapping content error exception node ID in the exception type node list, extract the node metadata (including but not limited to name, access path, and type identifier); filter the menu display text for special characters and replace it with the node name; reconstruct the route URL as the system domain name + node access path; and re-query the preset icon mapping table according to the type identifier to obtain the icon code; call the menu service update interface to correct the menu item attributes; and execute the check_node_accuracy task (node accuracy verification task) to verify the consistency between the node attributes and the menu configuration until they match. The core of the node accuracy verification task is to initiate a comparison verification, extract the node's own metadata, including but not limited to name, access path, and type identifier, and check it one by one with the corrected menu item attributes (display text, route URL, icon code). For example, verify whether the node name after filtering special characters is completely consistent with the corrected menu display text, whether the node access path combined with the system domain name completely matches the corrected menu route URL, and whether the SVG icon code corresponding to the node type identifier is completely identical to the corrected menu item icon code, thereby determining whether the two are consistent.
[0166] When a prerequisite dependency configuration error exception exists, based on the prerequisite dependency configuration error exception node ID and the associated prerequisite dependency node ID in the exception type node list, check the activation status of the prerequisite node: if it is not activated, update its activation status to true; if the prerequisite node is missing, generate the prerequisite node and bind it to the menu according to the missing function quick completion method; verify whether the dependency relationship set between the current node and the prerequisite node is effective in the menu (the current node is only visible after the prerequisite node is activated), until the prerequisite node exists and is activated.
[0167] When a path configuration deviation is found, the scaling path length after adjustment by K1, K2, and K3 is extracted based on the path configuration deviation abnormal node ID in the abnormal node list; the menu level depth is recalculated based on the path length, and the menu service adjustment interface is called to migrate the node to the corresponding level; the check_node_accuracy task is executed to compare the path length and level depth until they are consistent.
[0168] When functional stability anomalies occur, based on the functional stability anomaly node ID and failure log in the anomaly type node list, if it is a database connection timeout, the database connection pool capacity is increased; if it is a permission verification delay, the permission caching mechanism is optimized. Redundant backups are performed on the menu routes corresponding to the node (deployed to a backup server), and the node is automatically rolled back to a stable version when the update fails. N accesses are simulated again until the failure rate is less than or equal to the preset failure rate threshold.
[0169] When a permission inheritance out-of-bounds exception occurs, the permission opcode of its parent node is extracted based on the permission inheritance out-of-bounds exception node ID in the exception type node list; the current node's permission opcode is corrected to a subset of the parent node's opcode by bitwise AND operation (current node opcode = current node opcode + parent node opcode); the permission boundary of the node in the function permission constraint space is updated synchronously, and permission verification is performed to ensure that the child node's permissions are fully inherited from the parent node, until the corrected opcode conforms to the inheritance rules.
[0170] When there is an illegal role permission exception, based on the illegal role permission exception node ID in the exception type node list, extract the list of legal role IDs in the function permission constraint space; remove the role IDs and corresponding operation codes that are not in the legal list in the node permission configuration, call the permission center interface to update the role range associated with the resource registration ID; verify that the menu route is only open to legal roles, until there are no illegal role permissions.
[0171] When a permission configuration tampering exception occurs, the creation timestamp of the exception node is obtained based on the exception node ID recorded in the exception type node list. According to the creation timestamp, the original permission configuration corresponding to the exception node is retrieved from the global permission mask file, and this original permission configuration overwrites the currently tampered permission configuration of the node. This permission configuration tampering event is recorded in the node change log, which includes at least the following: operator identity information, time of the tampering operation, permission configuration content before tampering, and permission configuration content after tampering. Write protection is enabled for the permission configuration of this node. The write protection mechanism operates as follows: only users with preset administrator privileges can initiate requests to modify the node's permission configuration, and these requests must be approved through a preset approval process before the modification can be executed. The consistency between the node's current permission configuration and the original permission configuration is verified through hash value comparison. Specifically, the hash value of the current permission configuration is calculated and compared with the hash value of the original permission configuration. If they do not match, the original permission configuration overwrite operation is re-executed. If they match, further checks are conducted to determine if any unauthorized modification records exist, until the node's permission configuration is completely consistent with the original permission configuration and no unauthorized modifications have been made.
[0172] When bidirectional abnormal nodes exist, based on the bidirectional abnormal node ID in the abnormal type node list, the correction strategy corresponding to the positive abnormality is executed first, such as path configuration deviation correction, and then the correction strategy corresponding to the reverse abnormality is executed, such as permission inheritance out-of-bounds correction; the security adjustment and stability adjustment in the quality assurance adjustment method are called, including but not limited to redundancy backup and permission verification, and the menu structure is updated synchronously before performing forward simulation debugging and reverse testing until both bidirectional abnormalities are eliminated.
[0173] When an association propagation anomaly exists, based on the association propagation anomaly node ID and the upper-level bidirectional anomaly node ID in the anomaly type node list, the upper-level bidirectional anomaly node is first corrected; after the upper-level node anomaly is eliminated, the association relationship between the current node and the upper-level node is re-verified, including but not limited to dependency relationship sets and permission inheritance paths.
[0174] Perform integrity adjustments to ensure that the parent node exists and is active, and synchronously update the hierarchical relationships in the menu structure until the current node's anomaly is eliminated.
[0175] When there is an anomaly in the same level cluster, based on the anomaly node ID and shared parent node ID in the anomaly type node list, check whether the parent node has configuration errors (such as permission boundary anomalies or missing prerequisite dependencies) and correct them; batch execute the corresponding anomaly type correction strategy for the anomaly nodes in the same level, such as batch completing missing mappings and batch correcting permission opcodes.
[0176] Invoke stability adjustments; if there are more than 100 sub-items, split the hierarchy and synchronously update the menu sorting at the same level until all abnormalities at the same level are eliminated.
[0177] After the correction strategy is executed, the corrected subsystem parameters (node attributes, permission configuration, hierarchical relationship) must be synchronously mapped to the menu structure of the target subsystem. Repeat the forward simulation debugging and reverse testing until the list of abnormal type nodes is empty and the menu structure of the target subsystem meets the reporting requirements.
[0178] This process generates standardized menu display text by filtering special characters, concatenates access paths and system domain names to generate accurate routing URLs, matches type identifiers and icon codes to ensure visual consistency, and converts permission operation codes into resource-level tags to achieve permission system compatibility. This multi-dimensional approach ensures the standardization and accuracy of menu elements. By registering resources to associate permission boundaries, binding functions and menu item IDs, and sorting by level and adjusted path length, the menu structure conforms to the hierarchical functional node forest relationship while reflecting business dependency priorities, ensuring clear menu hierarchy and orderly functional associations. Secondly, forward traversal detects issues such as missing function mappings and content errors, while reverse tracing verifies risks such as out-of-bounds permission inheritance and illegal roles. Bidirectional cross-location of abnormal nodes achieves comprehensive and precise anomaly coverage, avoiding oversights from single-dimensional detection. Correction strategies for different anomaly types, such as completing missing mappings, correcting permission operation codes, and optimizing stability, combined with quality assurance adjustment methods, ensure the targeted effectiveness of anomaly corrections. Simultaneously, by synchronously updating the menu structure and performing repeated checks, a closed-loop management system is formed, ensuring the menu continuously meets business requirements.
[0179] Example 2
[0180] Please see Figure 3 Another embodiment of the present invention provides: an automated menu structure generation system based on reporting task configuration, comprising: a parsing module, a topology module, a mapping module, a simulation module, and a feedback adjustment module;
[0181] The parsing module is used to respond to the menu creation requirements of the target subsystem. It performs directed hierarchical parsing from the root node of the target subsystem through an association parsing algorithm to obtain the hierarchical functional node tree, directed functional dependencies, and functional permission constraint space.
[0182] The topology module, based on the hierarchical functional node tree and directed functional dependencies, constructs a directed decision growth forest through the Kahn algorithm, decision tree, and growth rules. It maps the functional permission constraint space to the functional association strength and maps it to the connection relationship between the upper and lower levels and the functions at the same level in the directed decision growth forest. It controls the length of the corresponding connection relationship to obtain the directed decision growth forest.
[0183] The mapping module, based on directed decision-growing forest, performs function mapping and permission mapping through hierarchical association mapping combined with automatic generation algorithms to obtain the menu structure of the target subsystem.
[0184] The simulation module, based on the menu structure of the target subsystem, combines the target subsystem with simulation algorithms to perform simulation debugging of the integrity, configuration accuracy and stability of menu function mapping along the forward direction of the directed decision growth forest. At the same time, it performs permission constraint range and anti-tampering test on the upper and lower level functions and the same level functions along the reverse direction of the directed decision growth forest, and obtains a list of abnormal type nodes.
[0185] The feedback adjustment module is used to feed back the list of anomaly type nodes to the corresponding branch function decision nodes of the directed decision growth forest and combine them with the configured anomaly adjustment strategy library for real-time anomaly correction. At the same time, the corrected subsystem parameters are synchronously mapped to the menu structure of the target subsystem until the current corrected menu structure of the target subsystem meets the corresponding requirements of the reporting subsystem in real time.
[0186] Example 3
[0187] An electronic device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement an automated menu structure generation method based on reporting task configuration.
[0188] A computer-readable storage medium storing computer instructions that, when executed, provide a method for automatically generating a menu structure based on a reporting task configuration.
[0189] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments under the guidance of the present invention without departing from the spirit and scope of the claims. All of these variations are within the protection scope of the present invention.
Claims
1. A method for automatically generating menu structures based on reporting task configuration, characterized in that, include: In response to the menu creation requirements of the target subsystem, a directed hierarchical parsing algorithm is used to perform a hierarchical parsing from the root node of the target subsystem to obtain the hierarchical functional node tree, directed functional dependencies, and functional permission constraint space. Based on the hierarchical functional node tree and directed functional dependencies, a directed decision growth forest is constructed using the Kahn algorithm, decision tree, and growth rules. The functional permission constraint space is mapped to the functional association strength and mapped to the connection relationship between the upper and lower levels and the functions at the same level in the directed decision growth forest. The length of the corresponding connection relationship is controlled to obtain the directed decision growth forest. Based on directed decision-growing forest, the menu structure of the target subsystem is obtained by performing function mapping and permission mapping through hierarchical association mapping combined with automatic generation algorithm. The hierarchical association mapping includes function mapping and permission mapping; The construction process of the directed decision-making growth forest includes: generating a hierarchical functional node tree consisting of root nodes, branch nodes, and leaf nodes based on the global configuration file of the target subsystem; parsing the dependency setting fields and data flow attributes in the corresponding functional configurations of the target subsystem based on the hierarchical functional node tree, extracting the pre-dependencies between atomic sub-functions and the dependencies between functional categories to generate a dependency set, and obtaining a directed acyclic dependency graph by detecting and eliminating cyclic dependencies using the Tarjan algorithm; and using the hierarchical functional node tree combined with the directed acyclic dependency graph, constructing the length weight of the internal connection relationship of the hierarchical functional node tree based on the pre-dependencies as an adjustment coefficient for the access path length between different leaf nodes, and simultaneously constructing the adjustment coefficient for the access path between functional categories based on the dependencies between functional categories. A hierarchical functional node forest is constructed by combining graph neural networks and random forest algorithms. Branch node permission constraint sets and leaf node permission constraint sets are generated based on a global permission mask. A functional permission constraint space is constructed and mapped to the access paths corresponding to the hierarchical functional node forest as dependency constraint adjustment coefficients for access relationships and access path lengths, thus obtaining a hierarchical functional node forest with permission constraints. Based on the hierarchical functional node forest with permission constraints, simulation algorithms, CART decision trees, simulation debugging scenario spaces, and hierarchical functional node tree growth rules are combined for simulation debugging training. The trained CART decision tree model is configured to each branch node in the hierarchical functional node forest with permission constraints, resulting in a directed decision growth forest including branch functional decision nodes.
2. The automated menu structure generation method based on reporting task configuration as described in claim 1, characterized in that, The method further includes: Based on the menu structure of the target subsystem, the target subsystem uses simulation algorithms to simulate and debug the integrity, configuration accuracy, and stability of menu function mapping along the forward direction of the directed decision growth forest. At the same time, along the reverse direction of the directed decision growth forest, the scope of permission constraints and anti-tampering of the debugged upper and lower level functions and same level functions are tested to obtain a list of abnormal type nodes. The list of abnormal node types is fed back to the branch function decision node corresponding to the directed decision growth forest. Combined with the configured abnormal adjustment strategy library, real-time abnormal correction is performed. At the same time, the corrected subsystem parameters are synchronously mapped to the menu structure of the target subsystem until the menu structure of the current corrected target subsystem meets the corresponding requirements of the reporting subsystem in real time.
3. The automated menu structure generation method based on reporting task configuration as described in claim 2, characterized in that, The process of constructing the directed decision-making growth forest also includes: The subsystem configuration interface is called to obtain the global configuration file of the target subsystem. The root node metadata is extracted by the XML syntax parser, and the root node metadata is encapsulated into a root node data structure and stored in a tree database. The root node metadata includes a unique task ID of the subsystem, a creation timestamp, a global permission mask, and an enable status indicator. The global permission mask uses 32-bit binary encoding to represent system-level permission constraints. Based on the functional classification management field in the global configuration file of the target subsystem, starting from the root node, the functional classification hierarchy is traversed using a depth-first search algorithm to extract the ID, name, parent category ID, and sort number of each category function, and a branch node sequence is generated according to the hierarchical depth; the hierarchical depth is calculated by recursively tracing the different level atomic sub-functions in the branch node sequence through the parent category ID.
4. The automated menu structure generation method based on reporting task configuration as described in claim 3, characterized in that, The process of constructing the directed decision-making growth forest also includes: Simultaneously, the configuration list of the corresponding atomic sub-function under each branch node sequence is traversed, and the atomic sub-function ID, name, category function ID, type identifier, data source address and access path length are extracted. The category function ID is associated and matched with the branch node sequence, and the access path is used as the connection relationship to generate the leaf node tree corresponding to each branch node. The atomic sub-function is an indivisible function that can only realize a minimum business closed loop at most. Based on the branch node sequence and the leaf node tree corresponding to each branch node, starting from the root node, a hierarchical functional node tree is generated by combining the tree database in the order of root node, branch node, and leaf node hierarchy. Each node in the hierarchical functional node tree carries a hierarchy depth parameter.
5. The automated menu structure generation method based on reporting task configuration as described in claim 4, characterized in that, The process of constructing the directed decision-making growth forest also includes: Based on the hierarchical functional node tree, the dependency setting fields and data flow attributes in the corresponding functional configuration of the target subsystem are parsed, and the pre-dependencies between the corresponding atomic sub-functions of the same level and different levels of leaf nodes under the same branch node are extracted. At the same time, the dependency relationships between the functional categories of the corresponding atomic sub-functions of the same level and different levels of leaf nodes of different branch nodes are extracted, and a dependency relationship set including [dependency ID, dependency direction, dependent ID] is generated. Based on all dependency sets, using branch node IDs and corresponding leaf node IDs as nodes, the Tarjan algorithm is used to detect and eliminate cyclic dependencies, resulting in a directed acyclic dependency graph.
6. The automated menu structure generation method based on reporting task configuration as described in claim 5, characterized in that, The process of constructing the directed decision-making growth forest also includes: Based on a hierarchical functional node tree combined with a directed acyclic dependency graph, the length weight of the connection relationship within the hierarchical functional node tree is constructed using the preceding dependency relationship as an adjustment coefficient for the access path length between different leaf nodes within the hierarchical functional node tree. At the same time, the access path adjustment coefficient between functional categories is constructed using the dependency relationship between functional categories. A hierarchical functional node forest is constructed by combining graph neural network and random forest algorithm. Based on the global permission mask file in the hierarchical functional node tree, the visible role group attributes contained in the classification configuration of the branch node are parsed to generate a branch node permission constraint set with role ID and permission operation code as the dimensions. Simultaneously, based on the permission configuration files of the corresponding atomic sub-functional nodes of all leaf nodes under each branch node in the global permission mask file, the granular parameters of operation permissions are extracted, and combined with the permission constraint set of the branch node, the permission constraint set of the leaf node is generated through the permission inheritance algorithm.
7. The automated menu structure generation method based on reporting task configuration as described in claim 6, characterized in that, The process of constructing the directed decision-making growth forest also includes: Based on the permission constraint set of all nodes, construct a functional permission constraint space indexed by branch node ID or leaf node ID, which stores the permission boundaries and inheritance paths of the corresponding nodes. The functional permission constraint space is mapped to the access path corresponding to the hierarchical functional node forest, and used as the dependency constraint adjustment coefficient between access relationship and access path length to obtain a hierarchical functional node forest with permission constraints. Based on a hierarchical functional node forest with permission constraints, combined with simulation algorithms, CART decision trees, a preset simulation debugging scenario space, and hierarchical functional node tree growth rules, simulation debugging training is conducted to ensure functional integrity, configuration accuracy, stability, permission constraint scope, and tamper-proof performance. The trained CART decision tree model is then configured into each branch node of the hierarchical functional node forest with permission constraints, resulting in a directed decision growth forest that includes branch functional decision nodes. The simulated debugging scenario space includes a directed decision growth forest, a menu structure for the target subsystem, and debugging scenario requirements. The hierarchical functional node tree growth rule is constructed by combining the corresponding abnormal scenario and scenario parameters with the correction strategies extracted from the preset correction strategy library and the decision parameters generated by the CART decision tree model. It is used to adjust the nodes and dependencies in the hierarchical functional node forest under the corresponding abnormal scenario, and synchronously adjust the menu structure of the corresponding target subsystem according to the adjustment results. The menu structure of the target subsystem is then mapped to the subsystem configuration interface for cyclic simulation until the requirements of the target subsystem are met.
8. The automated menu structure generation method based on reporting task configuration as described in claim 7, characterized in that, The process of obtaining the dependency set includes: Analyze the set of dependencies in a directed acyclic dependency graph that includes [dependency ID, dependency direction, dependent ID], where the dependency ID and dependent ID each correspond to at least one branch node or leaf node ID; The number of times each branch node or leaf node is dependent on by the remaining nodes in the directed decision growth forest is counted as the in-degree value. An in-degree table is constructed with node ID as the key and in-degree value as the value, where the in-degree value of the root node is set to 0. Extract the root node from the node pool constructed by the directed decision-making growth forest, add the root node ID to the initialization queue, where the initialization queue is processed according to the first-in-first-out principle, the root node is the first node to be mounted, and its level is preset to level 0. Take the first node from the queue and mark it as the current node. Record the current node ID and the current level. At the same time, traverse all dependencies in the directed acyclic dependency graph with the current node as the dependent party and extract the dependent party ID, which is the child node ID of the current node. For each child node corresponding to a dependent ID, if it is a branch node, the level of the current branch node is set to the current node level + 1; if it is a leaf node, the level of the leaf node is set to the level of its parent branch node + 1. At the same time, the level information of the child node is temporarily stored in a temporary level table, wherein the parent branch node is determined by associating with the category function ID in the leaf node metadata.
9. An automated menu structure generation system based on task reporting configuration, used to implement the automated menu structure generation method based on task reporting configuration as described in any one of claims 1-8, characterized in that, Includes: parsing module, topology module, and mapping module; The parsing module is used to respond to the menu creation requirements of the target subsystem. It performs directed hierarchical parsing from the root node of the target subsystem through an association parsing algorithm to obtain the hierarchical functional node tree, directed functional dependencies, and functional permission constraint space. The topology module constructs a directed decision growth forest based on a hierarchical functional node tree and directed functional dependencies using the Kahn algorithm, decision tree, and growth rules. It maps the functional permission constraint space to the functional association strength and maps it to the connection relationships between the upper and lower levels and the functions at the same level in the directed decision growth forest. It controls the length of the corresponding connection relationships to obtain the directed decision growth forest. The mapping module, based on directed decision-growing forest, performs function mapping and permission mapping through hierarchical association mapping combined with an automatic generation algorithm to obtain the menu structure of the target subsystem.
10. The automated menu structure generation system based on reporting task configuration as described in claim 9, characterized in that, The system also includes a simulation module and a feedback adjustment module; The simulation module, based on the menu structure of the target subsystem and combined with the target subsystem, uses simulation algorithms to perform simulation debugging of the completeness, configuration accuracy, and stability of menu function mapping along the forward direction of the directed decision growth forest. At the same time, it performs permission constraint range and anti-tampering test on the upper and lower level functions and the same level functions along the reverse direction of the directed decision growth forest, and obtains a list of abnormal type nodes. The feedback adjustment module is used to feed back the list of abnormal type nodes to the branch function decision nodes corresponding to the directed decision growth forest, and combine them with the configured abnormal adjustment strategy library for real-time abnormal correction. At the same time, the corrected subsystem parameters are synchronously mapped to the menu structure of the target subsystem until the menu structure of the current corrected target subsystem meets the corresponding requirements of the reporting subsystem in real time.
Citation Information
Patent Citations
Menu generation method and device, server equipment and medium
CN115878860A
Front-end intelligent menu caching and dynamic authority control method and system
CN120075246A