A method for building a dynamic tree for troop management and unit use
Through the construction of a dynamic unit tree, the problem of low efficiency of traditional static unit trees in complex troop management is solved, the rapid search and management of camps is realized, the operation process is simplified, and management efficiency and cost-effectiveness are improved.
Patent Information
- Application Number
- CN202410239292.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-01
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2044-03-01
AI Technical Summary
The traditional static unit tree is inefficient when managing complex troop camps, the operation is complicated, and it is difficult to achieve quick query and statistics.
The dynamic unit tree construction method is used to organize unit data and camp area data, assign permissions, and determine the unit root node, thereby constructing a usage unit tree and a management unit tree. It combines the idea of unit aggregation to simplify the tree structure and realize rapid search and management of campsites.
It improves the efficiency of troop camp management, saves time and labor costs, simplifies query, editing and statistical analysis operations, and is suitable for other troop management businesses.
Smart Images

Figure CN117992638B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of system management, and in particular to a method for constructing a dynamic tree of troop management and usage units. Background Art
[0002] In order to manage the military camps and realize the functions of quick query and statistics, the military units are often used as the entrance. At present, the management is realized by static complete unit tree. However, the number of military units is large, the hierarchy is complex, and the current situation of military units using and managing camps is complicated. This traditional management method is inefficient and complicated to operate.
[0003] In order to improve the management efficiency of military camps, this paper proposes a construction method based on dynamic unit tree, combined with data authority management technology, with the goal of military camp use and management business, to display the minimum unit tree related to the user, and quickly realize the use and management business of military camps. The method focuses on the use and management business of military camps, constructs two unit trees: the use tree and the management tree, and combines the idea of unit aggregation to make the tree structure simpler. Summary of the invention
[0004] The purpose of the present invention is to provide a method for constructing a dynamic tree of troop management and unit use, which constructs a troop use unit tree and a management unit tree, which is the smallest unit tree related to the business. When using the barracks and managing the barracks-related businesses, the two trees can be used as entrances to quickly find all the barracks used and managed by the unit, and the units that do not use and manage the barracks can be cut off, which facilitates business operations such as query, editing and statistical analysis, saving a lot of time and labor costs for the troop barracks management. The relevant technical methods can also be applied to other troop management businesses.
[0005] To achieve the above object, the present invention provides a method for constructing a dynamic tree of troop management and use units, comprising the following steps:
[0006] S1. Organizational data includes: unit data organization and camp data organization;
[0007] S2. Allocation of unit authority includes: functional authority allocation and data authority allocation;
[0008] S3. Fill in the users who use the camp and the users who manage the camp;
[0009] S4. Determine the unit root node, traverse the units downward from the root node, and complete the construction of the dynamic unit tree.
[0010] Preferably, the unit data in step S1 includes the main fields of id, parentId, useCampId, isLeaf and sort;
[0011] Among them, id is the primary key id of the unit; parentId is the id of the parent unit of the unit; useCampId is the id of the camp used by the unit; isLeaf indicates whether the unit is a leaf unit; sort is the unit sort code;
[0012] The unit's camp area field useCampId can only be filled in leaf node units, and cannot be filled in non-leaf node units.
[0013] Preferably, the camp data in step S1 includes the id and manageUnitId main fields;
[0014] Among them, id is the primary key id of the camp; manageUnitId is the id of the management unit of the camp;
[0015] The business relationship between the unit and the camp is associated through useCampId and manageUnitId.
[0016] Preferably, in the functional authority allocation in step S2, it is divided into using the camp filling authority and managing the camp filling authority.
[0017] Preferably, the data authority in step S2 is unit data authority, and all users can query all camps through fuzzy search.
[0018] Preferably, the user who fills in the camp area in step S3 has the function of viewing the unit node and all sub-node unit data assigned to him;
[0019] Among them, users who fill in the use of camps can only fill in the use of camps for leaf units, that is, set the useCampId of the relevant unit to the id of the corresponding camp.
[0020] Preferably, the user who fills in the management camp in step S3 has the right to view the unit data of the unit node and all sub-nodes assigned to him;
[0021] Among them, users who fill in the management camp can fill in the management camp for the visible units, that is, set the manageUnitId of the relevant camp to the id of the corresponding unit.
[0022] Preferably, in the process of constructing the unit tree in step S4, if the camp field of the leaf unit is empty, it will not be added to the unit tree;
[0023] The use of camps by non-leaf units is calculated based on business rules;
[0024] The parent unit uses the camp in the same way as all child units use the camp, aggregating to the parent unit and clipping the children.
[0025] Preferably, during the construction of the management unit tree in step S4, units that have no management camps at the current level and their parent level are pruned.
[0026] Preferably, in the process of constructing a dynamic unit tree for using and managing camps, the query is performed from top to bottom according to data permissions, and the tree is recursively constructed from bottom to top according to aggregation and pruning rules.
[0027] Therefore, the present invention adopts the above-mentioned method of constructing a dynamic tree of troop management and unit use, and constructs a troop use unit tree and management unit tree, which is the smallest unit tree related to the business. When using the barracks and managing barracks-related businesses, the two trees can be used as entrances to quickly find all the barracks used and managed by the unit, and units that do not use and manage the barracks can be cut off, which facilitates business operations such as query, editing and statistical analysis, saving a lot of time and manpower costs for troop barracks management. The relevant technical methods can also be applied to other troop management businesses.
[0028] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 It is a data organization diagram of the method of building a dynamic tree of troop management and use units;
[0030] Figure 2 It is a cutout diagram of the unit without using the camp unit for the construction method of the dynamic tree of troop management and use of units;
[0031] Figure 3 It is a sample diagram of the camp calculation for the non-leaf nodes of the method of building a dynamic tree of troop management and use units;
[0032] Figure 4 It is a unit aggregation cutout diagram for troop management and the construction method of using unit dynamic trees;
[0033] Figure 5 It is a flowchart of the construction method of the unit management and use of the unit dynamic tree;
[0034] Figure 6 It is a management unit cutout diagram of the method of building a dynamic tree of troop management and use units;
[0035] Figure 7 It is a flowchart of the construction and management unit tree for the construction method of the unit dynamic tree for troop management and use. DETAILED DESCRIPTION
[0036] The technical solution of the present invention is further described below through the accompanying drawings and embodiments.
[0037] The present invention provides a method for constructing a dynamic tree of troop management and use units, comprising the following steps:
[0038] S1. Organizational data includes: unit data organization and camp data organization;
[0039] S2. Allocation of unit authority includes: functional authority allocation and data authority allocation;
[0040] S3. Fill in the users who use the camp and the users who manage the camp;
[0041] S4. Determine the unit root node, traverse the units downward from the root node, and complete the construction of the dynamic unit tree.
[0042] Example
[0043] S1. Data organization includes: unit data organization and camp data organization.
[0044] Unit data includes main fields such as id, parentId, useCampId, isLeaf, and sort; among them, id is the primary key id of the unit, parentId is the id of the parent unit of the unit, useCampId is the id of the camp used by the unit, isLeaf indicates whether the unit is a leaf unit, and sort is the unit sorting code.
[0045] The unit's camp area field useCampId can only be filled in leaf node units, and cannot be filled in non-leaf node units.
[0046] The camp data includes main fields such as id and manageUnitId; among them, id is the primary key id of the camp, and manageUnitId is the id of the management unit of the camp.
[0047] The business relationship between the unit and the camp is associated through useCampId and manageUnitId, such as Figure 1 shown.
[0048] S2. Allocation of unit authority includes: functional authority allocation and data authority allocation.
[0049] The system administrator assigns functional permissions to relevant users, which are mainly divided into two parts: one is the permission to use the camp filling, and the other is the permission to manage the camp filling.
[0050] The system administrator assigns data permissions to relevant users, mainly unit data permissions. All users can query all camps through fuzzy search.
[0051] S3. Fill in the users who use the camp and the users who manage the camp.
[0052] Users who fill in the use camp can view the unit data of the unit node assigned to them and all its child nodes, and can only fill in the use camp for leaf units, that is, set the useCampId of the relevant unit to the id of the corresponding camp.
[0053] Users who fill in the management camp can view the unit data of the unit node assigned to them and all its child nodes, and can fill in the management camp for the visible units, that is, set the manageUnitId of the relevant camp to the id of the corresponding unit.
[0054] S4. Determine the unit root node, traverse the units downward from the root node, and complete the construction of the dynamic unit tree.
[0055] After the user has filled in the camp use and camp management data, the dynamically constructed unit tree is displayed on the camp use and camp management business related business page. According to the unit data assigned to the user, the root node of the unit tree that the user can see is determined.
[0056] Among them, the process of using the unit tree construction is as follows:
[0057] 1. Traverse the units downward from the root node of the tree;
[0058] 2. If the Use Camp field of a leaf unit is empty, it will not be added to the Use Unit Tree, e.g. Figure 2 As shown;
[0059] 3. The use camp of non-leaf units is obtained by calculation. That is, the direct child units are sorted according to the sort field, and the use camp of the direct child unit with the first order is taken as the use camp of the unit. If the use camp of the direct child unit with the first order is empty, the use camp of the non-leaf unit is empty. Figure 3 As shown;
[0060] 4. If the direct child units under the same level parent unit have the same usage area, only the parent unit will be retained in the tree, such as Figure 4 As shown;
[0061] 5. According to the above rules, a unit tree is dynamically constructed layer by layer recursively. The process is as follows: Figure 5 shown.
[0062] The construction process of the management unit tree is as follows:
[0063] Traverse the units from the root node of the tree downwards, and only keep the units with management camps and all their parent units, such as Figure 6 As shown. There are units that manage camps, that is, units whose manageUnitId field in the camp data table is the same as that of the unit, plus all of its parent units, and a management unit tree is constructed layer by layer, as shown in Figure 7shown.
[0064] In summary, in the process of building a dynamic unit tree for using and managing camps, the tree is queried from top to bottom according to data permissions, and recursively constructed from bottom to top according to aggregation and pruning rules.
[0065] Therefore, the present invention adopts the above-mentioned method of constructing a dynamic tree of troop management and unit use, and constructs a troop use unit tree and management unit tree, which is the smallest unit tree related to the business. When using the barracks and managing barracks-related businesses, the two trees can be used as entrances to quickly find all the barracks used and managed by the unit, and units that do not use and manage the barracks can be cut off, which facilitates business operations such as query, editing and statistical analysis, saving a lot of time and manpower costs for troop barracks management. The relevant technical methods can also be applied to other troop management businesses.
[0066] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that they can still modify or replace the technical solution of the present invention with equivalents, and these modifications or equivalent replacements cannot cause the modified technical solution to deviate from the spirit and scope of the technical solution of the present invention.
Claims
1. Troop management and the construction method of the unit dynamic tree, It is characterized in that The following steps are involved: S1. Organizational data includes: unit data organization and camp data organization; Unit data includes id, parentId, useCampId, isLeaf and sort. Among them, id is the primary key id of the unit; parentId is the id of the parent unit of the unit; useCampId is the id of the camp used by the unit; isLeaf indicates whether the unit is a leaf unit; sort is the unit sort code; the unit camp use field useCampId can only be filled in leaf node units, not non-leaf node units; Camp data includes the main fields of id and manageUnitId. Among them, id is the primary key id of the camp; manageUnitId is the id of the management unit of the camp; the business relationship between the unit and the camp is associated through useCampId and manageUnitId. S2. Allocation of unit authority includes: functional authority allocation and data authority allocation; Functional authority allocation is divided into using camp filling authority and managing camp filling authority; Data permissions are unit data permissions. All users can query all camps through fuzzy search. S3. Fill in the users who use the camp and the users who manage the camp; Users who fill in the use camp area have the function of viewing the unit node and all child node unit data assigned to them; among them, users who fill in the use camp area can only fill in the use camp area for leaf units, that is, set the useCampId of the relevant unit to the id of the corresponding camp area; The user who fills in the management area has the function of viewing the unit data of the unit node and all subnodes assigned to it; among them, the user who fills in the management area can fill in the management area for the visible unit, that is, set the manageUnitId of the relevant area to the id of the corresponding unit; S4, determine the unit root node, traverse the units from the root node downwards, and complete the construction of the dynamic unit tree; During the construction of the unit tree, if the camp field of a leaf unit is empty, it will not be added to the unit tree. The use camp of a non-leaf unit is obtained by calculation. The direct child units are sorted by the sort field, and the use camp of the first direct child unit is taken as the use camp of the unit. If the use camp of the first direct child unit is empty, the use camp of the non-leaf unit is empty. When the camp used by the parent unit is the same as that used by all child units, it is aggregated to the parent unit and the child units are trimmed; In the process of building the management unit tree, the units that have no management camps at this level and its parent level are pruned; in the process of building the dynamic unit tree that uses camps and manages camps, the query is made from top to bottom according to the data permissions, and the tree is recursively built from bottom to top according to the aggregation and pruning rules.
Citation Information
Patent Citations
Resource access control method
CN103701801A
Organizational structure generator and organizational structure generation method based on blockchain technology
CN108830560A
System and method for securely supporting customer security policies in third party as service solution
CN116194917A
Distributed self-directed lock-free RDMA-based b-tree key-value manager
US20170103039A1
