Organizational chart generation method and system, readable storage medium and computer device

CN120470153BActive Publication Date: 2026-08-07INSPUR GENERSOFT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
INSPUR GENERSOFT CO LTD
Filing Date
2025-05-09
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

然而,随着企业规模的日益扩大和业务复杂性的增加,传统组织架构图在展示和交互方面暴露出诸多局限性

Benefits of technology

[0036] 1. This invention innovatively proposes an organizational chart generation method. Based on basic data such as departments, employees, and relationships, it automatically generates and dynamically adjusts the organizational chart to clearly display the organization's hierarchical structure, departmental distribution, and employee affiliation. It not only shows the company's departmental organizational structure but also the management structure of the person in charge and department. It features low development workload, high reusability, flexible expansion, and high user demand satisfaction. Furthermore, subsequent data changes and maintenance are relatively simple, making it a valuable tool for promotion and application.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120470153B_ABST
    Figure CN120470153B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of data processing. A kind of organizational chart generation method, system, readable storage medium and computer equipment are provided, the basic data of department, staff and associated relationship are traversed, the uppermost level organization is found first, then the next level organization is found, until all levels of organization are found, from the uppermost level organization to the lowermost level organization, the level gradually increases;For any current level organization, if there is an assistant, an assistant virtual node is inserted, and if there is a supervisor, a supervisor virtual node is inserted;After adding the assistant virtual node and the supervisor virtual node to all levels of organization, the organizational level data is spliced, the display device resolution is obtained, and the spliced organizational level data is rendered according to the resolution for the final organizational chart display.The application has the characteristics of small development workload, high reusability, flexible expansion, high user demand satisfaction and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and specifically to an organizational chart generation method, system, readable storage medium, and computer device. Background Technology

[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.

[0003] In the field of organizational management and information presentation, organizational charts play a crucial role as a tool for intuitively displaying an organization's internal structure, departmental setup, and staffing. Traditional organizational charts typically rely on static graphical representations, such as tree diagrams or hierarchical diagrams, to reflect the organization's hierarchical relationships and staffing. However, as companies grow larger and their business becomes more complex, traditional organizational charts reveal numerous limitations in terms of presentation and interaction.

[0004] First, traditional organizational charts lack a dynamic update mechanism and require manual adjustment to adapt to changes in the organizational structure. This is not only time-consuming and laborious, but also prone to information lag or errors due to human negligence. In addition, due to the physical size or screen resolution of the display medium, it is particularly difficult to present a complete organizational chart of a large organization. Users often need to perform cumbersome scrolling or zooming operations, which seriously affects the readability and usability of the information.

[0005] Secondly, in terms of interactive experience, traditional organizational charts usually only provide basic browsing functions and lack personalized display options for user needs; for example, they cannot quickly locate a specific department according to specific needs, nor can they filter, hide or highlight information, thus limiting the effective transmission and utilization of information.

[0006] Finally, as enterprises increasingly demand big data analysis and visualization, traditional organizational charts are proving inadequate in supporting large-screen displays, in-depth information mining, and cross-platform access. In particular, when it is necessary to display organizational overviews in large conferences, exhibitions, or public areas, traditional methods cannot meet the requirements for high definition, real-time updates, and interactive experiences. Summary of the Invention

[0007] To address the shortcomings of existing technologies, this invention provides an organizational chart generation method, system, readable storage medium, and computer device. Using basic data such as departments, employees, and relationships, it automatically generates and dynamically adjusts organizational charts to clearly display the organization's hierarchical structure, departmental distribution, and employee affiliations. It not only shows the company's departmental organizational structure but also the management structure of the person in charge and their department. It features low development workload, high reusability, flexible expansion, and high user satisfaction, and subsequent data changes and maintenance are relatively simple, making it highly valuable for widespread application.

[0008] To achieve the above objectives, the present invention adopts the following technical solution:

[0009] In a first aspect, the present invention provides a method for generating organizational charts.

[0010] An organizational chart generation method includes the following steps:

[0011] The basic data of departments, employees and related relationships are traversed. First, the top-level organization is found, then the next level organization is found, until all levels of organizations are found, from the top-level organization to the bottom-level organization, the level gradually increases.

[0012] For any organization at the current level, if there is an assistant, insert an assistant virtual node; if there is a supervisor, insert a supervisor virtual node.

[0013] After adding assistant virtual nodes and supervisor virtual nodes to all levels of the organization, the organizational hierarchy data is spliced ​​together, the display device resolution is obtained, and the spliced ​​organizational hierarchy data is rendered according to the resolution for use in the final organizational chart display.

[0014] As a further limitation of the first aspect of the present invention, the hierarchy of the assistant virtual node is the hierarchy of the current level organization plus a first value, and the parent node of the assistant virtual node is the current level organization, wherein the first value is greater than zero and less than 1.

[0015] As a further limitation of the first aspect of the present invention, the level of the virtual node of the supervising leader is the level of the parent node of the current level organization minus a second value, the parent node of the virtual node of the supervising leader is the original parent node of the current level organization, the new parent node of the current level organization is the virtual node of the supervising leader, and the new level of the current level organization is the original level minus a second value, wherein the second value is greater than zero and less than 1.

[0016] As a further limitation of the first aspect of the invention, if there is an assistant, then an assistant virtual node is inserted, wherein the identifier of the assistant virtual node is the parent node identifier of the current hierarchical organization plus a first set suffix.

[0017] As a further limitation of the first aspect of the present invention, if there is a supervising leader, a supervising leader virtual node is inserted, and the identifier of the supervising leader virtual node is the original parent node identifier of the current level organization plus a second set suffix.

[0018] As a further limitation of the first aspect of the present invention, both the first and second values ​​are 0.5. After adding the virtual node of the supervising leader, a virtual department node is inserted between the virtual node of the supervising leader and the organizational level. The virtual department node is the original parent node identifier of the current level organization plus a third set suffix. The level of the virtual department node is the level of the virtual node of the supervising leader plus 0.5.

[0019] As a further limitation of the first aspect of the present invention, the final organizational chart supports focus display, information filtering and masking, and detailed viewing.

[0020] As a further limitation of the first aspect of the present invention, the stitched organizational hierarchy data includes: dynamically calculating the maximum width of each node based on the node content length of each layer of data for unified alignment; marking vertical display conditions, and enabling vertical layout if the node hierarchy exceeds a threshold; converting the flat organizational hierarchy data into a tree structure and supporting recursive nesting; determining each node container of each layer of data and rendering each node.

[0021] Secondly, the present invention provides an organizational chart generation system.

[0022] An organizational chart generation system, comprising:

[0023] The backend and frontend that communicate with each other;

[0024] The backend is configured to: traverse the basic data of departments, employees, and related relationships, first finding the top-level organization, then finding the next level of organization, until all levels of organizations are found, with the hierarchy gradually increasing from the top-level organization to the bottom-level organization; for any organization at the current level, if there is an assistant, insert an assistant virtual node; if there is a supervising leader, insert a supervising leader virtual node; after adding assistant virtual nodes and supervising leader virtual nodes for all levels of organizations, the organizational hierarchy data is concatenated.

[0025] The front end is configured to: obtain the display device resolution, and render the stitched organizational hierarchy data according to the resolution for use in the final organizational chart display.

[0026] Thirdly, the present invention provides an organizational chart generation system.

[0027] An organizational chart generation system, comprising:

[0028] The organization traversal unit is configured to traverse the basic data of departments, employees and related relationships, first find the top-level organization, then find the next level organization, until all levels of organizations are found, from the top-level organization to the bottom-level organization, the level gradually increases.

[0029] The virtual node addition unit is configured to: for any current level of organization, if there is an assistant, insert an assistant virtual node; if there is a supervisor, insert a supervisor virtual node.

[0030] The dynamic adaptation processing unit is configured to: add assistant virtual nodes and supervisor virtual nodes to all levels of the organization, stitch together the organizational hierarchy data, obtain the display device resolution, and render the stitched organizational hierarchy data according to the resolution for use in the final organizational chart display.

[0031] Fourthly, the present invention provides a computer device, comprising: a processor and a computer-readable storage medium;

[0032] A processor, adapted to execute computer programs;

[0033] A computer-readable storage medium storing a computer program that, when executed by the processor, implements the organizational chart generation method as described in the first aspect of the present invention.

[0034] Fifthly, the present invention provides a computer-readable storage medium storing a computer program adapted to be loaded by a processor and executed as described in the first aspect of the present invention for generating an organizational chart.

[0035] Compared with the prior art, the beneficial effects of the present invention are:

[0036] 1. This invention innovatively proposes an organizational chart generation method. Based on basic data such as departments, employees, and relationships, it automatically generates and dynamically adjusts the organizational chart to clearly display the organization's hierarchical structure, departmental distribution, and employee affiliation. It not only shows the company's departmental organizational structure but also the management structure of the person in charge and department. It features low development workload, high reusability, flexible expansion, and high user demand satisfaction. Furthermore, subsequent data changes and maintenance are relatively simple, making it a valuable tool for promotion and application.

[0037] 2. This invention innovatively proposes an organizational chart generation method. For any current-level organization, if there is an assistant, an assistant virtual node is inserted. The level of the assistant virtual node is the level of the current-level organization plus a first value. The parent node of the assistant virtual node is the original parent node of the current organization. The first value is greater than zero and less than 1. Logical sub-levels (such as L1.5) are inserted between traditional integer levels (such as L1 and L2) to achieve asymmetric expansion of the organizational structure, adapting to flat or overlapping organizational forms. The logical sub-levels naturally distinguish the differences in responsibilities between "assistant" and "formal subordinate" (e.g., assistant is L2.5, subordinate is L3), avoiding semantic confusion that may be caused by integer levels, and greatly improving the rigor of the organizational chart generation strategy.

[0038] 3. This invention innovatively proposes an organizational chart generation method. If there is a supervising leader, a virtual node for the supervising leader is inserted. The level of the virtual node for the supervising leader is the level of the current level organization minus a second value. The parent node of the current level organization is updated to the virtual node for the supervising leader. The levels of other nodes in the current level organization are all increased by a second value (to avoid being listed alongside departments at the same level and to highlight that they are directly managed by the supervising leader). The first value is greater than zero and less than 1. By inserting the virtual node for the supervising leader (e.g., if the original level is L3, the supervising leader node is L2.5), the functions of the original organization are split into two levels: "supervising leader" and "business execution". This strengthens vertical management, maintains the correlation with integer levels (e.g., L2.5 still belongs to the L2 level system), and clearly identifies the role of the supervising leader through the difference, adapting to an architecture that combines flatness and specialization.

[0039] 4. This invention innovatively proposes an organizational chart generation method. After adding the virtual node of the supervising leader, a virtual department node is inserted between the virtual node of the supervising leader and the organizational hierarchy. The virtual department node is the original parent node identifier of the current level organization plus a third set suffix. The hierarchy of the virtual department node is the hierarchy of the supervising leader virtual node plus 0.5. By filling the hierarchy gaps with virtual departments, the virtual nodes are avoided from directly connecting to actual departments. The virtual departments act as placeholders, maintaining the visual balance of the tree structure.

[0040] 5. This invention innovatively proposes an organizational chart generation method, which obtains the display device resolution, renders and splices the organizational hierarchy data according to the resolution for the final organizational chart display, supports multiple layout styles and visual effects, such as tree diagrams, to adapt to different display needs, has large screen adaptation function, and ensures a clear and intuitive display effect on large display devices.

[0041] 6. This invention innovatively proposes an organizational chart generation method that supports interactive functions such as focus display, information filtering and masking, and details viewing. Users can select and highlight specific departments through simple operations, and customize filtering conditions according to their needs to flexibly control the display and hiding of information. In addition, users can also obtain pop-ups or sidebars containing detailed information such as employee personal files and department responsibilities through the details viewing interface.

[0042] Advantages of additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description

[0043] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.

[0044] Figure 1 This is a schematic diagram of the workflow of the organizational chart generation system provided in Embodiment 1 of the present invention;

[0045] Figure 2 This is a schematic diagram illustrating the working principle of the organizational chart generation system provided in Embodiment 1 of the present invention;

[0046] Figure 3 This is a flowchart illustrating the organizational chart generation method provided in Embodiment 2 of the present invention.

[0047] Figure 4 This is a schematic diagram of the organizational chart generation system provided in Embodiment 3 of the present invention;

[0048] Figure 5 This is a schematic diagram of a computer device provided in Embodiment 4 of the present invention. Detailed Implementation

[0049] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0050] It should be noted that the following detailed descriptions are exemplary and intended to provide further illustration of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0051] Where there is no conflict, the embodiments and features in the embodiments of the present invention can be combined with each other.

[0052] Example 1:

[0053] This implementation proposes an organizational chart generation system, comprising a front-end and a back-end, which communicate and connect with each other. In the back-end, a basic data management subsystem based on the IGIX platform (Inspur iGIX Enterprise Digital Capability Platform) is used for users to input, edit, and maintain a complete dataset of departments, employees, and their related information within the organization. The system utilizes the IGIX basic data management subsystem to maintain basic information such as unit department and personnel information, and collects, stores, and updates information on departments, employees, and their related information within the organization in real time, including department names, employee names, job levels, and contact information. The basic data is then sorted and assembled to generate JSON data with organizational hierarchy and personnel information for display by the front-end.

[0054] In the front end, the dynamic rendering engine automatically generates and dynamically adjusts the organizational chart based on real-time data from the data management subsystem to clearly display the organization's hierarchical structure, departmental distribution, and employee affiliation. It is designed for seamless display of organizational charts on large-screen devices, supports high-definition display and touch interaction, and facilitates information sharing in public places.

[0055] More specifically, this implementation is based on the VUE 2.0 framework and has developed a dynamic rendering engine. This dynamic rendering engine automatically generates and dynamically adjusts the organizational structure diagram based on real-time data in the master data system. It supports various layout styles and visual effects, such as tree diagrams, to adapt to different display needs. At the same time, it has a large screen adaptation function to ensure a clear and intuitive display effect on large display devices.

[0056] The organizational chart generation system implemented in this way has a focus display function, which allows users to select and highlight specific departments or employees through simple operations, making it easy to quickly locate key information;

[0057] This implementation employs an information filtering and masking mechanism, providing users with customizable filtering conditions, such as department name and job level, to filter and display or hide specific information in the organizational chart. The information filtering and masking mechanism offers a wealth of filtering options and supports logical combination filtering to meet users' diverse information display needs.

[0058] This implementation provides a details viewing interface. When a user clicks on any employee or department on the organizational chart, a pop-up window or sidebar containing detailed information (such as employee profiles and departmental responsibilities overview) will appear immediately. The details viewing interface supports custom template design, and users can customize the information display style according to organizational characteristics and personal preferences.

[0059] In this implementation, preferably, the basic data management subsystem of the IGIX platform is further integrated with a permission management system to ensure data security and compliance, and to authorize users to access and modify data only within their permission scope.

[0060] In this implementation, preferably, the dynamic rendering engine adopts responsive design principles, automatically adjusting the layout according to the size and resolution of the display device to ensure a good visual experience on any device.

[0061] The basic working principle of the organizational chart generation system implemented in this way is as follows: users input and maintain basic organizational data through the basic data management system that relies on the IGIX platform; the dynamic rendering engine generates an organizational chart based on the latest data; and, according to actual needs, users can choose to use the large screen adaptation module, focus display function, information filtering and masking mechanism, or details viewing interface for information display, querying, and analysis.

[0062] This implementation enables the automatic generation of organizational charts with a small amount of IGXI base data configuration, requiring no other configuration. Once configured, the charts take effect dynamically. Practical application verification shows that this invention can significantly improve the generation efficiency and display effect of organizational charts, meeting the urgent needs of enterprises for efficient, flexible, and visual organizational structure management.

[0063] The organizational chart generation method based on the above organizational chart generation system, such as Figure 1 As shown, the process includes the following:

[0064] The IGIX platform maintains basic master data such as administrative organizations and personnel. Within the administrative organization, it needs to maintain information on supervising leaders, department heads, and assistants to facilitate the display of management hierarchy in the management chart. The data logic processing focuses on sorting and piecing together the basic data to generate JSON data with organizational hierarchy and personnel information for front-end display. Through this processing, the organization chart can be automatically generated and dynamically adjusted. The front-end receives the transmitted organizational data, iterates through it, first finding the top-level organization, then the next level, and so on, ultimately completing the data processing for front-end display. The data is then rendered to form the final display style. For aesthetic purposes, the display device resolution is obtained before rendering, and the size of the display elements (the smallest unit in the organization chart display) is rendered according to the resolution, achieving a unified display effect across various display media.

[0065] The dynamic generation of functions comes from the decoupling of the display diagram and the basic master data. The basic master data can be flexibly adjusted according to the actual situation of the customer company, and can be displayed in the display diagram after adjustment without any other configuration.

[0066] In this implementation, firstly, a base view is created, extracting basic information from the organization table and associating it with relevant data. Then, a temporary table is created to store intermediate organizational structure data during processing. Finally, a stored procedure is defined: it iterates through the organizational structure using a cursor, adding virtual nodes (such as assistants and leadership levels), adjusting hierarchical relationships, and ultimately generating the management structure data. Based on the base master data, the organization structure table and administrative personnel table can be determined, as shown in Tables 1 and 2.

[0067] Table 1: Organizational Structure Table.

[0068]

[0069]

[0070]

[0071] Table 2: Administrative Staff Table.

[0072]

[0073]

[0074] In this implementation, basic organizational information is extracted from Table 1 and associated with its managing organization (AdminOrgID) and parent organization path. Combined with data from Table 2, organizational information is expanded, and tables such as employee, position, and job title are associated to generate a complete organizational chart. A temporary table, temp_qlzzjg, is created in this implementation, containing fields such as organization ID, code, name, type, level, parent node, and path, to store organizational data during processing, including virtual nodes (such as assistant and supervising leader levels).

[0075] The specific processing procedure, such as Figure 1 and Figure 2 As shown, the basic data of departments, employees and related relationships are traversed. First, the top-level organization is found, then the next level organization is found, until all levels of organizations are found. The level gradually increases from the top-level organization to the bottom-level organization.

[0076] For any organization at the current level, if there is an assistant, insert an assistant virtual node. The level of the assistant virtual node is the level of the current organization plus 0.5, and the parent node of the assistant virtual node is the current organization. If there is a supervisor, insert a supervisor virtual node. The level of the supervisor virtual node is the level of the parent node of the current organization minus 0.5. The parent node of the supervisor virtual node is the original parent node of the current organization, the new parent node of the current organization is the supervisor virtual node, and the level of the current organization is reduced by 0.5.

[0077] After adding assistant virtual nodes and supervisor virtual nodes to all levels of the organization, the organizational hierarchy data is spliced ​​together, the display device resolution is obtained, and the spliced ​​organizational hierarchy data is rendered according to the resolution for use in the final organizational chart display.

[0078] If there is an assistant, then insert an assistant virtual node, the identifier of which is the parent node identifier A of the current level organization plus a first set suffix AS.

[0079] If there is a supervising leader, insert a supervising leader virtual node. The identifier of the supervising leader virtual node is the original parent node identifier of the current level organization plus a second set suffix AL.

[0080] In this implementation, preferably, both the first and second values ​​are 0.5. After adding the virtual node of the supervising leader, a virtual department node is inserted between the virtual node of the supervising leader and the organizational level. The virtual department node is the original parent node identifier of the current level organization plus the third set suffix AL-1, and the level of the virtual department node is the level of the virtual node of the supervising leader plus 0.5.

[0081] Based on the relevant information in Tables 1 and 2, the data for each level is determined, as shown in Table 3.

[0082] Table 3: The highest level of organization.

[0083] 1 ID ID 2 NAME Organization Name 3 SUPDEPID Parent ID 4 ISDETAIL Detailed breakdown: 0 No 1 Yes 5 LAYER hierarchy 6 PATH Hierarchical codes

[0084] Determine the organizational structure, personnel cards, basic information, and talent tags, as shown in Table 4.

[0085] Table 4: Organizational structure and personnel information.

[0086]

[0087]

[0088] The rendering process of this implementation method in the dynamic rendering engine specifically includes: (1) Dynamically calculating the maximum width of each node based on the length of the node content (such as text) for unified alignment; for example, optionally, a queue can be used for breadth-first search (BFS) to visit the nodes of the same layer one by one. For each node, the length of its text content is calculated. When traversing each layer, the text length of the widest node in that layer is tracked, and finally an array is obtained, where each element represents the maximum width of the corresponding layer; (2) Marking the vertical display conditions. If the node level exceeds the threshold, vertical layout is enabled; (3) Generating a tree structure, converting flat data into a tree structure, supporting recursive nesting; for example, optionally, assuming that each node has a unique identifier (such as id) and an identifier pointing to the parent node (such as parentId), first store all nodes in a dictionary for quick lookup, traverse all nodes, and add each node to the children list of its parent node; (4) Performing Vue component rendering, determining the node container (i.e., the visual or logical element used to wrap and display each node), and performing virtual node rendering, organization node rendering, and personnel node rendering.

[0089] In summary, this implementation method enables the synchronous display of organizational structure information by allowing users to maintain basic data such as organizational departments and users. Compared with existing general organizational charts, this implementation method not only shows the company's departmental organizational structure but also the management structure of the person in charge and department. The implementation method and device using this method have the characteristics of low development workload, high reusability, flexible expansion, and high user demand satisfaction. Moreover, subsequent data changes and maintenance are relatively simple, making it highly valuable for promotion and application.

[0090] Example 2:

[0091] like Figure 3 As shown, an organizational chart generation method is provided, implemented on a single terminal (e.g., front-end and back-end integrated into a single terminal), including the following process:

[0092] S1: Traverse the basic data of departments, employees and related relationships, first find the top-level organization, then find the next level of organization, until all levels of organizations are found, from the top-level organization to the bottom-level organization, the level gradually increases.

[0093] S2: For any organization at the current level, if there is an assistant, insert an assistant virtual node. The level of the assistant virtual node is the level of the current organization plus 0.5, and the parent node of the assistant virtual node is the current organization. If there is a supervisor, insert a supervisor virtual node. The level of the supervisor virtual node is the level of the parent node of the current organization minus 0.5. The parent node of the supervisor virtual node is the original parent node of the current organization, the new parent node of the current organization is the supervisor virtual node, and the level of the current organization is reduced by 0.5.

[0094] S3: After adding assistant virtual nodes and supervising leader virtual nodes to all organizational levels, the organizational hierarchy data is stitched together, the display device resolution is obtained, and the stitched organizational hierarchy data is rendered according to the resolution for use in the final organizational chart display.

[0095] For details of the specific working process, please refer to the description in Example 1, which will not be repeated here.

[0096] Example 3:

[0097] like Figure 4 As shown, an organizational chart generation system is provided, implemented on a single terminal (e.g., the front-end and back-end are integrated into a single terminal), including:

[0098] The organization traversal unit is configured to traverse the basic data of departments, employees and related relationships, first find the top-level organization, then find the next level organization, until all levels of organizations are found, from the top-level organization to the bottom-level organization, the level gradually increases.

[0099] The virtual node adding unit is configured to: for any current-level organization, if there is an assistant, insert an assistant virtual node, the level of which is the level of the current-level organization plus 0.5, and the parent node of which is the current-level organization; if there is a supervising leader, insert a supervising leader virtual node, the level of which is the level of the parent node of the current-level organization minus 0.5, the parent node of which is the original parent node of the current-level organization, the new parent node of the current-level organization is the supervising leader virtual node, and the level of the current-level organization is minus 0.5.

[0100] The dynamic adaptation processing unit is configured to: add assistant virtual nodes and supervisor virtual nodes to all levels of the organization, stitch together the organizational hierarchy data, obtain the display device resolution, and render the stitched organizational hierarchy data according to the resolution for use in the final organizational chart display.

[0101] The specific working process of each of the above units is described in Example 1, and will not be repeated here.

[0102] It is understood that the aforementioned units can be individually or entirely merged into one or more other units, or some of the units can be further divided into multiple functionally smaller units. This achieves the same operation without affecting the technical effects of the embodiments of this application. The aforementioned units are based on logical functional division. In practical applications, the function of one unit can be implemented by multiple units, or the function of multiple units can be implemented by one unit. In other embodiments of this application, the system may also include other units. In practical applications, these functions can also be implemented with the assistance of other units, and can be implemented collaboratively by multiple units.

[0103] According to another embodiment of this application, the system described in this embodiment, and the method of embodiment 1 of this application, can be constructed and the method of embodiment 1 of this application implemented by running a computer program (including program code) capable of performing the steps involved in the corresponding method described in embodiment 1 on a general-purpose computing device including processing elements and storage elements such as a central processing unit (CPU), random access memory (RAM), and read-only memory (ROM). The computer program can be recorded on, for example, a computer-readable recording medium, loaded into the aforementioned computing device through the computer-readable recording medium, and run therein.

[0104] Example 4:

[0105] like Figure 5 As shown, this implementation provides an electronic device including a processor 1001, a communication interface 1002, and a computer-readable storage medium 1003. The processor 1001, communication interface 1002, and computer-readable storage medium 1003 can be connected via a bus or other means.

[0106] The communication interface 1002 is used to receive and send data. The computer-readable storage medium 1003 can be stored in the memory of the electronic device. The computer-readable storage medium 1003 is used to store computer programs, which include program instructions. The processor 1001 is used to execute the program instructions stored in the computer-readable storage medium 1003.

[0107] The processor 1001 (or CPU (Central Processing Unit)) is the computing and control core of electronic devices. It is suitable for implementing one or more instructions, specifically for loading and executing one or more instructions to achieve corresponding methods or functions.

[0108] The processor 1001 is configured to perform the following process:

[0109] The basic data of departments, employees and related relationships are traversed. First, the top-level organization is found, then the next level organization is found, until all levels of organizations are found, from the top-level organization to the bottom-level organization, the level gradually increases.

[0110] For any organization at the current level, if there is an assistant, insert an assistant virtual node. The level of the assistant virtual node is the level of the current organization plus 0.5, and the parent node of the assistant virtual node is the current organization. If there is a supervisor, insert a supervisor virtual node. The level of the supervisor virtual node is the level of the parent node of the current organization minus 0.5. The parent node of the supervisor virtual node is the original parent node of the current organization, the new parent node of the current organization is the supervisor virtual node, and the level of the current organization is reduced by 0.5.

[0111] After adding assistant virtual nodes and supervising leader virtual nodes to all levels of the organization, the organizational hierarchy data is stitched together, the display device resolution is obtained, and the stitched organizational hierarchy data is rendered according to the resolution for use in the final organizational chart display.

[0112] For details of the specific working process, please refer to the description in Example 1, which will not be repeated here.

[0113] Example 5:

[0114] This implementation provides a computer-readable storage medium (Memory), which is a memory device in an electronic device used to store programs and data. It is understood that the computer-readable storage medium here can include both built-in storage media in the electronic device and extended storage media supported by the electronic device. The computer-readable storage medium provides storage space that stores the processing system of the electronic device.

[0115] Furthermore, this storage space also contains one or more instructions suitable for loading and execution by the processor. These instructions can be one or more computer programs (including program code). It should be noted that the computer-readable storage medium here can be high-speed RAM memory or unstable memory, such as at least one disk storage device; optionally, it can also be at least one computer-readable storage medium located remotely from the aforementioned processor.

[0116] In one embodiment, the computer-readable storage medium stores one or more instructions; the processor loads and executes the one or more instructions stored in the computer-readable storage medium to perform the following process:

[0117] The basic data of departments, employees and related relationships are traversed. First, the top-level organization is found, then the next level organization is found, until all levels of organizations are found, from the top-level organization to the bottom-level organization, the level gradually increases.

[0118] For any organization at the current level, if there is an assistant, insert an assistant virtual node. The level of the assistant virtual node is the level of the current organization plus 0.5, and the parent node of the assistant virtual node is the current organization. If there is a supervisor, insert a supervisor virtual node. The level of the supervisor virtual node is the level of the parent node of the current organization minus 0.5. The parent node of the supervisor virtual node is the original parent node of the current organization, the new parent node of the current organization is the supervisor virtual node, and the level of the current organization is reduced by 0.5.

[0119] After adding assistant virtual nodes and supervising leader virtual nodes to all levels of the organization, the organizational hierarchy data is stitched together, the display device resolution is obtained, and the stitched organizational hierarchy data is rendered according to the resolution for use in the final organizational chart display.

[0120] For details of the specific working process, please refer to the description in Example 1, which will not be repeated here.

[0121] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed in this application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0122] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in or transmitted through a computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data processing device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk (SSD)).

[0123] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for generating organizational charts, characterized in that, Includes the following processes: The basic data of departments, employees and related relationships are traversed. First, the top-level organization is found, then the next level organization is found, until all levels of organizations are found, from the top-level organization to the bottom-level organization, the level gradually increases. For any organization at the current level, if there is an assistant, insert an assistant virtual node; if there is a supervising leader, insert a supervising leader virtual node. The level of the assistant virtual node is the level of the current organization plus a first value. The parent node of the assistant virtual node is the current organization. The first value is greater than zero and less than 1. The level of the supervising leader virtual node is the level of the parent node of the current organization minus a second value. The parent node of the supervising leader virtual node is the original parent node of the current organization. The new parent node of the current organization is the supervising leader virtual node. The new level of the current organization is the original level minus a second value. The second value is greater than zero and less than 1. After adding assistant virtual nodes and supervisor virtual nodes to all levels of the organization, the organizational hierarchy data is spliced ​​together, the display device resolution is obtained, and the spliced ​​organizational hierarchy data is rendered according to the resolution for use in the final organizational chart display.

2. The organizational chart generation method as described in claim 1, characterized in that, The first and second values ​​are both 0.

5. After adding the virtual node of the supervising leader, a virtual department node is inserted between the virtual node of the supervising leader and the organizational level. The virtual department node is the original parent node identifier of the current level organization plus a third set suffix. The level of the virtual department node is the level of the virtual node of the supervising leader plus 0.

5.

3. The organizational chart generation method as described in any one of claims 1-2, characterized in that, If there is an assistant, then insert an assistant virtual node, the identifier of which is the parent node identifier of the current level organization plus a first set suffix; If there is a supervising leader, insert a supervising leader virtual node. The identifier of the supervising leader virtual node is the original parent node identifier of the current level organization plus a second set suffix.

4. The organizational chart generation method according to any one of claims 1-2, characterized in that, The rendered and stitched organizational hierarchy data includes: Based on the length of the node content in each layer of data, the maximum width of each node is dynamically calculated for uniform alignment; vertical display conditions are marked, and vertical layout is enabled if the node level exceeds the threshold; flat organizational hierarchical data is converted into a tree structure and recursive nesting is supported; the node container for each layer of data is determined, and each node is rendered.

5. An organizational chart generation system, characterized in that, include: The backend and frontend that communicate with each other; The backend is configured to: traverse the basic data of departments, employees, and related relationships, first finding the top-level organization, then finding the next level organization, until all levels of organizations are found, with the hierarchy gradually increasing from the top to the bottom level; for any organization at the current level, if there is an assistant, insert an assistant virtual node; if there is a supervising leader, insert a supervising leader virtual node; after adding assistant virtual nodes and supervising leader virtual nodes to all levels of organizations, the organizational hierarchy data is concatenated; the hierarchy of the assistant virtual node is the hierarchy of the current level organization plus a first value, and the parent node of the assistant virtual node is the current level organization, where the first value is greater than zero and less than 1; the hierarchy of the supervising leader virtual node is the hierarchy of the parent node of the current level organization minus a second value, where the parent node of the supervising leader virtual node is the original parent node of the current level organization, the new parent node of the current level organization is the supervising leader virtual node, and the new hierarchy of the current level organization is the original hierarchy minus a second value, where the second value is greater than zero and less than 1; The front end is configured to: obtain the display device resolution, and render the stitched organizational hierarchy data according to the resolution for use in the final organizational chart display.

6. An organizational chart generation system, characterized in that, include: The organization traversal unit is configured to traverse the basic data of departments, employees and related relationships, first find the top-level organization, then find the next level organization, until all levels of organizations are found, from the top-level organization to the bottom-level organization, the level gradually increases. The virtual node adding unit is configured to: for any current-level organization, if there is an assistant, insert an assistant virtual node; if there is a supervising leader, insert a supervising leader virtual node. The level of the assistant virtual node is the level of the current-level organization plus a first value. The parent node of the assistant virtual node is the current-level organization. The first value is greater than zero and less than 1. The level of the supervising leader virtual node is the level of the parent node of the current-level organization minus a second value. The parent node of the supervising leader virtual node is the original parent node of the current-level organization. The new parent node of the current-level organization is the supervising leader virtual node. The new level of the current-level organization is the original level minus a second value. The second value is greater than zero and less than 1. The dynamic adaptation processing unit is configured to: add assistant virtual nodes and supervisor virtual nodes to all levels of the organization, stitch together the organizational hierarchy data, obtain the display device resolution, and render the stitched organizational hierarchy data according to the resolution for use in the final organizational chart display.

7. A computer device, characterized in that, include: Processor and computer-readable storage media; A processor, adapted to execute computer programs; A computer-readable storage medium storing a computer program that, when executed by the processor, implements the organizational chart generation method as described in any one of claims 1 to 4.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program adapted to be loaded by a processor and executed as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Multi-layer hierarchical netlist processing method, device, computer equipment and storage medium

    CN110489812A

  • Method and device for generating hierarchical structure chart, equipment and storage medium

    CN114691761A