Cursor positioning method in digital system based on gravitational value calculation

Through the gravity value calculation method, the problem of inaccurate cursor position in the digital system is solved, the precise positioning of the component insertion position is achieved, and the user experience and system flexibility are improved.

CN120704564APending Publication Date: 2025-09-26CHINA HYDROELECTRIC ENGINEERING CONSULTING GROUP CHENGDU RESEARCH HYDROELECTRIC INVESTIGATION DESIGN AND INSTITUTE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510870400.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-26
Publication Date
2025-09-26

AI Technical Summary

Technical Problem

In existing digital systems, inaccurate cursor positioning leads to unclear component insertion locations. This is especially true in complex nested layouts, where positioning errors are large, flexibility is insufficient, obscured components are easily misjudged, layout impacts are not fully considered, and intuitiveness is poor, all of which affects the user experience.

Method used

A method based on gravity value calculation is adopted. By traversing the edges of all components on the canvas, the gravity value of the edges is calculated, and the edge with the largest gravity value is selected as the prompt insertion position of the component carried by the cursor. Empty containers are highlighted when the cursor hovers over them. When calculating the gravity value of the edge, discrete sampling is performed and the number of sampling points is dynamically adjusted to meet the performance and accuracy of real-time interactive response.

Benefits of technology

The accuracy of cursor positioning and the clarity of insertion position are improved, positioning errors are reduced, and the flexibility of the system and user experience are enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120704564A_ABST
    Figure CN120704564A_ABST
Patent Text Reader

Abstract

The invention provides a cursor positioning method in a digital system based on gravitational value calculation, and relates to the technical field of software development, when a cursor is not hovered, edges of all components on a canvas are traversed, gravitational values of the edges are calculated, the edge with the maximum gravitational value is selected as a prompt insertion position of the component carried by the cursor, and when the cursor is hovered, the edge with the maximum gravitational value is selected as a prompt insertion position of the component carried by the cursor. Judging a cursor hovering position, if the cursor hovers on a certain component, calculating gravitation values of all edges of the certain component, and selecting the edge with the maximum gravitation value as a prompt insertion position of the component carried by the cursor; and if the cursor hovers on the empty container, highlight prompting is performed on the empty container, so that the problem that the insertion position of the component is not clear due to inaccurate cursor position in the existing digital system is solved, and the method and the device are suitable for component layout in the digital system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of software development, and in particular to a cursor positioning method in a digital system based on gravity value calculation. Background Art

[0002] Currently, digital systems are usually low-code form development platforms, which are widely used in the field of enterprise information construction. They allow users to quickly build user interfaces by dragging and dropping components. They are usually divided into three functional areas: components, canvas area, and component property panel. Users drag components to the canvas area to layout the page. During this process, precise cursor positioning is required to clearly determine the component insertion position.

[0003] The existing technologies mainly include: 1. Positioning method based on cursor hover state: detect the component area where the mouse is located and determine the position based on the component type (block level or inline); 2. Container highlighting method: Hovering the cursor over an empty container will highlight the container but not specify the insertion position. An empty container refers to a component that is not configured with specific functions or content.

[0004] The above method has problems such as large positioning error, insufficient flexibility, easy misjudgment of obscured components, insufficient consideration of layout impact, and poor intuitiveness when dealing with complex nested layouts, which seriously affect the user experience. Summary of the Invention

[0005] Technical problem solved by the present invention: The present invention provides a cursor positioning method in a digital system based on gravity value calculation, which solves the problem of unclear component insertion position caused by inaccurate cursor position in existing digital systems.

[0006] The present invention solves the above-mentioned technical problem by adopting a technical solution: a cursor positioning method in a digitization system based on gravity value calculation, wherein the digitization system includes a canvas area and a component, the cursor is used to carry the component and determine the position of the component in the canvas area, and the method includes the following steps: S1. Determine whether the cursor is hovering. If not, traverse the edges of all components on the canvas and calculate the gravity values ​​of the edges. Select the edge with the largest gravity value as the hint insertion position for the component carried by the cursor. S2. If the cursor is hovering, determine the cursor hovering position. If the cursor is hovering over a component, calculate the gravity values ​​of all edges of the component, select the edge with the largest gravity value as the prompt insertion position of the component carried by the cursor; if the cursor is hovering over an empty container, highlight the empty container.

[0007] Furthermore, calculating the gravity value of the edge includes: discretely sampling the edge to obtain multiple sampling points, calculating the gravity value between the sampling points and the cursor based on the coordinates of the sampling points and the coordinates of the cursor, and summing the values ​​to obtain the gravity value of the edge.

[0008] Furthermore, the number of sampling points is dynamically adjusted according to the user operation speed and the cursor movement path.

[0009] Furthermore, the formula for calculating the gravitational force between the sampling point and the cursor based on the coordinates of the sampling point and the cursor is: ,in, Indicates the The gravitational force between the sampling point and the cursor, Indicates the edge The coordinates of the sampling points, Indicates the coordinates of the cursor, Indicates the edge The weight of the sampling points.

[0010] Furthermore, if the distance between the cursor and the sampling point is less than a threshold, the attraction value between the sampling point and the cursor is a fixed upper limit value.

[0011] Furthermore, the formula for calculating the gravitational value of an edge is: ,in, represents the gravitational value of the edge, Indicates the number of sampling points of the edge.

[0012] Furthermore, if there is occlusion between the cursor and the edge, the attraction value between the cursor and the edge is not calculated.

[0013] Beneficial effects of the present invention: The present invention provides a cursor positioning method in a digitization system based on gravity value calculation. When the cursor is not hovering, the edges of all components on the canvas are traversed, and the gravity values ​​of the edges are calculated. The edge with the largest gravity value is selected as the prompt insertion position of the component carried by the cursor. When the cursor is hovering, the cursor hovering position is judged. If the cursor hovers over a certain component, the gravity values ​​of all edges of the certain component are calculated, and the edge with the largest gravity value is selected as the prompt insertion position of the component carried by the cursor; if the cursor hovers over an empty container, the empty container is highlighted, which solves the problem of unclear component insertion position caused by inaccurate cursor position in existing digitization systems. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1 The present invention provides a flowchart of a cursor positioning method in a digital system based on gravity value calculation. DETAILED DESCRIPTION

[0015] The present invention aims to solve the problem that the position of component insertion is unclear due to inaccurate cursor position in the existing digitization system. The digitization system includes a canvas area and components. The cursor is used to carry the components and determine the position of the components in the canvas area. A cursor positioning method in the digitization system based on gravity value calculation is provided. Figure 1 As shown, the following steps are included: S1. Determine whether the cursor is hovering. If not, traverse the edges of all components on the canvas and calculate the gravity values ​​of the edges. Select the edge with the largest gravity value as the hint insertion position for the component carried by the cursor. S2. If the cursor is hovering, determine the cursor hovering position. If the cursor is hovering over a component, calculate the gravity values ​​of all edges of the component, select the edge with the largest gravity value as the prompt insertion position of the component carried by the cursor; if the cursor is hovering over an empty container, highlight the empty container.

[0016] In particular, if there is an occlusion between the cursor and the edge, the gravity value between the cursor and the edge is not calculated, preventing the penetrating gravity effect of large components on small components, ensuring the accuracy and rationality of insertion judgment.

[0017] Specifically, calculating the gravitational value of the edge includes: discretely sampling the edge to obtain multiple sampling points, calculating the gravitational value between the sampling points and the cursor based on the coordinates of the sampling points and the coordinates of the cursor, and summing the values ​​to obtain the gravitational value of the edge.

[0018] For the data of sampling points, the number of sampling points can be dynamically adjusted according to the user's operation speed and cursor movement path, so as to meet the performance of real-time interactive response while ensuring the accuracy of the prompt insertion position.

[0019] The formula for calculating the gravitational force between the sampling point and the cursor based on the coordinates of the sampling point and the cursor is: ,in, Indicates the The gravitational force between the sampling point and the cursor, Indicates the edge The coordinates of the sampling points, Indicates the coordinates of the cursor, Indicates the edge The weight of the sampling points.

[0020] In particular, if the distance between the cursor and the sampling point is less than the threshold, the gravity value between the sampling point and the cursor is a fixed upper limit value, and the above calculation formula is not sampled. In this way, abnormally high gravity values ​​are avoided and the stability and reliability of the gravity value are maintained.

[0021] The formula for calculating the gravitational value of an edge is: ,in, represents the gravitational value of the edge, Indicates the number of sampling points of the edge, ,in, , represents the distance between the cursor and the sampling point, Indicates a fixed upper limit value, Indicates the threshold value.

Claims

1. A cursor positioning method in a digital system based on gravity value calculation, characterized in that: The digitizing system includes a canvas area and a component, the cursor is used to carry the component and determine the position of the component in the canvas area, and the method includes the following steps: S1. Determine whether the cursor is hovering. If not, traverse the edges of all components on the canvas and calculate the gravity values ​​of the edges. Select the edge with the largest gravity value as the hint insertion position for the component carried by the cursor. S2. If the cursor is hovering, determine the cursor hovering position. If the cursor is hovering over a component, calculate the gravity values ​​of all edges of the component, select the edge with the largest gravity value as the prompt insertion position of the component carried by the cursor; if the cursor is hovering over an empty container, highlight the empty container.

2. The cursor positioning method in a digital system based on gravity value calculation according to claim 1, characterized in that: Calculating the gravitational value of the edge includes: discretely sampling the edge to obtain multiple sampling points, calculating the gravitational value between the sampling points and the cursor according to the coordinates of the sampling points and the coordinates of the cursor, and summing the sum to obtain the gravitational value of the edge.

3. The cursor positioning method in a digital system based on gravity value calculation according to claim 2, characterized in that: The number of sampling points is dynamically adjusted according to the user's operation speed and cursor movement path.

4. The cursor positioning method in a digital system based on gravity value calculation according to claim 2, characterized in that: The formula for calculating the gravitational force between the sampling point and the cursor based on the coordinates of the sampling point and the cursor is: ,in, Indicates the The gravitational force between the sampling point and the cursor, Indicates the edge The coordinates of the sampling points, Indicates the coordinates of the cursor, Indicates the edge The weight of the sampling points.

5. The cursor positioning method in a digital system based on gravity value calculation according to claim 4, characterized in that: If the distance between the cursor and the sampling point is less than the threshold, the attraction value between the sampling point and the cursor is a fixed upper limit value.

6. The cursor positioning method in a digital system based on gravity value calculation according to claim 5, characterized in that: The formula for calculating the gravitational value of an edge is: ,in, represents the gravitational value of the edge, Indicates the number of sampling points of the edge.

7. The cursor positioning method in a digital system based on gravity value calculation according to claim 1, characterized in that: If there is occlusion between the cursor and the edge, the gravitational force between the cursor and the edge is not calculated.