Tree structure data interactive dynamic adjustment method, system and equipment
By creating a hierarchical data model and building a tree list with a batch selection mechanism, listening and responding to user operations, and dynamically adjusting the location of data items, the flexibility and efficiency of data hierarchical change operations of tree structure data in the existing technology are solved, and efficient data management and optimization user experience is achieved.
Patent Information
- Application Number
- CN202510053881.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-14
- Publication Date
- 2025-04-25
AI Technical Summary
The prior art is difficult to provide flexible, efficient and intuitive tree structure data hierarchical change operation mode, resulting in difficulties and inefficiency in data management and decision analysis.
By creating a hierarchical data model, configuring the selection check box in response to user selection operations, building a tree list with a batch selection mechanism, and listening to the user's actions of moving data items, dynamically recording and returning to the user the number of moved data items, generating data items for the user, placing guidance for the user, and realizing dynamic adjustment of data items.
It realizes the adjustment of the tree structure's data level, improves the efficiency of data management and user interaction experience, and ensures data consistency and system stability.
Smart Images

Figure CN119884125A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of tree structure data management, and in particular to a method, system and device for interactive dynamic adjustment of tree structure data. Background Art
[0002] In today's rapidly developing information-based business environment, B-side products are increasingly widely used in various industries. With the continuous increase in business complexity, enterprises are faced with massive and complex data processing and display needs. The traditional single data display method can only present information of a single dimension, which can no longer meet the growing business needs. It is difficult to intuitively reflect the correlation and hierarchy between data, resulting in many difficulties for users in obtaining and understanding product information, and the readability and management efficiency of data are also greatly limited.
[0003] In order to display product information more comprehensively and improve data readability and management efficiency, multi-level nested data display has gradually become a trend. This display method can organize complex product information in the form of a tree structure, and arrange the data in order according to different levels and categories, so that users can quickly locate and understand the product hierarchy relationship, thereby more efficiently performing data management and decision analysis. For example, in an enterprise resource planning (ERP) system, the tree structure can clearly display the relationship between different departments, different projects, and related resources, helping managers quickly grasp the overall situation of the company's operations.
[0004] However, with the continuous increase in data volume and the increasing complexity of business logic, existing data display technologies face many challenges. Although tree lists have certain advantages in data display and can present data in a hierarchical manner, most tree lists on the market are only static displays and lack flexibility and dynamism. When faced with complex tree structures, users often need to perform frequent data hierarchy changes according to business needs, such as adjusting the order of nodes, merging or splitting nodes, etc., in order to better adapt to business changes and optimize data display effects. However, existing technologies cannot provide intuitive drag-and-drop interactive operations to meet this demand.
[0005] This limitation forces users to rely on traditional menu operations or command line input when changing data hierarchies. These operations are not only inefficient, requiring users to make tedious selections and switches among multiple menu options, or accurately input complex command instructions, but are also prone to errors. Once an operation error occurs, data may be confused or lost, requiring a lot of time and effort to correct. This not only seriously reduces the efficiency of tree-structured data change operations, but also greatly affects the user experience, making users feel inconvenient and frustrated when using data display tools, thereby affecting work efficiency and the timeliness and accuracy of business decisions.
[0006] Therefore, there is an urgent need for a data display technology that can provide a flexible, efficient and intuitive tree-structured data hierarchy change operation method to meet the high requirements for data display and management in the modern business environment. Summary of the invention
[0007] In view of this, in order to overcome the deficiencies of the prior art, the present application aims to provide a method, system and device for interactive dynamic adjustment of tree structured data.
[0008] According to a first aspect of the present application, a method for interactive dynamic adjustment of tree structure data is provided, the method comprising: Create a hierarchical data model, configure selection checkboxes for data items in the hierarchical data model that respond to user selection operations, and build a tree list with a batch selection mechanism; Listen to and respond to the user's operation of moving data items in the tree list, dynamically record and return the number of moved data items to the user; Perform corresponding hierarchical node judgment for the data items moved by the user, and generate corresponding data item placement guidance for the moved data items; Move the data items to the target location according to the data item placement guide, and make structural changes and update the display of the tree list.
[0009] Optionally, in the interactive dynamic adjustment method of tree-structured data of the present application, a hierarchical data model is created, including: creating a hierarchical data model with a recursive structure, the data items in the hierarchical data model include a unique identifier, a parent node identifier, a child node list, and a data content field, and a tree hierarchical relationship is constructed through the parent node identifier and the child node list.
[0010] Optionally, in the interactive dynamic adjustment method of tree-structured data of the present application, selection check boxes that respond to user selection operations are configured for data items of the hierarchical data model, including: setting a check box for each data item of the hierarchical data model through a tree selector component, binding an event processing function to each check box, and responding to user selection operations through the bound event processing function.
[0011] Optionally, in the interactive dynamic adjustment method of tree-structured data of the present application, a tree list with a batch selection mechanism is constructed, including: adding the data items corresponding to the selected check boxes to the node array, setting the corresponding selection status for the data items in the node array, and when the user selects a data item in the tree list, dynamically updating the selection status of the data item in the node array to dynamically select and update the check boxes of the data items in the hierarchical data model.
[0012] Optionally, in the interactive dynamic adjustment method of tree-structured data of the present application, the operation of users moving data items in the tree list is monitored and responded to, including: monitoring the user's selection, dragging and placement operations on data items, and dynamically adjusting the position of the data items in the tree list according to the changes in the coordinates of the data items obtained through monitoring.
[0013] Optionally, in the interactive dynamic adjustment method of tree-structured data of the present application, the number of moved data items is dynamically recorded and returned to the user, including: using a global state management counter to count the number of moved data items in real time, and dynamically visualizing the real-time counted number of moved data items.
[0014] Optionally, in the tree structure data interactive dynamic adjustment method of the present application, performing corresponding hierarchical node judgment for the data item moved by the user and generating corresponding data item placement guidance for the moved data item include: When the user moves a data item in a tree list to another tree list, a corresponding placement guide is generated for the user to move the data item to a target location by marking the graphic and inserting the positioning graphic; When the user moves a data item in the tree list from the corresponding parent node to form an independent tree data, the coordinates of the data item are dynamically monitored, and the target position of the data item is determined based on the coordinates of the data item obtained through monitoring. By marking graphics and inserting positioning graphics, the corresponding placement guide is generated for the user to move the data item to the target position.
[0015] Optionally, in the interactive dynamic adjustment method of tree-structured data of the present application, data items are moved to target positions according to data item placement guidance, and the tree list is structurally changed and displayed updated, including: when the user moves the data item to the target position and releases it, the tree list data stored in the back-end database is updated, the updated tree list data is sent to the front end, and the tree list hierarchical structure is updated through table rendering on the front end.
[0016] According to a second aspect of the present application, a tree structure data interactive dynamic adjustment system is provided, the system comprising a dynamic adjustment server, the dynamic adjustment server comprising: A batch selection tree list construction module is used to create a hierarchical data model, configure a selection check box that responds to user selection operations for data items in the hierarchical data model, and construct a tree list with a batch selection mechanism; The data item moving monitoring and response module is used to monitor and respond to the user's operation of moving data items in the tree list, dynamically record and return the number of moved data items to the user; A data item placement guidance module is used to determine the corresponding hierarchical nodes for the data items moved by the user and generate corresponding data item placement guidance for the moved data items; The tree list change module is used to move data items to target locations according to data item placement guidance, and to make structural changes and update the display of the tree list.
[0017] According to a third aspect of the present application, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in the first aspect of the present application when executing the program.
[0018] The tree structure data interactive dynamic adjustment method and system of the present application have the following beneficial technical effects: 1. Enhance data management efficiency and flexibility: Allow users to freely move data items in the tree structure to achieve dynamic adjustment of the data hierarchy. Enable users to quickly reorganize and optimize data according to changes in business needs, such as organizational structure adjustments, project priority changes, etc., without redesigning the entire data structure or performing a large amount of data migration. Compared with the traditional hierarchical management method, the mobile mechanism of this solution reduces the dependence on the preset structure. Users do not need to be restricted by fixed hierarchical relationships and can flexibly adjust the position and hierarchy of data items according to actual business scenarios, making data management more flexible and agile, and better able to adapt to the changing business environment. At the same time, this dynamic adjustment capability also supports more complex business logic, such as batch operations and cross-level movement of data items. Users can select multiple data items at one time and move them to a new location in batches by dragging and dropping, or move data items directly from one level to another without having to operate one by one. This greatly improves the efficiency of data management and reduces the time and energy required by users in the data operation process, thereby improving the overall data management efficiency, enabling users to complete data management tasks more efficiently and better meet the needs of business development.
[0019] 2. Improve user interaction experience: At the user interaction level, this solution provides an intuitive and highly interactive data operation method. Users do not need to input complex commands or cumbersome menu operations. They can reorganize the tree data structure by simply dragging the mouse. This natural interaction method greatly reduces the operational threshold of data management, allowing non-technical users to easily get started and quickly master the basic operations of data management without long-term learning and training, thereby significantly improving users' acceptance and willingness to use the data management system. In addition, the system provides clear visual feedback during the user operation process. These visual prompts can show users in real time where data items can be inserted and the expected effects after moving, helping users to accurately understand the results of data movement. This not only reduces user errors caused by improper operation, but also improves the user's expected accuracy of operation results, enhances the user's confidence and sense of control in the data management process, and further improves the user's interactive experience.
[0020] 3. Ensure data consistency and system stability: adopt the front-end and back-end synchronous update mechanism. When the user completes the drag and drop operation, not only the data display is updated instantly on the front end so that the user can intuitively see the operation results, but also the data hierarchy is updated synchronously in the back-end database. This synchronous update mechanism ensures the consistency of data at different storage and display levels, and avoids data errors and system failures caused by the mismatch between the front-end display and the back-end database data. At the same time, this application also includes error handling and rollback mechanisms. When the mobile operation fails for some reason, the system can capture the error in time and restore the data to the state before the operation through a rollback operation, thereby ensuring the stability and reliability of the system and preventing problems such as data loss or system crashes caused by operational errors. This focus on data consistency and system stability enables this application to maintain efficient and stable operation in scenarios where the data structure changes frequently. No matter how many times the user drags and drops the data, the accuracy and integrity of the data can be ensured, providing users with continuous and reliable services, ensuring business continuity and data security, which is crucial for enterprises and organizations that rely on data for decision-making and operations. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0022] Figure 1 This is an example diagram of the architecture of a tree structure data interactive dynamic adjustment system according to an embodiment of the present application; Figure 2 This is an example diagram of the architecture of a dynamic adjustment server of a tree structure data interactive dynamic adjustment system according to an embodiment of the present application; Figure 3 A flowchart of a method for interactive dynamic adjustment of tree structure data according to an embodiment of the present application; Figure 4 An example diagram of a tree list constructed according to the tree structure data interactive dynamic adjustment method of an embodiment of the present application; Figure 5 An example diagram of batch selection of data items according to the interactive dynamic adjustment method of tree structure data according to an embodiment of the present application; Figure 6 An example diagram of moving and counting data items according to the interactive dynamic adjustment method of tree structure data according to an embodiment of the present application; Figure 7 An exemplary diagram of guiding the movement of data items according to the interactive dynamic adjustment method of tree structure data according to an embodiment of the present application; Figure 8 Another example diagram of guiding the movement of data items according to the interactive dynamic adjustment method of tree structure data according to an embodiment of the present application; Fig. 9 An example diagram of changing and updating the tree list structure according to the interactive dynamic adjustment method of tree structure data in an embodiment of the present application; Fig.10 Another example diagram of changing and updating the tree list structure according to the interactive dynamic adjustment method of tree structure data in an embodiment of the present application; Fig.11 A schematic diagram of the structure of the device provided in this application. DETAILED DESCRIPTION
[0023] The embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0024] It should be noted that the following embodiments and features in the embodiments may be combined with each other in the absence of conflict; and, based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without making any creative work are within the scope of protection of the present disclosure.
[0025] It should be noted that various aspects of the embodiments within the scope of the appended claims are described below. It should be apparent that the aspects described herein may be embodied in a wide variety of forms, and any specific structure and / or function described herein is merely illustrative. Based on the present disclosure, it should be understood by those skilled in the art that an aspect described herein may be implemented independently of any other aspect, and two or more of these aspects may be combined in various ways. For example, any number of aspects described herein may be used to implement the device and / or practice the method. In addition, other structures and / or functionalities other than one or more of the aspects described herein may be used to implement this device and / or practice this method.
[0026] Figure 1 FIG. 1 is an example diagram of the architecture of a tree structure data interactive dynamic adjustment system according to an embodiment of the present application, such as Figure 1 As shown, the system may include a dynamic adjustment server 101, a communication network 102 and / or one or more dynamic adjustment clients 103. Figure 1 The example in the figure is a plurality of dynamically adjusted clients 103 .
[0027] The dynamic adjustment server 101 can be any appropriate server for storing information, data, programs and / or any other suitable type of content. In some embodiments, the dynamic adjustment server 101 can perform appropriate functions. For example, in some embodiments, the dynamic adjustment server 101 can be used for interactive dynamic adjustment of tree structure data. As an optional example, in some embodiments, the dynamic adjustment server 101 can be used to: create a hierarchical data model, configure selection check boxes that respond to user selection operations for data items in the hierarchical data model, and build a tree list with a batch selection mechanism; listen to and respond to user operations of moving data items in the tree list, dynamically record and return to the user the number of data items moved; perform corresponding hierarchical node judgments for the data items moved by the user, and generate corresponding data item placement guides for the moved data items; move the data items to the target location according to the data item placement guides, and perform structural changes and update display on the tree list.
[0028] Figure 2 FIG. 1 is an example diagram of the architecture of a dynamic adjustment server of a tree structure data interactive dynamic adjustment system according to an embodiment of the present application, such as Figure 2 As shown, in this embodiment, dynamically adjusting the server includes: A batch selection tree list construction module is used to create a hierarchical data model, configure a selection check box that responds to user selection operations for data items in the hierarchical data model, and construct a tree list with a batch selection mechanism; The data item moving monitoring and response module is used to monitor and respond to the user's operation of moving data items in the tree list, dynamically record and return the number of moved data items to the user; A data item placement guidance module is used to determine the corresponding hierarchical nodes for the data items moved by the user and generate corresponding data item placement guidance for the moved data items; The tree list change module is used to move data items to target locations according to data item placement guidance, and to make structural changes and update the display of the tree list.
[0029] As another example, in some embodiments, the dynamic adjustment server 101 may send the tree structure data interactive dynamic adjustment method to the dynamic adjustment client 103 for the user to use according to the request of the dynamic adjustment client 103 .
[0030] As an optional example, in some embodiments, the dynamic adjustment client 103 is used to provide a visual dynamic adjustment interface, which is used to receive a user's selection input operation for interactive dynamic adjustment of tree structure data, and to, in response to the selection input operation, obtain a dynamic adjustment interface corresponding to the option selected by the selection input operation from the dynamic adjustment server 101 and display the dynamic adjustment interface, wherein the dynamic adjustment interface at least displays information on interactive dynamic adjustment of tree structure data and operation options for the information on interactive dynamic adjustment of tree structure data.
[0031] In some embodiments, the communication network 102 can be any suitable combination of one or more wired and / or wireless networks. For example, the communication network 102 can include any one or more of the following: the Internet, an intranet, a wide area network (WAN), a local area network (LAN), a wireless network, a digital subscriber line (DSL) network, a frame relay network, an asynchronous transfer mode (ATM) network, a virtual private network (VPN), and / or any other suitable communication network. The dynamic adjustment client 103 can be connected to the communication network 102 via one or more communication links (e.g., communication link 104), and the communication network 102 can be linked to the dynamic adjustment server 101 via one or more communication links (e.g., communication link 105). The communication link can be any communication link suitable for transmitting data between the dynamic adjustment client 103 and the dynamic adjustment server 101, such as a network link, a dial-up link, a wireless link, a hard-wired link, any other suitable communication link, or any suitable combination of such links.
[0032] Dynamically adjust client 103 can include presenting the interface relevant to interactive dynamic adjustment of tree structure data through appropriate form, for any one or more clients of user use and operation.In some embodiments, dynamically adjust client 103 can include the equipment of any suitable type.For example, in some embodiments, dynamically adjust client 103 can include mobile device, tablet computer, laptop computer, desktop computer and / or any other suitable type of client device.
[0033] Although the dynamic adjustment server 101 is illustrated as one device, in some embodiments, any appropriate number of devices may be used to perform the functions performed by the dynamic adjustment server 101. For example, in some embodiments, multiple devices may be used to implement the functions performed by the dynamic adjustment server 101. Alternatively, the functions of the dynamic adjustment server 101 may be implemented using a cloud service.
[0034] Based on the above system, an embodiment of the present application provides a cloud platform interface design walkthrough method based on a rule engine, which is described below through the following embodiments.
[0035] Figure 3 FIG. 1 is a flowchart of a method for interactively and dynamically adjusting tree structure data according to an embodiment of the present application. The method for interactively and dynamically adjusting tree structure data of this embodiment can be executed at a dynamic adjustment server, such as Figure 3 As shown, the tree structure data interactive dynamic adjustment method includes the following steps: Step S201: Create a hierarchical data model, configure selection check boxes for data items in the hierarchical data model that respond to user selection operations, and construct a tree list with a batch selection mechanism.
[0036] In this embodiment, a hierarchical data model is created, and the tree selector component provided by the front-end framework and component library is used to add a check box in front of each data item to implement the selection function. The event processing function is bound to respond to user selection operations, and the selected node array maintained in the state management is updated to implement batch data operations.
[0037] As an optional example, in this embodiment, a hierarchical data model with a recursive structure is created, and the data items in the hierarchical data model include a unique identifier, a parent node identifier, a child node list, and a data content field, and a tree-like hierarchical relationship is constructed through the parent node identifier and the child node list.
[0038] After the hierarchical data model is created, this embodiment sets a check box for each data item of the hierarchical data model through a tree selector component, binds an event processing function to each check box, and responds to the user's selection operation through the bound event processing function.
[0039] As an optional example, this embodiment adds the data items corresponding to the selected check boxes to the node array, sets the corresponding selection status for the data items in the node array, and when the user selects a data item in the tree list, the check boxes of the data items in the hierarchical data model are dynamically selected and updated by dynamically updating the selection status of the data items in the node array. Figure 4 An example diagram of a tree list constructed according to the tree structure data interactive dynamic adjustment method of an embodiment of the present application, Figure 5 This is an example diagram of batch selection of data items according to the interactive dynamic adjustment method of tree-structured data in an embodiment of the present application.
[0040] Step S202: monitor and respond to the user's operation of moving data items in the tree list, dynamically record and return the number of moved data items to the user.
[0041] As an optional example, in this embodiment, the user's selection, dragging and placement operations on the data items are monitored, and the position of the data items in the tree list is dynamically adjusted according to the coordinate changes of the data items obtained by monitoring. The number of moved data items is counted in real time through the global state management counter, and the number of moved data items counted in real time is dynamically visualized. For example, it is displayed in digital form in a designated area of the user interface, and a dynamically updated visual effect is provided, such as flashing numbers or color changes.
[0042] In actual applications, compared with the prior art, this embodiment adopts a more intuitive interactive method when implementing the functions of moving and counting tree data in a list, allowing users to change the hierarchical position of data in the tree structure by long pressing the right mouse button and dragging. At this time, the selected and dragged data items will be grayed out to distinguish them from other unselected data items, enhancing the visual effect and user's operation cognition. During the dragging process, the system will track and record the selected data items in real time, and feedback the number of data currently being moved to the user through a dynamically updated counter, ensuring that the user has a clear understanding and control of the operation process. Figure 6 An example diagram of moving and counting data items according to the interactive dynamic adjustment method of tree-structured data in an embodiment of the present application.
[0043] Step S203: performing corresponding hierarchical node judgment for the data item moved by the user, and generating a corresponding data item placement guide for the moved data item.
[0044] This embodiment can reorganize tree structure data items through user dragging operations, which is achieved by dragging data and judging data hierarchical nodes. Hierarchical node judgment is performed during dragging and visual prompts are provided, such as blue marking lines and insertion positioning triangles, to guide users to correctly place data items.
[0045] As an optional example, in this embodiment, when a user moves a data item in a tree list to another tree list, a corresponding placement guide is generated for the user to move the data item to the target position through marking graphics and inserting positioning graphics; when the user moves a data item in a tree list from a corresponding parent node to become an independent tree data, the coordinates of the data item are dynamically monitored, and the target position of the data item is determined based on the coordinates of the data item obtained through monitoring, and a corresponding placement guide is generated for the user to move the data item to the target position through marking graphics and inserting positioning graphics.
[0046] When moving data items according to the method of the present application, a semi-transparent shadow area can also be displayed around the target level node. When the user drags the data item into the shadow area, the sub-node list of the target level node is adjusted to reserve space for the moved data item. For example, the user is allowed to long-press the right mouse button and drag to change the data level position in the tree structure, gray out the selected and dragged data item, track and record the selected data item in real time, and feedback the current number of moved data to the user through a dynamically updated counter.
[0047] In actual applications, when implementing the functions of tree data dragging and hierarchical node judgment, the method of this application allows users to reorganize data items in the tree structure by dragging. When the user drags the selected data item, the system will perform hierarchical node judgment and provide visual prompts to guide the user to correctly place the data item. For example, if the user moves the data item to another tree list item, the user is prompted to "move to xxx" through a blue marker line and an inserted positioning triangle. Such visual feedback helps the user understand the result of the drag operation. Figure 7 This is an example diagram of guiding the movement of data items according to the interactive dynamic adjustment method of tree-structured data in an embodiment of the present application. On the contrary, if the user moves the data item out of its parent node to make it an independent set of tree-structured data, the precise location of the data movement will be determined, and the user will be prompted to "move between xxx and xxx". The blue marking line and the inserted positioning triangle will also be used to assist the user in completing the operation. Figure 8 This is another example diagram of guiding the movement of data items according to the interactive dynamic adjustment method of tree-structured data in an embodiment of the present application.
[0048] Step S204: moving the data item to the target location according to the data item placement guide, and performing structural changes and updating the display of the tree list.
[0049] In this embodiment, after the user determines the target location of the data movement and releases the mouse, the data hierarchy structure change is processed, the back-end database update operation is performed, and the front-end application receives the update to trigger the table rendering logic to reflect the latest data hierarchy structure. For example, after the user determines the target location of the data movement through a drag operation and releases the mouse, the change of the data hierarchy structure is automatically processed. This process first involves the update operation of the back-end database to ensure that the changes of the data hierarchy nodes are correctly recorded and stored. Subsequently, the front-end application will receive these updates and trigger the table rendering logic to reflect the latest data hierarchy structure. This embodiment is based on the call of the back-end API to execute database transactions, as well as the update of the front-end state management, such as using Vue.js's responsive data binding to ensure the synchronization of the view and data status.
[0050] As an optional example, in this embodiment, when the user moves a data item to the target location and releases it, the tree list data stored in the backend database is updated, the updated tree list data is sent to the front end, and the tree list hierarchical structure is updated through table rendering at the front end.
[0051] In this embodiment, the backend database update operation adopts a transaction processing mechanism to ensure the atomicity of data level node changes. When an exception occurs during the data update process, the system automatically rolls back the transaction, restores to the state before the operation, and displays an error message to the user. After the front-end application receives the back-end database update, it efficiently updates the user interface through virtual DOM technology, re-rendering only the changed data level part, reducing the performance overhead of page redrawing and rearrangement, and improving the response speed of data display. Virtual DOM is a technology used to optimize the performance of Web applications. It reduces direct operations on the real DOM by building a lightweight copy of the DOM tree in memory, thereby improving the rendering efficiency and response speed of the application. Fig. 9 This is an example diagram of changing and updating the tree list structure according to the interactive dynamic adjustment method of tree structure data in an embodiment of the present application. Fig.10 This is another example diagram of changing and updating the tree list structure according to the tree structure data interactive dynamic adjustment method of an embodiment of the present application.
[0052] In actual applications, the application method also includes: data permission verification, data change history, data backup and recovery steps, and intelligent prompts and recommendations.
[0053] For example, before a user performs a data level change operation, the system determines whether the user has the authority to operate the target data item based on the user's permission information. If the user does not have the authority, the operation is prohibited and the user is prompted to ensure the security and integrity of the data.
[0054] Record detailed information of each data level change operation, including the operating user, operation time, data structure before and after the change, etc., to facilitate subsequent data auditing and problem troubleshooting.
[0055] Before performing large-scale data level change operations, back up the current data. When the user needs it, you can restore it to the backup state with one click to reduce the risk of data operation.
[0056] Based on the user's historical operation habits and data change patterns, when the user drags and drops data, it intelligently recommends possible target hierarchical locations to improve the efficiency and accuracy of data adjustment.
[0057] The tree structure data interactive dynamic adjustment method and system of this embodiment have the following beneficial technical effects: 1. Enhance data management efficiency and flexibility: Allow users to freely move data items in the tree structure to achieve dynamic adjustment of the data hierarchy. Enable users to quickly reorganize and optimize data according to changes in business needs, such as organizational structure adjustments, project priority changes, etc., without redesigning the entire data structure or performing a large amount of data migration. Compared with the traditional hierarchical management method, the mobile mechanism of this solution reduces the dependence on the preset structure. Users do not need to be restricted by fixed hierarchical relationships and can flexibly adjust the position and hierarchy of data items according to actual business scenarios, making data management more flexible and agile, and better able to adapt to the changing business environment. At the same time, this dynamic adjustment capability also supports more complex business logic, such as batch operations and cross-level movement of data items. Users can select multiple data items at one time and move them to a new location in batches by dragging and dropping, or move data items directly from one level to another without having to operate one by one. This greatly improves the efficiency of data management and reduces the time and energy required by users in the data operation process, thereby improving the overall data management efficiency, enabling users to complete data management tasks more efficiently and better meet the needs of business development.
[0058] 2. Improve user interaction experience: At the user interaction level, this solution provides an intuitive and highly interactive data operation method. Users do not need to input complex commands or cumbersome menu operations. They can reorganize the tree data structure by simply dragging the mouse. This natural interaction method greatly reduces the operational threshold of data management, allowing non-technical users to easily get started and quickly master the basic operations of data management without long-term learning and training, thereby significantly improving users' acceptance and willingness to use the data management system. In addition, the system provides clear visual feedback during the user operation process. These visual prompts can show users in real time where data items can be inserted and the expected effects after moving, helping users to accurately understand the results of data movement. This not only reduces user errors caused by improper operation, but also improves the user's expected accuracy of operation results, enhances the user's confidence and sense of control in the data management process, and further improves the user's interactive experience.
[0059] 3. Ensure data consistency and system stability: adopt the front-end and back-end synchronous update mechanism. When the user completes the drag and drop operation, not only the data display is updated instantly on the front end so that the user can intuitively see the operation results, but also the data hierarchy is updated synchronously in the back-end database. This synchronous update mechanism ensures the consistency of data at different storage and display levels, and avoids data errors and system failures caused by the mismatch between the front-end display and the back-end database data. At the same time, this application also includes error handling and rollback mechanisms. When the mobile operation fails for some reason, the system can capture the error in time and restore the data to the state before the operation through a rollback operation, thereby ensuring the stability and reliability of the system and preventing problems such as data loss or system crashes caused by operational errors. This focus on data consistency and system stability enables this application to maintain efficient and stable operation in scenarios where the data structure changes frequently. No matter how many times the user drags and drops the data, the accuracy and integrity of the data can be ensured, providing users with continuous and reliable services, ensuring business continuity and data security, which is crucial for enterprises and organizations that rely on data for decision-making and operations.
[0060] like Fig.11 As shown, the present application also provides a device, including a processor 310, a communication interface 320, a memory 330 for storing a processor executable computer program, and a communication bus 340. The processor 310, the communication interface 320, and the memory 330 communicate with each other through the communication bus 340. The processor 310 implements the above-mentioned tree structure data interactive dynamic adjustment method by running the executable computer program.
[0061] Among them, the computer program in the memory 330 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0062] The system embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, i.e., they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected based on actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art may understand and implement it without creative effort.
[0063] Through the description of the above implementation modes, those skilled in the art can clearly understand that each implementation mode can be implemented by means of software plus a necessary general hardware platform, or of course by hardware. Based on such an understanding, the above technical solution can essentially or in other words be embodied in the form of a software product that contributes to the prior art. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or some parts of the embodiment.
[0064] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A method for interactive dynamic adjustment of tree structure data, characterized in that: The method comprises: Create a hierarchical data model, configure selection checkboxes for data items in the hierarchical data model that respond to user selection operations, and build a tree list with a batch selection mechanism; Listen to and respond to the user's operation of moving data items in the tree list, dynamically record and return the number of moved data items to the user; Perform corresponding hierarchical node judgment for the data items moved by the user, and generate corresponding data item placement guidance for the moved data items; Move the data items to the target location according to the data item placement guide, and make structural changes and update the display of the tree list.
2. The interactive dynamic adjustment method for tree structure data according to claim 1, characterized in that: Creating a hierarchical data model includes: creating a hierarchical data model with a recursive structure, wherein the data items in the hierarchical data model include a unique identifier, a parent node identifier, a child node list, and a data content field, and a tree-like hierarchical relationship is constructed through the parent node identifier and the child node list.
3. The interactive dynamic adjustment method for tree structure data according to claim 1, characterized in that: Configuring selection check boxes that respond to user selection operations for data items in a hierarchical data model includes: setting a check box for each data item in the hierarchical data model through a tree selector component, binding an event processing function to each check box, and responding to user selection operations through the bound event processing function.
4. The interactive dynamic adjustment method for tree structure data according to claim 1, characterized in that: Construct a tree list with a batch selection mechanism, including: adding the data items corresponding to the selected check boxes to the node array, setting the corresponding selection status for the data items in the node array, and when the user selects a data item in the tree list, dynamically updating the selection status of the data item in the node array to dynamically select and update the check boxes of the data items in the hierarchical data model.
5. The interactive dynamic adjustment method for tree structure data according to claim 1, characterized in that: Monitor and respond to the user's operation of moving data items in the tree list, including: monitoring the user's selection, dragging and placement operations on data items, and dynamically adjusting the position of data items in the tree list according to the monitored data item coordinate changes.
6. The interactive dynamic adjustment method for tree structure data according to claim 1, characterized in that: Dynamically record and return to the user the number of data items moved, including: managing the counter in a global state, counting the number of data items moved in real time, and dynamically visualizing the number of data items moved in real time.
7. The interactive dynamic adjustment method for tree structure data according to claim 1, characterized in that: Perform corresponding hierarchical node judgment for the data item moved by the user, and generate corresponding data item placement guidance for the moved data item, including: When the user moves a data item in a tree list to another tree list, a corresponding placement guide is generated for the user to move the data item to a target location by marking the graphic and inserting the positioning graphic; When the user moves a data item in the tree list from the corresponding parent node to form an independent tree data, the coordinates of the data item are dynamically monitored, and the target position of the data item is determined based on the coordinates of the data item obtained through monitoring. By marking graphics and inserting positioning graphics, the corresponding placement guide is generated for the user to move the data item to the target position.
8. The interactive dynamic adjustment method for tree structure data according to claim 1, characterized in that: According to the data item placement guide, the data item is moved to the target position, and the tree list is structurally changed and updated. This includes: when the user moves the data item to the target position and releases it, the tree list data stored in the back-end database is updated, the updated tree list data is sent to the front-end, and the tree list hierarchical structure is updated through table rendering on the front-end.
9. A tree structure data interactive dynamic adjustment system, characterized in that: The system includes a dynamic adjustment server, and the dynamic adjustment server includes: A batch selection tree list construction module is used to create a hierarchical data model, configure a selection check box for a data item of the hierarchical data model that responds to a user selection operation, and construct a tree list with a batch selection mechanism; The data item moving monitoring and response module is used to monitor and respond to the user's operation of moving data items in the tree list, dynamically record and return the number of moved data items to the user; A data item placement guidance module is used to determine the corresponding hierarchical nodes for the data items moved by the user and generate corresponding data item placement guidance for the moved data items; The tree list change module is used to move data items to target locations according to data item placement guidance, and to make structural changes and update the display of the tree list.
10. A computer device, characterized in that: The computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the method according to any one of claims 1 to 8 when executing the program.