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

By predicting the drag endpoint in real time and dynamically rendering a visual prompt layer, the inconvenience of dragging and sorting in tree tables is solved, efficient data maintenance and view optimization are achieved, and the user operation experience is improved.

CN120030020BActive Publication Date: 2025-09-30KAIYUN LIANCHUANG (BEIJING) TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In the existing technology, tree tables do not support unlimited level drag and drop sorting operations in embedded system test platforms, resulting in high data maintenance repetitiveness and inconvenient views. The table and tree structure need to be two independent views, and a complete tree table view cannot be achieved.

Method used

By monitoring the dragging action and position information of the mouse cursor on the terminal device, using the drag endpoint prediction model to predict the end point position of the drag trajectory in real time, dynamically rendering the visual prompt layer, optimizing the performance during the dragging action, and updating the data path and key value distribution when the dragging stops, it supports dragging operations of combined type data.

Benefits of technology

The drag-and-drop operation experience of the tree table has been optimized, which reduces the user's manual adjustment time, improves the convenience of data processing and the convenience of the view, and enhances the compatibility of multiple data types and the regularity of data elements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120030020B_ABST
    Figure CN120030020B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a tree table data processing method, device, electronic device and readable storage medium, which determines the selected information corresponding to the selected instruction; monitors the dragging action of the mouse cursor, predicts the real-time end point position through the drag end point prediction model, and dynamically renders a visual prompt layer; when the dragging action is detected to be a stop action, determines the placed data and obtains the data path, 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 to update the key value distribution. This method effectively solves the shortcomings in performance optimization in the process of executing the drag action of the preset tree table, and significantly improves the user experience in the process of operating the preset tree table.
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 existing technology, 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:

[0006] In a first aspect, the present application provides a tree-shaped table data processing method, comprising:

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

[0008] Monitor the dragging action and position of the mouse cursor on the terminal device, predict the end point of the drag trajectory in real time through a drag end point prediction model, and preload the data elements at the end point. During the dragging action of the mouse cursor, dynamically render a visual prompt layer according to a preset display method, where the preset display method includes real-time highlighting of the droppable area and marking the data elements affected by the dragged data with different colors;

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

[0010] Furthermore, the method further includes: receiving training data, extracting track features of a training track 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 a 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;

[0011] Determine the prediction error between the predicted endpoint coordinates and the training endpoint coordinates in the training data, and update the model parameters of the drag endpoint prediction model based on the prediction error;

[0012] The training data is batch constructed according to the preset sampling probability to increase the training difficulty of the training data.

[0013] Furthermore, the method further 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;

[0014] Add a preset 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.

[0015] Furthermore, the method further includes: obtaining a data type corresponding to the placed data;

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

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

[0018] Furthermore, the method further includes: determining that no data element exists based on the location information, and traversing all interactive data elements within a preset detection range with the current location information as the center;

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

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

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

[0022] Get 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 where the data is to be placed;

[0023] Based on the mapped key value space, the updated key value is adjusted according to the preset adjustment method.

[0024] In a second aspect, the present application provides a tree-shaped table data processing device, comprising:

[0025] a selection module, configured 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;

[0026] A monitoring module is used to monitor the dragging action and position information of the mouse cursor on the terminal device, predict the end point of the drag trajectory in real time through a drag end point prediction model, and preload the data elements at the end point. During the dragging action of the mouse cursor, 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 different colors;

[0027] The processing module is used to, when detecting 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 of the placed data in the preset tree table; 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, update the key value distribution of each data element, and update the data set corresponding to the data to be dragged to the placed data according to the data path of the placed data.

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

[0029] 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-shaped table data processing method when executed by a processor.

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

[0031] It can be seen from the above technical solution 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 drag trajectory in real time through the 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 the visual prompt layer according to the preset display method during the mouse cursor's dragging action. 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. It 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 terminal device interface, optimizes the performance during the drag action, and when the drag 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 of 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 to-be-dragged combination where the to-be-dragged data is located and the index position of the first data in the to-be-dragged combination, and assigns the index position to the end index in the data path of the to-be-dragged data, 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 to-be-dragged data to the placed data according to the data path of the placed data, which can realize 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 the preset tree table in the optimization of performance in the process of dragging and performing the drag action, and significantly improves the user experience in the process of operating the preset tree table. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. 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 any creative work.

[0033] Figure 1 Schematic diagram of the process of the tree table data processing method in the embodiment of the present application;

[0034] Figure 2 2 is a structural diagram of a tree-shaped table data processing device in an embodiment of the present application;

[0035] Figure 3 Schematic diagram of the structure of the electronic device in the embodiment of the present application.

[0036] Reference numerals:

[0037] 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

[0038] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0039] The acquisition, storage, use, and processing of data in this application's technical solution comply with relevant national laws and regulations.

[0040] In view of the problems existing in the prior art, the present application provides a tree-shaped table data processing method and apparatus. This method innovatively monitors the dragging action and position information of a mouse cursor on a terminal device over data elements in a preset tree-shaped table, and inputs this information into a drag endpoint prediction model to predict the drag trajectory's endpoint in real time and preload the data elements at the endpoint. During the dragging action, a visual prompt layer is dynamically rendered according to a preset display mode to distinguish between the data to be dragged and the data elements affected by the dragged data. When the dragging action is detected as a stop, the method determines the existing data element based on the current position information and identifies it as the dropped data. The data path of the dropped data in the preset tree-shaped table is obtained. When the data type of the dropped data is a combination type, the method obtains the index position of the dropped data and assigns the index position to the end index in the data path of the dropped data. The method traverses the data elements adjacent to the dropped data in the data path of the dropped data and updates the key-value distribution of each data element. This updates the data set corresponding to the dropped data to the data path of the dropped data, thereby directly updating the database of the preset tree-shaped table. This method effectively solves the shortcomings of the existing technology 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.

[0041] In order to effectively solve the shortcomings of the prior art in that data processing through tree tables is inconvenient and the tree table view is incomplete, the convenience of data processing through preset tree tables is significantly improved, and the visualization of preset tree tables is optimized, 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:

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

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

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

[0045] After receiving the selection instruction, selection information corresponding to the selection instruction is determined, 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.

[0046] The data to be dragged is 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 combination type has a higher priority than the nested type and the non-nested type. For example, a combination type such as if else (if, otherwise) cannot be inserted in if and else because if else appears in pairs. 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.

[0047] 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 in 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.

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

[0049] During the data processing process, this embodiment clarifies the data to be dragged, the data path and 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, it clarifies the data type and data path of the data to be dragged, 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.

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

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

[0052] 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 the pressing event, moving event and releasing event of the mouse cursor, and the position information is used to record the real-time coordinates of the mouse cursor on the terminal device.

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

[0054] Furthermore, the drag endpoint prediction model also outputs a prediction confidence. When the prediction confidence is greater than a preset confidence threshold, the real-time endpoint position corresponding to the prediction confidence is determined as the endpoint position.

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

[0056] In addition, when the mouse cursor performs the dragging action, the visual prompt layer is dynamically rendered according to the 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 different colors.

[0057] Among them, the real-time highlighting of the droppable area can be based on the actual display structure of the preset tree table, and the real-time highlighting of the droppable area within the preset placement range of the current position information of the mouse cursor. The droppable area allows the user to place the target position of the data to be dragged. The highlighting can help the user quickly identify the valid placement position to avoid invalid operations. In addition to the 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.

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

[0059] This embodiment allows users to intuitively see the possible results of the dragging action by highlighting the droppable area and the data elements affected by the differential color marking in real time. During the process of the user performing the dragging action, real-time feedback can be seen, and the user can 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.

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

[0061] Step S103: 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.

[0062] Optionally, when the dragging action is detected as a stop action, the existing data elements are determined based on the position information, that is, it is necessary to determine whether there is a data element 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 where the user places the data to be dragged through the stop action in the dragging action.

[0063] 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 at the same time. 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 to ensure that all data elements in the combination to be dragged are moved simultaneously.

[0064] 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, where 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.

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

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

[0067] 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 the dragging action.

[0068] Through the above technical innovations, this embodiment effectively solves the shortcomings of the existing technology 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.

[0069] In some embodiments, the training process of the drag endpoint prediction model includes:

[0070] Receive training data and extract track features of training tracks in the training data, and obtain predicted endpoint 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;

[0071] Determine the prediction error between the predicted endpoint coordinates and the training endpoint coordinates in the training data, and update the model parameters of the drag endpoint prediction model based on the prediction error;

[0072] The training data is batch constructed according to the preset sampling probability to increase the training difficulty of the training data.

[0073] Optionally, during the process of training the drag end point 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 it starts dragging, 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 end point position of the mouse cursor when it ends dragging.

[0074] In addition, based on the training press event, training displacement vector and training release event, a training track can be constructed. 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, and the drag end point prediction model learns the track features to learn the behavioral model of the user's drag action, thereby obtaining the predicted end point coordinates.

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

[0076] 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 Euclidean distance. According to the prediction error, the parameters of the drag endpoint prediction model are updated through 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.

[0077] 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 the 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 end point prediction model can be improved.

[0078] At the same time, during the training process, the sampling probability can be dynamically adjusted. For example, P∝α^0.5 is used for batch construction, and the sample distribution is updated every 5 rounds. Here, 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 large prediction errors during training, thereby improving the generalization ability of the model.

[0079] Through the above technological 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.

[0080] In some embodiments, dynamically rendering the visual prompt layer according to a preset display mode includes:

[0081] 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, and the auxiliary channel is used to display the visual prompt layer in real time;

[0082] Add a preset 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.

[0083] 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 conventional 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.

[0084] The double-buffered rendering channel provided by this embodiment can effectively avoid the problems of screen flickering and rendering delay of terminal devices. 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.

[0085] 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 in colors with red or blue shifts. 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.

[0086] 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 affected range of the dragging action and make more reasonable operation decisions.

[0087] In addition, a transparency effect is added to the current position of the mouse cursor according to the preset transparency. That is, the transparency effect is added according to the preset transparency as the mouse cursor is dragged. This allows users to see the content behind the data being dragged while also seeing 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.

[0088] This embodiment adds a transparent effect to highlight the real-time position of the mouse cursor, indicate the data to be dragged, and 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.

[0089] This embodiment establishes a double-buffered rendering channel and adds hue offset and transparency effects to render the visual prompt layer in a dynamic and intuitive manner, 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.

[0090] In some embodiments, when the drag action is detected to be a stop action, determining the existing data element based on the position information, and determining the data element as the dropped data, further comprising:

[0091] Get the data type corresponding to the placed data;

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

[0093] Optionally, when this embodiment detects that the dragging action is a stop action, it determines the 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 way 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 priority corresponding to the nested type and the non-nested type.

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

[0095] Among them, the preset range of adding sub-elements can be set to be away from the leftmost side of the preset tree table and exceed 50% of 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.

[0096] In addition, the end index in the combination corresponding to the currently placed data is obtained, and the end index is assigned to the end index in the data path of the placed data, that is, the index position of the last data element in the data path of the placed data is assigned to ensure that the data to be dragged cannot be added in the middle of the combination of placed data, resulting in confusion of data elements in the preset tree table, wherein the end index is used to represent the index position of the last data element in the data elements of this combination type. The above content can be expressed by the following formula: dropPath[dropPath.length - 1].index = dropLastIndex, wherein 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.

[0097] Through the above technical innovations, this embodiment can process the data to be dragged according to the data type of the placed data when the drag action is a stop action, 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 interactive experience between the user and the preset tree table, and make the drag action more intuitive and efficient.

[0098] In some embodiments, before receiving an instruction to select a data element in a preset tree table, the method further includes:

[0099] Based on the preset type setting, a data type is added to each data element in the preset tree table. The data types include nested types and non-nested types, and also include combined types. Among them, the priority corresponding to the combined type is higher than the priority corresponding to the nested type and non-nested type.

[0100] Optionally, before receiving the selection instruction for the data elements in the preset tree table, this embodiment adds data types to each data element in the preset tree table according to the preset type setting, wherein the data types include nested types and non-nested types, and also include combination types, and the priority corresponding to the combination type is higher than the priority corresponding to the nested type and the non-nested type. For example, the data type corresponding to a certain segment of data elements is a nested 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 the nested type are still nested types, that is, sub-elements can be added to the nested type.

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

[0102] For example, you can add a data type to each row of data elements in the preset tree table, add a type field, and take the value as item or group. Group is used to indicate a nested type, and item is used to indicate a non-nested type. The combination type can be recorded as groupType, and its value is the unique identifier of the combination name id.

[0103] Furthermore, a groupPosition type can be added, whose value can be first, middle, or last, for styling pages of preset tree tables.

[0104] This embodiment uses the above innovative technology to set a corresponding data type for each data element, so that corresponding drag actions can be taken according to different data types, and the behavior and interaction of data elements can be managed more finely, thereby improving the flexibility and scalability of the preset tree table.

[0105] In some embodiments, when it is detected that the dragging action is a stop action, the method further includes:

[0106] Determine based on the location information that no data element exists, and traverse all interactive data elements within the preset detection range with the current location information as the center;

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

[0108] Optionally, during implementation, when the dragging action is detected as a stop action, the embodiment of the present application determines whether a data element exists based on the current mouse cursor position information. If no data element exists at the current position information, all interactive data elements within the predicted detection range are traversed with the current position information as the center, where 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.

[0109] In addition, when the traversal obtains a data element that meets 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 a nested type can be used as placed data, while data elements of a non-nested type cannot be used as placed data.

[0110] In addition, based on the display coordinates of the data element, an offset between the current position information and the display coordinates of the data element meeting the preset adsorption condition is determined, wherein the offset represents the distance and direction between the current position information and the display coordinates.

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

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

[0113] 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. The size of the preset detection range can be adjusted according to actual needs to balance search efficiency and accuracy.

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

[0115] This embodiment provides the user with an intuitive visual feedback by displaying movement 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.

[0116] Through the above technical innovations, this embodiment ensures that the data to be dragged can be correctly placed in the appropriate location 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.

[0117] 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:

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

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

[0120] Get 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 where the data is to be placed;

[0121] Based on the mapped key value space, the updated key value is adjusted according to the preset adjustment method.

[0122] 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 the insertion order or hierarchical order of the nodes, each parent node contains at least one child node, and each child node contains at least one data element.

[0123] 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 the preset tree table, including the location information and hierarchical relationship of the data element.

[0124] In addition, the key value corresponding to each data element is updated based on the hierarchical depth of each data element in the data path where the data is placed. 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 nodes is 1, and so on. By considering the hierarchical depth, it can be ensured that the key value update conforms to the logical relationship of the preset tree table, thereby maintaining the consistency of the data structure.

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

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

[0127] Furthermore, based on the mapped key space, the updated key values ​​are adjusted according to a predefined adjustment method. This is a set of predefined rules that ensures that key updates and adjustments comply with the logical relationships and data consistency requirements of the predefined tree table. For example, the adjustment method may include reallocating keys, adjusting the size of keys, or performing sequential operations to ensure that the key distribution is reasonable and effective.

[0128] 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 drag action is completed, thereby improving the accuracy and efficiency of the drag action, and enhancing the stability and reliability of the preset tree table, providing users with a more stable and efficient interactive environment.

[0129] In order to effectively solve the problem of unlimited level dragging of a preset tree table and the performance optimization during the dragging action, the present application provides an embodiment of a tree table data processing device for implementing all or part of the content of the tree table data processing method, see Figure 2 The tree table data processing device specifically includes the following contents:

[0130] The selection module 10 is configured to receive a selection instruction for a data element in a preset tree table, and determine selection information corresponding to the selection instruction for the placed data, 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;

[0131] The monitoring module 20 is configured to monitor the dragging action and position information of the mouse cursor on the terminal device, predict the end point of the drag trajectory in real time using a drag end point prediction model, preload the data elements at the end point, and dynamically render a visual prompt layer according to a preset display mode while the mouse cursor is performing the dragging action of the placed data. The preset display mode of the placed data includes real-time highlighting of the droppable area and marking the data elements affected by the placed data to be dragged with different colors.

[0132] The processing module 30 is configured to, when detecting that the dragging action of the dropped data is a stop action, determine an existing data element based on the dropped data position information, and determine the data element as the dropped data; obtain a data path in a preset tree table where the dropped data is located; and when the data type of the dropped data to be dragged is a combination type, obtain a data set of the combination to be dragged where the dropped data is located and an index position of the first data in the combination to be dragged where the dropped data is located, and assign the index position of the dropped data to an end index in the data path of the dropped data; traverse 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, so as to update the data set corresponding to the dropped data to the dropped data according to the data path of the dropped data.

[0133] 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 for 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 terminal device interface, optimizes the performance during the drag action, and when the drag 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 of 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 to-be-dragged combination where the to-be-dragged data is located and the index position of the first data in the to-be-dragged combination, and assigns the index position to the end index in the data path of the to-be-dragged data, 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 to-be-dragged data to the placed data according to the data path of the placed data, which can realize 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 the preset tree table in the optimization of performance in the process of dragging and performing the drag action, and significantly improves the user experience in the process of operating the preset tree table.

[0134] From a hardware perspective, in order to effectively address the performance optimization issues associated with dragging a preset tree-like table without any hierarchical restrictions and significantly improve the user experience when operating the preset tree-like table, the present application provides an embodiment of an electronic device that includes all or part of the content of the tree-like table data processing method. The electronic device specifically includes the following content:

[0135] A processor, memory, a communications interface, and a bus; wherein the processor, memory, and communications interface communicate with each other via the bus; the communications interface is used to transmit information between the tree-shaped table data processing device and related devices such as core business systems, user terminals, and related databases; the logic controller can be a desktop computer, a tablet computer, a mobile terminal, etc., but this embodiment is not limited thereto. In this embodiment, the logic controller can be implemented with reference to the embodiments of the tree-shaped table data processing method and the embodiments of the base tree-shaped table data processing device in the embodiments, the contents of which are incorporated herein and repeated parts are not repeated.

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

[0137] In practical applications, portions of the tree-shaped table data processing method may be executed on the electronic device side as described above, or all operations may be performed on the client device. The specific selection may be based on the processing capabilities of the client device and the limitations of the user's usage scenario. This application does not impose any restrictions on this. If all operations are performed on the client device, the client device may further include a processor.

[0138] The aforementioned client device may include a communication module (i.e., a communication unit) capable of establishing a communication connection with a remote server to facilitate data transmission with the server. The server may include a server at the task scheduling center or, in other implementation scenarios, a server on an intermediate platform, such as a server on a third-party server platform that is communicatively linked to the task scheduling center server. The server may comprise a single computer device, a server cluster consisting of multiple servers, or a distributed server configuration.

[0139] Figure 3 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 processing unit 9100 and a memory 9140; the memory 9140 is coupled to the central processing unit 9100. It is worth noting that the 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.

[0140] 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:

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

[0142] Step S102: monitoring the dragging action and position information of the mouse cursor on the terminal device, predicting the end point position of the dragging trajectory in real time using a drag end point prediction model, and preloading data elements at the end point position. During the process of the mouse cursor performing the dragging action, dynamically rendering a visual prompt layer 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 different colors;

[0143] Step S103: 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.

[0144] From the above description, it can be seen that the electronic device provided in the embodiment of the present application innovatively receives selection instructions for data elements in a 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 drag trajectory in real time through the drag end prediction model, which can reduce the user's manual adjustment time, optimize the drag action experience, 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 drag 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 drag action without processing the data elements. The invention reduces the number of repeated renderings of the interface of the terminal device and optimizes the performance during the execution of the drag action. When the drag action is detected as a stop action, the existing data elements are determined based on the position information, the data elements are determined as the placed data, and 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 data set of the combination to be dragged 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 invention can realize 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 the preset tree table in the optimization of performance in the process of dragging and performing the drag action without limit on the level of dragging, and significantly improves the user experience in the process of operating the preset tree table.

[0145] 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 device 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.

[0146] like Figure 3 As shown, the electronic device 9600 may further 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 all components shown in Figure 3 For components not shown, reference may be made to the prior art.

[0147] like Figure 3 As shown, the central processing unit 9100 is sometimes also referred to as a controller or 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.

[0148] Memory 9140 can be, for example, one or more of a cache, flash memory, hard drive, removable media, volatile memory, non-volatile memory, or other suitable devices. It can store the aforementioned failure-related information and also store programs that execute the relevant information. The CPU 9100 can execute the programs stored in memory 9140 to implement information storage or processing.

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

[0150] The memory 9140 may be a solid-state memory, such as a read-only memory (ROM), random access memory (RAM), or SIM card. Alternatively, it may be a memory that retains information even when power is off, can be selectively erased, and is capable of storing additional data. Examples of such memory are sometimes referred to as EPROMs. 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 for storing application programs and function programs, or processes used by the central processing unit 9100 to execute operations of the electronic device 9600.

[0151] The memory 9140 may also include a data storage unit 9143 for storing data, such as contacts, digital data, images, sounds, and / or any other data used by the electronic device. The driver storage unit 9144 of the memory 9140 may include various driver programs 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.).

[0152] The communication module 9110 is a transmitter / receiver that transmits 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.

[0153] Based on different communication technologies, multiple communication modules 9110 may be provided in the same electronic device, such as cellular network modules, Bluetooth modules, and / or wireless local area network modules. The communication module 9110 (transmitter / receiver) is also coupled to a speaker 9131 and a microphone 9132 via an audio processor 9130, providing audio output via the speaker 9131 and receiving audio input from the microphone 9132, thereby implementing common telecommunication functions. The audio processor 9130 may include any suitable buffer, decoder, amplifier, etc. Furthermore, the audio processor 9130 is coupled to the central processing unit 9100, enabling local recording via the microphone 9132 and playback of stored audio via the speaker 9131.

[0154] The embodiments of the present application also provide a computer-readable storage medium capable of implementing all steps of the tree-shaped table data processing method in the above-mentioned embodiments, where the execution subject is a server or a client. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the computer program implements all steps of the tree-shaped table data processing method in the above-mentioned embodiments, where the execution subject is a server or a client. For example, when the processor executes the computer program, the following steps are implemented:

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

[0156] Step S102: monitoring the dragging action and position information of the mouse cursor on the terminal device, predicting the end point position of the dragging trajectory in real time using a drag end point prediction model, and preloading data elements at the end point position. During the process of the mouse cursor performing the dragging action, dynamically rendering a visual prompt layer 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 different colors;

[0157] Step S103: 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.

[0158] From the above description, it can be seen that the computer-readable storage medium provided in the embodiment of the present application innovatively receives selection instructions for data elements in a 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 drag trajectory in real time through the 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 the visual prompt layer according to the preset display method during the mouse cursor's 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 performing any operations on the data elements. The invention relates to a method for processing rows, reducing the number of repeated renderings of the interface of the terminal device, optimizing the performance during the execution of the drag action, and determining the existing data elements based on the position information when the drag action is detected as a stop action, determining the data elements as the placed data, obtaining the data path of the preset tree table where the placed data is located, and obtaining the data set of the combination to be dragged and the index position of the first data in the combination to be dragged, and assigning the index position to the end index in the data path of the data to be dragged, traversing the data elements adjacent to the placed data in the data path of the placed data, updating 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, realizing differentiated processing of data elements, enhancing the compatibility of multiple data types, and complying with the rules of data elements. The method effectively solves the shortcomings of the preset tree table in the optimization of performance in the process of dragging and performing the drag action without limit on the level of dragging, and significantly improves the user experience in the process of operating the preset tree table.

[0159] The embodiments of the present application also provide a computer program product capable of implementing all steps of the tree-shaped table data processing method in the above-mentioned embodiments, where the execution subject is a server or a client. When the computer program / instructions are executed by a processor, the computer program / instructions implement the steps of the tree-shaped table data processing method. For example, the computer program / instructions implement the following steps:

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

[0161] Step S102: monitoring the dragging action and position information of the mouse cursor on the terminal device, predicting the end point position of the dragging trajectory in real time using a drag end point prediction model, and preloading data elements at the end point position. During the process of the mouse cursor performing the dragging action, dynamically rendering a visual prompt layer 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 different colors;

[0162] Step S103: 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.

[0163] As can be seen from the above description, the computer program product provided by the embodiment of the present application innovatively receives selection instructions for data elements in a 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 drag trajectory in real time through the 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 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 performing any operations on the data elements. The invention relates to a method for processing a terminal device to reduce the number of repeated renderings of the interface of the terminal device and optimize the performance of the dragging operation. When the dragging operation is detected as a stop operation, the existing data element is determined based on the position information, the data element is determined as the placed data, and 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 data set of the combination to be dragged 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 method can realize 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 the preset tree table in the optimization of performance in the process of dragging and performing the dragging operation without limit on the level of dragging, and significantly improves the user experience in the process of operating the preset tree table.

[0164] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, apparatuses, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROMs, optical storage, etc.) containing computer-usable program code.

[0165] 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 flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, 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 produce 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 flowcharts and / or block diagrams. 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.

[0166] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work 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 The function specified in one or more boxes.

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

[0168] Specific embodiments are used in the present invention 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 ideas. At the same time, for those skilled in the art, according to the ideas of the present invention, there may be changes in the specific implementation methods and application scopes. In summary, the contents of this specification should not be understood as limiting 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-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; 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 the data element at the end position; while the mouse cursor is performing the dragging action, dynamically rendering a visual prompt layer 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 to-be-dragged data with a different color; When it is detected that the dragging action is a stop action, the existing data element is determined based on the position information, and the data element is determined as the placed data; the data path of the placed data in the preset tree table is obtained, and when the data type of the data to be dragged is a combination type, the data set of the to-be-dragged combination where the to-be-dragged data is located and the index position of the first data in the to-be-dragged 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 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 to-be-dragged data 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 a training track in the training data, and obtain predicted endpoint 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 of 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, wherein In the case where it is detected that the dragging action is a stop action, after determining the existing data element based on the position information and determining the data element as the dropped 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, wherein 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 priority corresponding to the nestable type and the non-nested type.

6. The method according to claim 1, characterized in that When it is detected that the dragging action is a stop action, the method further includes: Determining based on the location information that the data element does not exist, and traversing all interactive data elements within a preset detection range with the current location information as the center; When a data element that meets the preset adsorption conditions is traversed, 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 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 element that meets the preset adsorption conditions.

7. The method according to claim 1, characterized in that The traversing adjacent data elements in the data path of the placed data 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 a key value of each of the data elements in the traversed child nodes, and update a key value corresponding to each of the data elements based on a hierarchical depth of each of the data elements in the data path where the data is placed; Acquire a key value range corresponding to the data set of the to-be-dragged data, and map the key value range to a 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-shaped table data processing device, characterized in that: The device comprises: a selection module, configured 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 for 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 the data elements at the end position; and dynamically rendering a visual prompt layer according to a preset display mode while 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 with a different color; The processing module is configured to, when detecting 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 of the placed data in a preset tree table; when the data type of the data to be dragged is a combination type, obtain the data set of the to-be-dragged combination where the to-be-dragged data is located and the index position of the first data in the to-be-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 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 to-be-dragged data 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, wherein: When the processor executes the program, the steps of the tree-shaped 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-shaped table data processing method according to any one of claims 1 to 7 are implemented.