Tree table data processing method and device, electronic equipment and readable storage medium

By monitoring the drag and drop actions of the mouse cursor and using prediction models to dynamically render the visual prompt layer, unlimited drag and drop of tree tables and performance optimization is achieved, solving the problem of insufficient data maintenance and view convenience in the existing technology, and improving user operation experience.

CN120030020AActive Publication Date: 2025-05-23KAIYUN LIANCHUANG (BEIJING) TECH CO LTD

Patent Information

Application Number
CN202510504591.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-22
Publication Date
2025-05-23
Estimated Expiration
2045-04-22

AI Technical Summary

Technical Problem

In the prior art, tree tables have shortcomings in data maintenance and view convenience, and cannot support unlimited levels of drag and drop sorting operations. The table and tree structure data need to be maintained independently, resulting in duplicate data maintenance and inconvenient views.

Method used

By monitoring the drag action and position information of the mouse cursor, the drag end point prediction model is used to predict the end point position of the drag trajectory in real time, and preload the data elements of the end point position, dynamically render the visual prompt layer to achieve efficient drag operation of the tree table and update the data path.

Benefits of technology

It effectively solves the problems of unlimited hierarchical drag and performance optimization of tree tables, significantly improving the convenience of user operation experience and data maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120030020A_ABST
    Figure CN120030020A_ABST
Patent Text Reader

Abstract

Embodiments of the invention provide a tree form data processing method and apparatus, an electronic device and a readable storage medium. The method comprises the steps of determining selected information corresponding to a selected instruction; monitoring a dragging action of a mouse cursor, predicting a real-time terminal point position of the model through a dragging terminal point, and dynamically rendering a visual prompt layer at the same time; when monitoring that the dragging action is a stop action, determining the placed data and obtaining a data path, and when the data type of the to-be-dragged data is a combination type, obtaining a data set of a to-be-dragged combination where the to-be-dragged data is located and an index position where first data in the to-be-dragged combination is located, assigning the index position to a tail end index in a data path of the data to be dragged; and traversing data elements adjacent to the placed data in the data path of the placed data to update the key value distribution. According to the method, the defect of performance optimization in the process of executing the dragging action by the preset tree form is effectively solved, and the experience feeling in the process of operating the preset tree form by a user is remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer programs, and in particular to a tree-shaped table data processing method, device, electronic device and readable storage medium. Background Art

[0002] In the prior art, in the development of a general embedded system test platform (Embedded System Interface TestStudio, ETest), basic information can be displayed through multiple columns, and basic adding operations such as dragging and dropping can be supported. Flow control operations can also be implemented, thereby realizing a tabular programming view.

[0003] However, the tree table only provides basic functions, such as structure rendering, expansion and collapse, etc., and does not support drag-and-drop sorting operations without hierarchy restrictions. Both the table and tree structure data are derived from the database, but the data in the hierarchical control area and the table editing area need to be updated synchronously. If complex operations are required on the table and tree structure, the table and tree structure need to be two independent views, not a complete tree table view, which leads to problems such as duplication of data maintenance and inconvenient views. Summary of the invention

[0004] In response to the problems in the prior art, the present application provides a tree-shaped table data processing method and device, which can effectively solve the shortcomings of traditional technology in terms of repetitiveness of data maintenance and inconvenient views, and significantly improve data maintenance costs and view convenience.

[0005] In order to solve at least one of the above problems, the present application provides the following technical solutions: In a first aspect, the present application provides a tree table data processing method, comprising: Receiving a selection instruction for a data element in a preset tree-shaped table, and determining selection information corresponding to the selection instruction, wherein the selection information includes the data to be dragged, the data type of the data to be dragged, and the data path of the data to be dragged in the preset tree-shaped table; Monitor the dragging action and position information of the mouse cursor on the terminal device, predict the end point position of the dragging trajectory in real time through the drag end point prediction model, and preload the data elements of the end point position. During the process of the mouse cursor performing the dragging action, dynamically render the visual prompt layer according to the preset display mode, wherein the preset display mode includes real-time highlighting of the droppable area and marking the data elements affected by the dragged data with different colors; When it is detected that the dragging action is a stop action, the existing data elements are determined based on the position information, and the data elements are determined as the placed data; the data path in the preset tree table where the placed data is located is obtained, and when the data type of the data to be dragged is a combination type, the data set of the combination to be dragged where the data to be dragged is located and the index position of the first data in the combination to be dragged are obtained, and the index position is assigned to the end index in the data path of the data to be dragged; the data elements adjacent to the placed data in the data path of the placed data are traversed, and the key value distribution of each data element is updated to update the data set corresponding to the data to be dragged to the placed data according to the data path of the placed data.

[0006] Further, it also includes: receiving training data, and extracting track features of training tracks in the training data, and obtaining predicted end point coordinates based on the track features, wherein the training data includes multiple sets of training press events, training displacement vectors, and training release events of the mouse cursor, and the training track has the training press event as the starting point, the training release event as the end point, and the training displacement vector as the trajectory; Determine a prediction error between the predicted endpoint coordinates and the training endpoint coordinates in the training data, and update a model parameter of the drag endpoint prediction model based on the prediction error; The training data is batch constructed according to the preset sampling probability to increase the training difficulty of the training data.

[0007] Furthermore, it also includes: establishing a double buffer rendering channel, wherein the double buffer rendering channel includes a main channel and an auxiliary channel, the main channel is used to display the current interface of the terminal device, and the auxiliary channel is used to display the visual prompt layer in real time; Add a preset degree of hue offset to the data elements affected by the dragged data, and add a transparent effect to the current position information according to the preset transparency.

[0008] Furthermore, it also includes: obtaining the data type corresponding to the placed data; When the data type of the placed data is a combination type and the position information is outside the preset range of added sub-elements in the preset tree table, obtain the end index in the combination corresponding to the current placed data, and assign the end index in the combination corresponding to the placed data to the end index in the data path of the placed data.

[0009] Furthermore, it also includes: adding data types to each data element in the preset tree table based on the preset type setting, the data types include nested types and non-nested types, and also include combination types, wherein the priority corresponding to the combination type is higher than the priority corresponding to the nested type and the non-nested type.

[0010] Further, it also includes: determining that no data element exists based on the location information, traversing all interactive data elements in a preset detection range with the current location information as the center; When the data elements that meet the preset adsorption conditions are traversed, the display coordinates of the data elements on the terminal device are determined, the offset between the data elements and the current position information is determined based on the display coordinates, and the movement prompt information is displayed in the visual prompt layer, wherein the preset adsorption conditions include that the data type corresponding to the data element is a nested type, and the movement prompt information includes highlighting the data elements that meet the preset adsorption conditions.

[0011] Furthermore, the method further includes: determining a parent node where the data is placed, and traversing the data elements in all child nodes of the parent node in a preset order, wherein each parent node includes at least one child node, and each child node includes at least one data element; Determine the key value of each data element in the traversed child node, and update the key value corresponding to each data element based on the hierarchical depth of each data element in the data path where the data is placed; Obtain the key value range corresponding to the data set of the data to be dragged, and map the key value range to the key value space of the data path of the placed data; Based on the mapped key value space, the updated key value is adjusted according to a preset adjustment method.

[0012] In a second aspect, the present application provides a tree table data processing device, comprising: A selection module, used to receive a selection instruction for a data element in a preset tree-shaped table, and determine selection information corresponding to the selection instruction, wherein the selection information includes the data to be dragged, the data type of the data to be dragged, and the data path of the data to be dragged in the preset tree-shaped table; A monitoring module is used to monitor the dragging action and position information of the mouse cursor on the terminal device, predict the end position of the dragging trajectory in real time through a drag end prediction model, and preload the data elements of the end position. When the mouse cursor performs the dragging action, a visual prompt layer is dynamically rendered according to a preset display mode, wherein the preset display mode includes real-time highlighting of the droppable area and marking the data elements affected by the dragged data with a difference color; The processing module is used to determine the existing data elements based on the position information when the dragging action is detected to be a stop action, and determine the data elements as the placed data; obtain the data path in the preset tree table where the placed data is located, and when the data type of the data to be dragged is a combination type, obtain the data set of the combination to be dragged where the data to be dragged is located and the index position of the first data in the combination to be dragged, and assign the index position to the end index in the data path of the data to be dragged; traverse the data elements adjacent to the placed data in the data path of the placed data, and update the key value distribution of each data element, so as to update the data set corresponding to the data to be dragged to the placed data according to the data path of the placed data.

[0013] In a third aspect, the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the described method when executing the program.

[0014] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the tree table data processing method when executed by a processor.

[0015] In a fifth aspect, the present application provides a computer program product, including a computer program / instruction, which implements the steps of the tree table data processing method when executed by a processor.

[0016] It can be seen from the above technical scheme that the present application provides a tree-shaped table data processing method and device, which innovatively receives selection instructions for data elements in a preset tree-shaped table, determines the selection information corresponding to the selection instruction, wherein the selection information includes the data to be dragged, the data type of the data to be dragged, and the data path of the data to be dragged in the preset tree-shaped table, monitors the dragging action and position information of the mouse cursor on the terminal device, and predicts the end position of the dragging trajectory in real time through a drag end prediction model, which can reduce the user's manual adjustment time, optimize the dragging action experience, preload the data elements at the end position, and dynamically render a visual prompt layer according to a preset display method during the process of the mouse cursor performing the dragging action, wherein the preset display method includes real-time highlighting of the placeable area and marking the data elements affected by the data to be dragged with different colors, which can only render the display interface during the execution of the dragging action, without affecting the data elements. The method processes the elements, reduces the number of repeated renderings of the interface of the terminal device, optimizes the performance during the dragging action, and when the dragging action is detected as a stop action, determines the existing data elements based on the position information, determines the data elements as the placed data, obtains the data path in the preset tree table where the placed data is located, and when the data type of the data to be dragged is a combination type, obtains the data set of the combination to be dragged where the data to be dragged is located and the index position of the first data in the combination to be dragged, and assigns the index position to the end index in the data path of the data to be dragged, traverses the data elements adjacent to the placed data in the data path of the placed data, updates the key value distribution of each data element, and updates the data set corresponding to the data to be dragged to the placed data according to the data path of the placed data, which can realize the differentiated processing of data elements, enhance the compatibility of multiple data types, and comply with the rules of data elements. The method effectively solves the shortcomings of unlimited hierarchical dragging of the preset tree table and the optimization of performance during the dragging action, and significantly improves the user experience in the process of operating the preset tree table. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0018] Figure 1 Schematic diagram of the process of the tree table data processing method in the embodiment of the present application; Figure 2 is a structural diagram of a tree-shaped table data processing device in an embodiment of the present application; Figure 3It is a schematic diagram of the structure of an electronic device in an embodiment of the present application.

[0019] Reference numerals: Electronic device 9600, central processing unit 9100, memory 9140, communication module 9110, input unit 9120, audio processor 9130, display 9160, power supply 9170, buffer memory 9141, application / function storage unit 9142, data storage unit 9143, driver program storage unit 9144, antenna 9111, speaker 9131, microphone 9132. DETAILED DESCRIPTION

[0020] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0021] The acquisition, storage, use, and processing of data in the technical solution of this application comply with the relevant provisions of national laws and regulations.

[0022] In view of the problems existing in the prior art, the present application provides a tree-shaped table data processing method and device, which innovatively monitors the dragging action and position information of the mouse cursor on the data elements in the preset tree-shaped table on the terminal device, and inputs it into the drag end prediction model to predict the end position of the drag trajectory in real time, and preload the data elements at the end position. In the process of the mouse cursor performing the dragging action, the visual prompt layer is dynamically rendered according to the preset display mode to distinguish the data to be dragged and the data elements affected by the data to be dragged. When the dragging action is detected to be a stop action, the existing data elements are determined according to the current position information, and are determined as the placed data, and the data path of the placed data in the preset tree-shaped table is obtained. When the data type of the data to be dragged is a combination type, the index position of the data to be dragged is obtained, and the index position is assigned to the end index in the data path of the data to be dragged, the data elements adjacent to the placed data in the data path of the placed data are traversed, and the key value distribution of each data element is updated, so as to update the data set corresponding to the data to be dragged to the data path of the placed data, thereby directly updating the database of the preset tree-shaped table. The method effectively solves the inconvenience of data processing through tree tables and the incompleteness of tree table views in the prior art, significantly improves the convenience of data processing through preset tree tables, and optimizes the visualization of preset tree tables.

[0023] In order to effectively solve the inconvenience of data processing through tree tables and incomplete tree table views in the prior art, significantly improve the convenience of data processing through preset tree tables, and optimize the visualization of preset tree tables, the present application provides an embodiment of a tree table data processing method, see Figure 1 , the tree table data processing method specifically includes the following contents: Step S101: receiving a selection instruction for a data element in a preset tree-shaped table, and determining selection information corresponding to the selection instruction.

[0024] The selected information includes the data to be dragged, the data type of the data to be dragged, and the data path of the data to be dragged in a preset tree table.

[0025] Optionally, a selection instruction for a data element in a preset tree table is received, wherein the selection instruction can be triggered by a mouse click, a keyboard shortcut or other input methods.

[0026] After receiving the selection instruction, the selection information corresponding to the selection instruction is determined, wherein the selection information includes the data to be dragged, the data type of the data to be dragged, and the data path of the data to be dragged in the preset tree table.

[0027] The data to be dragged refers to the data element selected by the user and prepared to be dragged, which can be a single data element or multiple data elements. The data type of the data to be dragged is used to identify the nature of the data to be dragged, such as a combination type, a nested type, and a non-nested type. The priority of the combination type is higher than that of the nested type and the non-nested type. A combination type is for example if else (if, otherwise). Since if else appears in pairs, no other data elements can be interspersed between if and else. However, if else may be a child node of a nested type or a part of a child node. Therefore, a combination type is set to expand the compatibility of data processing.

[0028] The data path of the data to be dragged in the preset tree table describes the position of the data to be dragged in the preset tree table. The data path can be represented by a hierarchical structure, such as "root node / child node 1 / child node 1.1". The data path can be used to accurately locate and operate the data to be dragged.

[0029] Furthermore, large data can be serialized in blocks to improve overall performance.

[0030] During the data processing process, this embodiment clarifies the data to be dragged, the data path and the data type of the data to be dragged, and can accurately locate and operate the data to be dragged, avoiding erroneous operations caused by unclear data information. At the same time, the data type and data path of the data to be dragged are clarified, so that different processing strategies can be adopted according to different types of data elements and data paths, thereby improving the flexibility of operating the preset tree table. For example, when a new data type or new processing logic is required, it is sufficient to add corresponding processing rules under the existing framework without large-scale modifications, thereby improving the user experience and the flexibility of performing drag actions on the preset tree table.

[0031] Step S102: Monitor the dragging action and position information of the mouse cursor on the terminal device, predict the end position of the dragging trajectory in real time through the drag end prediction model, and preload the data elements of the end position. During the process of the mouse cursor performing the dragging action, dynamically render the visual prompt layer according to the preset display method.

[0032] Among them, the preset display methods include real-time highlighting of the droppable area and marking the data elements affected by the to-be-dragged data with different colors.

[0033] Optionally, after determining the data to be dragged according to the selected instruction, the dragging action and position information of the mouse cursor on the terminal device are monitored, wherein the monitoring of the dragging action includes pressing events, moving events and releasing events of the mouse cursor, and the position information is used to record the real-time coordinates of the mouse cursor on the terminal device.

[0034] The end point position of the drag trajectory can be predicted in real time through the drag end point prediction model. The press event, release event and position information of the mouse cursor can be input into the drag end point prediction model, and the possible end point position of the mouse cursor can be predicted through a machine learning algorithm or a physical model to obtain a real-time predicted end point position.

[0035] Furthermore, the dragging end point prediction model also outputs a prediction confidence. When the prediction confidence is greater than a preset confidence threshold, the real-time end point position corresponding to the prediction confidence is determined as the end point position.

[0036] In addition, after obtaining the end point position, the data elements of the end point position are preloaded to reduce the delay during the dragging process and improve the smoothness of the dragging action.

[0037] In addition, when the mouse cursor performs a dragging action, a visual prompt layer is dynamically rendered according to a preset display method. The preset display method includes real-time highlighting of the droppable area and marking the data elements affected by the dragged data with differential colors.

[0038] Among them, real-time highlighting of the droppable area can be based on the actual display structure of the preset tree table, and real-time highlighting of the droppable area within the preset placement range of the current position information of the mouse cursor. The droppable area is the target position that allows the user to place the data to be dragged. The highlighted display can help the user quickly identify the valid placement position to avoid invalid operations. In addition to real-time highlighting of the droppable area, the data elements affected by the data to be dragged can be marked with different colors to help the user intuitively observe the impact of the dragging action on the data elements in the preset tree table, so as to facilitate faster and more reasonable decision-making.

[0039] The droppable area included in the visual hint layer can be realized by adjusting parameters of the box shadow box-shadow, and the data elements affected by the dragged data can be realized by a Web Graphics Library (WebGL, a 3D drawing protocol) shader processor.

[0040] This embodiment can enable the user to intuitively see the possible results of the dragging action by highlighting the droppable area and the data elements affected by the difference color marking in real time. The user can see real-time feedback while performing the dragging action, understand the status of the dragging action and intuitively see the impact on the dragged data and the data to be placed, thereby completing a more accurate dragging action and reducing the possibility of misoperation.

[0041] This embodiment predicts the end point position through the drag end point prediction model and preloads the data elements of the end point position. When the user completes the dragging action, the preloading of the data elements of the end point position has been completed, which reduces the waiting time and improves the smoothness of the dragging action.

[0042] Step S103: When it is detected that the dragging action is a stop action, determine the existing data elements based on the position information, and determine the data elements as the placed data; obtain the data path in the preset tree table where the placed data is located, and when the data type of the data to be dragged is a combination type, obtain the data set of the combination to be dragged where the data to be dragged is located and the index position of the first data in the combination to be dragged, and assign the index position to the end index in the data path of the data to be dragged; traverse the data elements adjacent to the placed data in the data path of the placed data, and update the key value distribution of each data element, so as to update the data set corresponding to the data to be dragged to the placed data according to the data path of the placed data.

[0043] Optionally, when the dragging action is monitored as a stop action, the existing data elements are determined based on the position information, that is, it is necessary to determine whether there are data elements in the position information in the case of a stop action. If the data element exists, the data element is determined as the placed data, wherein the placed data is the target position selected by the user through the stop action in the dragging action to place the data to be dragged.

[0044] In addition, the data path of the placed data in the preset tree table is obtained. When the data type of the data to be dragged is a combination type, the overall data set of the combination to be dragged where the current element to be dragged is located is obtained, and the index position of the first data in the data set is determined. The index position corresponding to the first data obtained is assigned to the end index in the data path of the data to be dragged, so as to ensure that all data elements in the combination to be dragged are moved simultaneously.

[0045] Among them, the index position is the position identifier of the data in the collection, and the assignment method can be expressed by the following formula: dragPath[dragPath.length - 1].index = dragFirstIndex, wherein dragPath is used to represent the data path corresponding to the data to be dragged, dragPath.length is used to represent the length of the combination where the data to be dragged is located, that is, the number of data elements included in the combination where the data to be dragged is located, and dragFirstIndex is used to represent the index position of the first data in the combination to be dragged.

[0046] In addition, the data elements adjacent to the placed data in the data path of the placed data are traversed, and the key value distribution of the data elements is updated, wherein the key value distribution refers to the position and association relationship of the data elements in the tree structure. By updating the key value distribution, the data set corresponding to the data to be dragged can be updated to the placed data according to the data path of the placed data, thereby ensuring the integrity and consistency of the preset tree table data structure.

[0047] This embodiment assigns the index position of the first data in the combination to be dragged to the end index in the data path of the data to be dragged, so that the combination to be dragged can be moved as a whole without destroying the integrity and completeness of the combination itself, so that the dragging action on the combination to be dragged remains valid.

[0048] This embodiment traverses the data elements adjacent to the placed data in the data path of the placed data and updates their key value distribution, so as to ensure the stability of the preset tree table after the element to be dragged is placed on the placed data, thereby avoiding crashes or exceptions caused by dragging actions.

[0049] Through the above technical innovations, this embodiment effectively solves the shortcomings of the prior art in that data processing through tree tables is inconvenient and the tree table view is incomplete, significantly improves the convenience of data processing through preset tree tables, and optimizes the visualization of preset tree tables.

[0050] In some embodiments, the training process of the drag endpoint prediction model includes: Receive training data, extract track features of training tracks in the training data, and obtain predicted end point coordinates based on the track features, wherein the training data includes multiple sets of training press events, training displacement vectors, and training release events of the mouse cursor, and the training track has the training press event as the starting point, the training release event as the end point, and the training displacement vector as the trajectory; Determine a prediction error between the predicted endpoint coordinates and the training endpoint coordinates in the training data, and update a model parameter of the drag endpoint prediction model based on the prediction error; The training data is batch constructed according to the preset sampling probability to increase the training difficulty of the training data.

[0051] Optionally, during the process of training the drag endpoint prediction model, training data is received, wherein the training data includes multiple sets of training press events, training displacement vectors and training release events of the mouse cursor, the training press event is used to indicate the starting action and position of the mouse cursor when starting the dragging action, the training displacement vector is used to indicate the movement trajectory of the mouse cursor during the dragging action, including the direction and distance of each movement, and the training release event is used to indicate the endpoint position of the mouse cursor when ending the dragging.

[0052] In addition, a training track can be constructed based on the training press events, training displacement vectors and training release events. The training track is used to represent the entire path of the mouse cursor corresponding to the set of training data performing the drag action on the terminal device, wherein the training track is a path with the training press event as the starting point, the training release event as the midpoint, and the training displacement vector as the trajectory. The track features in the training track are extracted so that the drag endpoint prediction model learns the track features to learn the behavioral model of the user's drag action, thereby obtaining the predicted endpoint coordinates.

[0053] Among them, the track characteristics may include speed characteristics, acceleration characteristics and track shape characteristics. The speed characteristics are used to indicate the average speed, maximum speed and minimum speed during the execution of the dragging action. The acceleration characteristics are used to indicate the acceleration changes during the execution of the dragging action. The track shape characteristics are used to indicate the curvature, straightness, etc. of the track.

[0054] In addition, this embodiment determines the prediction error between the predicted endpoint coordinates and the training endpoint coordinates in the training data, which can be determined by the mean square error or the Euclidean distance. According to the prediction error, the parameters of the drag endpoint prediction model are updated by an optimization algorithm. The optimization algorithm may include gradient descent, etc. Through multiple iterations, the prediction error between the predicted endpoint coordinates and the training endpoint coordinates in the training data is reduced, thereby improving the accuracy of the drag endpoint prediction model.

[0055] In addition, this embodiment randomly selects a part of the training data from the training data set as the training data of the current batch according to a preset sampling device, wherein the training data set includes training press events, training position vectors and training release events of all groups. By selecting a part of the data as the training data of the current batch, the prosperity ability of the drag endpoint prediction model can be improved.

[0056] At the same time, during the training process, the sampling probability can be dynamically adjusted, for example, P∝α^0.5 for batch construction, and the sample distribution is updated every 5 rounds, where P represents the sampling probability and α represents the significance level of the training data. According to the dynamically adjusted sampling probability, the drag endpoint prediction model can pay more attention to data with larger prediction errors during the training process, thereby improving the generalization ability of the model.

[0057] Through the above technical innovations, this embodiment effectively obtains accurate endpoint coordinates from a large number of training press events, training position vectors, and training release events, and continuously makes dynamic adjustments during the training process to adapt to data of different difficulty levels, thereby improving the overall performance and robustness of the drag endpoint prediction model, and improving the accuracy and reliability of the prediction.

[0058] In some embodiments, dynamically rendering the visual prompt layer according to a preset display mode includes: Establishing a double buffer rendering channel, wherein the double buffer rendering channel includes a main channel and an auxiliary channel, the main channel is used to display the current interface of the terminal device, and the auxiliary channel is used to display the visual prompt layer in real time; Add a preset degree of hue offset to the data elements affected by the dragged data, and add a transparent effect to the current position information according to the preset transparency.

[0059] Optionally, this embodiment can establish a double-buffered rendering channel, wherein the double-buffered rendering channel includes a main channel and an auxiliary channel. The main channel is used to display the current interface of the terminal device, including common elements of the user interface, such as menus, buttons, text boxes, contents of preset tree tables, etc. The rendering content of the main channel is relatively stable and can be mainly used to provide a background environment for user operations. The auxiliary channel is used to display a visual prompt layer in real time, that is, the content of the auxiliary channel will be dynamically updated according to the real-time status of the drag action, including highlighting the droppable area, hue-shifted data elements, etc. The rendering content of the auxiliary channel is highly dynamic and needs to respond quickly to the received drag action.

[0060] The double-buffered rendering channel provided in this embodiment can effectively avoid the problems of screen flickering and rendering delay of the terminal device. The main channel maintains the stability of the interface, and the auxiliary channel focuses on the rapid update of dynamic content, thereby reducing the content required for rendering and providing users with a smooth visual experience.

[0061] In addition, a preset degree of hue shift is added to the data elements affected by the dragged data, where hue shift refers to changing the hue of the color so that the affected data elements are distinguished from the surrounding elements in color. For example, normal data elements may be displayed in gray, while affected data elements may be displayed with a red or blue shift. The preset degree of hue shift is pre-set to ensure that the visual effect is both obvious and not too glaring. For example, the hue shift may be set to a small value so that the affected elements change slightly in color, but not to the point of being inconsistent with the overall interface style.

[0062] This embodiment adds a preset degree of hue offset to the data elements affected by the data to be dragged, so that the user can quickly identify the possible impact range of the dragging action, thereby making a more reasonable operation decision.

[0063] In addition, a transparency effect is added to the current position information of the mouse cursor according to the preset transparency, that is, following the dragging action of the mouse cursor, a transparency effect is added according to the preset transparency, so that the user can see the content behind the data to be dragged, thereby maintaining the overall visual coherence of the interface. The preset transparency can be between 0 (completely transparent) and 1 (completely opaque). For example, setting the preset transparency to 0.5 makes the mouse cursor appear semi-transparent when moving.

[0064] This embodiment can highlight the real-time position of the mouse cursor by adding a transparent effect, while marking the data to be dragged, and can also prevent the data elements in the preset tree table from completely blocking other important information, thereby providing users with richer and more intuitive visual feedback.

[0065] This embodiment can render the visual prompt layer in a dynamic and intuitive manner by establishing a double-buffered rendering channel, adding hue offset and transparency effects, thereby improving the accuracy and efficiency of user operations, and enhancing the interactive experience between the user and the preset tree table, making the dragging action smoother and more natural.

[0066] In some embodiments, when the dragging action is detected to be a stop action, after determining the existing data element based on the position information and determining the data element as the placed data, the method further includes: Get the data type corresponding to the placed data; When the data type of the placed data is a combination type and the position information is outside the preset range of added sub-elements in the preset tree table, obtain the end index in the combination corresponding to the current placed data, and assign the end index in the combination corresponding to the placed data to the end index in the data path of the placed data.

[0067] Optionally, when the present embodiment detects that the dragging action is a stop action, determines an existing data element based on the position information, determines the data element as the placed data, and obtains the data type corresponding to the placed data. The data type determines the structure of the data element and the method of processing the data element. The data type includes nested types and non-nested types, and also includes combined types. The priority of the combined type is higher than the priorities corresponding to the nested type and the non-nested type.

[0068] In addition, when the data type of the placed data is a combination type, it is further determined whether the current position information is outside the preset range for adding sub-elements in the preset tree table, wherein the preset range for adding sub-elements refers to a specific area in the tree table where sub-elements are allowed to be added, which is usually used to insert new sub-items in a nested type. If the current position information is outside the preset range for adding sub-elements, it indicates that the user's intention is not to place the data to be dragged as a sub-element, but to place the data to be dragged into the nested type as its sub-element.

[0069] The preset range of adding sub-elements can be set to be 50% of the leftmost distance from the preset tree table and exceeding the width of the entire preset tree table. Otherwise, it is regarded as placing the data to be dragged below the placed data, that is, not placing it in the placed data.

[0070] In addition, obtain the end index within the combination corresponding to the currently placed data, and assign this end index to the end index in the data path of the placed data, that is, assign the index position of the last data element in the data path of the placed data, so as to ensure that the data to be dragged cannot be added to the middle of the combination of the placed data, resulting in the disorder of the data elements in the preset tree table. Here, the end index is used to represent the index position of the last data element among the data elements of this combination type. The above content can be expressed by the following formula: dropPath[dropPath.length - 1].index = dropLastIndex, where dropPath represents the data path of the placed data, dropPath.length represents the total length of the combination where the data path of the placed data is located, and dropLastIndex is used to represent the index position of the last data element in the combination type corresponding to the placed data.

[0071] Through the above technological innovation in this embodiment, when the drag action is a stop action, the data to be dragged can be processed according to the data type of the placed data, so as to ensure the correct placement and update of each data element in the preset tree table, improve the accuracy of data operations, enhance the interaction experience between the user and the preset tree table, and make the drag action more intuitive and efficient.

[0072] In some embodiments, before receiving the selection instruction for the data elements in the preset tree table, it further includes: Based on the preset type, add data types to each data element in the preset tree table. The data types include nestable types and non-nestable types, and also include combination types. Among them, the priority corresponding to the combination type is higher than the priorities corresponding to the nestable types and non-nestable types.

[0073] Optionally, before receiving the selection instruction for the data elements in the preset tree table in this embodiment, according to the preset type, add data types to each data element in the preset tree table. The data types include nestable types and non-nestable types, and also include combination types. The priority corresponding to the combination type is higher than the priorities corresponding to the nestable types and non-nestable types. For example, the data type corresponding to a certain data element is a nestable type, but it includes an if-else combination (i.e., a combination type). Then, the data in the if-else combination cannot be nested, and the other data elements included in this nestable type are still nestable types, that is, sub-elements can be added to this nestable type.

[0074] Among them, the nestable type may include other data elements as its child nodes. For example, in a preset tree table, the data type of a certain parent node is the nestable type, and its parent node includes multiple child nodes. Child nodes (i.e., the sub-elements in the above text) can be added to it, while the non-nestable type indicates that no child nodes (i.e., the sub-elements in the above text) can be added to the current data element.

[0075] For example, a data type can be added to each row of data elements in the preset tree table, and a type field is added. The value can be item or group. Group is used to represent the nestable type, and item is used to represent the non-nestable type. The combined type can be denoted as groupType, and its value is the combined name id with a unique identifier.

[0076] Furthermore, a groupPosition type can be added, and its value can be first, middle, or last, which is used to style the page of the preset tree table.

[0077] Through the above innovative technologies in this embodiment, by setting corresponding data types for each data element, corresponding drag actions can be taken according to different data types, the behavior and interaction of data elements can be managed more precisely, and thus the flexibility and scalability of the preset tree table can be improved.

[0078] In some embodiments, after it is detected that the drag action is a stop action, it further includes: Based on the position information, it is determined that there is no data element, and all interactive data elements are traversed within a preset detection range centered on the current position information; When a data element that meets the preset adsorption condition is obtained through traversal, the display coordinates of the data element on the terminal device are determined, the offset between the display coordinates and the current position information is determined, and a moving prompt message is displayed in the visualization prompt layer. Among them, the preset adsorption condition includes that the data type corresponding to the data element is the nestable type, and the moving prompt message includes highlighting the data element that meets the preset adsorption condition.

[0079] Optionally, in the implementation process of this application embodiment, when it is detected that the drag action is a stop action, it is determined whether there is a data element according to the position information of the current mouse cursor. If there is no data element at the current position information, all interactive data elements are traversed within a predicted detection range centered on the current position information. Among them, the preset detection range is a predefined area used to determine the data elements that can be interacted with around the current position information. For example, the preset detection range can be a rectangular area or a circular area centered on the current position information, and its size can be adjusted according to actual needs.

[0080] In addition, when the traversal obtains data elements that meet the adsorption conditions within the preset detection range, the display coordinates of the data element on the terminal device are determined, wherein the preset adsorption conditions include that the data type corresponding to the data element is a nested type, and the display coordinates are the position where the data element is displayed on the terminal device. For example, in a preset tree table, data elements of the nestable type can be used as placed data, while data elements of the non-nested type cannot be used as placed data.

[0081] In addition, according to the display coordinates of the data element, the offset between the current position information and the display coordinates of the data element that meets the preset adsorption condition is determined, wherein the offset represents the distance and direction between the current position information and the display coordinates.

[0082] In addition, in the visual prompt layer, movement prompt information is displayed based on the current position information, display coordinates and offset to inform the user of the specific location where the data to be dragged can be placed. The movement prompt information includes highlighting the data elements that meet the preset adsorption conditions, so that the user can intuitively see the location where the data to be dragged can be placed, thereby confirming whether the operation is as expected.

[0083] This embodiment implements checking whether there is a data element at the current position when the dragging action stops, so as to ensure the correct placement of the data to be dragged. If there is no data element at the current position information, further measures need to be taken to find suitable data to be placed.

[0084] This embodiment realizes that by traversing data elements within a preset detection range, placed data that meets preset adsorption conditions can be quickly found, avoiding wasting time on invalid searches, wherein the size of the preset detection range can be adjusted according to actual needs to balance search efficiency and accuracy.

[0085] This embodiment implements the screening of data elements by preset adsorption conditions, which can avoid placing the data to be dragged on data elements that do not support nesting, thereby maintaining the integrity and consistency of the data structure of the preset tree table.

[0086] This embodiment provides the user with an intuitive visual feedback by displaying moving prompt information to help the user confirm the placed data where the dragged data will be placed. Highlighting the data elements that meet the preset adsorption conditions can attract the user's attention, allowing the user to quickly identify the placed data that meets the preset adsorption conditions, thereby improving the accuracy of the dragging action and enhancing the user's interactive experience.

[0087] Through the above technical innovations, this embodiment ensures that the data to be dragged can be correctly placed in the appropriate position and provides intuitive visual feedback to the user, thereby improving the accuracy and efficiency of data processing, enhancing the user-friendliness of the preset tree table, and making the dragging action more natural and intuitive.

[0088] In some embodiments, traversing adjacent data elements in the data path where the data is placed and recalculating the key value distribution of each data element includes: Determine the parent node where the data is placed, and traverse the data elements in all child nodes of the parent node in a preset order, wherein each parent node includes at least one child node, and each child node includes at least one data element; Determine the key value of each data element in the traversed child node, and update the key value corresponding to each data element based on the hierarchical depth of each data element in the data path where the data is placed; Obtain the key value range corresponding to the data set of the data to be dragged, and map the key value range to the key value space of the data path of the placed data; Based on the mapped key value space, the updated key value is adjusted according to a preset adjustment method.

[0089] Optionally, this embodiment determines the parent node of the placed data, wherein the parent node is the upper node of the placed data in the tree structure, including the placed data and its adjacent data elements, and traverses the data elements in all child nodes of the parent node in a preset order, wherein the preset order can be an insertion order or a hierarchical order of the nodes, each parent node contains at least one child node, and each child node contains at least one data element.

[0090] In addition, during the traversal process, the key value of each data element in each traversed child node is determined, wherein the key value is a unique identifier of the data element in a preset tree table, including the location information and hierarchical relationship of the data element.

[0091] In addition, the key value corresponding to each data element is updated according to the hierarchical depth of each data element in the data path where the data is placed, wherein the hierarchical depth refers to the hierarchical position of the data element in the preset tree table, for example, the hierarchical depth of the root node is 0, the hierarchical depth of its direct child node is 1, and so on. By considering the hierarchical depth, it can be ensured that the update of the key value conforms to the logical relationship of the preset tree table, thereby maintaining the consistency of the data structure.

[0092] In addition, the key value range corresponding to the data set of the data to be dragged is obtained, wherein the key value range represents the minimum and maximum key values ​​of all data elements in the data set to be dragged, that is, the position range of the data set to be dragged in the preset tree table.

[0093] Map the key value range to the key value space of the data path of the placed data, where the key value space refers to the range occupied by the key values ​​of the placed data and its adjacent data elements, that is, the position range of the placed data and its adjacent data elements in the preset tree table. By mapping the key value range to the key value space, the continuity and consistency of the key value distribution of the data set to be dragged on the placed data can be ensured.

[0094] In addition, according to the mapped key value space, the updated key value is adjusted according to a preset adjustment method, which is a set of predefined rules for ensuring that the update and adjustment of the key value conforms to the logical relationship and data consistency requirements of the preset tree table. For example, the adjustment method may include reallocating key values, adjusting the size of key values, or sequential operations to ensure that the distribution of key values ​​is reasonable and effective.

[0095] Through the above technical innovations, this embodiment can recalculate and adjust the key value distribution of the placed data and its adjacent data elements after the dragging action is completed, thereby improving the accuracy and efficiency of the dragging action, and enhancing the stability and reliability of the preset tree table, providing users with a more stable and efficient interactive environment.

[0096] In order to effectively solve the problem of unlimited-level dragging of a preset tree-shaped table and the performance optimization during the dragging action, the present application provides an embodiment of a tree-shaped table data processing device for implementing all or part of the contents of the tree-shaped table data processing method, see Figure 2 The tree table data processing device specifically includes the following contents: The selection module 10 is used to receive a selection instruction for a data element in a preset tree table, and determine the selection information corresponding to the placed data selection instruction, wherein the placed data selection information includes the data to be dragged, the data type of the placed data to be dragged, and the data path of the placed data to be dragged in the preset tree table of the placed data; The monitoring module 20 is used to monitor the dragging action and position information of the mouse cursor on the terminal device, predict the end position of the dragging trajectory in real time through the drag end prediction model, and preload the data elements at the end position, and dynamically render the visual prompt layer according to the preset display mode when the mouse cursor of the placed data performs the dragging action of the placed data, wherein the preset display mode of the placed data includes real-time highlighting of the droppable area and marking the data elements of the placed data to be dragged by the differential color. The processing module 30 is configured to, when it is monitored that the drag action of the placed data is a stop action, determine the existing data elements based on the position information of the placed data, and determine the data elements as the placed data; obtain the data path of the placed data in the preset tree-shaped table where the placed data is located. When the data type of the data to be dragged of the placed data is a combined type, obtain the data set of the combination to be dragged where the data to be dragged of the placed data is located and the index position of the first data in the combination to be dragged of the placed data, and assign the index position of the placed data to the end index in the data path of the data to be dragged of the placed data; traverse the data elements adjacent to the placed data in the data path of the placed data, and update the key value distribution of each data element, so as to update the data set corresponding to the data to be dragged of the placed data to the placed data according to the data path of the placed data.

[0097] From the above description, it can be seen that the tree-shaped table data processing device provided in the embodiment of the present application can determine the selection information corresponding to the selection instruction by innovatively receiving the selection instruction for the data elements in the preset tree-shaped table, wherein the selection information includes the data to be dragged, the data type of the data to be dragged and the data path of the data to be dragged in the preset tree-shaped table, monitor the dragging action and position information of the mouse cursor on the terminal device, and predict the end position of the dragging trajectory in real time through the drag end prediction model, which can reduce the time of manual adjustment by the user, optimize the experience of the dragging action, preload the data elements at the end position, and dynamically render the visual prompt layer according to the preset display method during the process of the mouse cursor performing the dragging action, wherein the preset display method includes real-time highlighting of the placeable area and marking the data elements affected by the data to be dragged with different colors, and can only render the display interface during the execution of the dragging action without affecting the data elements. The method processes the elements, reduces the number of repeated renderings of the interface of the terminal device, optimizes the performance during the dragging action, and when the dragging action is detected as a stop action, determines the existing data elements based on the position information, determines the data elements as the placed data, obtains the data path in the preset tree table where the placed data is located, and when the data type of the data to be dragged is a combination type, obtains the data set of the combination to be dragged where the data to be dragged is located and the index position of the first data in the combination to be dragged, and assigns the index position to the end index in the data path of the data to be dragged, traverses the data elements adjacent to the placed data in the data path of the placed data, updates the key value distribution of each data element, and updates the data set corresponding to the data to be dragged to the placed data according to the data path of the placed data, which can realize the differentiated processing of data elements, enhance the compatibility of multiple data types, and comply with the rules of data elements. The method effectively solves the shortcomings of unlimited hierarchical dragging of the preset tree table and the optimization of performance during the dragging action, and significantly improves the user experience in the process of operating the preset tree table.

[0098] From the hardware level, in order to effectively solve the problem of unlimited-level dragging of a preset tree-shaped table and the performance optimization during the dragging action, and significantly improve the user experience during the operation of the preset tree-shaped table, the present application provides an embodiment of an electronic device that includes all or part of the contents of the tree-shaped table data processing method, and the electronic device specifically includes the following contents: Processor, memory, communication interface and bus; wherein the processor, memory and communication interface communicate with each other through the bus; the communication interface is used to realize information transmission between the tree-shaped table data processing device and related devices such as the core business system, user terminal and related database; the logic controller can be a desktop computer, a tablet computer and a mobile terminal, etc., but the present embodiment is not limited thereto. In the present embodiment, the logic controller can be implemented with reference to the embodiment of the tree-shaped table data processing method and the embodiment of the base tree-shaped table data processing device in the embodiment, and the contents thereof are incorporated herein, and the repeated parts are not repeated.

[0099] It is understandable that the user terminal may include a smart phone, a tablet electronic device, a network set-top box, a portable computer, a desktop computer, a personal digital assistant (PDA), a vehicle-mounted device, a smart wearable device, etc. Among them, the smart wearable device may include smart glasses, a smart watch, a smart bracelet, etc.

[0100] In practical applications, part of the tree table data processing method can be executed on the electronic device side as described above, or all operations can be completed in the client device. The selection can be made based on the processing capability of the client device and the limitations of the user's usage scenario. This application does not limit this. If all operations are completed in the client device, the client device may also include a processor.

[0101] The client device may have a communication module (i.e., a communication unit) that can communicate with a remote server to achieve data transmission with the server. The server may include a server on the task scheduling center side, and other implementation scenarios may also include a server on an intermediate platform, such as a server on a third-party server platform that has a communication link with the task scheduling center server. The server may include a single computer device, or a server cluster consisting of multiple servers, or a server structure of a distributed device.

[0102] Figure 3 FIG. 9 is a schematic block diagram of the system structure of the electronic device 9600 according to an embodiment of the present application. Figure 3 As shown, the electronic device 9600 may include a central processor 9100 and a memory 9140; the memory 9140 is coupled to the central processor 9100. It is worth noting that Figure 3 is exemplary; other types of structures may also be used to supplement or replace this structure to implement telecommunication functions or other functions.

[0103] In one embodiment, the tree table data processing method function may be integrated into the central processing unit 9100. The central processing unit 9100 may be configured to perform the following control: Step S101: receiving a selection instruction for a data element in a preset tree table, and determining selection information corresponding to the selection instruction, wherein the selection information includes the data to be dragged, the data type of the data to be dragged, and the data path of the data to be dragged in the preset tree table; Step S102: monitoring the dragging action and position information of the mouse cursor on the terminal device, predicting the end position of the dragging trajectory in real time through a drag end prediction model, and preloading data elements of the end position, and dynamically rendering a visual prompt layer according to a preset display mode during the process of the mouse cursor performing the dragging action, wherein the preset display mode includes real-time highlighting of the droppable area and marking the data elements affected by the to-be-dragged data with a difference color; Step S103: When it is detected that the dragging action is a stop action, determine the existing data elements based on the position information, and determine the data elements as the placed data; obtain the data path in the preset tree table where the placed data is located, and when the data type of the data to be dragged is a combination type, obtain the data set of the combination to be dragged where the data to be dragged is located and the index position of the first data in the combination to be dragged, and assign the index position to the end index in the data path of the data to be dragged; traverse the data elements adjacent to the placed data in the data path of the placed data, and update the key value distribution of each data element, so as to update the data set corresponding to the data to be dragged to the placed data according to the data path of the placed data.

[0104] From the above description, it can be seen that the electronic device provided in the embodiment of the present application innovatively receives the selection instruction for the data elements in the preset tree table, determines the selection information corresponding to the selection instruction, wherein the selection information includes the data to be dragged, the data type of the data to be dragged and the data path of the data to be dragged in the preset tree table, monitors the dragging action and position information of the mouse cursor on the terminal device, and predicts the end position of the dragging trajectory in real time through the drag end prediction model, which can reduce the time of manual adjustment by the user, optimize the experience of the dragging action, preload the data elements at the end position, and dynamically render the visual prompt layer according to the preset display mode during the process of the mouse cursor performing the dragging action, wherein the preset display mode includes real-time highlighting of the placeable area and marking the data elements affected by the data to be dragged with different colors, and can only render the display interface during the execution of the dragging action without processing the data elements. The method reduces the number of repeated renderings of the interface of the terminal device and optimizes the performance during the dragging action. When the dragging action is detected as a stop action, the existing data elements are determined based on the position information, and the data elements are determined as the placed data. The data path in the preset tree table where the placed data is located is obtained. When the data type of the data to be dragged is a combination type, the data set of the combination to be dragged where the data to be dragged is located and the index position of the first data in the combination to be dragged are obtained, and the index position is assigned to the end index in the data path of the data to be dragged. The data elements adjacent to the placed data in the data path of the placed data are traversed, and the key value distribution of each data element is updated to update the data set corresponding to the data to be dragged to the placed data according to the data path of the placed data. The data elements can be differentiated, the compatibility of multiple data types is enhanced, and the rules of data elements are met. The method effectively solves the shortcomings of the unlimited level dragging of the preset tree table and the optimization of the performance during the dragging action, and significantly improves the user experience in the process of operating the preset tree table.

[0105] In another embodiment, the tree table data processing device can be configured separately from the central processing unit 9100. For example, the tree table data processing can be configured as a chip connected to the central processing unit 9100, and the tree table data processing method function can be implemented under the control of the central processing unit.

[0106] like Figure 3 As shown, the electronic device 9600 may also include: a communication module 9110, an input unit 9120, an audio processor 9130, a display 9160, and a power supply 9170. It is worth noting that the electronic device 9600 does not necessarily have to include Figure 3 In addition, the electronic device 9600 may also include Figure 3 For components not shown, reference may be made to the prior art.

[0107] like Figure 3 As shown, the central processing unit 9100 is sometimes also referred to as a controller or an operation control, and may include a microprocessor or other processor device and / or logic device. The central processing unit 9100 receives input and controls the operation of various components of the electronic device 9600.

[0108] The memory 9140 may be, for example, one or more of a cache, a flash memory, a hard drive, a removable medium, a volatile memory, a non-volatile memory or other suitable devices. The above-mentioned information related to the failure may be stored, and a program for executing the relevant information may also be stored. The CPU 9100 may execute the program stored in the memory 9140 to implement information storage or processing, etc.

[0109] The input unit 9120 provides input to the central processing unit 9100. The input unit 9120 is, for example, a key or a touch input device. The power supply 9170 is used to provide power to the electronic device 9600. The display 9160 is used to display display objects such as images and texts. The display may be, for example, an LCD display, but is not limited thereto.

[0110] The memory 9140 may be a solid-state memory, such as a read-only memory (ROM), a random access memory (RAM), a SIM card, etc. It may also be a memory that saves information even when the power is off, can be selectively erased, and is provided with more data, examples of which are sometimes referred to as EPROMs, etc. The memory 9140 may also be some other type of device. The memory 9140 includes a buffer memory 9141 (sometimes referred to as a buffer). The memory 9140 may include an application / function storage unit 9142, which is used to store application programs and function programs or processes for executing the operation of the electronic device 9600 through the central processor 9100.

[0111] The memory 9140 may also include a data storage unit 9143 for storing data, such as contacts, digital data, pictures, sounds, and / or any other data used by the electronic device. The driver storage unit 9144 of the memory 9140 may include various drivers for communication functions of the electronic device and / or for executing other functions of the electronic device (such as messaging applications, address book applications, etc.).

[0112] The communication module 9110 is a transmitter / receiver that sends and receives signals via the antenna 9111. The communication module 9110 (transmitter / receiver) is coupled to the central processor 9100 to provide input signals and receive output signals, which may be the same as the case of a conventional mobile communication terminal.

[0113] Based on different communication technologies, multiple communication modules 9110 may be provided in the same electronic device, such as a cellular network module, a Bluetooth module and / or a wireless LAN module. The communication module 9110 (transmitter / receiver) is also coupled to a speaker 9131 and a microphone 9132 via an audio processor 9130 to provide an audio output via the speaker 9131 and receive an audio input from the microphone 9132, thereby realizing a common telecommunication function. The audio processor 9130 may include any suitable buffer, decoder, amplifier, etc. In addition, the audio processor 9130 is also coupled to the central processor 9100, so that recording can be performed on the local machine through the microphone 9132, and the sound stored on the local machine can be played through the speaker 9131.

[0114] The embodiments of the present application also provide a computer-readable storage medium capable of implementing all the steps of the tree-shaped table data processing method in the above embodiments, where the execution subject is a server or a client. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, all the steps of the tree-shaped table data processing method in the above embodiments are implemented. For example, when the processor executes the computer program, the following steps are implemented: Step S101: receiving a selection instruction for a data element in a preset tree table, and determining selection information corresponding to the selection instruction, wherein the selection information includes the data to be dragged, the data type of the data to be dragged, and the data path of the data to be dragged in the preset tree table; Step S102: monitoring the dragging action and position information of the mouse cursor on the terminal device, predicting the end position of the dragging trajectory in real time through a drag end prediction model, and preloading data elements of the end position, and dynamically rendering a visual prompt layer according to a preset display mode during the process of the mouse cursor performing the dragging action, wherein the preset display mode includes real-time highlighting of the droppable area and marking the data elements affected by the to-be-dragged data with a difference color; Step S103: When it is detected that the dragging action is a stop action, determine the existing data elements based on the position information, and determine the data elements as the placed data; obtain the data path in the preset tree table where the placed data is located, and when the data type of the data to be dragged is a combination type, obtain the data set of the combination to be dragged where the data to be dragged is located and the index position of the first data in the combination to be dragged, and assign the index position to the end index in the data path of the data to be dragged; traverse the data elements adjacent to the placed data in the data path of the placed data, and update the key value distribution of each data element, so as to update the data set corresponding to the data to be dragged to the placed data according to the data path of the placed data.

[0115] As can be seen from the above description, the computer-readable storage medium provided by the embodiments of the present application innovatively receives a selection instruction for a data element in a preset tree table, determines the selection information corresponding to the selection instruction, where the selection information includes the data to be dragged, the data type of the data to be dragged, and the data path of the data to be dragged in the preset tree table, monitors the dragging action and position information of the mouse cursor on the terminal device, and uses a dragging end prediction model to predict the end position of the dragging trajectory in real time, which can reduce the time for users to manually adjust and optimize the experience of the dragging action. Preload the data elements at the end position. During the process of the mouse cursor performing the dragging action, a visual prompt layer is dynamically rendered according to a preset display method, where the preset display method includes highlighting the droppable area in real time and marking the data elements affected by the data to be dragged with different colors. It can only render the display interface during the execution of the dragging action without processing the data elements, reducing the number of repeated renders of the interface of the terminal device and optimizing the performance during the execution of the dragging action. When it is detected that the dragging action is a stop action, based on the position information, determine the existing data elements, determine the data elements as the dropped data, obtain the data path of the dropped data in the preset tree table, when the data type of the data to be dragged is a combined type, obtain the data set of the dragged combination where the data to be dragged is located and the index position of the first data in the dragged combination, and assign the index position to the end index in the data path of the data to be dragged. Traverse the data elements adjacent to the dropped data in the data path of the dropped data, and update the key value distribution of each data element to update the data set corresponding to the data to be dragged to the dropped data according to the data path of the dropped data, which can achieve differential processing of data elements, enhance the compatibility of multiple data types, and conform to the rules of data elements. This method effectively solves the problem of unlimited-level dragging of the preset tree table and the deficiency in optimizing the performance during the execution of the dragging action, and significantly improves the user experience during the operation of the preset tree table.

[0116] An embodiment of the present application also provides a computer program product that can implement all steps of the tree table data processing method with the execution subject being a server or a client in the above embodiments. When the computer program / instructions are executed by a processor, the steps of the tree table data processing method are implemented. For example, the computer program / instructions implement the following steps: Step S101: Receive a selection instruction for a data element in a preset tree table, and determine the selection information corresponding to the selection instruction, where the selection information includes the data to be dragged, the data type of the data to be dragged, and the data path of the data to be dragged in the preset tree table; Step S102: monitoring the dragging action and position information of the mouse cursor on the terminal device, predicting the end position of the dragging trajectory in real time through a drag end prediction model, and preloading data elements of the end position, and dynamically rendering a visual prompt layer according to a preset display mode during the process of the mouse cursor performing the dragging action, wherein the preset display mode includes real-time highlighting of the droppable area and marking the data elements affected by the to-be-dragged data with a difference color; Step S103: When it is detected that the dragging action is a stop action, determine the existing data elements based on the position information, and determine the data elements as the placed data; obtain the data path in the preset tree table where the placed data is located, and when the data type of the data to be dragged is a combination type, obtain the data set of the combination to be dragged where the data to be dragged is located and the index position of the first data in the combination to be dragged, and assign the index position to the end index in the data path of the data to be dragged; traverse the data elements adjacent to the placed data in the data path of the placed data, and update the key value distribution of each data element, so as to update the data set corresponding to the data to be dragged to the placed data according to the data path of the placed data.

[0117] As can be seen from the above description, the computer program product provided by the embodiments of the present application innovatively receives a selection instruction for data elements in a preset tree table, determines the selection information corresponding to the selection instruction, where the selection information includes the data to be dragged, the data type of the data to be dragged, and the data path of the data to be dragged in the preset tree table, monitors the dragging action and position information of the mouse cursor on the terminal device, and uses a dragging end prediction model to predict the end position of the dragging trajectory in real time, which can reduce the time for users to manually adjust and optimize the experience of the dragging action. It preloads the data elements at the end position, and during the process of the mouse cursor performing the dragging action, dynamically renders a visual prompt layer according to a preset display method, where the preset display method includes highlighting the droppable area in real time and marking the data elements affected by the data to be dragged with different colors. It can only render the display interface during the execution of the dragging action without processing the data elements, reducing the number of repeated renderings of the interface of the terminal device and optimizing the performance during the execution of the dragging action. When it is detected that the dragging action is a stop action, based on the position information, the existing data elements are determined, and the data elements are determined as the dropped data. The data path of the dropped data in the preset tree table is obtained. When the data type of the data to be dragged is a combined type, the data set of the dragging combination where the data to be dragged is located and the index position of the first data in the dragging combination are obtained, and the index position is assigned to the end index in the data path of the data to be dragged. The data elements adjacent to the dropped data in the data path of the dropped data are traversed, and the key value distribution of each data element is updated to update the data set corresponding to the data to be dragged to the dropped data according to the data path of the dropped data, which can realize the differential processing of data elements, enhance the compatibility of multiple data types, and conform to the rules of data elements. This method effectively solves the problem of unlimited-level dragging of the preset tree table and the deficiency in optimizing the performance during the execution of the dragging action, and significantly improves the user experience during the operation of the preset tree table.

[0118] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a device, or a computer program product. Therefore, the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0119] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (apparatus), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0120] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0121] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0122] The present invention uses specific embodiments to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A tree table data processing method, characterized in that: The method comprises: Receiving a selection instruction for a data element in a preset tree table, and determining selection information corresponding to the selection instruction, wherein the selection information includes the data to be dragged, the data type of the data to be dragged, and the data path of the data to be dragged in the preset tree table; Monitor the dragging action and position information of the mouse cursor on the terminal device, predict the end position of the dragging trajectory in real time through a drag end prediction model, and preload the data element at the end position, and dynamically render a visual prompt layer according to a preset display mode when the mouse cursor performs the dragging action, wherein the preset display mode includes real-time highlighting of the droppable area and marking the data elements affected by the data to be dragged by using a difference color; When it is detected that the dragging action is a stop action, the data element that exists is determined based on the position information, and the data element is determined as the placed data; the data path in the preset tree table where the placed data is located is obtained, and when the data type of the data to be dragged is a combination type, the data set of the combination to be dragged where the data to be dragged is located and the index position of the first data in the combination to be dragged are obtained, and the index position is assigned to the end index in the data path of the data to be dragged; the data elements adjacent to the placed data in the data path of the placed data are traversed, and the key value distribution of each data element is updated, so as to update the data set corresponding to the data to be dragged to the placed data according to the data path of the placed data.

2. The method according to claim 1, characterized in that The training process of the drag endpoint prediction model includes: Receive training data, extract track features of training tracks in the training data, and obtain predicted end point coordinates based on the track features, wherein the training data includes multiple sets of training press events, training displacement vectors, and training release events of the mouse cursor, and the training track has the training press event as a starting point, the training release event as an end point, and the training displacement vector as a trajectory; Determining a prediction error between the predicted endpoint coordinates and the training endpoint coordinates in the training data, and updating model parameters of the drag endpoint prediction model based on the prediction error; The training data is batch constructed according to a preset sampling probability to increase the training difficulty of the training data.

3. The method according to claim 1, characterized in that: The dynamically rendering the visual prompt layer according to the preset display mode includes: Establishing a double-buffered rendering channel, wherein the double-buffered rendering channel includes a main channel and an auxiliary channel, the main channel is used to display the current interface of the terminal device, and the auxiliary channel is used to display the visual prompt layer in real time; A preset degree of hue offset is added to the data element affected by the to-be-dragged data, and a transparent effect is added to the current position information according to a preset transparency.

4. The method according to claim 1, characterized in that In the case where the dragging action is detected to be a stop action, after determining the existing data element based on the position information and determining the data element as the placed data, the method further includes: Obtaining the data type corresponding to the placed data; When the data type of the placed data is a combination type and the position information is outside the preset range of added sub-elements in the preset tree table, the end index in the combination corresponding to the current placed data is obtained, and the end index in the combination corresponding to the placed data is assigned to the end index in the data path of the placed data.

5. The method according to claim 1, characterized in that Before receiving the selection instruction for the data element in the preset tree table, the method further includes: Based on the preset type setting, a data type is added to each data element in the preset tree table, and the data type includes a nestable type and a non-nested type, and also includes a combination type, wherein the priority corresponding to the combination type is higher than the priorities corresponding to the nestable type and the non-nested type.

6. The method according to claim 1, characterized in that When the dragging action is detected as a stop action, the method further includes: Determining based on the location information that the data element does not exist, traversing all interactive data elements within a preset detection range with the current location information as the center; When traversing and obtaining data elements that meet the preset adsorption conditions, the display coordinates of the data elements on the terminal device are determined, the offset between the data elements and the current position information is determined based on the display coordinates, and movement prompt information is displayed in the visual prompt layer, wherein the preset adsorption conditions include that the data type corresponding to the data element is a nested type, and the movement prompt information includes highlighting the data elements that meet the preset adsorption conditions.

7. The method according to claim 1, characterized in that The traversing adjacent data elements in the data path where the data is placed and recalculating the key value distribution of each of the data elements includes: Determine the parent node where the data is placed, and traverse the data elements in all child nodes of the parent node in a preset order, wherein each parent node includes at least one child node, and each child node includes at least one data element; Determine the key value of each of the data elements in the traversed child nodes, and update the key value corresponding to each of the data elements based on the hierarchical depth of each of the data elements in the data path where the data is placed; Acquire the key value range corresponding to the data set of the to-be-dragged data, and map the key value range to the key value space of the data path of the placed data; Based on the mapped key value space, the updated key value is adjusted according to a preset adjustment method.

8. A tree table data processing device, characterized in that: The device comprises: A selection module, used to receive a selection instruction for a data element in a preset tree-shaped table, and determine selection information corresponding to the selection instruction, wherein the selection information includes the data to be dragged, the data type of the data to be dragged, and the data path of the data to be dragged in the preset tree-shaped table; A monitoring module, used to monitor the dragging action and position information of the mouse cursor on the terminal device, predict the end position of the dragging trajectory in real time through a drag end prediction model, and preload the data element at the end position, and dynamically render a visual prompt layer according to a preset display mode when the mouse cursor performs the dragging action, wherein the preset display mode includes real-time highlighting of the droppable area and marking the data elements affected by the data to be dragged by using a difference color; A processing module is used to, when it is detected that the dragging action is a stop action, determine the existing data element based on the position information, and determine the data element as the placed data; obtain the data path in the preset tree table where the placed data is located, and when the data type of the data to be dragged is a combination type, obtain the data set of the combination to be dragged where the data to be dragged is located and the index position of the first data in the combination to be dragged, and assign the index position to the end index in the data path of the data to be dragged; traverse the data elements adjacent to the placed data in the data path of the placed data, and update the key value distribution of each data element, so as to update the data set corresponding to the data to be dragged to the placed data according to the data path of the placed data.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the tree table data processing method according to any one of claims 1 to 7 are implemented.

10. A readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the tree table data processing method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Method for reducing dragging delay on embedded device through contact prediction

    CN102929433A

  • Data visualization realization system and method

    CN107844297A

  • Big data task draggable modeling method and system, storage medium and terminal

    CN113821200A

  • Object dragging method and device

    CN115516413A

  • Drag-based prediction model generation method, data set prediction method and device

    CN116931777A

Cited By

  • Dragging operation processing method and device, equipment and medium

    CN121165997A

  • A drag operation processing method, device, equipment and medium

    CN121165997B

  • Table data printing method and device and readable storage medium

    CN121455431A