A method and system for assigning users in a virtual organization tree

CN117891977BActive Publication Date: 2026-10-16CHINA ELECTRONICS CLOUD DIGITAL INTELLIGENCE TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410087643.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-22
Publication Date
2026-10-16
Estimated Expiration
2044-01-22

AI Technical Summary

Technical Problem

[0004]在实际应用中,现有的虚拟组织用户分配方式存在以下不足:在虚拟组织树中,按打标签的方式绑定用户到虚拟组织树,被绑定的用户不能修改所属的组织,用户的组织只能和原有标准组织树所属的组织相同

Benefits of technology

[0030] The present invention provides a method and system for allocating users in a virtual organizational tree. By establishing a mapping relationship between users in the standard organizational tree and users in the virtual organizational tree, users in the standard organizational tree are allocated to the constructed virtual organizational tree. This allows for more flexible user allocation and management in the virtual organizational tree and solves the problem that users in the virtual organizational tree cannot change organizations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117891977B_ABST
    Figure CN117891977B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of organization tree construction management, and provides a method and system for allocating users in a virtual organization tree, comprising: constructing a standard organization tree by creating a root node of the standard organization tree and setting child nodes for the created root node level by level; creating users for nodes in the constructed standard organization tree and setting a user field table for the created users; constructing a virtual organization tree by creating a root node and child nodes of the virtual organization tree; and establishing a mapping association relationship between users of the standard organization tree and users of the virtual organization tree, so as to allocate the users of the standard organization tree to the constructed virtual organization tree. The method and system for allocating users in the virtual organization tree can more flexibly allocate and manage users in the virtual organization tree, and solve the problem that users in the virtual organization tree cannot change organizations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of organizational tree construction and management technology, and in particular to a method and system for allocating users in a virtual organizational tree. Background Technology

[0002] When managing users, various organizations use unified user center software to manage all users under their organization. When an organization is created, a standard organizational tree is established. When a user is created, it belongs to a specific organization within this standard organizational tree. Each user belongs to a particular organization.

[0003] Currently, the main method used in this field is to tag users and bind them to a virtual organizational tree. If a virtual organizational tree is created, and the tag a user is bound to matches the tag specified by the virtual organizational tree, the user can be associated with a specific virtual organizational tree.

[0004] In practical applications, the existing virtual organization user allocation method has the following shortcomings: In the virtual organization tree, users are bound to the virtual organization tree by tagging. The bound users cannot change the organization to which they belong. The user's organization can only be the same as the organization to which the original standard organization tree belongs.

[0005] Therefore, how to provide a more flexible user allocation and management method to overcome the shortcomings of users not being able to change organizations in a virtual organization tree has become an urgent technical problem to be solved. Summary of the Invention

[0006] 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 allocating users in a virtual organization tree.

[0007] According to a first aspect of the present invention, a method for assigning users in a virtual organization tree is provided, the method comprising:

[0008] A standard organization tree is constructed by creating a root node and then assigning child nodes to that root node at each level.

[0009] Create users for nodes in the constructed standard organization tree, and set up the user field table for the created users;

[0010] A virtual organization tree is constructed by creating the root node and child nodes of the virtual organization tree;

[0011] Establish a mapping relationship between standard organization tree users and virtual organization tree users, and assign standard organization tree users to the constructed virtual organization tree.

[0012] Preferably, in the method for allocating users in a virtual organizational tree according to the present invention, the standard organizational tree is constructed by creating a root node of a standard organizational tree and setting child nodes for the created root node level by level, including:

[0013] 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;

[0014] 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 short name of the organization of the child node as the value of the shortName field, the full name of the organization 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, and the level of the child node as the value of the orgLevel field.

[0015] Preferably, in the method for allocating users in a virtual organization tree according to the present invention, users are created for nodes in the constructed standard organization tree, and user field tables are set for the created users, including: creating users for nodes in the constructed standard organization tree, setting empID, empName, userID, orgID, mobile, and email fields for each created user; setting a corresponding random string for each user, setting the random string as the value of the corresponding user's empID field, setting the user's name as the value of the empName field, setting the user's login account as the value of the userID field, setting the organization ID as the value of the orgID field, setting the user's phone number as the value of the mobile field, and setting the user's email address as the value of the email field.

[0016] Preferably, in the method for allocating users in a virtual organization tree according to the present invention, the virtual organization tree is constructed by creating the root node and child nodes of the virtual organization tree, including: setting a virtual organization tree field table according to the root node and child nodes of the standard organization tree, and creating the root node and child nodes of the virtual organization tree according to the set virtual organization tree field table.

[0017] Preferably, in the method for allocating users in a virtual organization tree according to the present invention, establishing a mapping relationship between standard organization tree users and virtual organization tree users, and allocating users of the standard organization tree to the constructed virtual organization tree, includes: creating users for nodes of the constructed virtual organization tree; setting an ID field, a vTreeID field, an empID field, and an orgID field for each created user; setting a corresponding random string for each user; setting the random string as the value of the ID field of the corresponding user; setting the virtual organization tree ID as the value of the vTreeID field; setting the user ID of the standard organization tree corresponding to the virtual organization tree as the empID field; and setting the organization ID of the node in the virtual organization tree as the value of the orgID field.

[0018] According to a second aspect of the present invention, a system for allocating users in a virtual organizational tree is provided, the system comprising a user allocation server, the user allocation server comprising:

[0019] The standard organization tree building module is used to construct a standard organization tree by creating a root node and setting child nodes for the root node level by level.

[0020] The Standard Organization Tree User Creation Module is used to create users for nodes in the constructed Standard Organization Tree and set up the user field table for the created users.

[0021] The Virtual Organization Tree Building Module is used to construct a virtual organization tree by creating the root node and child nodes of the virtual organization tree;

[0022] The Virtual Organization Tree User Assignment Module is used to establish a mapping relationship between standard organization tree users and virtual organization tree users, and to assign standard organization tree users to the constructed virtual organization tree.

[0023] Preferably, the standard organization tree construction module in the system for allocating users in the virtual organization tree of the present invention is specifically used for:

[0024] 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;

[0025] 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 short name of the organization of the child node as the value of the shortName field, the full name of the organization 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, and the level of the child node as the value of the orgLevel field.

[0026] Preferably, the standard organization tree user creation module in the system for allocating users in a virtual organization tree according to the present invention is specifically used for: creating users for nodes in the constructed standard organization tree; setting empID, empName, userID, orgID, mobile, and email fields for each created user; setting a corresponding random string for each user; setting the random string as the value of the corresponding user's empID field; setting the user's name as the value of the empName field; setting the user's login account as the value of the userID field; setting the organization ID as the value of the orgID field; setting the user's phone number as the value of the mobile field; and setting the user's email address as the value of the email field.

[0027] Preferably, the virtual organization tree construction module in the system for allocating users in the virtual organization tree of the present invention is specifically used for: setting a virtual organization tree field table based on the root node and child nodes of the standard organization tree, and creating the root node and child nodes of the virtual organization tree based on the set virtual organization tree field table.

[0028] Preferably, the virtual organization tree user allocation module in the system for allocating users in a virtual organization tree according to the present invention is specifically used for: creating users for nodes of the constructed virtual organization tree; setting an ID field, a vTreeID field, an empID field, and an orgID field for each created user; setting a corresponding random string for each user; setting the random string as the value of the ID field of the corresponding user; setting the virtual organization tree ID as the value of the vTreeID field; setting the user ID of the standard organization tree corresponding to the virtual organization tree as the empID field; and setting the organization ID of the node in the virtual organization tree as the value of the orgID field.

[0029] 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.

[0030] The present invention provides a method and system for allocating users in a virtual organizational tree. By establishing a mapping relationship between users in the standard organizational tree and users in the virtual organizational tree, users in the standard organizational tree are allocated to the constructed virtual organizational tree. This allows for more flexible user allocation and management in the virtual organizational tree and solves the problem that users in the virtual organizational tree cannot change organizations. Attached Figure Description

[0031] 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.

[0032] Figure 1 This is a schematic diagram of a system for allocating users in a virtual organization tree, applicable to embodiments of this application;

[0033] Figure 2 This is an example diagram of the architecture of a user allocation server in a system that allocates users in a virtual organization tree according to an embodiment of the present invention;

[0034] Figure 3 This is a flowchart illustrating the steps of a method for allocating users in a virtual organization tree according to an embodiment of the present invention.

[0035] Figure 4 This is an example diagram illustrating the method for assigning users to a virtual organization tree according to an embodiment of the present invention;

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

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

[0038] 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.

[0039] It should be noted that various aspects of embodiments within the scope of the appended claims are described below. 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 structures and / or functionalities other than one or more of the aspects set forth herein.

[0040] Figure 1 An exemplary system for assigning users in a virtual organization tree, applicable to embodiments of the present invention, is shown. For example... Figure 1 As shown, the system may include a user allocation server 101, a communication network 102, and / or one or more user allocation clients 103. Figure 1 The example in the text assigns client 103 to multiple users.

[0041] User allocation server 101 can be any suitable server used to store information, data, programs, and / or any other suitable type of content. In some embodiments, user allocation server 101 can perform appropriate functions. For example, in some embodiments, user allocation server 101 can be used to allocate users in a virtual organizational tree. As an optional example, in some embodiments, user allocation server 101 can be used to allocate users in a virtual organizational tree by constructing a standard organizational tree and a virtual organizational tree. For example, user allocation server 101 can be used to construct a standard organizational tree by creating a root node of the standard organizational tree and setting child nodes for the created root node level by level; create users for the nodes in the constructed standard organizational tree and set user field tables for the created users; construct a virtual organizational tree by creating a root node and child nodes of the virtual organizational tree; establish a mapping relationship between users in the standard organizational tree and users in the virtual organizational tree, and allocate users in the standard organizational tree to the constructed virtual organizational tree.

[0042] As another example, in some embodiments, the user allocation server 101 may send a method for allocating users in a virtual organization tree to the user allocation client 103 for user use, based on a request from the user allocation client 103.

[0043] Figure 2 This is an example diagram of the architecture of a user allocation server in a system that allocates users in a virtual organization tree according to an embodiment of the present invention, as shown below. Figure 2 As shown, as an optional example, this embodiment includes a user allocation server in a system that allocates users in a virtual organization tree, comprising:

[0044] The Standard Organization Tree Builder module is used to construct a standard organization tree by creating a root node and setting child nodes for the root node level by level. Specifically, the standard organization tree construction module is used to: set the orgID, shortName, orgName, parentID, and orgLevel fields for the root node; set a corresponding random string for the root node, using the random string as the value of the orgID field, the organization abbreviation of the root node as the value of the shortName field, the organization full name of the root node as the value of the orgName field, set the parentID field of the root node to null, and set the orgLevel field of the root node to 1; and set the orgID, shortName, orgName, parentID, and orgLevel fields for each child node under the root node level by level; set a corresponding random string for each child node, using the random string as the value of the orgID field, 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, and the level of the child node as the value of the orgLevel field.

[0045] The Standard Organization Tree User Creation Module is used to create users for nodes in the constructed standard organization tree and set user field tables for the created users. Specifically, the Standard Organization Tree User Creation Module is used to: create users for nodes in the constructed standard organization tree; set empID, empName, userID, orgID, mobile, and email fields for each created user; set a corresponding random string for each user, and set the random string as the value of the corresponding user's empID field, user name as the value of the empName field, user login account as the value of the userID field, organization ID as the value of the orgID field, user phone number as the value of the mobile field, and user email address as the value of the email field.

[0046] The Virtual Organization Tree Construction Module is used to construct a virtual organization tree by creating its root and child nodes. Specifically, the Virtual Organization Tree Construction Module is used to: set the virtual organization tree field table based on the root and child nodes of the standard organization tree, and create the root and child nodes of the virtual organization tree based on the set virtual organization tree field table.

[0047] The Virtual Organization Tree User Assignment Module is used to establish a mapping relationship between standard organization tree users and virtual organization tree users, assigning standard organization tree users to the constructed virtual organization tree. Specifically, the Virtual Organization Tree User Assignment Module is used to: create users for nodes in the constructed virtual organization tree; set ID, vTreeID, empID, and orgID fields for each created user; set a corresponding random string for each user; set the random string as the value of the corresponding user's ID field; set the virtual organization tree ID as the value of the vTreeID field; set the user ID of the standard organization tree corresponding to the virtual organization tree as the empID field; and set the organization ID of the node in the virtual organization tree as the value of the orgID field.

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

[0049] In some embodiments, communication network 102 may be any suitable combination of one or more wired and / or wireless networks. For example, communication network 102 may 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. User allocation client 103 may connect to communication network 102 via one or more communication links (e.g., communication link 104), which may be linked to user allocation server 101 via one or more communication links (e.g., communication link 105). Communication links may be any communication link suitable for transmitting data between user allocation client 103 and user allocation 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.

[0050] User assignment client 103 may include any one or more clients that present an interface related to assigning users in a virtual organization tree in a suitable form for user use and operation. In some embodiments, user assignment client 103 may include any suitable type of device. For example, in some embodiments, user assignment client 103 may include mobile devices, tablet computers, laptop computers, desktop computers, and / or any other suitable type of client device.

[0051] Although the user allocation 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 user allocation server 101. For example, in some embodiments, multiple devices may be used to implement the functions performed by the user allocation server 101. Alternatively, cloud services may be used to implement the functions of the user allocation server 101.

[0052] Based on the above system, this application provides a method for high-speed access to ORC external tables, which will be described below through the following embodiments.

[0053] Figure 3 This is a flowchart illustrating the steps of a method for allocating users in a virtual organization tree according to an embodiment of the present invention. This method for allocating users in a virtual organization tree can be executed on a user allocation server, such as... Figure 3 As shown, the method for assigning users in a virtual organization tree includes the following steps:

[0054] Step S201: Construct the standard organization tree by creating the root node of the standard organization tree and setting child nodes for the created root node level by level.

[0055] As an optional example, this embodiment sets the orgID field, shortName field, orgName field, parentID field, and orgLevel field for the root node; sets a corresponding random string for the root node, uses the random string as the value of the orgID field of the root node, 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 value of the parentID field of the root node to null, and sets the value of the orgLevel field of the root node to 1;

[0056] After creating the root node, this embodiment sets the orgID, shortName, orgName, parentID, and orgLevel fields for each child node under the root node. A corresponding random string is set for each child node, and this random string is used as the value of the orgID field. The abbreviation of the child node's organization is used as the value of the shortName field, the full name of the child node's organization is used as the value of the orgName field, the organization ID of the child node's parent node is used as the value of the parentID field, and the level of the child node is used as the value of the orgLevel field.

[0057] For example, according to the fields defined in Table 1, set the root node of the organization tree to have the following fields: orgID, shortName, orgName, parentID, and orgLevel. Here, orgId is the primary key and is set to a unique random string; shortName is set to the abbreviation of the root node of the organization tree; orgName is set to the full name of the root organization; parentID is set to null; and orgLevel is set to 1.

[0058] Table 1

[0059] orgID String Organization ID shortName String Organization Abbreviation orgName String Full name of the organization parentID String Parent organization ID orgLevel Integer Organizational level

[0060] Write the root node's fields into the standard organization table in Table 1. For each child node under the root node, set the orgID, shortName, orgName, parentID, and orgLevel fields. For each child node, assign a random string as the value of its orgID field, the abbreviated organization name as the value of its shortName field, the full organization name as the value of its orgName field, the organization ID of its parent node as the value of its parentID field, and set orgLevel to the parent node's orgLevel plus 1. Write the child node data into the standard organization table in Table 1. Repeat this process for each child node to complete the organization tree creation.

[0061] Step S202: Create users for the nodes in the constructed standard organization tree, and set up the user field table for the created users.

[0062] As an optional example, this embodiment creates users for nodes in a constructed standard organization tree, and sets empID, empName, userID, orgID, mobile, and email fields for each created user; sets a corresponding random string for each user, and sets the random string as the value of the corresponding user's empID field, the user's name as the value of the empName field, the user's login account as the value of the userID field, the organization ID as the value of the orgID field, the user's phone number as the value of the mobile field, and the user's email address as the value of the email field.

[0063] For example, to create a user belonging to a node in the standard organization tree, as shown in Table 2, set the empID, empName, userID, orgID, mobile, and email fields for each user; set a random string as the value of the empID field, the user's name as the value of the empName field, the user's login account as the value of the userID field, the ID of the organization to which the user belongs (orgID in Table 1) as the value of orgID, the user's phone number as the value of the mobile field, and the user's email address as the value of the email field.

[0064] Table 2

[0065]

[0066]

[0067] Create the second user in sequence, and so on, until all users belonging to the standard organization tree have been created.

[0068] Step S203: Construct the virtual organization tree by creating the root node and child nodes of the virtual organization tree.

[0069] As an optional example, this embodiment sets up a virtual organization tree field table based on the root node and child nodes of the standard organization tree, and creates the root node and child nodes of the virtual organization tree based on the set virtual organization tree field table.

[0070] For example, this embodiment constructs a virtual organization tree based on the standard organization tree. According to the root node and child nodes at all levels of the standard organization tree, the virtual organization tree table fields are set, and the root node and child nodes at all levels of the virtual organization tree are created. Specifically, a framework of a virtual organization tree is created, and the root node and virtual organization tree name are specified, as shown in the fields in Table 3.

[0071] Table 3

[0072] vTreeID String Virtual Organization Tree ID vTreeName String Virtual organization tree name rootOrgID String Selected root node ID of the virtual organization tree

[0073] The vTreeID value of the virtual organization tree is a random string, the vTreeName value is the name of the virtual organization tree, and the rootOrgID is the node ID of the node selected as the root node in the standard organization tree.

[0074] Then, in this embodiment, nodes below the root node are added to the created virtual organization tree framework. Each level of child node can be added by adding a subtree or by adding discrete nodes. The added organization nodes can be mapped to the standard organization. The fields of the added nodes are shown in Table 4.

[0075] Table 4

[0076]

[0077]

[0078] The ID of a child node is a random string. The vTreeId of a child node is the virtual organization tree ID. The orgId of a child node is the orgID of the organization defined in the standard organization tree. The parentOrgID of a child node is the orgID of the new parent node in the virtual organization tree. The orgLevel of a child node is the level of the current child node in the virtual organization tree, and its value is the orgLevel of the parent node + 1. Child nodes are added to the virtual organization tree sequentially until all child nodes are added, creating one virtual organization tree. The next virtual organization tree can then be created, until all required virtual organization trees are created.

[0079] Step S204: Establish a mapping relationship between standard organization tree users and virtual organization tree users, and assign standard organization tree users to the constructed virtual organization tree.

[0080] As an optional example, this embodiment creates users for the nodes of the constructed virtual organization tree, sets an ID field, a vTreeID field, an empID field, and an orgID field for each created user, sets a corresponding random string for each user, sets the random string as the value of the corresponding user's ID field, sets the virtual organization tree ID as the value of the vTreeID field, sets the user ID of the standard organization tree corresponding to the virtual organization tree as the empID field, and sets the organization ID of the node in the virtual organization tree as the value of the orgID field.

[0081] For example, users in a virtual organization tree originate from a standard organization tree. Selecting a user from the standard organization tree and assigning them a virtual organization tree ID and a node ID within the virtual organization tree creates the user in the virtual organization tree. The specific steps are as follows: Select a virtual organization tree, select a node within the virtual organization tree, and create the user in the virtual organization tree: Set the ID, vTreeID, empID, and orgID fields. See Table 5 for field descriptions. Set the user ID to a random string, set the user's vTreeID to the ID of the selected virtual organization tree, set the user's empID to the value of the empID field of the selected user in the standard organization tree, and set the user's orgID to the value of the orgID of an organization node in the selected virtual organization tree.

[0082] Table 5

[0083] ID String Primary Key ID vTreeID String Virtual Organization Tree ID empID String Selected Standard Organization Tree User ID orgID String Node ID of a node in a virtual organization tree

[0084] Complete the creation of all users in the current virtual organization tree in sequence, and then continue to create all users in the next virtual organization tree.

[0085] Figure 4 This is an example diagram illustrating the method for assigning users to a virtual organization tree according to an embodiment of the present invention, such as... Figure 4 As shown, Figure 4 The standard organizational tree contains two users, User 1 and User 2, located under nodes 8 and 4 respectively. In virtual organizational tree 1, User 1 and User 2 are created, corresponding to User 1 and User 2 in the standard organizational tree, located under nodes 2 and 7 in virtual organizational tree 1. Similarly, in virtual organizational tree 2, User 1 and User 2 are created, corresponding to User 1 and User 2 in the standard organizational tree, located under nodes 7 and 4 in virtual organizational tree 2.

[0086] The present invention provides a method and system for allocating users in a virtual organizational tree. By establishing a mapping relationship between users in the standard organizational tree and users in the virtual organizational tree, users in the standard organizational tree are allocated to the constructed virtual organizational tree. This allows for more flexible user allocation and management in the virtual organizational tree and solves the problem that users in the virtual organizational tree cannot change organizations.

[0087] like Figure 5 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 allocating users in a virtual organizational tree by running the executable computer program.

[0088] 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.

[0089] 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.

[0090] 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.

[0091] 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 allocating users in a virtual organization tree, characterized in that, The method includes: A standard organization tree is constructed by creating a root node and then assigning child nodes to that root node at each level. Create users for nodes in the constructed standard organization tree, and set up the user field table for the created users; A virtual organization tree is constructed by creating the root node and child nodes of the virtual organization tree; Establish a mapping relationship between standard organization tree users and virtual organization tree users, and assign standard organization tree users to the constructed virtual organization tree; The virtual organization tree is constructed by creating the root node and child nodes of the virtual organization tree, including: setting the virtual organization tree field table according to the root node and child nodes of the standard organization tree, and creating the root node and child nodes of the virtual organization tree according to the set virtual organization tree field table; Establishing a mapping relationship between standard organization tree users and virtual organization tree users, and assigning standard organization tree users to the constructed virtual organization tree, includes: creating users for nodes in the constructed virtual organization tree; setting ID, vTreeID, empID, and orgID fields for each created user; setting a corresponding random string for each user; setting the random string as the value of the corresponding user's ID field; setting the virtual organization tree ID as the value of the vTreeID field; setting the user ID of the standard organization tree corresponding to the virtual organization tree as the empID field; and setting the organization ID of the node in the virtual organization tree as the value of the orgID field.

2. The method for allocating users in a virtual organization tree according to claim 1, characterized in that, A standard organizational tree is constructed by creating a root node and assigning child nodes to that root node at each level. This includes: 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; 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 short name of the organization of the child node as the value of the shortName field, the full name of the organization 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, and the level of the child node as the value of the orgLevel field.

3. The method for allocating users in a virtual organization tree according to claim 1, characterized in that, To create users for nodes in the constructed standard organizational tree, a user field table is set for the created users, including: creating users for nodes in the constructed standard organizational tree, and setting empID, empName, userID, orgID, mobile, and email fields for each created user; setting a corresponding random string for each user, and setting the random string as the value of the corresponding user's empID field, the user's name as the value of the empName field, the user's login account as the value of the userID field, the organization ID as the value of the orgID field, the user's phone number as the value of the mobile field, and the user's email address as the value of the email field.

4. A system for allocating users in a virtual organizational tree, characterized in that, The system includes a user allocation server, which includes: The standard organization tree building module is used to construct a standard organization tree by creating a root node and setting child nodes for the root node level by level. The Standard Organization Tree User Creation Module is used to create users for nodes in the constructed Standard Organization Tree and set up the user field table for the created users. The Virtual Organization Tree Building Module is used to construct a virtual organization tree by creating the root node and child nodes of the virtual organization tree; The Virtual Organization Tree User Assignment Module is used to establish a mapping relationship between standard organization tree users and virtual organization tree users, and to assign standard organization tree users to the constructed virtual organization tree. The virtual organization tree construction module is specifically used to: set the virtual organization tree field table based on the root node and child nodes of the standard organization tree, and create the root node and child nodes of the virtual organization tree based on the set virtual organization tree field table; The virtual organization tree user assignment module is specifically used for: creating users for nodes in the constructed virtual organization tree; setting ID, vTreeID, empID, and orgID fields for each created user; setting a corresponding random string for each user; setting the random string as the value of the corresponding user's ID field; setting the virtual organization tree ID as the value of the vTreeID field; setting the user ID of the standard organization tree corresponding to the virtual organization tree as the empID field; and setting the organization ID of the node in the virtual organization tree as the value of the orgID field.

5. The system for allocating users in a virtual organization tree according to claim 4, characterized in that, The standard organization tree building module is specifically used for: 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. 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 abbreviation of the organization of the child node as the value of the shortName field, the full name of the organization 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.

6. The system for allocating users in a virtual organization tree according to claim 4, characterized in that, The standard organization tree user creation module is specifically used for: creating users for nodes in the constructed standard organization tree; setting empID, empName, userID, orgID, mobile, and email fields for each created user; setting a corresponding random string for each user; setting the random string as the value of the corresponding user's empID field; setting the user's name as the value of the empName field; setting the user's login account as the value of the userID field; setting the organization ID as the value of the orgID field; setting the user's phone number as the value of the mobile field; and setting the user's email address as the value of the email field.

Citation Information

Patent Citations

  • Organization tree authority management method

    CN113721926A