A method and system for constructing a virtual tissue tree based on a standard tissue tree

CN117725067BActive Publication Date: 2026-09-01CHINA ELECTRONICS CLOUD DIGITAL INTELLIGENCE TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410024050.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-05
Publication Date
2026-09-01
Estimated Expiration
2044-01-05

AI Technical Summary

Technical Problem

在众多的业务场景中,不同业务常常需要使用不同的组织机构,不同业务的组织层级也不一样,这使得用户中心使用同一套标准组织树往往无法同时满足不同业务的组织机构要求

Benefits of technology

[0039] This invention relates to a method and system for constructing a virtual organization tree based on a standard organization tree. By creating a virtual organization tree with basic attributes consistent with the standard organization tree, child nodes are added to the created virtual organization tree in the form of complete subtrees or discrete nodes. Through the creation and binding of tags, the binding relationship between users and the virtual organization tree is realized, avoiding the work of repeatedly building the organization tree in the user center. It can meet the needs of different businesses for building organizations, save construction costs, and is easy to maintain and manage. It is suitable for application scenarios where multiple applications access the user center.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117725067B_ABST
    Figure CN117725067B_ABST
Patent Text Reader

Abstract

This invention relates to the field of organizational tree construction and management technology, and provides a method and system for constructing a virtual organizational tree based on a standard organizational tree. The method includes: creating the root node and all levels of child nodes of the standard organizational tree by setting fields in a standard organizational tree table; creating tags and constructing a tag association table by binding the created tags to users; and setting fields in a virtual organizational tree table based on the root node, all levels of child nodes of the standard organizational tree, and the tag association table to create the root node and all levels of child nodes of the virtual organizational tree. This invention's method and system for constructing a virtual organizational tree based on a standard organizational tree avoids the repetitive work of constructing the organizational tree in the user center, meets the organizational construction needs of different businesses, saves organizational construction costs, and makes the created organization easy to maintain and manage. It is suitable for application scenarios where multiple applications access the user center.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of tissue tree construction and management technology, and in particular to a method and system for constructing a virtual tissue tree based on a standard tissue tree. Background Technology

[0002] During the digital transformation process of various application units, users under the unit need to be managed in a unified user center management software. Since users belong to a certain organization, before creating a user, it is necessary to first create the organization to which the user belongs, and then add the user to the created organization.

[0003] In practical applications, organizations typically have multiple hierarchical relationships. Therefore, it's necessary to create multiple departments with hierarchical relationships belonging to the organization for each user. For example, to create user Zhang San in department 5, the full path of department 5 is: department 1 / department 3 / department 5. This requires first creating departments 1, 3, and 5, then setting Zhang San's department to department 5, and simultaneously setting Zhang San's other attributes. In numerous business scenarios, different businesses often require different organizational structures, and the organizational levels vary. This makes it difficult for the user center to simultaneously meet the organizational requirements of different businesses using a single standard organizational tree. If the user center establishes one organizational tree, and different businesses have different organizational levels, a new organizational tree must be created. This new tree may contain duplicate departments, differing only in department level. In other words, when applications accessing the user center have different organizational level requirements, a new organizational tree suitable for their specific business must be repeatedly created based on the existing standard tree. This wastes manpower and time, and the repetitive appearance of organizations can lead to confusion and make maintenance difficult.

[0004] Therefore, how to provide a more efficient, widely applicable, and resource-saving method for constructing and managing organizational trees has become an urgent technical problem to be solved. Summary of the Invention

[0005] In view of this, in order to overcome the shortcomings of the prior art, the present invention aims to provide a method and system for constructing a virtual tissue tree based on a standard tissue tree.

[0006] According to a first aspect of the present invention, a method for constructing a virtual tissue tree based on a standard tissue tree is provided, comprising:

[0007] By setting fields in the standard organization tree table, the root node and child nodes at each level of the standard organization tree are created;

[0008] Create tags and build a tag association table by binding the created tags to users;

[0009] Based on the root node and child nodes at all levels of the standard organization tree, as well as the label association table, set the fields of the virtual organization tree table, and create the root node and child nodes at all levels of the virtual organization tree.

[0010] Preferably, in the method for constructing a virtual organization tree based on a standard organization tree of the present invention, the root node and child nodes at each level of the standard organization tree are created by setting fields in the standard organization tree table, including:

[0011] By setting standard organization tree table fields for the root node, the data of the standard organization tree table fields of the root node is written into the standard organization tree table in the database, thus creating the root node of the standard organization tree;

[0012] Set standard organization tree table fields for each child node under the root node, write the standard organization tree table data of each child node into the standard organization tree table in the database, and create child nodes at each level of the standard organization tree.

[0013] Preferably, in the method for constructing a virtual organization tree based on a standard organization tree of the present invention, the root node of the standard organization tree is created by setting a standard organization tree table field for the root node and writing the standard organization tree table field data of the root node into the standard organization tree table in the database, including:

[0014] Set the orgID, shortName, orgName, parentID, and orgLevel fields for the root node;

[0015] Set a corresponding random string for the root node, use the random string as the value of the orgID field of the root node, use the organization abbreviation of the root node as the value of the shortName field, use the organization full name of the root node as the value of the orgName field, set the value of the parentID field of the root node to null, and set the value of the orgLevel field of the root node to 1.

[0016] Preferably, in the method for constructing a virtual organization tree based on a standard organization tree of the present invention, standard organization tree table fields are set for the child nodes under the root node level by level, and the standard organization tree table field data of each child node is written into the standard organization tree table in the database to create the child nodes at each level of the standard organization tree, including:

[0017] Set the orgID, shortName, orgName, parentID, and orgLevel fields for each child node under the root node;

[0018] Set a corresponding random string for each child node, and use the random string as the value of the orgID field of the corresponding child node, the organization abbreviation of the child node as the value of the shortName field, the organization full name of the child node as the value of the orgName field, the organization ID of the parent node of the child node as the value of the parentID field of the child node, and the level of the child node as the value of the orgLevel field of the child node.

[0019] Preferably, in the method for constructing a virtual organizational tree based on a standard organizational tree of the present invention, tags are created, and a tag association table is constructed by binding the created tags with users, including:

[0020] Tags are created by defining key-value pairs, where the key of the tag is the user and the value is the organization abbreviation of the node. The created tags are then written into the tag table.

[0021] Select a user, choose the corresponding tag for the selected user from the tag table, associate the ID of the selected user with the ID of the selected tag, and write the association relationship between the selected user and the selected tag into the tag association table. The association relationship includes the ID of the selected tag, the ID of the selected user, and the tag type.

[0022] Preferably, in the method for constructing a virtual organization tree based on a standard organization tree of the present invention, the virtual organization tree table fields are set according to the root node and child nodes at all levels of the standard organization tree and the label association table, and the root node and child nodes at all levels of the virtual organization tree are created, including:

[0023] Based on the root node and child nodes of the standard organization tree, as well as the label association table, set the virtual organization tree table fields, write the virtual organization tree table field data of the root node into the virtual organization tree table in the database, and create the root node of the virtual organization tree.

[0024] The child nodes of the virtual organization tree are constructed by adding the child nodes of the standard organization tree to the root node of the virtual organization tree.

[0025] Preferably, in the method for constructing a virtual organization tree based on a standard organization tree of the present invention, the virtual organization tree table fields are set according to the root node and child nodes at all levels of the standard organization tree and the label association table, and the virtual organization tree table field data of the root node is written into the virtual organization tree table in the database to create the root node of the virtual organization tree, including:

[0026] Set the name of the virtual organization tree, select the corresponding tag ID from the tag association table for the virtual organization tree, and select a node from the standard organization tree as the root node of the virtual organization tree;

[0027] Set the vTreeID, vTreeName, bindLabelID, and rootOrgID fields for the root node;

[0028] Set a corresponding random string for the root node, use the random string as the value of the vTreeID field of the root node, use the virtual organization tree name as the value of the vTreeName field, set the selected label ID as the value of the bindLabelID field, and use the organization ID of the node selected from the standard organization tree as the value of the rootOrgID field.

[0029] Write the virtual organization tree table field data of the root node into the virtual organization tree table in the database to create the root node of the virtual organization tree.

[0030] Preferably, in the method for constructing a virtual organization tree based on a standard organization tree of the present invention, the construction of the virtual organization tree's child nodes involves adding the child nodes of the standard organization tree to the root node of the virtual organization tree, including:

[0031] When adding a complete subtree from the standard organization tree to the root node of the virtual organization tree, a subtree is selected from the standard organization tree. The root node of the subtree is different from the root node selected by the virtual organization tree from the standard organization tree, and does not include the root node selected by the virtual organization tree from the standard organization tree. The nodes in the subtree are sorted in ascending order according to the orgLevel field. The sorted nodes are added to the root node of the virtual organization tree in order. The vTreeID, orgID, parentOrgID, ID, and orgLevel fields are set for the nodes. The virtual organization tree ID is used as the value of the vTreeID field, the standard organization ID added to the virtual organization tree is used as the value of the orgID field, the current new parent ID in the virtual organization tree is used as the value of the parentOrgID field, the virtual organization tree primary key is used as the value of the ID field, and the level of the virtual organization tree node is used as the value of the orgLevel field.

[0032] When adding a discrete node from the standard organization tree to the root node of the virtual organization tree, a node is selected from the standard organization tree, which is different from the root node selected from the standard organization tree for the virtual organization tree. The selected node is added to the root node of the virtual organization tree. The node is then assigned the vTreeID, orgID, parentOrgID, ID, and orgLevel fields. The virtual organization tree ID is used as the value of the vTreeID field, the standard organization ID added to the virtual organization tree is used as the value of the orgID field, the current new parent ID in the virtual organization tree is used as the value of the parentOrgID field, the virtual organization tree primary key is used as the value of the ID field, and the virtual organization tree node level is used as the value of the orgLevel field.

[0033] Preferably, the method for constructing a virtual tissue tree based on a standard tissue tree according to the present invention further includes:

[0034] Add complete subtrees from the standard organization tree to any child node of the virtual organization tree, or add discrete nodes from the standard organization tree to any child node of the virtual organization tree. Set the vTreeID, orgID, parentOrgID, ID, and orgLevel fields for the added nodes. Use the virtual organization tree ID as the value of the vTreeID field, the standard organization ID added to the virtual organization tree as the value of the orgID field, the current new parent ID in the virtual organization tree as the value of the parentOrgID field, the virtual organization tree primary key as the value of the ID field, and the level of the virtual organization tree node as the value of the orgLevel field.

[0035] When adding a complete subtree from the standard organization tree to any child node of the virtual organization tree hierarchically, a subtree is selected from the standard organization tree. The root node of the subtree is different from the child node of the selected subtree in the virtual organization tree, and does not include the child node of the selected subtree in the virtual organization tree. The organization ID of any node in the subtree is different from the organization ID of any existing node in the current virtual organization tree. The nodes in the subtree are sorted in ascending order according to the organization level field, and the sorted nodes are added hierarchically to the child node of the selected subtree in the virtual organization tree.

[0036] When adding a discrete node from the standard organization tree to any child node of the virtual organization tree, a node is selected from the standard organization tree. This node is different from the child node of the selected mounted child node in the virtual organization tree and has a different organization ID than any existing node in the current virtual organization tree. The selected node is then added to the child node of the selected mounted child node in the virtual organization tree.

[0037] According to a second aspect of the present invention, a system for constructing a virtual organizational tree based on a standard organizational tree is provided. The system includes a virtual organizational tree construction server, which is used to create the root node and child nodes of the standard organizational tree by setting fields in the standard organizational tree table; create tags and construct a tag association table by binding the created tags to users; and set fields in the virtual organizational tree table according to the root node and child nodes of the standard organizational tree and the tag association table to create the root node and child nodes of the virtual organizational tree.

[0038] According to a third aspect of the present invention, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method described in the first aspect of the present invention.

[0039] This invention relates to a method and system for constructing a virtual organization tree based on a standard organization tree. By creating a virtual organization tree with basic attributes consistent with the standard organization tree, child nodes are added to the created virtual organization tree in the form of complete subtrees or discrete nodes. Through the creation and binding of tags, the binding relationship between users and the virtual organization tree is realized, avoiding the work of repeatedly building the organization tree in the user center. It can meet the needs of different businesses for building organizations, save construction costs, and is easy to maintain and manage. It is suitable for application scenarios where multiple applications access the user center. Attached Figure Description

[0040] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0041] Figure 1 This is a schematic diagram of a system for constructing a virtual tissue tree based on a standard tissue tree, applicable to embodiments of the present invention;

[0042] Figure 2 This is a flowchart illustrating the steps of a method for constructing a virtual tissue tree based on a standard tissue tree according to an embodiment of the present invention.

[0043] Figure 3 A structural example diagram of a standard tissue tree created by the method according to an embodiment of the present invention;

[0044] Figure 4 An example diagram of a virtual organization tree created by the method according to an embodiment of the present invention;

[0045] Figure 5This is an example diagram illustrating how discrete nodes in a standard tissue tree are added to the root node of a virtual tissue tree according to the method of an embodiment of the present invention.

[0046] Figure 6 This is an example diagram illustrating how a complete subtree in a standard tissue tree is added hierarchically to any child node of a virtual tissue tree according to the method of an embodiment of the present invention;

[0047] Figure 7 This is a schematic diagram of the structure of the device provided by the present invention. Detailed Implementation

[0048] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0049] It should be noted that, in the absence of conflict, the following embodiments and features can be combined with each other; and, based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.

[0050] It should be noted that various aspects of the embodiments described below are within the scope of the appended claims. It will be apparent that the aspects described herein can be embodied in a wide variety of forms, and any particular structure and / or function described herein is merely illustrative. Based on this disclosure, those skilled in the art will understand that one aspect described herein can be implemented independently of any other aspect, and two or more of these aspects can be combined in various ways. For example, any number of aspects set forth herein can be used to implement the device and / or practice the method. Additionally, this device and / or method can be implemented using other structures and / or functionalities besides one or more of the aspects set forth herein.

[0051] Figure 1 An exemplary system is shown that illustrates a method for constructing a virtual tissue tree based on a standard tissue tree, applicable to embodiments of the present invention. For example... Figure 1 As shown, the system may include a virtual organization tree construction server 101, a communication network 102, and / or one or more virtual organization tree construction clients 103. Figure 1 The example in the text is client 103, which is built for multiple virtual organization trees.

[0052] The virtual organization tree construction server 101 can be any suitable server used to store information, data, programs, and / or any other suitable type of content. In some embodiments, the virtual organization tree construction server 101 can perform appropriate functions. For example, in some embodiments, the virtual organization tree construction server 101 can be used to construct a virtual organization tree based on a standard organization tree. As an optional example, in some embodiments, the virtual organization tree construction server 101 can be used to create the root node and child nodes of a standard organization tree by setting standard organization tree table fields; create tags and construct a tag association table by binding the created tags to users; and create the root node and child nodes of a virtual organization tree by setting virtual organization tree table fields according to the root node and child nodes of the standard organization tree and the tag association table.

[0053] As another example, in some embodiments, the virtual organization tree building server 101 may send a method for building a virtual organization tree based on a standard organization tree to the virtual organization tree building client 103 for user use, according to a request from the virtual organization tree building client 103.

[0054] As an optional example, in some embodiments, the virtual organization tree building client 103 is used to provide a visual building interface, which is used to receive a user's selection input operation to build a virtual organization tree based on a standard organization tree, and to obtain and display the building interface corresponding to the option selected by the selection input operation from the virtual organization tree building server 101 in response to the selection input operation. The building interface displays at least information about building a virtual organization tree based on a standard organization tree and operation options for the information about building a virtual organization tree based on a standard organization tree.

[0055] In some embodiments, communication network 102 can be any suitable combination of one or more wired and / or wireless networks. For example, communication network 102 can include any one or more of the following: the Internet, intranet, wide area network (WAN), local area network (LAN), wireless network, digital subscriber line (DSL) network, frame relay network, asynchronous transfer mode (ATM) network, virtual private network (VPN), and / or any other suitable communication network. Virtual organization tree building client 103 can connect to communication network 102 via one or more communication links (e.g., communication link 104), which can be linked to virtual organization tree building server 101 via one or more communication links (e.g., communication link 105). Communication links can be any communication link suitable for transmitting data between virtual organization tree building client 103 and virtual organization tree building server 101, such as network links, dial-up links, wireless links, hardwired links, any other suitable communication links, or any suitable combination of such links.

[0056] The virtual organization tree building client 103 may include any one or more clients that present an interface related to building a virtual organization tree based on a standard organization tree in a suitable form for user use and operation. In some embodiments, the virtual organization tree building client 103 may include any suitable type of device. For example, in some embodiments, the virtual organization tree building client 103 may include a mobile device, tablet computer, laptop computer, desktop computer, and / or any other suitable type of client device.

[0057] Although the Virtual Organization Tree Building Server 101 is illustrated as a single device, in some embodiments, any suitable number of devices may be used to perform the functions performed by the Virtual Organization Tree Building Server 101. For example, in some embodiments, multiple devices may be used to implement the functions performed by the Virtual Organization Tree Building Server 101. Alternatively, cloud services may be used to implement the functions of the Virtual Organization Tree Building Server 101.

[0058] Based on the above system, embodiments of the present invention provide a method for constructing a virtual tissue tree based on a standard tissue tree, which will be described below through the following embodiments.

[0059] Figure 2 This is a flowchart illustrating the steps of a method for constructing a virtual tissue tree based on a standard tissue tree according to an embodiment of the present invention; the method for constructing a virtual tissue tree based on a standard tissue tree in this embodiment can be executed on a virtual tissue tree construction server, such as... Figure 2 As shown, the method for constructing a virtual tissue tree based on a standard tissue tree includes the following steps:

[0060] Step S201: Create the root node and child nodes at each level of the standard organization tree by setting the standard organization tree table fields.

[0061] As an optional example, this embodiment of the invention creates the root node of a standard organization tree by setting standard organization tree table fields for the root node and writing the data of these fields into the standard organization tree table in the database. Specifically, this embodiment sets the orgID, shortName, orgName, parentID, and orgLevel fields for the root node; sets a corresponding random string for the root node, uses the random string as the value of the orgID field, uses the organization abbreviation of the root node as the value of the shortName field, uses the organization full name of the root node as the value of the orgName field, sets the parentID field to null, and sets the orgLevel field to 1.

[0062] After creating the root node of the standard organization tree, the method of this embodiment of the invention needs to set standard organization tree table fields for each child node under the root node, and write the standard organization tree table field data of each child node into the standard organization tree table in the database to create child nodes at each level of the standard organization tree. Specifically, the method of this embodiment of the invention sets the orgID field, shortName field, orgName field, parentID field, and orgLevel field for each child node under the root node; sets a corresponding random string for each child node, uses the random string as the value of the orgID field of the corresponding child node, uses the organization abbreviation of the child node as the value of the shortName field, uses the full organization name of the child node as the value of the orgName field, uses the organization ID of the parent node of the child node as the value of the parentID field of the child node, and uses the level of the child node as the value of the orgLevel field of the child node.

[0063] The following describes in a specific scenario how the method of this embodiment of the invention creates the root node and child nodes of a standard organization tree by setting fields in a standard organization tree table.

[0064] To create the root node "Organization 1" of the standard organization tree of the method of this embodiment, the fields defined in Table 1 are first set as follows: the value of the orgID field is the primary key, which is unique in the entire standard organization tree and is created by randomly generating a string; the value of the shortName field is "Organization 1"; the value of the orgName field is "Organization 1" by default; the parentID is empty; the value of the orgLevel field is 1; and the value of the orgCode field is optional according to the business scenario.

[0065] Table 1

[0066] orgID String Organization ID shortName String Organization Abbreviation orgName String Full name of the organization parentId String Parent organization ID orgLevel Integer Organizational level orgCode String Organizational coding

[0067] After setting the multiple columns of fields in Table 1, the fields of the root node "Organization 1" of the standard organization tree are written into the standard organization table in the database, thus completing the creation of the root node "Organization 1".

[0068] Then, create a child node "Organization 2" under the root node "Organization 1". Set the fields listed in Table 1 for the child node "Organization 2". The orgID field is the primary key, unique throughout the standard organization tree, and is created by randomly generating a string. The shortName field is "Organization 2", and the orgName field defaults to "Organization 2". parentID is the ID of the root node "Organization 1". The orgLevel field is 2. The orgCode field is optional depending on the business scenario. Write the fields of the root node "Organization 2" of the standard organization tree into the standard organization table in the database.

[0069] 1. Create other node organizations under the root node in the manner described above. The value of the parentID field of the created node is the ID of the current parent organization, and the value of the orgLevel field is the current organization level (the root organization level is 1, and it increases level by level). Write the new node organization data into the standard organization table.

[0070] Figure 3 A structural example diagram of a standard tissue tree created according to the method of an embodiment of the present invention, such as... Figure 3 As shown, the standard organization tree created by the method of this embodiment is a collection of multiple hierarchical organization nodes. Each organization node has a finite number of child nodes or no child node organization. In the standard organization tree created by the method of this embodiment, the node organization without a parent node organization is taken as the root node, and each non-root node has one and only one parent node organization. Except for the root node, each child node organization can be divided into multiple non-overlapping subtrees. In the standard organization tree created by the method of this embodiment, no nodes form a loop.

[0071] Step S202: Create tags and build a tag association table by binding the created tags to users.

[0072] As an optional example, the method of this embodiment of the invention creates tags by defining key-value pairs, where the key of the tag is a user and the value of the tag is the organization abbreviation of the node, and writes the created tags into a tag table; after writing the created tags into the tag table, the method of this embodiment of the invention needs to select a user, select the corresponding tag for the selected user from the tag table, associate the ID of the selected user with the ID of the selected tag, and write the association relationship between the selected user and the selected tag into a tag association table, wherein the association relationship includes the ID of the selected tag, the ID of the selected user, and the tag type.

[0073] It should be noted that the tags created by the method in this embodiment of the invention are markers used to identify node organizations and users with the same attributes. For example, the tags are in key-value pair form. After creating tags, corresponding tags can be bound to users or node organizations. For instance, the tag for Xiao Wang and Xiao Ming is "User Type = Ordinary User", and the tag for user Xiao Zhang is "User Type = Advanced User". By querying the tag interface for users bound with the tag "User Type = Ordinary User", the two users Xiao Wang and Xiao Ming can be found.

[0074] Step S203: Based on the root node and child nodes at all levels of the standard organization tree and the label association table, set the fields of the virtual organization tree table and create the root node and child nodes at all levels of the virtual organization tree.

[0075] As an optional example, the method of this embodiment of the invention sets virtual organization tree table fields based on the root node and child nodes at all levels of the standard organization tree and the label association table, writes the virtual organization tree table field data of the root node into the virtual organization tree table in the database, and creates the root node of the virtual organization tree. Figure 4 An example diagram of a virtual organization tree created by a method according to an embodiment of the present invention.

[0076] Specifically, the method of this embodiment sets the virtual organization tree name, selects the corresponding tag ID from the tag association table for the virtual organization tree, and selects a node from the standard organization tree as the root node of the virtual organization tree. As shown in Table 2, the method of this embodiment sets the vTreeID field, vTreeName field, bindLabelID field, and rootOrgID field for the root node; sets a corresponding random string for the root node, uses the random string as the value of the vTreeID field of the root node, uses the virtual organization tree name as the value of the vTreeName field, sets the selected tag ID as the value of the bindLabelID field, and uses the organization ID of the node selected from the standard organization tree as the value of the rootOrgID field; writes the virtual organization tree table field data of the root node into the virtual organization tree table in the database, and creates the root node of the virtual organization tree.

[0077] Table 2

[0078]

[0079]

[0080] After creating the root node of the virtual organization tree, the method of this embodiment of the invention constructs the child nodes of the virtual organization tree by adding the child nodes of the standard organization tree to the root node of the virtual organization tree.

[0081] In the method of this invention embodiment, there are two ways to establish the child nodes of the virtual organization tree: one is to add the complete subtrees in the standard organization tree to the root node of the virtual organization tree according to the hierarchy, and the other is to add the discrete nodes in the standard organization tree to the root node of the virtual organization tree.

[0082] When adding a complete subtree from the standard organization tree to the root node of the virtual organization tree, a subtree is selected from the standard organization tree. The root node of this subtree is different from the root node selected by the virtual organization tree from the standard organization tree, and does not include the root node selected by the virtual organization tree from the standard organization tree. The nodes in the subtree are sorted in ascending order according to the orgLevel field. The sorted nodes are then added to the root node of the virtual organization tree according to the level, as shown in Table 3. The vTreeID, orgID, parentOrgID, ID, and orgLevel fields are set for the nodes. The virtual organization tree ID is used as the value of the vTreeID field, the standard organization ID added to the virtual organization tree is used as the value of the orgID field, the current new parent ID in the virtual organization tree is used as the value of the parentOrgID field, the virtual organization tree primary key is used as the value of the ID field, and the level of the virtual organization tree node is used as the value of the orgLevel field.

[0083] Table 3

[0084] vTreeID String Virtual Organization Tree ID orgID String Standard organization ID added to the virtual organization tree parentOrgID String The current new parent ID in the virtual organization tree ID String Virtual organization tree primary key orgLevel Integer Hierarchy of virtual organization tree nodes

[0085] Figure 5 This is an example diagram illustrating how discrete nodes in a standard tissue tree are added to the root node of a virtual tissue tree according to the method of an embodiment of the present invention. Figure 5 As shown in Table 3, when adding discrete nodes from the standard organization tree to the root node of the virtual organization tree, nodes are selected from the standard organization tree. These nodes are different from the root node selected from the standard organization tree for the virtual organization tree. The selected nodes are added to the root node of the virtual organization tree. Similarly, as shown in Table 3, vTreeID, orgID, parentOrgID, ID, and orgLevel fields are set for the nodes. The virtual organization tree ID is used as the value of the vTreeID field, the standard organization ID added to the virtual organization tree is used as the value of the orgID field, the current new parent ID in the virtual organization tree is used as the value of the parentOrgID field, the virtual organization tree primary key is used as the value of the ID field, and the level of the virtual organization tree node is used as the value of the orgLevel field.

[0086] It should be noted that, in addition to adding nodes from the standard organization tree to the root node of the virtual organization tree, the method of this embodiment also involves adding complete subtrees from the standard organization tree to any child node of the virtual organization tree hierarchically, or adding discrete nodes from the standard organization tree to any child node of the virtual organization tree.

[0087] Figure 6 This is an example diagram illustrating how a complete subtree from a standard tissue tree is added hierarchically to any child node of a virtual tissue tree according to the method of an embodiment of the present invention, such as... Figure 6As shown, when a complete subtree in the standard organization tree is added hierarchically to any child node of the virtual organization tree, a subtree is selected from the standard organization tree. The root node of this subtree is different from the child node of the selected subtree in the virtual organization tree, and does not include the child node of the selected subtree in the virtual organization tree. The organization ID of any node in this subtree is different from the organization ID of any existing node in the current virtual organization tree. The nodes in the subtree are sorted in ascending order according to the organization level field, and the sorted nodes are added hierarchically to the child node of the selected subtree in the virtual organization tree.

[0088] When adding a discrete node from the standard organization tree to any child node of the virtual organization tree, a node is selected from the standard organization tree. This node is different from the child node of the selected mounted child node in the virtual organization tree and has a different organization ID than any existing node in the current virtual organization tree. The selected node is then added to the child node of the selected mounted child node in the virtual organization tree.

[0089] After adding complete subtrees from the standard organization tree to any child node of the virtual organization tree hierarchically, or adding discrete nodes from the standard organization tree to any child node of the virtual organization tree, the method of this embodiment is shown in Table 3. The added node is configured with the following fields: vTreeID, orgID, parentOrgID, ID, and orgLevel. The virtual organization tree ID is used as the value of the vTreeID field, the standard organization ID added to the virtual organization tree is used as the value of the orgID field, the current new parent ID in the virtual organization tree is used as the value of the parentOrgID field, the virtual organization tree primary key is used as the value of the ID field, and the level of the virtual organization tree node is used as the value of the orgLevel field.

[0090] This invention relates to a method and system for constructing a virtual organization tree based on a standard organization tree. By creating a virtual organization tree with basic attributes consistent with the standard organization tree, child nodes are added to the created virtual organization tree in the form of complete subtrees or discrete nodes. Through the creation and binding of tags, the binding relationship between users and the virtual organization tree is realized, avoiding the work of repeatedly building the organization tree in the user center. It can meet the needs of different businesses for building organizations, save construction costs, and is easy to maintain and manage. It is suitable for application scenarios where multiple applications access the user center.

[0091] like Figure 7 As shown, the present invention also provides a device including a processor 310, a communication interface 320, a memory 330 for storing processor-executable computer programs, and a communication bus 340. The processor 310, communication interface 320, and memory 330 communicate with each other via the communication bus 340. The processor 310 implements the aforementioned method for constructing a virtual organizational tree based on a standard organizational tree by running the executable computer program.

[0092] The computer program in memory 330, when implemented as a software functional unit and sold or used as an independent product, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0093] The system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected based on actual needs to achieve the purpose of this embodiment. Those skilled in the art can understand and implement this without any creative effort.

[0094] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of various embodiments or some parts of embodiments.

[0095] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for constructing a virtual tissue tree based on a standard tissue tree, characterized in that, The method includes: By setting fields in the standard organization tree table, the root node and child nodes at each level of the standard organization tree are created; Create tags and build a tag association table by binding the created tags to users; Based on the root node and child nodes at all levels of the standard organization tree, as well as the label association table, set the fields of the virtual organization tree table, and create the root node and child nodes at all levels of the virtual organization tree; Based on the root node and child nodes of the standard organization tree, as well as the label association table, set the fields of the virtual organization tree table, and create the root node and child nodes of the virtual organization tree, including: Based on the root node and child nodes of the standard organization tree, as well as the label association table, set the virtual organization tree table fields, write the virtual organization tree table field data of the root node into the virtual organization tree table in the database, and create the root node of the virtual organization tree. The child nodes of the virtual organization tree are constructed by adding the child nodes of the standard organization tree to the root node of the virtual organization tree; Based on the root node and child nodes of the standard organization tree, as well as the label association table, set up fields in the virtual organization tree table. Write the virtual organization tree table field data of the root node into the virtual organization tree table in the database, creating the root node of the virtual organization tree, including: Set the name of the virtual organization tree, select the corresponding tag ID from the tag association table for the virtual organization tree, and select a node from the standard organization tree as the root node of the virtual organization tree; Set the vTreeID, vTreeName, bindLabelID, and rootOrgID fields for the root node; Set a corresponding random string for the root node, use the random string as the value of the vTreeID field of the root node, use the virtual organization tree name as the value of the vTreeName field, set the selected label ID as the value of the bindLabelID field, and use the organization ID of the node selected from the standard organization tree as the value of the rootOrgID field. Write the virtual organization tree table field data of the root node into the virtual organization tree table in the database to create the root node of the virtual organization tree; The child nodes of the virtual organization tree are constructed by adding the child nodes of the standard organization tree to the root node of the virtual organization tree, including: When adding a complete subtree from the standard organization tree to the root node of the virtual organization tree, a subtree is selected from the standard organization tree. The root node of the subtree is different from the root node selected by the virtual organization tree from the standard organization tree, and does not include the root node selected by the virtual organization tree from the standard organization tree. The nodes in the subtree are sorted in ascending order according to the orgLevel field. The sorted nodes are added to the root node of the virtual organization tree in order. The vTreeID, orgID, parentOrgID, ID, and orgLevel fields are set for the nodes. The virtual organization tree ID is used as the value of the vTreeID field, the standard organization ID added to the virtual organization tree is used as the value of the orgID field, the current new parent ID in the virtual organization tree is used as the value of the parentOrgID field, the virtual organization tree primary key is used as the value of the ID field, and the level of the virtual organization tree node is used as the value of the orgLevel field. When adding a discrete node from the standard organization tree to the root node of the virtual organization tree, a node is selected from the standard organization tree, which is different from the root node selected from the standard organization tree for the virtual organization tree. The selected node is added to the root node of the virtual organization tree. The node is then assigned the vTreeID, orgID, parentOrgID, ID, and orgLevel fields. The virtual organization tree ID is used as the value of the vTreeID field, the standard organization ID added to the virtual organization tree is used as the value of the orgID field, the current new parent ID in the virtual organization tree is used as the value of the parentOrgID field, the virtual organization tree primary key is used as the value of the ID field, and the virtual organization tree node level is used as the value of the orgLevel field.

2. The method for constructing a virtual tissue tree based on a standard tissue tree according to claim 1, characterized in that, By setting fields in the standard organization tree table, the root node and child nodes at each level of the standard organization tree are created, including: By setting standard organization tree table fields for the root node, the data of the standard organization tree table fields of the root node is written into the standard organization tree table in the database, thus creating the root node of the standard organization tree; Set standard organization tree table fields for each child node under the root node, write the standard organization tree table data of each child node into the standard organization tree table in the database, and create child nodes at each level of the standard organization tree.

3. The method for constructing a virtual tissue tree based on a standard tissue tree according to claim 2, characterized in that, By setting standard organization tree table fields for the root node, the data in the standard organization tree table of the root node is written into the standard organization tree table in the database, thus creating the root node of the standard organization tree, including: Set the orgID, shortName, orgName, parentID, and orgLevel fields for the root node; Set a corresponding random string for the root node, use the random string as the value of the orgID field of the root node, use the organization abbreviation of the root node as the value of the shortName field, use the organization full name of the root node as the value of the orgName field, set the value of the parentID field of the root node to null, and set the value of the orgLevel field of the root node to 1.

4. The method for constructing a virtual tissue tree based on a standard tissue tree according to claim 2, characterized in that, Set standard organization tree table fields for each child node under the root node, and write the standard organization tree table data of each child node into the standard organization tree table in the database to create child nodes at each level of the standard organization tree, including: Set the orgID, shortName, orgName, parentID, and orgLevel fields for each child node under the root node; Set a corresponding random string for each child node, and use the random string as the value of the orgID field of the corresponding child node, the organization abbreviation of the child node as the value of the shortName field, the organization full name of the child node as the value of the orgName field, the organization ID of the parent node of the child node as the value of the parentID field of the child node, and the level of the child node as the value of the orgLevel field of the child node.

5. The method for constructing a virtual tissue tree based on a standard tissue tree according to claim 1, characterized in that, Create tags, and build a tag association table by binding the created tags to users, including: Tags are created by defining key-value pairs, where the key of the tag is the user and the value is the organization abbreviation of the node. The created tags are then written into the tag table. Select a user, choose the corresponding tag for the selected user from the tag table, associate the ID of the selected user with the ID of the selected tag, and write the association relationship between the selected user and the selected tag into the tag association table. The association relationship includes the ID of the selected tag, the ID of the selected user, and the tag type.

6. The method for constructing a virtual tissue tree based on a standard tissue tree according to claim 1, characterized in that, The method further includes: Add complete subtrees from the standard organization tree to any child node of the virtual organization tree, or add discrete nodes from the standard organization tree to any child node of the virtual organization tree. Set the vTreeID, orgID, parentOrgID, ID, and orgLevel fields for the added nodes. Use the virtual organization tree ID as the value of the vTreeID field, the standard organization ID added to the virtual organization tree as the value of the orgID field, the current new parent ID in the virtual organization tree as the value of the parentOrgID field, the virtual organization tree primary key as the value of the ID field, and the level of the virtual organization tree node as the value of the orgLevel field. When adding a complete subtree from the standard organization tree to any child node of the virtual organization tree hierarchically, a subtree is selected from the standard organization tree. The root node of the subtree is different from the child node of the selected subtree in the virtual organization tree, and does not include the child node of the selected subtree in the virtual organization tree. The organization ID of any node in the subtree is different from the organization ID of any existing node in the current virtual organization tree. The nodes in the subtree are sorted in ascending order according to the organization level field, and the sorted nodes are added hierarchically to the child node of the selected subtree in the virtual organization tree. When adding a discrete node from the standard organization tree to any child node of the virtual organization tree, a node is selected from the standard organization tree. This node is different from the child node of the selected mounted child node in the virtual organization tree and has a different organization ID than any existing node in the current virtual organization tree. The selected node is then added to the child node of the selected mounted child node in the virtual organization tree.

7. A system for constructing a virtual tissue tree based on a standard tissue tree, characterized in that, The system includes a virtual organization tree construction server, which is used to create the root node and child nodes of the standard organization tree by setting fields in the standard organization tree table; create tags and build a tag association table by binding the created tags to users; and set fields in the virtual organization tree table according to the root node and child nodes of the standard organization tree and the tag association table to create the root node and child nodes of the virtual organization tree. Based on the root node and child nodes of the standard organization tree, as well as the label association table, the virtual organization tree table fields are set, and the root node and child nodes of the virtual organization tree are created. This includes: setting the virtual organization tree table fields based on the root node and child nodes of the standard organization tree, as well as the label association table; writing the virtual organization tree table field data of the root node into the virtual organization tree table in the database to create the root node of the virtual organization tree; constructing the child nodes of the virtual organization tree by adding the child nodes of the standard organization tree under the root node of the virtual organization tree; and setting the virtual organization tree table fields based on the root node and child nodes of the standard organization tree, as well as the label association table; writing the virtual organization tree table field data of the root node into the virtual organization tree table in the database to create the root node of the virtual organization tree. This includes: setting the virtual organization tree name; selecting the corresponding label ID for the virtual organization tree from the label association table; and selecting a node from the standard organization tree as the root node of the virtual organization tree. Set the vTreeID, vTreeName, bindLabelID, and rootOrgID fields for the root node; set a corresponding random string for the root node, using this random string as the value of the vTreeID field, the virtual organization tree name as the value of the vTreeName field, the selected label ID as the value of the bindLabelID field, and the organization ID of the node selected from the standard organization tree as the value of the rootOrgID field; write the virtual organization tree table field data of the root node into the virtual organization tree table in the database, creating... Construct the root node of the virtual organization tree; construct the child nodes of the virtual organization tree by adding the child nodes of the standard organization tree to the root node of the virtual organization tree, including: when adding complete subtrees from the standard organization tree to the root node of the virtual organization tree hierarchically, selecting subtrees from the standard organization tree, wherein the root node of the subtree is different from the root node selected by the virtual organization tree from the standard organization tree, and does not include the root node selected by the virtual organization tree from the standard organization tree; sorting the nodes in the subtree in ascending order according to the orgLevel field, adding the sorted nodes hierarchically to the root node of the virtual organization tree, and setting the vTreeID field for the nodes. The system defines the vTreeID, parentOrgID, ID, and orgLevel fields. The virtual organization tree ID is used as the value of the vTreeID field, the standard organization ID added to the virtual organization tree is used as the value of the orgID field, the current new parent ID in the virtual organization tree is used as the value of the parentOrgID field, the virtual organization tree primary key is used as the value of the ID field, and the virtual organization tree node level is used as the value of the orgLevel field. When adding a discrete node from the standard organization tree to the root node of the virtual organization tree, a node is selected from the standard organization tree, and this node is different from the root node selected from the standard organization tree for the virtual organization tree. The selected node is added to the root node of the virtual organization tree, and the vTreeID, orgID, parentOrgID, ID, and orgLevel fields are set for the node. The virtual organization tree ID is used as the value of the vTreeID field, the standard organization ID added to the virtual organization tree is used as the value of the orgID field, the current new parent ID in the virtual organization tree is used as the value of the parentOrgID field, the virtual organization tree primary key is used as the value of the ID field, and the virtual organization tree node level is used as the value of the orgLevel field.

Citation Information

Patent Citations

  • Organization tree authority management method

    CN113721926A