Organizational structure diagram generation method and system, readable storage medium and computer equipment
By automatically generating and dynamically adjusting the organizational structure chart, inserting virtual nodes and rendering images according to resolution, the shortcomings of traditional organizational structure charts in terms of display and interaction are solved, and high-definition and interactive organizational structure display are achieved to meet the needs of large-screen display.
Patent Information
- Application Number
- CN202510597895.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-09
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2045-05-09
AI Technical Summary
Traditional organizational structure charts have problems such as dynamic update difficulties, information lag, unclear display, and difficulty in meeting the needs of large-screen display and interactive.
By automatically generating and dynamically adjusting the organizational structure chart, inserting assistant and leader virtual nodes, rendering images according to the resolution of the display device, supporting a variety of layout styles and interactive functions, achieving high-definition display and interactive operation.
It realizes clear display of the organizational hierarchical structure and management structure, supports focus display, information screening and occlusion, and details viewing, adapts to different display needs, and improves the flexibility of user experience and data changes maintenance.
Smart Images

Figure CN120470153A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a method, system, readable storage medium and computer device for generating an organizational chart. Background Art
[0002] The statements in this section merely provide background art related to the present invention and do not necessarily constitute prior art.
[0003] In the realm of organizational management and information presentation, organizational charts play a crucial role as a tool for visually displaying a company's internal structure, departmental setup, and staffing. Traditional organizational charts typically rely on static graphical representations, such as tree diagrams or hierarchical diagrams, to depict organizational hierarchical relationships and staffing. However, as companies expand in size and business complexity, traditional organizational charts are exposing numerous limitations in presentation and interactivity.
[0004] First, traditional organizational charts lack a dynamic update mechanism and require manual adjustments to accommodate changes in the organizational structure. This is not only time-consuming and labor-intensive, but can also easily lead to information lags or errors due to human negligence. Furthermore, due to limitations in the physical size of the display medium or screen resolution, it is particularly difficult to fully present the organizational chart of a large organization. This often requires users to perform cumbersome scrolling or zooming operations, seriously affecting the readability and usability of the information.
[0005] Secondly, in terms of interactive experience, traditional organizational charts typically only provide basic browsing functions and lack personalized display options tailored to user needs. For example, it's impossible to quickly locate a department based on specific needs, nor is it possible to filter, hide, or highlight information, thus limiting the effective transmission and utilization of information.
[0006] Finally, with the growing demand for big data analysis and visualization in enterprises, traditional organizational charts are unable to support large-screen displays, in-depth information mining, and cross-platform access. Especially when it is necessary to display the organizational profile in large conferences, exhibitions or public areas, traditional methods cannot meet the needs of high definition, real-time updates and interactive experience. Summary of the Invention
[0007] In order to address the deficiencies of the prior art, the present invention provides a method, system, readable storage medium and computer device for generating an organizational chart. The method automatically generates and dynamically adjusts the organizational chart through basic data such as departments, employees and relationships, so as to clearly display the hierarchical structure, department distribution and employee affiliation of the organization. Not only can the company's department organizational structure be seen, but also the management structure of the person in charge-department can be seen. The method has the characteristics of small development workload, high reusability, flexible expansion and high user demand satisfaction. Subsequent data changes and maintenance are relatively simple, and the method has good promotion and application value.
[0008] In order to achieve the above object, the present invention adopts the following technical solutions:
[0009] In a first aspect, the present invention provides a method for generating an organizational chart.
[0010] A method for generating an organizational chart includes the following steps:
[0011] Traverse the basic data of departments, employees, and 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 levels gradually increase;
[0012] For any current level organization, if there is an assistant, insert the assistant virtual node; if there is a leader in charge, insert the leader virtual node;
[0013] After adding assistant virtual nodes and deputy leader virtual nodes to all levels of the organization, the organizational hierarchy data is spliced, the display device resolution is obtained, and the spliced organizational hierarchy data is rendered according to the resolution for the final organizational structure chart display.
[0014] As a further limitation of the first aspect of the present invention, the level of the assistant virtual node is the level of the current hierarchical organization plus a first value, and the parent node of the assistant virtual node is the current hierarchical 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 in charge of the leader is the level of the parent node of the current hierarchical organization minus a second value, the parent node of the virtual node in charge of the leader is the original parent node of the current hierarchical organization, the new parent node of the current hierarchical organization is the virtual node in charge of the leader, and the new level of the current hierarchical organization is the original level minus the 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 present invention, if there is an assistant, an assistant virtual node is inserted, and 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 leader in charge, a virtual node of the leader in charge is inserted, and the identifier of the virtual node of the leader in charge is the original parent node identifier of the current hierarchical organization plus a second set suffix.
[0018] As a further limitation of the first aspect of the present invention, the first value and the second value are both 0.5. After adding the virtual node of the leader in charge, a virtual department node is inserted between the virtual node of the leader in charge and the organizational hierarchy. The virtual department node is the original parent node identifier of the current hierarchical organization plus a third set suffix, and the hierarchy of the virtual department node is the hierarchy of the virtual node of the leader in charge 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 detail viewing.
[0020] As a further limitation of the first aspect of the present invention, the spliced organizational hierarchical data includes: dynamically calculating the maximum width of each layer of nodes for unified alignment based on the node content length of each layer of data; marking the vertical display condition, and enabling vertical layout if the node level exceeds the threshold; converting the flat organizational hierarchical data into a tree structure and supporting recursive nesting; determining each node container of each layer of data, and rendering each node.
[0021] In a second aspect, the present invention provides a system for generating an organizational chart.
[0022] A system for generating an organizational chart, comprising:
[0023] Backend and frontend that communicate with each other;
[0024] The backend is configured to: traverse the basic data of departments, employees, and their relationships, first find the top-level organization, then find the next-level organization, and so on until all levels of organizations are found, with the levels increasing from the top-level organization to the bottom-level organization; for any current-level organization, if there is an assistant, insert an assistant virtual node; if there is a leader in charge, insert a leader virtual node; after adding assistant virtual nodes and leader virtual nodes to all levels of organizations, splice the organizational hierarchy data;
[0025] The front end is configured to: obtain the resolution of the display device, and render the spliced organizational hierarchy data according to the resolution for use in the final organizational structure chart display.
[0026] In a third aspect, the present invention provides an organizational chart generation system.
[0027] A system for generating an organizational chart, comprising:
[0028] The organization traversal unit is configured to traverse the basic data of departments, employees, and their relationships, first finding the top-level organization, then the next-level organization, and so on until all levels of organizations are found, with the hierarchy increasing from the top-level organization to the bottom-level organization.
[0029] The virtual node adding unit is configured to: for any current level organization, if there is an assistant, insert the assistant virtual node; if there is a leader in charge, insert the leader virtual node;
[0030] The dynamic adaptation processing unit is configured to: add assistant virtual nodes and deputy leader virtual nodes to all levels of the organization, splice the organizational hierarchy data, obtain the display device resolution, and render the spliced organizational hierarchy data according to the resolution for the final organizational structure chart display.
[0031] In a fourth aspect, the present invention provides a computer device comprising: a processor and a computer-readable storage medium;
[0032] a processor adapted to execute a computer program;
[0033] A computer-readable storage medium having a computer program stored therein, wherein when the computer program is executed by the processor, the method for generating an organizational chart as described in the first aspect of the present invention is implemented.
[0034] In a fifth aspect, the present invention provides a computer-readable storage medium storing a computer program, wherein the computer program is suitable for being loaded by a processor and executing the method for generating an organizational chart as described in the first aspect of the present invention.
[0035] Compared with the prior art, the present invention has the following beneficial effects:
[0036] 1. The present invention innovatively proposes a method for generating an organizational chart. Through basic data such as departments, employees and relationships, the organizational chart is automatically generated and dynamically adjusted to clearly display the organization's hierarchical structure, department distribution and employee affiliation. Not only can the company's department organizational structure be seen, but also the management structure of the person in charge-department can be seen. It has the characteristics of small development workload, high reusability, flexible expansion, high user demand satisfaction, etc., and subsequent data changes and maintenance are relatively simple, and it has good promotion and application value.
[0037] 2. The present invention innovatively proposes a method for generating an organizational chart. 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 and adapt to flat or cross-functional organizational forms. The logical sub-levels naturally distinguish the responsibilities of "assistants" and "formal subordinates" (such as assistants are L2.5 and subordinates are L3), avoiding the semantic confusion that may be caused by integer levels, and greatly improving the rigor of the organizational chart generation strategy.
[0038] 3. The present invention innovatively proposes a method for generating an organizational structure chart. If there is a leader in charge, a virtual node of the leader in charge is inserted. The level of the virtual node of the leader in charge 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 of the leader in charge. The levels of other nodes of the current level organization are increased by the second value (to avoid being listed alongside departments at the same level, highlighting that they are directly managed by the leader in charge). The first value is greater than zero and less than 1. By inserting the virtual node of the leader in charge (such as the original level is L3, the leader in charge node is L2.5), the functions of the original organization are split into two layers: "leader in charge" and "business execution", strengthening vertical management, maintaining the correlation with the integer level (such as L2.5 still belongs to the L2 level system), and clearly identifying the role of the leader in charge through the difference, adapting to the architecture where flatness and specialization coexist.
[0039] 4. The present invention innovatively proposes a method for generating an organizational chart. After adding the virtual node of the person in charge, a virtual department node is inserted between the virtual node of the person in charge and the organizational hierarchy. The virtual department node is the original parent node identifier of the current hierarchical organization plus a third set suffix. The hierarchy of the virtual department node is the hierarchy of the virtual node of the person in charge plus 0.5. The virtual department is used to fill the hierarchical gap to avoid the virtual node being directly connected to the actual department. The virtual department acts as a placeholder to maintain the visual balance of the tree structure.
[0040] 5. The present invention innovatively proposes a method for generating an organizational chart, obtains the resolution of the display device, renders the spliced 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 meet different display needs, and has large-screen adaptation function to ensure clear and intuitive display effects even on large display devices.
[0041] 6. The present invention innovatively proposes a method for generating an organizational chart that supports interactive functions such as focus display, information filtering and masking, and detail viewing. Users can select and highlight specific departments through simple operations, customize filtering conditions according to needs, and flexibly control the display and hiding of information. In addition, users can also obtain pop-up windows or sidebars containing detailed information such as employee personal files and department responsibilities through the detail viewing interface.
[0042] Advantages of additional aspects of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] The accompanying drawings, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0044] Figure 1 A schematic diagram of the workflow of the system for generating an organizational chart according to Example 1 of the present invention;
[0045] Figure 2 A schematic diagram illustrating the working principle of the organizational chart generation system provided in Example 1 of the present invention;
[0046] Figure 3 A schematic diagram of the process of generating an organizational chart according to Embodiment 2 of the present invention;
[0047] Figure 4 A schematic diagram of the organizational chart generation system provided in Example 3 of the present invention;
[0048] Figure 5 A schematic diagram of a computer device provided in Example 4 of the present invention. DETAILED DESCRIPTION
[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 explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which the present invention belongs.
[0051] In the absence of conflict, the embodiments of the present invention and the features thereof may be combined with each other.
[0052] Example 1:
[0053] This implementation method proposes an organizational chart generation system, including a front-end and a back-end, which are in communication with each other. In the back-end, based on the basic data management subsystem relying on the IGIX platform (Inspur iGIX enterprise digital capability platform), it is used for users to enter, edit and maintain a complete data set of departments, employees and their related information within the organization. The basic data management subsystem of IGIX is used to maintain basic information such as unit departments and personnel information, and to collect, store and update the departments, employees and their related information within the organization in real time, including department names, employee names, job levels, contact information, etc.; the basic data is sorted and spliced to generate JSON data with organizational hierarchy and personnel information for front-end display.
[0054] In the front-end, the dynamic rendering engine automatically generates and dynamically adjusts the organizational chart based on real-time data in the data management subsystem to clearly display the organization's hierarchical structure, department distribution, and employee affiliations. It is designed to seamlessly display the organizational chart on large-screen devices, supports high-definition display and touch interaction, and facilitates information sharing in public places.
[0055] More specifically, this implementation method is based on the VUE2.0 framework and has developed a dynamic rendering engine. This dynamic rendering engine automatically generates and dynamically adjusts the organizational chart based on the real-time data in the data master system. It supports a variety of layout styles and visual effects, such as tree diagrams, to meet different display needs. At the same time, it has large-screen adaptation functions to ensure clear and intuitive display effects on large display devices.
[0056] The organizational chart generation system of this implementation has a focus display function, which allows users to select and highlight specific departments or employees through simple operations, making it easier to quickly locate key information;
[0057] This implementation uses an information filtering and masking mechanism to provide users with customized filtering conditions, such as department name, job level, etc., to filter and display or hide specific information in the organizational chart. The information filtering and masking mechanism provides rich 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 personal profile and department responsibilities overview) will pop up immediately. The details viewing interface supports custom template design, and users can customize the information display style based on organizational characteristics and personal preferences.
[0059] In this implementation, preferably, the basic data management subsystem of the IGIX platform is further integrated with the permission management system to ensure the security and compliance of the data, and only authorize users to access and modify data within their authority.
[0060] In this implementation, preferably, the dynamic rendering engine adopts responsive design principles to automatically adjust 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 of this implementation is: users enter 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; according to actual needs, choose to use the large-screen adaptation module, focus display function, information screening and masking mechanism or detail viewing interface to display, query and analyze information.
[0062] This implementation method realizes the automatic generation of organizational charts through a small amount of IGXI base data configuration without the need for other configurations. After configuration, it can be dynamically effective. Through practical application verification, the present 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] An organizational chart generation method based on the above organizational chart generation system, such as Figure 1 As shown, the following process is included:
[0064] The IGIX platform maintains basic master data such as administrative organizations and administrative personnel. In administrative organizations, it is necessary to maintain the leaders in charge, department heads and assistants to facilitate the display of the management hierarchy of the management structure diagram; the focus of data logic processing is to sort out and splice the basic data, and generate JSON data with organizational hierarchy and personnel information for front-end display. Through processing, the automatic generation and dynamic adjustment of the organizational chart can be realized; the front-end obtains the transmitted organizational data, traverses the data, first finds the top-level organization, then looks for the next-level organization, and so on, and finally completes the processing of the front-end display data; then renders the data to form the final display style. In order to display beautifully, the display device resolution will be obtained before rendering, and the display element (the smallest unit displayed in the organizational structure chart) size will be rendered according to the resolution to achieve a unified display effect of multiple display media.
[0065] The dynamic generation of functions comes from the decoupling of display diagrams and basic master data. The basic master data can be flexibly adjusted according to the actual situation of the customer company. After adjustment, it can be displayed in the display diagram without any other configuration.
[0066] In this implementation, we first create a base view to extract basic information from the organization table and associate related data. Next, we create a temporary table to store intermediate organizational structure data during processing. Finally, we define a stored procedure that uses a cursor to loop through the organizational structure, adding virtual nodes (such as assistant and leadership levels), adjusting hierarchical relationships, and ultimately generating management structure data. In this implementation, the organizational structure table and administrative personnel table can be determined based on the basic master data. Specifically, they are shown in Tables 1 and 2.
[0067] Table 1: Organizational structure.
[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 management organization (AdminOrgID) and parent organization path. Combined with the data in Table 2, the organizational information is expanded and associated with tables such as employee, position, and job title to generate a complete organizational chart. In this implementation, a temporary table, temp_qlzzjg, is created containing fields such as organization ID, code, name, type, level, parent node, and path to store the organizational data during processing, including virtual nodes (such as assistant and deputy leadership levels).
[0075] Specific processing procedures, such as Figure 1 and Figure 2 As shown, the basic data of departments, employees and their relationships are traversed, first finding the top-level organization, then looking for the next-level organization, until all levels of organizations are found, with the levels gradually increasing from the top-level organization to the bottom-level organization;
[0076] For any current hierarchical 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 hierarchical organization plus 0.5, and the parent node of the assistant virtual node is the current hierarchical organization. If there is a leader in charge, a leader in charge virtual node is inserted. The level of the leader in charge virtual node is the level of the parent node of the current hierarchical organization minus 0.5, and the parent node of the leader in charge virtual node is the original parent node of the current hierarchical organization. The new parent node of the current hierarchical organization is the leader in charge virtual node, and the level of the current hierarchical organization minus 0.5.
[0077] After adding assistant virtual nodes and deputy leader virtual nodes to all levels of the organization, the organizational hierarchy data is spliced, the display device resolution is obtained, and the spliced organizational hierarchy data is rendered according to the resolution for the final organizational structure chart display.
[0078] If there is an assistant, an assistant virtual node is inserted, and the identifier of the assistant virtual node is the parent node identifier A of the current hierarchical organization plus the first set suffix AS.
[0079] If there is a leader in charge, a virtual node of the leader in charge is inserted, and the identifier of the virtual node of the leader in charge is the original parent node identifier of the current hierarchical organization plus a second set suffix AL.
[0080] In this implementation, preferably, the first value and the second value are both 0.5. After adding the virtual node of the leader in charge, a virtual department node is inserted between the virtual node of the leader in charge and the organizational hierarchy. The virtual department node is the original parent node identifier of the current hierarchical organization plus a third set suffix AL-1, and the hierarchy of the virtual department node is the hierarchy of the virtual node of the leader in charge plus 0.5.
[0081] According to the relevant information in Table 1 and Table 2, the data of each level is determined, as shown in Table 3.
[0082] Table 3: Top-level organization.
[0083] Serial number serial number meaning Remark 1 ID ID 2 NAME Organization Name 3 SUPDEPID Parent ID 4 ISDETAIL Whether it is detailed, 0 no 1 yes 5 LAYER Hierarchy 6 PATH Grading Code
[0084] Determine the organizational structure - personnel card - basic information + talent label, as shown in Table 4.
[0085] Table 4: Organizational structure and personnel information.
[0086]
[0087]
[0088] The rendering process of the dynamic rendering engine of this implementation method specifically includes: (1) dynamically calculating the maximum width of each layer of nodes 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), and the nodes of the same layer can be visited layer by layer. For each node, the length of its text content is calculated. When traversing each layer, the text length of the widest node in the layer is tracked, and finally an array is obtained, in which each element represents the maximum width of the corresponding layer; (2) marking the vertical display condition, if the node level exceeds the threshold, the vertical layout is enabled; (3) generating a tree structure, converting the flat data into a tree structure, and 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 all nodes are stored in a dictionary for fast search, all nodes are traversed, and each node is added 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 staff node rendering.
[0089] In summary, this implementation method realizes that the organization's structural information can be displayed synchronously by users maintaining basic data such as organizational departments and users; compared with the existing general organizational structure chart, this implementation method can not only see the company's department organizational structure, but also the management structure of the person in charge-department. The implementation method and device using this implementation method have the characteristics of small development workload, high reusability, flexible expansion, high user demand satisfaction, and subsequent data changes and maintenance are relatively simple, and it has good promotion and application value.
[0090] Example 2:
[0091] like Figure 3 As shown, a method for generating an organizational chart is provided, which is implemented on a terminal (for example, the front-end and the back-end are integrated together as a terminal), including the following processes:
[0092] S1: Traverse the basic data of departments, employees, and their relationships, first find the top-level organization, then search for the next-level organization, until all levels of organizations are found, gradually increasing from the top-level organization to the bottom-level organization;
[0093] S2: For any current hierarchical organization, if there is an assistant, insert an assistant virtual node. The level of the assistant virtual node is the level of the current hierarchical organization plus 0.5, and the parent node of the assistant virtual node is the current hierarchical organization. If there is a leader in charge, insert a leader in charge virtual node. The level of the leader in charge virtual node is the level of the parent node of the current hierarchical organization minus 0.5, and the parent node of the leader in charge virtual node is the original parent node of the current hierarchical organization. The new parent node of the current hierarchical organization is the leader in charge virtual node, and the level of the current hierarchical organization minus 0.5.
[0094] S3: After adding assistant virtual nodes and deputy leader virtual nodes to all levels of the organization, splice the organizational hierarchy data, obtain the display device resolution, and render the spliced organizational hierarchy data according to the resolution for the final organizational structure chart display
[0095] The details of the specific working process are described in Example 1 and will not be repeated here.
[0096] Example 3:
[0097] like Figure 4 As shown, a system for generating an organizational chart is provided, which is implemented on a terminal (for example, the front end and the back end are integrated together as a terminal), including:
[0098] The organization traversal unit is configured to traverse the basic data of departments, employees, and their relationships, first finding the top-level organization, then the next-level organization, and so on until all levels of organizations are found, with the hierarchy increasing from the top-level organization to the bottom-level organization.
[0099] The virtual node adding unit is configured to: for any current hierarchical organization, if there is an assistant, insert an assistant virtual node, the level of the assistant virtual node is the level of the current hierarchical organization plus 0.5, and the parent node of the assistant virtual node is the current hierarchical organization; if there is a deputy leader, insert a deputy leader virtual node, the level of the deputy leader virtual node is the level of the parent node of the current hierarchical organization minus 0.5, the parent node of the deputy leader virtual node is the original parent node of the current hierarchical organization, the new parent node of the current hierarchical organization is the deputy leader virtual node, and the level of the current hierarchical organization minus 0.5;
[0100] The dynamic adaptation processing unit is configured to: add assistant virtual nodes and deputy leader virtual nodes to all levels of the organization, splice the organizational hierarchy data, obtain the display device resolution, and render the spliced organizational hierarchy data according to the resolution for the final organizational structure 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 understandable that each of the above-mentioned units can be separately or entirely combined into one or several other units to constitute, or a certain unit (or units) thereof can also be further split into multiple smaller units in function to constitute, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application. The above-mentioned units are divided based on logical functions. In practical applications, the function of a unit can also be realized by multiple units, or the function of multiple units can be realized by one unit. In other embodiments of the present application, the system can also include other units. In practical applications, these functions can also be implemented with the assistance of other units, and can be implemented by the collaboration of multiple units.
[0103] According to another embodiment of the present application, the system described in this embodiment can be constructed and the method of Example 1 of the present application can be implemented by running a computer program (including program code) capable of executing the steps involved in the corresponding method described in Example 1 on a general-purpose computing device such as a computer, which includes 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, and loaded into the above-mentioned 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, which includes a processor 1001, a communication interface 1002, and a computer-readable storage medium 1003. The processor 1001, the communication interface 1002, and the computer-readable storage medium 1003 may be connected via a bus or other means.
[0106] Among them, 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 a computer program, the computer program includes program instructions, and 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 core and control core of the electronic device, which is suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions to implement corresponding method processes or corresponding functions.
[0108] The processor 1001 is configured to execute the following process:
[0109] Traverse the basic data of departments, employees, and 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 levels gradually increase;
[0110] For any current hierarchical 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 hierarchical organization plus 0.5, and the parent node of the assistant virtual node is the current hierarchical organization. If there is a leader in charge, a leader in charge virtual node is inserted. The level of the leader in charge virtual node is the level of the parent node of the current hierarchical organization minus 0.5, and the parent node of the leader in charge virtual node is the original parent node of the current hierarchical organization. The new parent node of the current hierarchical organization is the leader in charge virtual node, and the level of the current hierarchical organization minus 0.5.
[0111] After adding assistant virtual nodes and deputy leader virtual nodes to all levels of the organization, splice the organizational hierarchy data, obtain the display device resolution, and render the spliced organizational hierarchy data according to the resolution for the final organizational structure chart display
[0112] The details of the specific working process are described in Example 1 and will not be repeated here.
[0113] Example 5:
[0114] This implementation provides a computer-readable storage medium (Memory). This computer-readable storage medium is a memory device in an electronic device that is used to store programs and data. It is understood that the computer-readable storage medium herein can include both built-in storage media in the electronic device and, of course, 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, the storage space also stores one or more instructions suitable for being loaded and executed by the processor. These instructions may be one or more computer programs (including program code). It should be noted that the computer-readable storage medium herein may be a high-speed RAM memory or a non-volatile memory, such as at least one disk storage; optionally, it may 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 implement the following process:
[0117] Traverse the basic data of departments, employees, and 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 levels gradually increase;
[0118] For any current hierarchical 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 hierarchical organization plus 0.5, and the parent node of the assistant virtual node is the current hierarchical organization. If there is a leader in charge, a leader in charge virtual node is inserted. The level of the leader in charge virtual node is the level of the parent node of the current hierarchical organization minus 0.5, and the parent node of the leader in charge virtual node is the original parent node of the current hierarchical organization. The new parent node of the current hierarchical organization is the leader in charge virtual node, and the level of the current hierarchical organization minus 0.5.
[0119] After adding assistant virtual nodes and deputy leader virtual nodes to all levels of the organization, splice the organizational hierarchy data, obtain the display device resolution, and render the spliced organizational hierarchy data according to the resolution for the final organizational structure chart display
[0120] The details of the specific working process are described in Example 1 and will not be repeated here.
[0121] Those skilled in the art will appreciate that the units and algorithmic steps of each example 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 performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional technical personnel may 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, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. 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 a computer-readable storage medium or transmitted via 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 a wired (e.g., coaxial cable, optical fiber, digital line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. 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 includes one or more available media integrations. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).
[0123] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be within the scope of protection of the present invention.
Claims
1. A method for generating an organizational chart, characterized in that: The following processes are included: Traverse the basic data of departments, employees, and 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 levels gradually increase; For any current level organization, if there is an assistant, insert the assistant virtual node; if there is a leader in charge, insert the leader virtual node; After adding assistant virtual nodes and deputy leader virtual nodes to all levels of the organization, the organizational hierarchy data is spliced, the display device resolution is obtained, and the spliced organizational hierarchy data is rendered according to the resolution for the final organizational structure chart display.
2. The method for generating an organizational chart according to claim 1, wherein: The level of the assistant virtual node is the level of the current hierarchical organization plus a first value, and the parent node of the assistant virtual node is the current hierarchical organization, wherein the first value is greater than zero and less than 1.
3. The method for generating an organizational chart according to claim 2, wherein: The level of the virtual node in charge of the leader is the level of the parent node of the current level organization minus the second value. The parent node of the virtual node in charge of the leader is the original parent node of the current level organization. The new parent node of the current level organization is the virtual node in charge of the leader. The new level of the current level organization is the original level minus the second value, wherein the second value is greater than zero and less than 1.
4. The method for generating an organizational chart according to claim 3, wherein: The first value and the second value are both 0.
5. After adding the virtual node of the leader in charge, a virtual department node is inserted between the virtual node of the leader in charge and the organizational hierarchy. The virtual department node is the original parent node identifier of the current hierarchical organization plus a third set suffix. The hierarchy of the virtual department node is the hierarchy of the virtual node of the leader in charge plus 0.
5.
5. The method for generating an organizational chart according to any one of claims 1 to 4, wherein: If there is an assistant, insert an assistant virtual node, where the identifier of the assistant virtual node is the parent node identifier of the current hierarchical organization plus the first set suffix; If there is a leader in charge, a virtual node of the leader in charge is inserted, and the identifier of the virtual node of the leader in charge is the original parent node identifier of the current hierarchical organization plus a second set suffix.
6. The method for generating an organizational chart according to any one of claims 1 to 4, wherein: The tissue-level data after dyeing and splicing includes: Based on the node content length of each layer of data, the maximum width of each layer of nodes is dynamically calculated for unified alignment; the vertical display conditions are marked, and if the node level exceeds the threshold, the vertical layout is enabled; the flat organizational hierarchical data is converted into a tree structure and supports recursive nesting; the node container of each layer of data is determined and each node is rendered.
7. An organizational chart generation system, characterized in that: include: Backend and frontend that communicate with each other; The backend is configured to: traverse the basic data of departments, employees, and their relationships, first find the top-level organization, then find the next-level organization, and so on until all levels of organizations are found, with the levels increasing from the top-level organization to the bottom-level organization; for any current-level organization, if there is an assistant, insert an assistant virtual node; if there is a leader in charge, insert a leader virtual node; after adding assistant virtual nodes and leader virtual nodes to all levels of organizations, splice the organizational hierarchy data; The front end is configured to: obtain the resolution of the display device, and render the spliced organizational hierarchy data according to the resolution for use in the final organizational structure chart display.
8. An organizational chart generation system, characterized in that: include: The organization traversal unit is configured to traverse the basic data of departments, employees, and their relationships, first finding the top-level organization, then the next-level organization, and so on until all levels of organizations are found, with the hierarchy increasing from the top-level organization to the bottom-level organization. The virtual node adding unit is configured to: for any current level organization, if there is an assistant, insert the assistant virtual node; if there is a leader in charge, insert the leader virtual node; The dynamic adaptation processing unit is configured to: add assistant virtual nodes and deputy leader virtual nodes to all levels of the organization, splice the organizational hierarchy data, obtain the display device resolution, and render the spliced organizational hierarchy data according to the resolution for the final organizational structure chart display.
9. A computer device, characterized in that: include: a processor and a computer-readable storage medium; a processor adapted to execute a computer program; A computer-readable storage medium having a computer program stored therein, wherein when the computer program is executed by the processor, the method for generating an organizational chart according to any one of claims 1 to 6 is implemented.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor and executing the method for generating an organizational chart according to any one of claims 1 to 6.
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
Adaptive rendering method and system for data visualization page and storage medium
CN116049599A
Master data management hierarchy merging
US20120084325A1