An object drag-and-drop sorting method and device, equipment, and storage medium

CN122985033APending Publication Date: 2026-10-27ZHEJIANG GEELY HLDG GRP CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611253242.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-18
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

然而,在根据用户的拖拽操作对目标列表进行排序更新时,相关技术中的拖拽排序方案通常在拖拽移动过程中根据被拖拽对象经过的位置实时更新目标列表顺序,即被拖拽对象经过的其他对象会随拖拽过程发生位置变化,使目标列表的排列状态随拖拽路径持续变化,这样会导致用户难以直观、稳定地确定拖拽释放后对应的最终排序位置及排序结果,从而影响对象拖拽排序的可控性及用户交互体验

Benefits of technology

[0019]本发明的对象拖拽排序方法及装置、设备、存储介质的有益效果是:本发明中,拖拽开始操作、拖拽移动操作、拖拽释放操作以及目标列表更新,形成完整的对象拖拽排序处理过程。其中,拖拽开始操作用于确定排序操作对象,并记录对应的拖拽对象信息;拖拽移动操作用于确定当前目标对象,并记录或更新对应的目标对象信息,在第一对象的拖拽移动过程中,目标列表保持拖拽开始操作时的排列顺序;拖拽释放操作则基于拖拽对象信息、目标对象信息以及当前采用的预设排序模式共同确定目标列表顺序;最后,根据目标列表顺序完成目标列表更新。相较于相关技术中拖拽排序方案在拖拽移动过程中根据被拖拽对象经过的位置持续调整目标列表顺序的方式,本发明在拖拽移动过程中维持目标列表在拖拽开始操作时的排列顺序,并通过记录或更新目标对象信息获得后续排序所需的数据,在检测到拖拽释放操作后,再结合当前采用的预设排序模式确定目标列表顺序,并根据所确定的目标列表顺序更新目标列表。由此,可避免目标列表的排列状态随第一对象的拖拽路径持续发生变化,使操作者能够更加直观、稳定地确定拖拽释放后对应的最终排序位置及排序结果,从而提高对象拖拽排序的可控性及操作交互体验。而且,由于拖拽释放阶段可根据当前采用的预设排序模式,对拖拽对象信息和目标对象信息进行相应的排序处理,因此,在无需改变对象拖拽处理整体流程的情况下,可适配不同的对象拖拽排序需求,从而进一步提高对象拖拽排序的灵活性及可控性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122985033A_ABST
    Figure CN122985033A_ABST
Patent Text Reader

Abstract

The application provides an object drag sorting method and device, equipment and storage medium, and relates to the technical field of computers. The method comprises the following steps: in response to a drag start operation on a first object in a target list, recording drag object information corresponding to the first object; in response to a drag movement operation of the first object, recording target object information corresponding to a current target object; wherein, during the drag movement of the first object, the target list maintains the arrangement order at the time of the drag start operation; in response to a drag release operation of the first object, determining a target list order according to a preset sorting mode currently adopted and the drag object information and the target object information; and updating the target list according to the target list order. The application can realize object drag sorting while avoiding continuous changes in the arrangement state of the target list along the object drag path, thereby improving the controllability of object drag sorting and the operation interaction experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and more specifically, to a method, apparatus, device, and storage medium for dragging and sorting objects. Background Technology

[0002] With the development of web front-end technologies, drag-and-drop sorting functionality has been widely used in back-end management systems, visual design platforms, and various business configuration systems. Users can adjust the display order of objects by dragging and dropping them from a list, thereby improving page configuration efficiency and user interaction experience.

[0003] Drag-and-drop sorting is typically implemented based on browser drag-and-drop events or third-party drag-and-drop components. However, when updating the sorting of a target list based on user drag-and-drop actions, related technologies often update the order of the target list in real time based on the position of the dragged object during the dragging process. This means that other objects passed by the dragged object will change position as the dragging process proceeds, causing the arrangement of the target list to continuously change along the drag path. This makes it difficult for users to intuitively and reliably determine the final sorting position and result after the drag is released, thus affecting the controllability of object drag-and-drop sorting and the user experience. Summary of the Invention

[0004] The problem this invention addresses is: how to provide a method for sorting objects by dragging and dropping, so as to prevent the arrangement of the target list from continuously changing with the dragging path of the objects, thereby improving the controllability of object dragging and dropping sorting and the user experience.

[0005] To address the aforementioned problems, this invention provides a method, apparatus, device, and storage medium for object drag-and-drop sorting.

[0006] In a first aspect, the present invention provides a method for dragging and sorting objects, comprising: In response to the start of a drag-and-drop operation targeting the first object in the target list, record the drag-and-drop object information corresponding to the first object; In response to the drag-and-move operation of the first object, the target object information corresponding to the current target object is recorded; wherein, during the drag-and-move process of the first object, the target list maintains the arrangement order at the start of the drag-and-move operation; In response to the drag-and-release operation of the first object, the order of the target list is determined according to the currently used preset sorting mode, the dragged object information, and the target object information; Update the target list according to the order of the target list.

[0007] Optionally, the preset sorting mode includes an interchange sorting mode; The step of determining the order of the target list based on the currently used preset sorting mode, the information of the dragged object, and the information of the target object includes: When the current interchange sorting mode is used, the order of the target list is determined according to the arrangement result after the positions of the first object and the current target object are interchanged.

[0008] Optionally, the preset sorting mode includes an arbitrary position sorting mode; The step of determining the order of the target list based on the currently used preset sorting mode, the information of the dragged object, and the information of the target object includes: When the arbitrary position sorting mode is currently used, the arrangement result of the first object being located before or after the current target object is determined according to the positional relationship between the drag release position of the first object and the current target object, and the order of the target list is determined according to the arrangement result.

[0009] Optionally, determining the arrangement result of the first object being located before or after the current target object based on the positional relationship between the drag-and-release position of the first object and the current target object includes: Obtain the position information of the display area corresponding to the current target object; Based on the drag-release position corresponding to the first object and the position information of the display area, it is determined that the drag-release position is located in the first side area or the second side area of ​​the display area corresponding to the current target object; When the drag-and-release position is located in the first side area, it is determined that the first object is located before the current target object; when the drag-and-release position is located in the second side area, it is determined that the first object is located after the current target object.

[0010] Optionally, the object drag-and-drop sorting method further includes: During the dragging and moving of the first object, the expected arrangement position of the first object relative to the current target object is determined based on the positional relationship between the current drag position of the first object and the current target object, and a position prompt mark is generated on the side of the display area corresponding to the current target object that corresponds to the expected arrangement position; Wherein, the expected arrangement position is the target arrangement position of the first object relative to the current target object when the drag-and-release operation is performed according to the current drag position; the position prompt indicator is used to indicate the expected arrangement position.

[0011] Optionally, the recording of the target object information corresponding to the current target object includes: During the dragging and moving of the first object, the current target object is continuously detected; In response to a change in the object that is the current target object, the target object information is updated.

[0012] Optionally, updating the target object information in response to a change in the object that is the current target object includes: If the sorting attribute corresponding to the current target object indicates that the current target object is prohibited from participating in object drag-and-drop sorting, the currently recorded target object information remains unchanged; if the sorting attribute corresponding to the current target object indicates that the current target object is allowed to participate in object drag-and-drop sorting, the target object information is updated to the target object information corresponding to the current target object.

[0013] Optionally, the preset sorting mode includes an interchange sorting mode; determining the target list order based on the currently used preset sorting mode, the dragged object information, and the target object information includes: When the current swap sorting mode is used, if the current target object corresponding to the drag-and-release operation is allowed to participate in object drag-and-drop sorting, the order of the target list is determined according to the arrangement result after the first object and the current target object are swapped; if the current target object corresponding to the drag-and-release operation is prohibited from participating in object drag-and-drop sorting, the order of the target list is determined to remain the same as the arrangement order of the target list when the drag-and-drop operation started.

[0014] Optionally, the dragged object information includes the object identifier corresponding to the first object; And / or, the target object information includes the object identifier corresponding to the current target object.

[0015] Optionally, after updating the target list according to the target list order, the object drag-and-drop sorting method further includes: Clear the information of the dragged object and the target object.

[0016] In a second aspect, the present invention provides an object drag-and-drop sorting device, comprising: The drag-and-drop object recording unit is used to record drag-and-drop object information corresponding to the first object in response to a drag-and-drop start operation targeting the first object in the target list. The target object recording unit is used to record the target object information corresponding to the current target object in response to the drag-and-move operation of the first object; wherein, during the drag-and-move process of the first object, the target list maintains the arrangement order at the start of the drag-and-move operation; The list order determination unit is used to determine the target list order in response to the drag-and-release operation of the first object, based on the currently used preset sorting mode, the dragged object information, and the target object information. The target list update unit is used to update the target list according to the target list order.

[0017] Thirdly, the present invention provides an electronic device, including a memory and a processor; The memory is used to store computer programs; The processor is configured to implement the object drag-and-drop sorting method as described in the first aspect when executing the computer program.

[0018] Fourthly, the present invention provides a computer-readable storage medium storing a computer program that, when read and executed by a processor, implements the object drag-and-drop sorting method as described in the first aspect.

[0019] The beneficial effects of the object drag-and-drop sorting method, apparatus, device, and storage medium of the present invention are as follows: In the present invention, the drag-and-drop start operation, drag-and-drop move operation, drag-and-drop release operation, and target list update form a complete object drag-and-drop sorting process. Specifically, the drag-and-drop start operation is used to determine the sorting operation object and record the corresponding dragged object information; the drag-and-drop move operation is used to determine the current target object and record or update the corresponding target object information. During the drag-and-drop move of the first object, the target list maintains the order at the start of the drag-and-drop operation; the drag-and-drop release operation determines the target list order based on the dragged object information, the target object information, and the currently used preset sorting mode; finally, the target list is updated according to the target list order. Compared to related technologies where drag-and-drop sorting schemes continuously adjust the target list order based on the position of the dragged object during drag-and-drop movement, the present invention maintains the target list order at the start of the drag-and-drop operation during drag-and-drop movement, obtains the data required for subsequent sorting by recording or updating the target object information, and after detecting the drag-and-drop release operation, determines the target list order based on the currently used preset sorting mode, and updates the target list according to the determined target list order. This prevents the arrangement of the target list from continuously changing along the drag path of the first object, allowing the operator to more intuitively and reliably determine the final sorting position and result after drag-and-release, thereby improving the controllability of object drag-and-drop sorting and the user experience. Furthermore, since the drag-and-release phase can sort the dragged object information and target object information according to the currently used preset sorting mode, it can adapt to different object drag-and-drop sorting needs without changing the overall object drag-and-drop processing flow, further enhancing the flexibility and controllability of object drag-and-drop sorting. Attached Figure Description

[0020] Figure 1 This is a flowchart illustrating an object drag-and-drop sorting method in an embodiment of the present invention; Figure 2 This is a sub-flowchart of step 200 in an embodiment of the present invention; Figure 3 This is a schematic diagram of the object drag-and-drop sorting process in the interchange sorting mode of this invention embodiment; Figure 4 This is a schematic diagram of the object drag-and-drop sorting process in the arbitrary position sorting mode of this invention embodiment; Figure 5 This is a flowchart illustrating an object drag-and-drop sorting method in an embodiment of the present invention; Figure 6 This is a structural block diagram of the object drag-and-drop sorting device in an embodiment of the present invention; Figure 7 This is a schematic diagram of the structure of an electronic device in an embodiment of the present invention. Detailed Implementation

[0021] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0022] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in sequences other than those illustrated or described herein.

[0023] Combination Figure 1 As shown, this embodiment of the invention provides a method for dragging and sorting objects, including the following steps: Step 100: In response to the start of drag-and-drop operation for the first object in the target list, record the drag-and-drop object information corresponding to the first object.

[0024] This method can be applied to pages or systems that require drag-and-drop sorting of objects, enabling the adjustment of the order of multiple objects in a target list. For example, this method can be applied to backend management systems, visual configuration pages, page editors, workflow configuration pages, resource management pages, menu configuration pages, etc.

[0025] Specifically, for the target list presented on the corresponding interface (such as a human-computer interaction interface), when a drag-and-drop operation is detected to start on the first object in the target list, the dragged object information corresponding to the first object is recorded. This recorded dragged object information is continuously saved during the current object drag-and-drop sorting process and serves as the basic input data for subsequent target list order determination. The drag-and-drop operation can be initiated by an operator, who may include a user or other triggering entity. Other triggering entities may include local applications, automation programs, intelligent agents, or other programs capable of performing object drag-and-drop operations. The target list includes multiple objects to be sorted; the operator can adjust the order of objects in the target list through drag-and-drop operations. The target list can be a list, card set, configuration item set, or other sortable object set displayed on the corresponding interface. The first object is the dragged object determined in response to the drag-and-drop operation. The dragged object information is used to characterize the relevant information of the dragged object to uniquely identify the first object. For example, the dragged object information may include the object identifier corresponding to the first object, the original position of the first object in the target list, and other information that can uniquely identify the first object.

[0026] Therefore, by recording the dragged object information at the beginning of the drag-and-drop process, on the one hand, the same dragged object can be continuously associated throughout the entire drag-and-drop process, so as to accurately determine the operation object corresponding to this sorting operation when the drag is released, avoiding the problem of inaccurate operation object identification caused by sorting based solely on the drag release position; on the other hand, the dragged object information can serve as the basic input data for the subsequent target list order determination process, providing a unified data foundation for the association of subsequent target object information and the generation of the target list order, so that the subsequent sorting process revolves around the same dragged object, thereby ensuring the data consistency and processing continuity of the entire object drag-and-drop sorting process.

[0027] Step 200: In response to the drag-and-drop operation of the first object, record the target object information corresponding to the current target object; wherein, during the drag-and-drop operation of the first object, the target list maintains the order in which the drag-and-drop operation started.

[0028] Specifically, after recording the dragged object information corresponding to the first object in the drag-and-drop operation, if further drag-and-drop operations targeting the first object are detected, the target object information corresponding to the current target object is recorded. The current target object is the object that the first object currently passes through, points to, or stops at during the drag-and-drop process (or drag-and-drop phase); that is, the object pointed to by the current position of the first object during the drag-and-drop process. The current position of the first object during the drag-and-drop process can be called the current drag position. Target object information is used to characterize relevant information about the current target object to uniquely identify it. For example, target object information may include the object identifier corresponding to the current target object, the position of the current target object in the target list, and other information that can uniquely identify the current target object. During the continuous drag-and-drop process of the first object, the objects that the first object currently passes through, points to, or stops at can be continuously detected. When the current target object changes, the target object information is recorded accordingly to provide accurate data for determining the subsequent order of the target list.

[0029] During the dragging and moving of the first object, the target list maintains its original order as the drag operation began. In other words, the current drag position of the first object may change with the dragging operation, but the order of the target list does not change as the first object passes over different objects; instead, it maintains the list arrangement state corresponding to the start of the drag operation. It should be noted that maintaining the original order of the target list means preserving the list's sorting state during the dragging process, but it does not restrict the dragged content of the first object (such as the dragged image, dragged preview object, or other display content used to represent the current drag position of the first object) from moving with the current drag position, nor does it restrict changes to other display or interactive states related to the drag operation.

[0030] Therefore, by recording target object information during the drag-and-drop process, the target object corresponding to the current drag-and-drop operation can be identified, establishing a correspondence between the target object information and the previously recorded drag-and-drop object information. Specifically, the drag-and-drop object information is used to identify the operation object corresponding to this sorting operation, and the target object information is used to identify the target object corresponding to this sorting operation. Together, they constitute the basic input data for the subsequent target list order determination process. Thus, after the drag is released, there is no need to re-identify the operation object or target object; the target list order can be directly determined based on the drag-and-drop object information and the target object information. This ensures the data continuity and processing consistency of the object drag-and-drop sorting process and provides a unified data foundation for subsequently generating the target list order using a preset sorting mode. Simultaneously, during the drag-and-drop process of the first object, the target list maintains the order it was in at the start of the drag-and-drop operation. That is, as the first object passes through different objects, the target object information corresponding to the current target object can be recorded, while maintaining the original arrangement of the target list. Only after the drag-and-drop release operation is detected is the target list order determined based on the currently used preset sorting mode, the drag-and-drop object information, and the target object information. This avoids the arrangement of the target list from continuously changing along the drag path of the first object, allowing the sorting process to be completed during the drag-and-release phase, thereby improving the controllability of object drag-and-drop sorting and the user experience.

[0031] Step 300: In response to the drag-and-release operation of the first object, determine the order of the target list based on the currently used preset sorting mode, the dragged object information, and the target object information.

[0032] Specifically, when a drag-and-release operation of the first object is detected, the order of the target list is determined based on the currently used preset sorting mode, the dragged object information, and the target object information. Since the target list maintains its initial order during the drag-and-release process, after detecting the drag-and-release operation, corresponding sorting processing is performed based on the currently used preset sorting mode and the dragged object information and target object information generated during this drag-and-release process to generate the target list order after this drag-and-release sorting. Here, a drag-and-release operation indicates the end of the drag-and-release operation, such as when the operator releases a mouse button, ends touch dragging, or uses other methods to end the drag-and-release operation. The preset sorting mode is used to characterize the sorting processing method (or mode) corresponding to the current target list. Different application scenarios can adopt different preset sorting modes according to actual sorting needs. In this embodiment, regardless of the preset sorting mode used, the target list order is determined based on the aforementioned recorded dragged object information and target object information. That is, the dragged object information is used to determine the operation object corresponding to the sorting operation, the target object information is used to identify the target object corresponding to the sorting operation, and the preset sorting mode is used to determine the sorting processing method between the operation object and the target object, thereby jointly determining the target list order. The target list order is used to characterize the arrangement order of each object in the target list after the current object drag-and-drop sorting is completed. It can include the target arrangement position, target index, or other data that can characterize the sorting result for each object.

[0033] Therefore, by combining dragged object information, target object information, and a preset sorting mode to determine the order of the target list during the drag-and-release phase, the generation of sorting results can be based on a unified drag-and-drop data foundation. Specifically, dragged object information identifies the object to be sorted, target object information identifies the target object, and the preset sorting mode determines the sorting relationship between the two. These three elements work together to form the target list order. By recording target object information during drag-and-drop movement and determining the target list order based on this information after drag-and-release, the target list maintains its initial order even when the first object passes over different objects during drag-and-drop movement. The sorting result is only formed after drag-and-release, thus reducing the impact of drag path changes on the target list's arrangement. This eliminates the need to design different drag-and-drop processes for different sorting needs; simply combining different preset sorting modes generates the corresponding target list order. This allows the same object drag-and-drop sorting method to adapt to different sorting requirements, providing a unified, accurate, and stable sorting basis for subsequent target list updates.

[0034] Step 400: Update the target list according to the order of the target list.

[0035] Specifically, after determining the order of the target list, the arrangement position of the corresponding objects in the target list is updated according to the order of the target list, and the interface is displayed according to the updated target list, so that the target list presents the target list order, thereby completing the drag-and-drop sorting of objects.

[0036] In summary, the method of this embodiment forms a complete object drag-and-drop sorting process through drag-and-drop start operation, drag-and-drop move operation, drag-and-drop release operation, and target list update. Specifically, the drag-and-drop start operation determines the sorting object and records the corresponding dragged object information; the drag-and-drop move operation determines the current target object and records or updates the corresponding target object information; during the drag-and-drop movement of the first object, the target list maintains the order it was in at the start of the drag-and-drop operation; the drag-and-drop release operation determines the target list order based on the dragged object information, the target object information, and the currently used preset sorting mode; finally, the target list is updated according to the target list order. Compared to related technologies where drag-and-drop sorting schemes continuously adjust the target list order based on the position of the dragged object during drag-and-drop movement, this embodiment maintains the target list order at the start of the drag-and-drop operation, obtains the data required for subsequent sorting by recording or updating the target object information, and after detecting the drag-and-drop release operation, determines the target list order based on the currently used preset sorting mode and updates the target list according to the determined target list order. This prevents the arrangement of the target list from continuously changing along the drag path of the first object, allowing the operator to more intuitively and reliably determine the final sorting position and result after drag-and-release, thereby improving the controllability of object drag-and-drop sorting and the user experience. Furthermore, since the drag-and-release phase can sort the dragged object information and target object information according to the currently used preset sorting mode, it can adapt to different object drag-and-drop sorting needs without changing the overall object drag-and-drop processing flow, further enhancing the flexibility and controllability of object drag-and-drop sorting.

[0037] Optionally, the method in this embodiment can be implemented using a page componentization approach, such as by using a page management module and an object drag-and-drop processing module in tandem. The page management module is used to display the target list, maintain the target list data, and update the target list data and display based on the object drag-and-drop sorting results. The object drag-and-drop processing module is used to respond to object drag-and-drop operations and complete the object drag-and-drop processing process, including recording dragged object information, maintaining target object information, and generating sorting parameters (which characterize the object information and sorting-related information generated during the current object drag-and-drop sorting process, including dragged object information, target object information, and sorting auxiliary information generated according to different preset sorting modes).

[0038] For example, the page management module can provide the object drag-and-drop processing module with parameters such as target list data, preset sorting mode, and object identifier field. The object drag-and-drop processing module responds to the object drag-and-drop operation, completes the object drag-and-drop processing according to the parameters, and returns the generated sorting parameters to the page management module. The page management module generates the target list order based on the sorting parameters returned by the object drag-and-drop processing module and the currently used preset sorting mode, and then updates the target list data and corresponding interface display according to the target list order to complete the object drag-and-drop sorting. In addition, the page management module can correspond to a parent page, and the object drag-and-drop processing module can correspond to a child page. The parent page is used to maintain the target list data and update the sorting results, and the child page is used to handle object drag-and-drop events and generate sorting parameters. The two interact with each other through event callbacks, interface calls, or message communication to jointly complete the object drag-and-drop sorting. In some embodiments, the object drag-and-drop processing module can implement the object drag-and-drop process based on the browser's native drag-and-drop events, and customize the entire process of drag-and-drop start, drag-and-drop movement, and drag-and-drop release, without relying on the sorting mechanism preset by third-party drag-and-drop plugins. In this way, the object drag-and-drop processing flow can be flexibly controlled according to different sorting requirements, improving the flexibility and scalability of the object drag-and-drop sorting scheme.

[0039] Optionally, the preset sorting modes include an interchange sorting mode; Based on the currently used preset sorting mode, as well as the information of the dragged object and the target object, determine the order of the target list, including: When the current sorting mode is swapped, the order of the target list is determined based on the result of swapping the positions of the first object and the current target object.

[0040] Specifically, the preset sorting modes include an interchange sorting mode. This mode adjusts the order of objects in the target list by swapping the positions of the first object and the target object within the target list. Compared to adjusting object order through insertion, the interchange sorting mode achieves sorting by adjusting the positions of the first object and the current target object. In the resulting sorted list, all objects except the first object and the current target object retain their original positions.

[0041] When the current sorting mode is swapped, the first object is determined based on the previously recorded dragged object information, and the swapping object is determined based on the current target object corresponding to the drag-and-release operation. The current target object is the target object corresponding to the first object when the drag-and-release operation occurs, and is used as the swapping object for this drag-and-drop sorting. Subsequently, the order of the target list is determined based on the arrangement result after the first object and the current target object are swapped. The arrangement result after the swapped positions represents the object arrangement relationship after the first object and the current target object have swapped positions, and may include the swapped object order, object index relationship, or other data that can represent the object arrangement relationship.

[0042] For example, when the objects in the target list are arranged in the order of object A, object B, object C, and object D, if the first object is object A and the current target object is object D, then in the swap sorting mode, the target list order corresponding to object D, object B, object C, and object A can be obtained based on the arrangement result after swapping the positions of object A and object D. Subsequently, the target list is updated according to the target list order to complete the drag-and-drop sorting of objects. In some embodiments, the swap sorting mode is suitable for application scenarios where the arrangement order of objects is adjusted by swapping their positions, such as menu sorting, icon sorting, card sorting, configuration item sorting, etc.

[0043] Therefore, in the interchange sorting mode, the method of this embodiment determines the first object based on the dragged object information and, in conjunction with the current target object corresponding to the drag-and-release operation, determines the arrangement result after the positions of the first object and the current target object are interchanged, thereby generating the target list order. In the resulting sorting result, the positions of the first object and the current target object are interchanged, while other objects besides the first object and the current target object can maintain their original positions. In this way, on the one hand, only the positions of the first object and the current target object need to be adjusted to complete the object drag-and-drop sorting, which helps to reduce the complexity of the sorting process and improve the efficiency of object drag-and-drop sorting; on the other hand, the interchange sorting mode, as a specific implementation of the preset sorting mode, combined with the unified object drag-and-drop processing flow in the method of this embodiment, keeps the process of object drag-and-drop information collection, target object determination, and target list order generation consistent. It can adapt to the interchange sorting processing requirements simply by switching the preset sorting mode, without redesigning the object drag-and-drop processing flow, thereby further improving the flexibility and user experience of object drag-and-drop sorting.

[0044] Optionally, the method based on this embodiment can be implemented using a page componentization approach. Based on the interchange sorting mode, after the object drag-and-drop processing module completes the object drag-and-drop processing, it can return the sorting parameters corresponding to the first object and the current target object to the page management module. The page management module then generates the target list order based on the sorting result after the positions of the two objects are interchanged.

[0045] Optionally, the preset sorting modes include sorting modes for any position; Based on the currently used preset sorting mode, as well as the information of the dragged object and the target object, determine the order of the target list, including: When the current arbitrary position sorting mode is used, the arrangement result of whether the first object is before or after the current target object is determined according to the position relationship between the drag release position of the first object and the current target object, and the order of the target list is determined according to the arrangement result.

[0046] Specifically, the preset sorting modes include an arbitrary position sorting mode. Unlike the interchange sorting mode, the arbitrary position sorting mode does not directly swap the positions of two objects. Instead, it determines whether the first object is before or after the current target object based on the positional relationship between the drag-and-release position of the first object and the current target object, and generates the target list order accordingly.

[0047] When the arbitrary position sorting mode is currently in use, after detecting a drag-and-release operation on the first object, the positional relationship between the drag-and-release position of the first object and the current target object is determined. The drag-and-release position represents the position of the first object at the time the drag-and-release operation occurs; that is, the current drag position of the first object when the drag-and-release operation is performed. The drag-and-release position may include the mouse pointer position, touch position, cursor position, or other information that can represent the drag-and-release position of the object at the time the drag-and-release operation occurs. The positional relationship between the drag-and-release position and the current target object is used to determine the arrangement position of the first object relative to the current target object after the current object drag-and-release sorting is completed. Subsequently, based on the positional relationship between the drag-and-release position and the current target object, the arrangement result formed by placing the first object before or after the current target object is determined, and the target list order is generated based on this arrangement result. The arrangement result represents the object arrangement relationship formed by placing the first object before or after the current target object, and it may include object arrangement order, object index relationship, object position relationship, or other data that can represent the sorting result of the target list.

[0048] For example, when the objects in the target list are arranged in the order of object A, object B, object C, and object D, if the first object is object A, the current target object is object C, and the position of the drag-and-release position of the first object relative to object C indicates that the first object should be arranged before object C, then the target list order corresponding to object B, object A, object C, and object D can be obtained according to the corresponding arrangement result. If the position of the drag-and-release position of the first object relative to object C indicates that the first object should be arranged after object C, then the target list order corresponding to object B, object C, object A, and object D can be obtained according to the corresponding arrangement result. Subsequently, the target list is updated according to the generated target list order to complete the object drag-and-drop sorting.

[0049] Therefore, in this embodiment, after the first object is dragged and released, the method determines whether the first object is placed before or after the current target object based on the positional relationship between the drag release position of the first object and the current target object, and generates the target list order accordingly. This maintains the original arrangement of the target list during dragging, and then forms the final sorting result based on the corresponding drag release position after the drag release operation, thereby reducing the impact of drag path changes on the target list's arrangement. Furthermore, by determining the arrangement position of the first object relative to the current target object based on the drag release position, insertion sorting of the first object at different positions in the target list can be achieved, improving the flexibility and controllability of object drag sorting.

[0050] Optionally, the method based on this embodiment can be implemented using a page componentization approach. Based on the arbitrary position sorting mode, after the object drag-and-drop processing module completes the object drag-and-drop processing, it can also return the positional relationship between the drag release position of the first object and the current target object to the page management module. The page management module generates a target list order in which the first object is located before or after the current target object based on the first object, the current target object, and the positional relationship.

[0051] Optionally, based on the positional relationship between the drag-release position of the first object and the current target object, the arrangement result of the first object being located before or after the current target object is determined, including: Get the position information of the display area corresponding to the current target object; Based on the position information of the drag release position and the display area corresponding to the first object, determine whether the drag release position is located in the first side area or the second side area of ​​the display area corresponding to the current target object; When the drag release position is in the first side area, the first object is determined to be before the current target object; when the drag release position is in the second side area, the first object is determined to be after the current target object.

[0052] Specifically, in order to determine whether the first object is located before or after the current target object, the target arrangement position of the first object relative to the current target object can be further judged based on the positional relationship between the drag release position of the first object and the display area corresponding to the current target object.

[0053] When a drag-and-release operation of the first object is detected, the position information of the display area corresponding to the current target object is obtained. The display area is used to represent the display range of the current target object in the corresponding interface, and it may include the position coordinates, boundary range, size information, or other information that can represent the spatial range of the display area.

[0054] Subsequently, based on the position information of the drag-release position corresponding to the first object and the display area corresponding to the current target object, it is determined whether the drag-release position is located in the first side area or the second side area of ​​the display area corresponding to the current target object. The first side area and the second side area are located on opposite sides of the display area corresponding to the current target object, respectively, to distinguish different target arrangement positions of the first object relative to the current target object. For example, when the target list is arranged vertically, the first side area may correspond to the upper area of ​​the display area corresponding to the current target object, and the second side area may correspond to the lower area of ​​the display area corresponding to the current target object; when the target list is arranged horizontally, the first side area may correspond to the left side area of ​​the display area corresponding to the current target object, and the second side area may correspond to the right side area of ​​the display area corresponding to the current target object; for other arrangement methods, the corresponding first side area and second side area can also be divided according to the display area corresponding to the current target object to determine the side area corresponding to the drag-release position.

[0055] After determining whether the drag-and-release position is in the first or second side area, the target arrangement position of the first object relative to the current target object is further determined. Specifically, when the drag-and-release position is in the first side area, the first object is determined to be before the current target object; when the drag-and-release position is in the second side area, the first object is determined to be after the current target object. Subsequently, based on the above determination results, the arrangement result corresponding to whether the first object is before or after the current target object is generated, and the target list order is generated in combination with the arrangement result.

[0056] Therefore, the method in this embodiment does not directly determine the target arrangement position of the first object based solely on the drag-and-release position itself. Instead, it combines the positional relationship between the drag-and-release position of the first object and the display area corresponding to the current target object, converting the spatial positional relationship corresponding to the drag-and-release position into an arrangement relationship where the first object is located before or after the current target object, and then further generates the target list order. On the one hand, it can more accurately reflect the sorting intention of the operator when dragging and releasing, improving the accuracy of the object dragging and sorting results; on the other hand, by using a first side area and a second side area to divide the display area corresponding to the target object, this embodiment's method is equally applicable to target lists with vertical, horizontal, and other different arrangement methods, thereby further improving the versatility and applicability of this embodiment's method.

[0057] Optionally, the object drag-and-drop sorting method also includes: During the dragging and moving of the first object, the expected arrangement position of the first object relative to the current target object is determined based on the positional relationship between the current dragging position of the first object and the current target object, and a position prompt mark is generated on the side of the display area corresponding to the current target object that corresponds to the expected arrangement position; The expected arrangement position is the target arrangement position of the first object relative to the current target object when the drag-and-release operation is performed according to the current drag position; the position hint label is used to indicate the expected arrangement position.

[0058] In this embodiment, during the dragging and moving of the first object, the target arrangement position of the first object relative to the current target object after a drag-and-release operation is performed at the current drag position can be predicted based on the current drag position of the first object. A corresponding position prompt icon is then generated based on the predicted expected arrangement position. Therefore, the expected sorting result corresponding to the current drag position can be fed back to the operator before the actual drag-and-release operation of the first object is performed.

[0059] Specifically, the current drag position represents the current position of the first object during dragging, and it can change as the first object is dragged. For example, the current drag position can be determined based on the current mouse pointer position, touch position, cursor position, or other information that can represent the current drag position of the first object. Based on the positional relationship between the current drag position and the current target object, the target arrangement position of the first object relative to the current target object can be determined when a drag-and-release operation is performed at the current drag position, and this target arrangement position is determined as the expected arrangement position. The expected arrangement position can be the arrangement position where the first object is located before or after the current target object.

[0060] After determining the expected arrangement position, a positional indicator can be generated on one side of the display area corresponding to the current target object, corresponding to the expected arrangement position. For example, when the expected arrangement position is that the first object is in front of the current target object, a positional indicator can be generated on the corresponding side of the display area corresponding to the current target object; when the expected arrangement position is that the first object is behind the current target object, a positional indicator can be generated on the other corresponding side of the display area corresponding to the current target object. The positional indicator can be a tooltip, border, highlighted area, arrow, shadow, color change, or other visual cues that can represent the expected arrangement position.

[0061] As the first object continues to be dragged and moved, its current drag position can change accordingly, and the expected arrangement position of the first object relative to the current target object can be redefined based on the changed current drag position. When the expected arrangement position changes, the display position of the position indicator can be updated accordingly so that the position indicator always indicates the expected arrangement position corresponding to the current drag position.

[0062] For example, when the first object is dragged to the vicinity of the display area corresponding to object C, if it is determined that the first object will be placed before object C when the drag-release operation is performed at the current drag position, a position hint mark can be generated on the corresponding side of the display area corresponding to object C, based on the positional relationship between the current drag position of the first object and object C; as the first object continues to be dragged and moved, if it is determined that the first object will be placed after object C based on the changed current drag position, the display position of the position hint mark is adjusted accordingly to indicate that if the drag-release operation is performed at the current drag position, the first object will be placed after object C.

[0063] Therefore, the method in this embodiment determines the expected arrangement position based on the current drag position during the dragging and moving of the first object, and provides real-time prompts for the expected arrangement position through position prompts. This allows the operator to intuitively know the expected sorting result corresponding to the current drag position before performing the drag-release operation, thereby reducing the possibility of misoperation due to difficulty in judging the arrangement position after drag release, and improving the interactive intuitiveness and controllability of the object drag-release sorting process.

[0064] Optionally, combined Figure 1 , Figure 2 As shown, the target object information recorded for the current target object includes: Step 210: During the dragging and moving of the first object, continuously monitor the current target object; Step 220: In response to a change in the object that is currently the target object, update the target object information.

[0065] In this embodiment, in order to ensure that the target object information can accurately reflect the current target object corresponding to the first object during the dragging process, the current target object can be continuously detected during the dragging and moving of the first object, and the target object information can be updated when the current target object changes.

[0066] Specifically, once the first object enters the drag-and-drop state, the target object corresponding to the first object can be continuously detected. The current target object is the object that the first object currently passes through, points to, or stops at during the drag-and-drop process; that is, the object associated with the current drag position of the first object. As the first object continues to be dragged and moved, the current target object may change with the change of the first object's current drag position. Therefore, the current target object can be continuously detected throughout the entire drag-and-drop process.

[0067] When a change is detected in the current target object, the target object information is updated accordingly to ensure that the updated target object information corresponds to the current target object. The target object information is used to characterize relevant information about the current target object and may include object identifier, object index, object reference, object location, or other information that can uniquely identify the current target object.

[0068] For example, as the first object sequentially passes through object B, object C, and object D, the system continuously detects the current target object. When the first object moves from object B to object C, if the system detects that the current target object has changed from object B to object C, the target object information is updated to the information corresponding to object C. Subsequently, when the first object continues to move to object D, if the system detects that the current target object has changed again, the target object information is further updated to the information corresponding to object D, ensuring that the target object information always corresponds to the target object currently associated with the first object. In some embodiments, the detection of the current target object can be based on the positional relationship between the current drag position of the first object and the corresponding display areas of each object in the target list. For example, when the current drag position of the first object enters the display area corresponding to a certain object, that object can be identified as the current target object; when the current drag position of the first object leaves the display area corresponding to that object and enters the display area corresponding to another object, the new object is identified as the current target object.

[0069] Therefore, the method in this embodiment continuously detects the current target object during the dragging and moving of the first object, and updates the target object information only when the current target object changes. This allows the target object information to be dynamically maintained as the current dragging position of the first object changes, providing accurate target object information for determining the order of the subsequent target list. On the one hand, this avoids redundant processing caused by repeatedly updating the same target object information during dragging and moving, improving the processing efficiency of the object dragging and sorting process. On the other hand, it allows the target object information to be updated synchronously as the current dragging position of the first object changes, so that the order of the subsequent target list can be generated based on valid target object information, improving the accuracy and data consistency of the object dragging and sorting results. At the same time, the dynamic maintenance mechanism of the target object information, together with the aforementioned dragged object information, constitutes a unified data foundation in the object dragging and sorting process, forming a continuous data association between different processing stages such as drag start, drag movement, and drag release, providing reliable data support for the generation of the target list order under different preset sorting modes.

[0070] Optionally, in response to a change in the object that is currently the target object, the target object information is updated, including: If the sorting attribute of the current target object indicates that the current target object is prohibited from participating in object drag-and-drop sorting, keep the currently recorded target object information unchanged; if the sorting attribute of the current target object indicates that the current target object is allowed to participate in object drag-and-drop sorting, update the target object information to the target object information corresponding to the current target object.

[0071] In this embodiment, after detecting a change in the current target object, the method can further determine how to update the target object information based on the update conditions of the target object information. That is, the update conditions of the target object information are used to determine how to update the target object information when the current target object changes. This avoids objects that are prohibited from participating in drag-and-drop sorting from being included in the generation of the subsequent target list order. Updating the target object information may include changing or maintaining the currently recorded target object information.

[0072] For example, the explanation will be based on using the sorting attribute corresponding to the current target object as the update condition for the target object information.

[0073] When a change is detected in the current target object, the sorting attribute corresponding to the current target object is first obtained. The sorting attribute indicates whether the corresponding object is allowed to participate in drag-and-drop sorting, and can include information indicating whether drag-and-drop sorting is allowed, prohibited, or other information that represents the object's sorting permissions. When the sorting attribute indicates that the current target object is allowed to participate in drag-and-drop sorting, the target object information is updated to the information corresponding to the current target object, ensuring that the target object information always corresponds to the target object currently allowed to participate in drag-and-drop sorting. Therefore, when generating the target list order subsequently, the target arrangement position corresponding to the first object can be determined based on the latest recorded target object information. Conversely, when the sorting attribute indicates that the current target object is prohibited from participating in drag-and-drop sorting, the currently recorded target object information remains unchanged, and the target object information is not updated using the information corresponding to the current target object. Maintaining the currently recorded target object information means continuing to use the target object information corresponding to the most recently recorded target object that is allowed to participate in drag-and-drop sorting during the drag-and-drop process, and not updating the target object information using the information of the object currently prohibited from participating in drag-and-drop sorting. If the target object information corresponding to the target object that is allowed to participate in the drag-and-drop sorting has not yet been recorded, the target object information can be kept in its initial state until a target object that is allowed to participate in the drag-and-drop sorting is detected, and then the corresponding target object information can be recorded.

[0074] For example, when the first object is dragged and moved, it sequentially passes through object B, object C, and object D, where objects B and D are allowed to participate in object drag-and-drop sorting, while object C is prohibited from participating in object drag-and-drop sorting. When the first object moves to object B, the information corresponding to object B is recorded in the target object information. Subsequently, when the first object continues to move to object C, since object C is prohibited from participating in object drag-and-drop sorting, the target object information corresponding to object B is maintained. When the first object further moves to object D, the target object information is updated to the information corresponding to object D. Thus, throughout the entire drag-and-drop process, the target object information always corresponds to the target object that is allowed to participate in object drag-and-drop sorting. In some embodiments, the sorting attribute can be pre-configured in each object in the target list, or it can be dynamically determined based on the object's current running status, object type, object permissions, business rules, or other preset conditions.

[0075] Therefore, the method in this embodiment, while continuously detecting the current target object, does not directly update the target object information for all changed target objects. Instead, it further determines whether to perform an update operation based on the sorting attribute corresponding to the current target object. When the current target object allows participation in object drag-and-drop sorting, the target object information is updated promptly to ensure that the target object information reflects the currently valid target object. When the current target object prohibits participation in object drag-and-drop sorting, the target object information corresponding to the most recently recorded target object that allows participation in object drag-and-drop sorting is maintained, thereby preventing objects that prohibit participation in object drag-and-drop sorting from participating in the generation of subsequent target list order. On the one hand, this helps ensure that the subsequent target list order is always generated based on valid target objects, improving the accuracy and stability of object drag-and-drop sorting results. On the other hand, by combining object sorting permission control with the target object information maintenance process, the target object information filtering mechanism can be applied to objects with different sorting permissions in different business scenarios, further improving the flexibility and applicability of the method in this embodiment.

[0076] Optionally, the preset sorting mode includes an interchange sorting mode; the order of the target list is determined based on the currently used preset sorting mode, the dragged object information, and the target object information, including: When the current sorting mode is swapped, if the current target object corresponding to the drag-and-release operation is allowed to participate in object drag-and-release sorting, the order of the target list is determined according to the arrangement result after the first object and the current target object are swapped; if the current target object corresponding to the drag-and-release operation is not allowed to participate in object drag-and-release sorting, the order of the target list is determined to remain the same as the order in which the target list was arranged when the drag-and-release operation started.

[0077] In this embodiment, when the swap sorting mode is used, it is possible to further determine whether the current target object corresponding to the drag-and-release operation is allowed to participate in object drag-and-release sorting during the drag-and-release phase, and determine whether to perform swap sorting based on the determination result.

[0078] Specifically, upon detecting a drag-and-release operation on the first object, the current target object corresponding to the drag-and-release operation is obtained, along with its sorting attribute. The current target object is the target object corresponding to the first object at the time of the drag-and-release operation, and is used as a candidate swap object for this sorting swap.

[0079] When the sorting attribute indicates that the current target object is allowed to participate in drag-and-drop sorting, the target list order is generated based on the arrangement result after the first object and the current target object have their positions swapped. The arrangement result after the position swap represents the object arrangement relationship formed after the first object and the current target object have their positions swapped, and it can include object arrangement order, object index relationship, object position relationship, or other data that can represent the target list sorting result. Subsequently, the target list is updated according to the generated target list order to complete this drag-and-drop sorting. Conversely, when the sorting attribute indicates that the current target object is prohibited from participating in drag-and-drop sorting, the position swap between the first object and the current target object is not performed, and the target list order remains the same as the order in which the drag-and-drop operation began; that is, this drag-and-drop operation does not change the arrangement relationship of the objects in the target list.

[0080] For example, when the objects in the target list are arranged in the order of object A, object B, object C, and object D, if the first object is object A, the current target object corresponding to the drag-and-release operation is object D, and object D is allowed to participate in object drag-and-drop sorting, then the order of object A and object D is swapped, resulting in the target list order of object D, object B, object C, and object A. If object D is prohibited from participating in object drag-and-drop sorting, then the target list order remains object A, object B, object C, and object D, and the swap sorting is not performed. In some embodiments, whether the current target object is allowed to participate in object drag-and-drop sorting can be determined based on object permissions, object status, object type, business rules, or other preset conditions.

[0081] Therefore, in the swap sorting mode, the method of this embodiment does not simply perform object position swapping based on the drag-and-release operation. Instead, it further considers the sorting attributes of the current target object during the drag-and-release phase to determine whether the current target object is allowed to participate in object drag-and-drop sorting. When the current target object is allowed to participate in object drag-and-drop sorting, the object positions are swapped to complete the object drag-and-drop sorting; when the current target object is prohibited from participating in object drag-and-drop sorting, the swap operation is canceled, and the order of the target list remains unchanged. This avoids objects prohibited from participating in object drag-and-drop sorting from being used as swap objects in the generation of the target list order, ensuring that the object drag-and-drop sorting result meets the object sorting permission requirements. Furthermore, by establishing a swap sorting validity judgment mechanism during the drag-and-release phase, object position swapping is only performed when the object sorting permission conditions are met, which helps reduce the risk of abnormal changes in the target list order due to accidental release to prohibited sorting objects, improving the reliability, stability, and user experience of the object drag-and-drop sorting result.

[0082] For example, combined Figure 3As shown, the target list initially includes a first object A, a second object B, a third object C, and a fourth object D. The sorting attribute of the second object B indicates that it is prohibited from participating in object drag-and-drop sorting.

[0083] First, such as Figure 3 As shown in (a), the target list is displayed in the order of A, B, C, and D. When a drag operation is detected to start targeting the first object A, the dragged object information corresponding to the first object A is recorded.

[0084] Subsequently, as Figure 3 As shown in (b), the operator drags the first object A to the position corresponding to the fourth object D. During the dragging process, the object dragging processing module continuously detects the current target object and records its information. It should be noted that while the first object A is being dragged, the object dragging processing module records or maintains the target object information, and the target list retains its original order at the start of the dragging operation. That is, the second object B and the third object C, which the first object A passes through during the dragging process, will not have their order adjusted along the dragging path of the first object A. Specifically, since the sorting attribute of the second object B indicates that it is prohibited from participating in object dragging sorting, when the first object A passes through the second object B, the information corresponding to the second object B is not used to update the target object information, preventing the second object B from participating in subsequent sorting processes as a valid target object.

[0085] Finally, as Figure 3 As shown in (c), when a drag-and-release operation of the first object A is detected, the order of the target list after the arrangement of the first object A and the fourth object D is determined according to the dragged object information and target object information recorded above. The target list is then updated according to the target list order, so that the target list is updated to D, B, C, A, thereby completing the object drag-and-sort operation.

[0086] Therefore, in the interchange sorting mode, the drag-and-drop process is only used to determine the target object, and will not change the order of the target list in real time during the drag-and-drop process; the object positions are swapped only after the drag release operation is detected, based on the dragged object information and the target object information. This avoids the arrangement position of objects passed through during the drag-and-drop process being affected, and can support sorting control of objects that are prohibited from participating in the sorting, thereby improving the stability and flexibility of the object drag-and-drop sorting process.

[0087] For example, combined Figure 4 As shown, the target list initially includes a first object A, a second object B, a third object C, and a fourth object D. The sorting attribute of the second object B indicates that it is prohibited from participating in object drag-and-drop sorting.

[0088] First, such as Figure 4As shown in (a), when a drag operation is detected to start for the first object A, the drag object information corresponding to the first object A is recorded.

[0089] Subsequently, as Figure 4 As shown in (b), the operator drags the first object A past the second object B. During the dragging process, the object dragging processing module continuously detects the current target object. When the current target object is detected to be the second object B, since the sorting attribute corresponding to the second object B indicates that it is prohibited from participating in object dragging sorting, the currently recorded target object information remains unchanged, and the second object B is not used as the target object for subsequent sorting. At the same time, the order of each object in the target list remains unchanged.

[0090] Subsequently, as Figure 4 As shown in (c), the operator continues to drag the first object A to the position corresponding to the third object C, at which point the third object C becomes the current target object. The object drag processing module determines the expected arrangement position of the first object A relative to the third object C based on the current drag position of the first object and the position information of the display area corresponding to the third object C. For example, when it is determined based on the current drag position that the first object A will be located after the third object C after a drag-and-release operation is performed at the current position, a position prompt mark (as shown by the blue line in the figure) is generated on the corresponding side of the display area corresponding to the third object C (as shown by the blue line in the figure) to indicate the expected arrangement position of the first object A, so that the operator can intuitively know the insertion position after the object is released.

[0091] Finally, as Figure 4 As shown in (d), when the drag-and-release operation of the first object A is detected, the order of the target list is determined based on the previously recorded dragged object information, target object information, and the arrangement result of the first object being after the third object C. The target list is then updated according to the target list order, so that the first object A is inserted after the third object C, thereby completing the object drag-and-drop sorting.

[0092] Therefore, in the arbitrary position sorting mode, when the first object passes an object prohibited from participating in sorting, the target object information is not updated using the information corresponding to that object, preventing it from participating in subsequent sorting processes as a valid target object. When the first object moves to an object allowed to participate in sorting, the expected arrangement position is determined by combining the current drag position with the positional relationship of the target object, and a real-time visual prompt is provided through position indicator markers, allowing the operator to intuitively understand the insertion position after the object is dragged and released, thereby improving the interactive intuitiveness of the object drag-and-drop sorting process. Simultaneously, the order of objects in the target list remains unchanged before dragging and releasing; the target list is only updated after dragging and releasing based on the determined target arrangement position, thus ensuring the stability and consistency of the object drag-and-drop sorting process.

[0093] Optionally, the dragged object information includes the object identifier corresponding to the first object; And / or, the target object information includes the object identifier corresponding to the current target object.

[0094] In this embodiment, in order to accurately determine the operation object and target object in the object drag-and-drop sorting process, the drag-and-drop object information and the target object information respectively include the object identifier of the corresponding object.

[0095] Specifically, when a drag-and-drop operation targeting the first object is detected, the object identifier corresponding to the first object can be obtained and recorded in the dragged object information. During the drag-and-drop process of the first object, after the current target object is determined, the object identifier corresponding to the current target object can also be obtained and recorded in the target object information. Thus, the object identifier in the dragged object information is used to uniquely identify the first object corresponding to this drag-and-drop sorting, and the object identifier in the target object information is used to uniquely identify the current target object, thereby establishing a correspondence between the first object and the current target object. The object identifier is used to uniquely identify the corresponding object in the target list, and it can be an object number, unique identifier (ID), object key (Key), object reference, object index, object address, or other information that can uniquely identify the corresponding object.

[0096] For example, when the target list includes objects A, B, C, and D, each object corresponds to a unique object identifier ID1, ID2, ID3, and ID4, respectively. When object A is dragged first, ID1 can be recorded in the dragged object information; subsequently, when object A is dragged to the corresponding position of object C, ID3 can be recorded in the target object information. Afterward, regardless of whether an interchangeable sorting mode or an arbitrary position sorting mode is used, the objects participating in this drag-and-drop sorting can be determined based on ID1 in the dragged object information and ID3 in the target object information, and the corresponding target list order can be further generated.

[0097] Therefore, the method in this embodiment records the object identifiers corresponding to the first object and the current target object respectively, so that the information of the dragged object and the target object can uniquely correspond to the specific object in the target list. On the one hand, even if the current drag position corresponding to the first object and the current target object change during the dragging process, the object participating in the sorting can still be accurately located through the object identifier, improving the accuracy and reliability of object identification. On the other hand, by using object identifiers to uniformly identify the objects participating in the sorting, it is beneficial to associate data between different processing stages such as drag start, drag movement, and drag release, so that the entire object dragging and sorting process is processed around the uniformly identified object, thereby ensuring the data consistency and processing continuity of the object dragging and sorting process. At the same time, since the object identifier is only one way to uniquely identify the corresponding object, its specific data form is not limited, so it can be applied to different data structures and different object management methods, improving the versatility and applicability of the method in this embodiment.

[0098] Optionally, combined Figure 1 , Figure 5 As shown, after updating the target list according to its order, the object drag-and-drop sorting method also includes: Step 500: Clear the information of the dragged object and the target object.

[0099] In this embodiment, after updating the target list according to the order of the target list, the information of the dragged objects and the target objects recorded during the current drag-and-drop sorting process can be cleared to end the current drag-and-drop sorting process.

[0100] Specifically, once the target list has been updated according to its order, the dragged object information and target object information recorded during the current drag-and-drop sorting process can be cleared. The dragged object information represents the first object in the current drag-and-drop sorting, and the target object information represents the current target object. Clearing the dragged object information and target object information means releasing the temporary data generated and saved during the current drag-and-drop sorting process, restoring the dragged object information and target object information to their initial state so that subsequent new drag-and-drop sorting processes can re-record the corresponding information.

[0101] For example, after the first object completes the drag-and-drop sorting with the current target object and updates the target list according to the target list order, the dragged object information and target object information can be cleared sequentially, so that the system no longer saves the operation object and target object information corresponding to the previous round of object drag-and-drop sorting. When a new object drag-and-drop operation is detected again, the new dragged object information and target object information are recorded again to complete a new round of object drag-and-drop sorting. In some embodiments, in addition to dragged object information and target object information, other temporary state information generated during the object drag-and-drop sorting process can also be cleared simultaneously, such as current position information, position prompt information, target position judgment information, or other temporary data.

[0102] Therefore, the method in this embodiment, by promptly clearing the information of the dragged objects and the target objects after the target list is updated, can, on the one hand, prevent temporary data recorded during the previous round of object drag-and-drop sorting from continuing to participate in subsequent object drag-and-drop sorting, ensuring that each object drag-and-drop sorting is completed independently based on the newly recorded object information, thereby improving the data independence and processing accuracy of the object drag-and-drop sorting process; on the other hand, it helps to release the temporary state data generated during the object drag-and-drop sorting process, enabling the object drag-and-drop sorting process to form a complete processing closed loop of "recording object information - generating target list order - updating target list - clearing temporary data", thereby improving the stability and reliability of the object drag-and-drop sorting process.

[0103] Combination Figure 6 As shown, another embodiment of the present invention provides an object drag-and-drop sorting device, comprising: The drag-and-drop object recording unit is used to record the drag-and-drop object information corresponding to the first object in response to the start of drag-and-drop operation targeting the first object in the target list. The target object recording unit is used to record the target object information corresponding to the current target object in response to the drag-and-move operation of the first object; wherein, during the drag-and-move of the first object, the target list maintains the sorting order at the start of the drag-and-move operation. The list order determination unit is used to determine the target list order in response to the drag-and-release operation of the first object, based on the currently used preset sorting mode, dragged object information, and target object information. The target list update unit is used to update the target list according to the target list order.

[0104] The object drag-and-drop sorting device in this embodiment is used to implement the above-described object drag-and-drop sorting method. Its advantages over the prior art are the same as the advantages of the above-described object drag-and-drop sorting method over the prior art, and will not be repeated here.

[0105] Combination Figure 7As shown, another embodiment of the present invention provides an electronic device, including a memory 701 and a processor 702; Memory 701 is used to store computer programs; Processor 702 is used to implement the above-described object drag-and-drop sorting method when executing a computer program.

[0106] Alternatively, an electronic device includes a memory 701 and a processor 702 coupled to the memory 701; the memory 701 is configured to store a computer program; the processor 702 is configured to perform the following operations when the computer program is executed: In response to the start of a drag-and-drop operation targeting the first object in the target list, record the dragged object information corresponding to the first object; In response to the drag-and-drop operation of the first object, record the target object information corresponding to the current target object; wherein, during the drag-and-drop operation of the first object, the target list maintains the sorting order at the start of the drag-and-drop operation. In response to the drag-and-release operation of the first object, determine the order of the target list based on the currently used preset sorting mode, the dragged object information, and the target object information; Update the target list according to the order of the target list.

[0107] Another embodiment of the present invention provides a computer-readable storage medium storing a computer program, which is read and executed by a processor to implement the above-described object drag-and-drop sorting method.

[0108] Alternatively, a non-volatile computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to perform the following operations: In response to the start of a drag-and-drop operation targeting the first object in the target list, record the dragged object information corresponding to the first object; In response to the drag-and-drop operation of the first object, record the target object information corresponding to the current target object; wherein, during the drag-and-drop operation of the first object, the target list maintains the sorting order at the start of the drag-and-drop operation. In response to the drag-and-release operation of the first object, determine the order of the target list based on the currently used preset sorting mode, the dragged object information, and the target object information; Update the target list according to the order of the target list.

[0109] The technical solutions of the embodiments of the present invention, or the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods of the embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, external hard drives, ROM, RAM, magnetic disks, or optical disks.

[0110] The computer-readable storage medium of this embodiment can be used to implement the above-described object drag-and-drop sorting method. Its advantages over the prior art are the same as those of the above-described object drag-and-drop sorting method over the prior art, and will not be repeated here.

[0111] While the present invention has been disclosed above, its scope of protection is not limited thereto. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention, and all such changes and modifications will fall within the scope of protection of the present invention.

Claims

1. A method for sorting objects by dragging and dropping, characterized in that, include: In response to the start of a drag-and-drop operation targeting the first object in the target list, record the drag-and-drop object information corresponding to the first object; In response to the drag-and-move operation of the first object, the target object information corresponding to the current target object is recorded; wherein, during the drag-and-move process of the first object, the target list maintains the arrangement order at the start of the drag-and-move operation; In response to the drag-and-release operation of the first object, the order of the target list is determined according to the currently used preset sorting mode, the dragged object information, and the target object information; Update the target list according to the order of the target list.

2. The object drag-and-drop sorting method as described in claim 1, characterized in that, The preset sorting mode includes an interchange sorting mode; The step of determining the order of the target list based on the currently used preset sorting mode, the information of the dragged object, and the information of the target object includes: When the current interchange sorting mode is used, the order of the target list is determined according to the arrangement result after the positions of the first object and the current target object are interchanged.

3. The object drag-and-drop sorting method as described in claim 1, characterized in that, The preset sorting modes include sorting modes at any position; The step of determining the order of the target list based on the currently used preset sorting mode, the information of the dragged object, and the information of the target object includes: When the arbitrary position sorting mode is currently used, the arrangement result of the first object being located before or after the current target object is determined according to the positional relationship between the drag release position of the first object and the current target object, and the order of the target list is determined according to the arrangement result.

4. The object drag-and-drop sorting method as described in claim 3, characterized in that, The step of determining the arrangement result of the first object being located before or after the current target object based on the positional relationship between the drag-release position of the first object and the current target object includes: Obtain the position information of the display area corresponding to the current target object; Based on the drag-release position corresponding to the first object and the position information of the display area, it is determined that the drag-release position is located in the first side area or the second side area of ​​the display area corresponding to the current target object; When the drag-and-release position is located in the first side area, it is determined that the first object is located before the current target object; when the drag-and-release position is located in the second side area, it is determined that the first object is located after the current target object.

5. The object drag-and-drop sorting method as described in claim 3, characterized in that, The object drag-and-drop sorting method also includes: During the dragging and moving of the first object, the expected arrangement position of the first object relative to the current target object is determined based on the positional relationship between the current drag position of the first object and the current target object, and a position prompt mark is generated on the side of the display area corresponding to the current target object that corresponds to the expected arrangement position; Wherein, the expected arrangement position is the target arrangement position of the first object relative to the current target object when the drag-and-release operation is performed according to the current drag position; the position prompt indicator is used to indicate the expected arrangement position.

6. The object drag-and-drop sorting method as described in any one of claims 1-5, characterized in that, The target object information corresponding to the current target object includes: During the dragging and moving of the first object, the current target object is continuously detected; In response to a change in the object that is the current target object, the target object information is updated.

7. The object drag-and-drop sorting method as described in claim 6, characterized in that, The step of updating the target object information in response to a change in the object that is the current target object includes: If the sorting attribute corresponding to the current target object indicates that the current target object is prohibited from participating in object drag-and-drop sorting, the currently recorded target object information remains unchanged; if the sorting attribute corresponding to the current target object indicates that the current target object is allowed to participate in object drag-and-drop sorting, the target object information is updated to the target object information corresponding to the current target object.

8. The object drag-and-drop sorting method as described in claim 7, characterized in that, The preset sorting mode includes an interchange sorting mode; determining the order of the target list based on the currently used preset sorting mode, the dragged object information, and the target object information includes: When the current swap sorting mode is used, if the current target object corresponding to the drag-and-release operation is allowed to participate in object drag-and-drop sorting, the order of the target list is determined according to the arrangement result after the first object and the current target object are swapped; if the current target object corresponding to the drag-and-release operation is prohibited from participating in object drag-and-drop sorting, the order of the target list is determined to remain the same as the arrangement order of the target list when the drag-and-drop operation started.

9. The object drag-and-drop sorting method as described in any one of claims 1-5, characterized in that, The dragged object information includes the object identifier corresponding to the first object; And / or, the target object information includes the object identifier corresponding to the current target object.

10. The object drag-and-drop sorting method as described in any one of claims 1-5, characterized in that, After updating the target list according to the order of the target list, the object drag-and-drop sorting method further includes: Clear the information of the dragged object and the target object.

11. An object drag-and-drop sorting device, characterized in that, include: The drag-and-drop object recording unit is used to record drag-and-drop object information corresponding to the first object in response to a drag-and-drop start operation targeting the first object in the target list. The target object recording unit is used to record the target object information corresponding to the current target object in response to the drag-and-move operation of the first object; wherein, during the drag-and-move process of the first object, the target list maintains the arrangement order at the start of the drag-and-move operation; The list order determination unit is used to determine the target list order in response to the drag-and-release operation of the first object, based on the currently used preset sorting mode, the dragged object information, and the target object information. The target list update unit is used to update the target list according to the target list order.

12. An electronic device, characterized in that, Including memory and processor; The memory is used to store computer programs; The processor is configured to implement the object drag-and-drop sorting method as described in any one of claims 1-10 when executing the computer program.

13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which is read and executed by a processor to implement the object drag-and-drop sorting method as described in any one of claims 1-10.