Cursor-based object highlighting method, intelligent terminal and storage medium

By collecting object selection information when the cursor moves and performing hover highlighting operations when the timer is triggered, the cursor stuck problem is solved and the user experience and graphics display efficiency are improved.

CN115686314BActive Publication Date: 2024-09-24ZWCAD SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211248129.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-12
Publication Date
2024-09-24
Estimated Expiration
2042-10-12

AI Technical Summary

Technical Problem

In drawings with complex scenes, frequent hover highlighting and de-highlighting of objects causes the cursor to freeze when the cursor moves, affecting the user experience.

Method used

By obtaining the cursor movement information, the object selection information is collected according to the cursor position and preset instructions, and the hover highlighting operation is performed when the timer is triggered to reduce the refresh frequency and avoid cursor lag.

Benefits of technology

Improved the smoothness of cursor movement and graphics display efficiency, improving user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115686314B
    Figure CN115686314B
Patent Text Reader

Abstract

The present invention provides a cursor-based object highlighting method, an intelligent terminal and a storage medium. The cursor-based object highlighting method comprises: S101: obtaining cursor movement information, obtaining object selection information according to cursor position information in the cursor movement information and preset instruction receiving information, and clearing the hovering highlighted object before the cursor moves; S102: when a timer is triggered and it is determined that the hovering highlighting condition is met, performing a hovering highlighting operation according to sub-segment selection information or object selection information. The present invention reduces the interference of object highlighting on cursor movement and the frequency of refresh operations, is not prone to the problem of cursor stuck points, has high graphics or image display efficiency, and improves user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of CAD technology, and in particular to a cursor-based object highlighting method, an intelligent terminal and a storage medium. Background Art

[0002] In drawings with complex scenes, when users are editing or viewing drawings, in order to quickly know the cursor's movement route, position, and whether the cursor has moved to the target object, a hover highlight operation is adopted, that is, the object that the cursor passes by is hover highlighted.

[0003] However, when the user frequently moves the cursor or passes over complex objects (such as blocks, groups, etc.), the cursor can be clearly felt to be "stuck". The cursor is "stuck" because the object under the cursor is constantly hovering and highlighting when the cursor passes over the object. When the cursor moves, the object under the cursor is unconditionally hovering and highlighting, triggering a refresh operation. Since the refresh takes a certain amount of time, the cursor movement is stuck, which greatly affects the user experience. Summary of the invention

[0004] In order to overcome the shortcomings of the prior art, the present invention proposes a cursor-based object highlighting method, an intelligent terminal and a storage medium. When the cursor moves, object selection information is collected according to the cursor position and preset instructions, and after the timer is triggered and the hover highlighting conditions are met, the hover highlighting operation is performed according to the selected sub-segment or object selection information, thereby reducing the interference of object highlighting on cursor movement and reducing the refresh operation frequency, making it less likely for the cursor to get stuck, and the graphics or image display efficiency is high, thereby improving the user experience.

[0005] To solve the above problems, the present invention adopts a technical solution: a cursor-based object highlighting method, which includes: S101: obtaining cursor movement information, obtaining object selection information according to cursor position information in the cursor movement information and preset instruction receiving information, and clearing the hovering highlighted objects before the cursor moves; S102: when the timer is triggered and it is determined that the hover highlighting conditions are met, performing the hover highlighting operation according to the sub-segment selection information or the object selection information.

[0006] Furthermore, the step of obtaining object selection information based on the cursor position information in the cursor movement information and the preset instruction specifically includes: judging whether the position of the cursor in the previous frame and the current frame has changed based on the cursor position information; if so, obtaining the object selection information based on the information of the current frame and the previous frame, wherein the information includes hover highlight information and object selection information; if not, judging whether the preset instruction has been received based on the preset instruction receiving information, and executing the selection set acquisition operation based on the judgment result.

[0007] Furthermore, the step of obtaining object selection information based on information of the current frame and the previous frame specifically includes: after determining that the object selection information obtaining condition is met based on the information, generating object selection information based on the object selected in the current frame, and the object selection information obtaining condition includes that there is a hovered highlighted object in the previous frame, and the selected object in the current frame is different from the selected object in the previous frame.

[0008] Furthermore, the step of acquiring object selection information according to information of the current frame and the previous frame further includes: after determining according to the information that the object selection information acquisition condition is not met, managing the cache and the timer, and ending the object selection information acquisition operation.

[0009] Furthermore, the step of executing the selection set acquisition operation according to the judgment result specifically includes: after determining according to the judgment result that a preset instruction has been received, executing a circular selection operation to acquire a selected object, and determining an object to be put into the selection set according to the attributes of the selected object.

[0010] Furthermore, the step of determining the object to be put into the selection set according to the attributes of the selected object specifically includes: judging whether the selected object is in a group; if so, adding all entities in the group to the selection set; if not, adding the selected object to the selection set.

[0011] Furthermore, the step of performing a hover highlight operation based on sub-segment selection information or object selection information specifically includes: determining whether a sub-segment highlight reactor is registered; if so, obtaining the selected sub-segment, and performing a hover highlight operation based on the selected sub-segment; if not, obtaining the selected object, determining the object to be put into the selection set based on the attributes of the selected object, and highlighting the selection set.

[0012] Furthermore, the step of performing a hover highlight operation based on the selected sub-segment specifically includes: sending a notification to a sub-segment highlight reactor, processing the sub-segment according to an input instruction, adding the processed sub-segment to a selection set, and highlighting the selection set.

[0013] Based on the same inventive concept, the present invention also proposes an intelligent terminal, which includes a processor and a memory. The processor is communicatively connected to the memory. The memory stores a computer program, and the computer program is used to execute the cursor-based object highlighting method as described above.

[0014] Based on the same inventive concept, the present invention further proposes a computer-readable storage medium, wherein the computer-readable storage medium stores program data, and the program data is used to execute the cursor-based object highlighting method as described above.

[0015] Compared with the prior art, the beneficial effects of the present invention are: when the cursor moves, the object selection information is collected according to the cursor position and preset instructions, and after the timer is triggered and the hover highlight conditions are met, the hover highlight operation is performed according to the selected sub-segment or object selection information, thereby reducing the interference of object highlight on cursor movement and reducing the refresh operation frequency, making it less likely for the cursor to get stuck, and the graphics or image display efficiency is high, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 It is a flow chart of an embodiment of a cursor-based object highlighting method of the present invention;

[0017] Figure 2 A flowchart of an embodiment of timer resetting and canceling in a cursor-based object highlighting method of the present invention;

[0018] Figure 3 A logic diagram of an embodiment of timer triggering in a cursor-based object highlighting method of the present invention;

[0019] Figure 4 It is a structural diagram of an embodiment of a smart terminal;

[0020] Figure 5 This is a structural diagram of an embodiment of a computer-readable storage medium of the present invention. DETAILED DESCRIPTION

[0021] The following describes the implementation methods of the present application through specific specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. The present application can also be implemented or applied through other different specific implementation methods, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that the various embodiments of the present disclosure generally described and shown in the accompanying drawings here can be combined with each other without conflict, and the structural components or functional modules therein can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the accompanying drawings is not intended to limit the scope of the present disclosure claimed for protection, but merely represents the selected embodiments of the present disclosure. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present disclosure.

[0022] The terms used in the disclosure of this application are only for the purpose of describing specific embodiments and are not intended to limit the present disclosure. The singular forms of "a", "said" and "the" used in the present disclosure and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0023] See also Figure 1-3 ,in, Figure 1 It is a flow chart of an embodiment of a cursor-based object highlighting method of the present invention; Figure 2 A flowchart of an embodiment of timer resetting and canceling in a cursor-based object highlighting method of the present invention; Figure 3 This is a logic diagram of an embodiment of a timer trigger in a cursor-based object highlighting method of the present invention. Figure 1-3 The cursor-based object highlighting method of the present invention is described.

[0024] In this embodiment, the cursor-based object highlighting method can be applied to smart terminals such as mobile phones, computers, tablet computers, laptops, robots, etc., as long as the smart terminal can be used for CAD drawing display, and no limitation is made here.

[0025] In this embodiment, the cursor-based object highlighting method includes:

[0026] S101: obtaining cursor movement information, obtaining object selection information according to cursor position information in the cursor movement information and preset instruction receiving information, and clearing the hovering highlighted objects before the cursor moves.

[0027] In this embodiment, the step of obtaining object selection information based on the cursor position information in the cursor movement information and the preset instruction specifically includes: judging whether the position of the cursor in the previous frame and the current frame has changed based on the cursor position information; if so, obtaining the object selection information based on the information of the current frame and the previous frame, the information including hover highlight information and object selection information; if not, judging whether the preset instruction has been received based on the preset instruction receiving information, and executing the selection set acquisition operation based on the judgment result.

[0028] Specifically, the intelligent terminal receives the cursor movement message, determines whether the current cursor position is different from the position of the previous frame and has changed. If not, determines whether a preset instruction has been received; if changed, continues to process backward to obtain object selection information.

[0029] In this embodiment, the preset instruction is an instruction generated by pressing the Shift+Space keys on the keyboard at the same time. In other embodiments, the preset instruction may also be an instruction generated by pressing other keys on the keyboard to instruct the execution of a circular selection operation. The specific instruction type can be set according to actual needs.

[0030] In this embodiment, the step of obtaining object selection information based on information of the current frame and the previous frame specifically includes: after determining that the object selection information obtaining conditions are met based on the information, generating object selection information based on the object selected in the current frame, and the object selection information obtaining conditions include the existence of a hover highlighted object in the previous frame, and the selected object in the current frame is different from the selected object in the previous frame.

[0031] Specifically, after determining that the cursor position has changed, first determine whether there is a hovering highlighted object in the previous frame. If so, then determine whether there is an object selected in the current frame. If an object is selected, then determine whether the selected object is the same as the object selected in the previous frame. If they are different, put the object selected in the current frame into the object selection information, and after obtaining the object selection information, reset the timer and back up the selected object.

[0032] The step of obtaining the selected object of the previous frame and the current frame specifically includes: judging whether there is an object intersecting with the cursor according to the position information before and after the cursor moves; if so, determining that the object is selected; if not, the object is not selected. Specifically, judging whether the cursor and the object under the cursor intersect according to the position of the cursor and the position of the object under the cursor.

[0033] In this embodiment, the step of acquiring object selection information according to information of the current frame and the previous frame further includes: after determining according to the information that the object selection information acquisition condition is not met, managing the cache and the timer, and ending the object selection information acquisition operation.

[0034] In a specific embodiment, it is determined whether there is a hover-highlighted object in the previous frame. If not, the cache is cleared and the timer is reset. If yes, it is determined whether an object is selected by the position of the cursor in the current frame. If no object is selected, it means that the cursor has moved to a blank space, and it is necessary to clear the cache and reset the timer. If an object is selected, it is necessary to determine whether it is the same object as the previously selected object. If it is the same, it means that the cursor is on the same object, and only the timer needs to be canceled without canceling the highlight. If it is different, it means that the cursor has moved to a new object, and it is necessary to cancel the highlight of the original object. By clearing the cache, it is prevented that the object selection information, hover highlight information and other information in the cache interfere with the current information.

[0035] In this embodiment, resetting the timer means reinstalling the timer, that is, restarting the timing. After the set time is reached, it will be triggered and a response message will be sent. The user or smart terminal can receive the message to process the timing event. Timer cancellation: refers to no longer using the timer, and there will be no response message. Timer triggering: when the timer is installed and the corresponding function is triggered after the set time. The present invention reasonably sets the reset and cancellation of the timer according to the new position of the mouse. When the cursor moves away from a highlighted object, its highlight is immediately canceled. However, when the cursor moves to a new object, it is not immediately highlighted. Instead, through the mechanism of the timer, it is determined whether it needs to be highlighted after a period of time, which plays a delay role to avoid frequent highlighting and anti-highlighting when the cursor moves quickly.

[0036] In this embodiment, the step of executing the selection set acquisition operation according to the judgment result specifically includes: after determining according to the judgment result that a preset instruction has been received, executing a circular selection operation to acquire a selected object, and determining an object to be put into the selection set according to the attributes of the selected object.

[0037] The step of determining the object to be put into the selection set according to the properties of the selected object specifically includes: judging whether the selected object is in the group; if so, adding all entities in the group to the selection set; if not, adding the selected object to the selection set.

[0038] Specifically, circular selection means that when multiple entities overlap, when the cursor moves to the top entity, if you want to select the entity on the lower layer, you can cyclically switch between different entities by entering preset commands; a group is a combination of entity objects, for example, a straight line and a circle can form a group. When a straight line is selected for highlighting, the circle also needs to be highlighted because it is in the same group.

[0039] In a specific embodiment, if the user presses the Shift+Space keys on the keyboard, it means that the preset instruction is received and the circular selection is confirmed. Then, it is necessary to adjust the cursor of the current circular selection, obtain the selected object according to the movement of the cursor and the instruction, and then further determine whether the selected object is in the group. If so, it is necessary to obtain all entities in the group. If not, only the selected object is added to the selection set.

[0040] In this embodiment, after obtaining the object selection information, the hovering highlighted objects in the previous frame are cleared, the objects selected in the object selection information are backed up, and the timer is waited to be triggered.

[0041] S102: When the timer is triggered and it is determined that the hover highlight condition is met, a hover highlight operation is performed according to the sub-segment selection information or the object selection information.

[0042] In this embodiment, the timer counts, and when the specified time arrives, the object currently selected by the cursor is obtained, a corresponding message is sent, and the message response function is triggered. After the message response function is triggered, the object currently selected by the cursor is obtained again to determine whether the hover highlight condition is met.

[0043] Specifically, it is determined whether hover highlighting can be performed according to the switch set by the user. If so, it is determined that the hover highlighting condition is met. If not, it is determined that the hover highlighting condition is not met.

[0044] In this embodiment, the step of performing a hover highlight operation based on sub-segment selection information or object selection information specifically includes: determining whether a sub-segment highlight reactor is registered; if so, obtaining the selected sub-segment, and performing a hover highlight operation based on the selected sub-segment; if not, obtaining the selected object, determining the object to be put into the selection set based on the properties of the selected object, and highlighting the selection set.

[0045] The step of performing the hover highlight operation based on the selected sub-segment specifically includes: sending a notification to the sub-segment highlight reactor, processing the sub-segment according to the input instruction, adding the processed sub-segment to the selection set, and highlighting the selection set.

[0046] Specifically, a sub-segment refers to a partial segment of an entity, such as a multi-segment line composed of multiple lines, one or more of which are collectively referred to as a sub-segment. The sub-segment highlighting reactor is a reactor registered by the user through secondary development. When the reactor exists, a sub-segment selection is required after the entity is selected, and the selected sub-segment is notified to the user through the reactor. The user can customize the selected sub-segment, such as removing the selected part of the line from the selected sub-segment, the sub-segment highlighting method, the sub-segment size, etc.

[0047] When the sub-segment highlight reactor is not registered, determine whether the currently selected object is in the group. If so, add all entities in the group to the selection set. If not, add the currently selected object to the selection set and highlight the selection set.

[0048] In a specific embodiment, it is determined whether hover highlighting can be performed based on a switch set by the user, if not, the process ends; if yes, it is determined whether the user has registered a sub-segment highlight reactor, if so, the sub-segment is selected, and after obtaining the sub-segment, the user is notified through the relevant interface of the reactor, the selected sub-segment is processed according to the instructions in the interface, and after processing, the processed sub-segment is added to the selection set; if not registered, it is determined whether the selected object is in the group, if so, all entities in the group are obtained and added to the selection set, and the entire group can be highlighted later; if not, only the selected object is added to the selection set, the highlight operation is performed on the objects in the selection set, and the content displayed on the screen is updated.

[0049] The present invention sets and cancels the timer reasonably to identify the time the cursor stays on the object, and then highlights it; when it moves away, the highlight is immediately canceled. This solution can optimize the hover highlighting and anti-highlighting mechanism, improve the smoothness of the cursor movement process, make it meet user expectations, and do not affect efficiency, thereby improving user experience.

[0050] Based on the same inventive concept, the present invention also proposes an intelligent terminal, see Figure 4 , Figure 4 This is a structural diagram of an embodiment of the intelligent terminal of the present invention, combined with Figure 4 The intelligent terminal of the present invention is described in detail.

[0051] In this embodiment, the intelligent terminal includes a processor and a memory. The processor is in communication with the memory. The memory stores a computer program. The computer program is used to execute the cursor-based object highlighting method as described in the above embodiment.

[0052] It should be noted that the intelligent terminal may include a processor, a memory, a network interface and a database connected via a system bus. Among them, the processor of the intelligent terminal is used to provide computing and control capabilities. The memory of the intelligent terminal includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the intelligent terminal is used to store the data involved in the above-mentioned embodiment method. The network interface of the intelligent terminal is used to communicate with an external terminal through a network connection.

[0053] It should also be noted that the processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor, etc. The processor is the control center of the computer device, and uses various interfaces and lines to connect various parts of the entire computer device.

[0054] The memory can be used to store computer programs and / or modules. The processor implements various functions of the computer device by running or executing the computer programs and / or modules stored in the memory and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, program instructions for implementing the method in the above embodiment, etc. The data storage area can store data processed by the program instructions of the method in the above embodiment.

[0055] Based on the same inventive concept, the present invention also provides a computer-readable storage medium, see Figure 5 , Figure 5 The structure diagram of an embodiment of the computer readable storage medium of the present invention is shown in FIG. Figure 5 The computer-readable storage medium of the present invention is described.

[0056] In this embodiment, a computer-readable storage medium stores program data, and the program data is used to execute the cursor-based object highlighting method described in the above embodiment.

[0057] The computer-readable storage medium may include, but is not limited to, a floppy disk, an optical disk, a CD-ROM (compact disk-read only memory), a magneto-optical disk, a ROM (read only memory), a RAM (random access memory), an EPROM (erasable programmable read-only memory), an EEPROM (electrically erasable programmable read-only memory), a magnetic card or an optical card, a flash memory, or other types of media / machine-readable media suitable for storing machine-executable instructions. The computer-readable storage medium may be a product that is not connected to a smart terminal, or a component that is connected to a smart terminal for use.

[0058] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0059] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A cursor-based object highlighting method, characterized in that: The cursor-based object highlighting method comprises: S101: obtaining cursor movement information, obtaining object selection information according to cursor position information in the cursor movement information and preset instruction receiving information, and clearing the hovering highlighted objects before the cursor moves; The step of obtaining object selection information according to the cursor position information in the cursor movement information and the preset instruction specifically includes: judging whether the position of the cursor in the previous frame and the current frame has changed according to the cursor position information; if so, obtaining object selection information according to the information of the current frame and the previous frame, wherein the information of the previous frame includes hover highlight information and object selection information; The step of obtaining object selection information according to information of the current frame and the previous frame specifically includes: After determining that the object selection information acquisition condition is met according to the information of the previous frame, the object selection information is generated according to the object selected in the current frame, wherein the object selection information acquisition condition includes that there is a hovering highlighted object in the previous frame, and the selected object in the current frame is different from the selected object in the previous frame; After determining that the object selection information acquisition condition is not met according to the information of the previous frame, managing the cache and the timer, and ending the object selection information acquisition operation; S102: When the timer is triggered and it is determined that the hover highlight condition is met, a hover highlight operation is performed according to the sub-segment selection information or the object selection information.

2. The cursor-based object highlighting method according to claim 1, characterized in that: The step of obtaining object selection information according to the cursor position information in the cursor movement information and the preset instruction specifically includes: Determining whether the position of the cursor in the previous frame and the current frame has changed according to the cursor position information; If not, it is determined whether the preset instruction is received according to the preset instruction reception information, and the selection set acquisition operation is performed according to the determination result.

3. The cursor-based object highlighting method according to claim 2, characterized in that: The step of performing the selection set acquisition operation according to the judgment result specifically includes: After receiving the preset instruction according to the judgment result, a circular selection operation is performed to obtain the selected object, and the object to be put into the selection set is determined according to the attributes of the selected object.

4. The cursor-based object highlighting method according to claim 3, characterized in that: The step of determining the objects to be put into the selection set according to the properties of the selected objects specifically includes: Determine whether the selected object is in the group; If so, add all entities in the group to the selection set; If not, the selected object is added to the selection set.

5. The cursor-based object highlighting method according to claim 1, characterized in that: The step of performing the hover highlight operation according to the sub-segment selection information or the object selection information specifically includes: Determine whether the sub-fragment highlight reactor is registered; If yes, get the selected sub-segment, and perform a hover highlight operation based on the selected sub-segment; If not, get the selected object, determine the object to put into the selection set according to the properties of the selected object, and highlight the selection set.

6. The cursor-based object highlighting method according to claim 5, characterized in that: The step of performing a hover highlight operation based on the selected sub-segment specifically includes: A notification is sent to the sub-segment highlighting reactor, the sub-segment is processed according to the input instruction, the processed sub-segment is added to the selection set, and the selection set is highlighted.

7. An intelligent terminal, characterized in that: The intelligent terminal comprises a processor and a memory, wherein the processor is in communication connection with the memory, and the memory stores a computer program, wherein the computer program is used to execute the cursor-based object highlighting method according to any one of claims 1 to 6.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program data, and the program data is used to execute the cursor-based object highlighting method according to any one of claims 1 to 6.