Dragging rotation method and electronic equipment
By obtaining the initial angle and position information of the device ball, adjusting the display position of the device ball on the trust ring, the problem that the device ball movement trajectory is not along the trust ring trajectory, and the continuous movement of the device ball and the improvement of the user experience are achieved.
Patent Information
- Application Number
- CN202410042179.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-10
- Publication Date
- 2025-07-18
AI Technical Summary
When a user drags the device ball, the movement trajectory of the device ball does not move along the trust ring trajectory, resulting in a poor user experience.
By obtaining the initial angle, first position and second position of the device ball to be dragged, the display position of the device ball on the trust ring is determined based on these parameters, and the display position of the device ball is adjusted according to the rotation direction and angle of the drag operation.
Ensure that the device ball moves continuously on the trust ring as the user drags and drops, enhances the interaction between the user and the device, and improves the user experience.
Smart Images

Figure CN120335689A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the technical field of terminals, and in particular, to a dragging and rotating method and an electronic device. Background Art
[0002] When a user uses a device interconnection application, the user can drag a device ball in the device interconnection application to rotate it around the user's avatar (i.e., the center of the trust ring). Generally, the device balls are arranged on the trust ring. Therefore, ideally, when the user drags a device ball, the device ball should move along the trajectory of the trust ring.
[0003] Since the user's dragging trajectory does not necessarily coincide with the trajectory of the trust ring, if the movement coordinates of the device ball are updated according to the user's dragging trajectory, it is impossible to ensure that the device ball updates its position along the trajectory of the trust ring. If the movement coordinates of the device ball are updated according to the overlapping part of the user's dragging trajectory and the trajectory of the trust ring, when the user's dragging trajectory deviates from the trajectory of the trust ring, the device ball will stop moving and no longer follow the movement, which will result in a poor user experience. Therefore, when the user drags a device ball, how to make the device ball move along the trajectory of the trust ring is an urgent problem to be solved currently. Summary of the Invention
[0004] The embodiments of the present application provide a dragging and rotating method and an electronic device. When the user drags a device ball, the device ball can move along the trajectory of the trust ring, thereby enhancing the interaction between the user and the device.
[0005] To achieve the above object, the embodiments of the present application adopt the following technical solutions:
[0006] In a first aspect, the embodiments of the present application provide a dragging and rotating method, including: in response to a user's dragging operation on a device ball to be dragged on a trust ring, obtaining an initial angle, a first position, and a second position of the device ball to be dragged; the first position is used to represent the position of the device ball to be dragged before dragging, and the second position is used to represent the position of the device ball to be dragged after dragging; determining a display position of the device ball to be dragged on the trust ring based on the first position, the second position, and the initial angle; and displaying the device ball to be dragged on the trust ring based on the display position of the device ball to be dragged on the trust ring.
[0007] Based on the dragging and rotating method of the first aspect, the present disclosure obtains the display position of the device ball to be dragged on the trust ring by obtaining the initial angle of the device ball to be dragged, the position of the device ball to be dragged before dragging, and the position of the device ball to be dragged after dragging. Then, the device ball to be dragged is displayed on the trust ring according to the display position. In this way, not only can it be ensured that the device ball to be dragged always moves on the trust ring along with the user's dragging operation, but also the interaction between the user and the device can be enhanced, and the user experience can be improved.
[0008] In another possible implementation manner in combination with the first aspect, based on the first position, the second position, and the initial angle, determining the display position of the device ball to be dragged on the trust ring includes: obtaining initialization parameters, where the initialization parameters include the center position of the trust ring; based on the first position, the second position, and the center position of the trust ring, determining the dragging angle corresponding to the device ball to be dragged and the rotation direction corresponding to the dragging operation; based on the initial angle, the initialization parameters, the dragging angle corresponding to the device ball to be dragged, and the rotation direction corresponding to the dragging operation, determining the display position of the device ball to be dragged on the trust ring.
[0009] Based on this solution, through the positional relationship between the device ball to be dragged and the trust ring, parameters related to this positional relationship are obtained (for example, the center position of the trust ring, the first position, the second position, etc.). Then, these parameters are used to determine the dragging angle corresponding to the device ball to be dragged and the rotation direction corresponding to the dragging operation, so as to use the dragging angle corresponding to the device ball to be dragged and the rotation direction corresponding to the dragging operation to obtain the display position of the device ball to be dragged on the trust ring, thereby making the obtained display position of the device ball to be dragged on the trust ring more accurate and providing a better display effect for the user.
[0010] In another possible implementation manner in combination with the first aspect, based on the initial angle, the initialization parameters, the dragging angle corresponding to the device ball to be dragged, and the rotation direction corresponding to the dragging operation, determining the display position of the device ball to be dragged on the trust ring includes: based on the rotation direction corresponding to the dragging operation and the dragging angle corresponding to the device ball to be dragged, determining the adjustment angle; based on the initial angle and the adjustment angle, determining the angle to be rotated of the device ball to be dragged; based on the initialization parameters and the angle to be rotated of the device ball to be dragged, determining the display position of the device ball to be dragged on the trust ring.
[0011] Based on this solution, through the rotation direction corresponding to the dragging operation and the dragging angle, the adjustment angle can be accurately obtained, thereby realizing fine adjustment of the position of the device ball to be dragged. Then, according to the combination of the initial angle and the adjustment angle, the angle to be rotated of the device ball to be dragged is obtained, so that the obtained angle to be rotated is more accurate.
[0012] In another possible implementation manner in combination with the first aspect, based on the rotation direction corresponding to the dragging operation and the dragging angle corresponding to the device ball to be dragged, determining the adjustment angle includes: when the rotation direction corresponding to the dragging operation is the clockwise direction, determining the dragging angle corresponding to the device ball to be dragged as the adjustment angle; when the rotation direction corresponding to the dragging operation is the counterclockwise direction, performing an inversion process on the dragging angle corresponding to the device ball to be dragged to obtain the processed angle, and determining the processed angle as the adjustment angle. Based on this solution, an example of determining the adjustment angle based on the rotation direction is provided.
[0013] In another possible implementation manner in combination with the first aspect, after determining the rotation angle to be rotated of the device ball to be dragged, the method further includes: when the rotation angle to be rotated is within a preset range, correcting the rotation angle to be rotated to obtain a corrected rotation angle; the preset range is less than a first threshold or greater than or equal to a second threshold; the value range corresponding to the corrected rotation angle meets the requirements; determining the display position of the device ball to be dragged on the trust ring based on the initialization parameter and the corrected rotation angle.
[0014] Based on this solution, after obtaining the rotation angle to be rotated, the rotation angle to be rotated can be further corrected to ensure that the corrected rotation angle is within the preset range, thereby avoiding unreasonable rotations beyond the range. In this way, the accuracy and stability of position calculation can be improved, making the display position of the device ball to be dragged more accurate and reliable.
[0015] In another possible implementation manner in combination with the first aspect, the initialization parameter further includes the trust ring radius and the device ball radius; determining the display position of the device ball to be dragged on the trust ring based on the initialization parameter and the corrected rotation angle includes: determining the coordinates corresponding to the center display position of the device ball to be dragged on the trust ring based on the trust ring center position, the trust ring radius, and the corrected rotation angle; obtaining the display position of the device ball to be dragged on the trust ring according to the coordinates corresponding to the center display position of the device ball to be dragged on the trust ring and the device ball radius.
[0016] Based on this solution, determining the coordinates corresponding to the center display position of the device ball to be dragged on the trust ring through the trust ring center position, the trust ring radius, and the corrected rotation angle can ensure that the display position of the device ball to be dragged has high accuracy and precision. In this way, users can more accurately understand the specific position of the device ball to be dragged on the trust ring.
[0017] In another possible implementation manner in combination with the first aspect, determining the rotation direction corresponding to the drag operation based on the first position, the second position, and the trust ring center position includes: determining a first Boolean parameter, a second Boolean parameter, a third Boolean parameter, a fourth Boolean parameter, and a fifth Boolean parameter based on the first position, the second position, and the trust ring center position; the first Boolean parameter is used to represent whether the device ball to be dragged is sliding downwards; the second Boolean parameter is used to represent whether the device ball to be dragged is sliding to the right; the third Boolean parameter is used to represent whether the device ball to be dragged is sliding vertically; the fourth Boolean parameter is used to represent whether the device ball to be dragged is sliding to the left of the trust ring center; the fifth Boolean parameter is used to represent whether the device ball to be dragged is sliding above the trust ring center; determining the rotation direction corresponding to the drag operation based on the first Boolean parameter, the second Boolean parameter, the third Boolean parameter, the fourth Boolean parameter, and the fifth Boolean parameter.
[0018] Based on this solution, the sliding direction and sliding position of the ball of the device to be dragged can be determined by the first Boolean parameter, the second Boolean parameter, the third Boolean parameter, the fourth Boolean parameter, and the fifth Boolean parameter. Then, based on the sliding direction and sliding position, the rotation direction corresponding to the drag operation can be accurately determined.
[0019] Combined with the first aspect, in another possible implementation, determining the rotation direction corresponding to the drag operation based on the first Boolean parameter, the second Boolean parameter, the third Boolean parameter, the fourth Boolean parameter, and the fifth Boolean parameter includes: when it is determined based on the third Boolean parameter that the ball of the device to be dragged slides vertically, based on the first Boolean parameter that the ball of the device to be dragged slides upward, and based on the fourth Boolean parameter that the ball of the device to be dragged slides to the left of the center of the trust ring, then it is determined that the rotation direction corresponding to the drag operation is the clockwise direction.
[0020] When it is determined based on the third Boolean parameter that the ball of the device to be dragged slides vertically, based on the first Boolean parameter that the ball of the device to be dragged slides upward, and based on the fourth Boolean parameter that the ball of the device to be dragged slides to the right of the center of the trust ring, then it is determined that the rotation direction corresponding to the drag operation is the counterclockwise direction.
[0021] When it is determined based on the third Boolean parameter that the ball of the device to be dragged slides vertically, based on the first Boolean parameter that the ball of the device to be dragged slides downward, and based on the fourth Boolean parameter that the ball of the device to be dragged slides to the left of the center of the trust ring, then it is determined that the rotation direction corresponding to the drag operation is the counterclockwise direction.
[0022] When it is determined based on the third Boolean parameter that the ball of the device to be dragged slides vertically, based on the first Boolean parameter that the ball of the device to be dragged slides downward, and based on the fourth Boolean parameter that the ball of the device to be dragged slides to the right of the center of the trust ring, then it is determined that the rotation direction corresponding to the drag operation is the clockwise direction.
[0023] When it is determined based on the third Boolean parameter that the ball of the device to be dragged slides horizontally, based on the second Boolean parameter that the ball of the device to be dragged slides to the right, and based on the fifth Boolean parameter that the ball of the device to be dragged slides above the center of the trust ring, then it is determined that the rotation direction corresponding to the drag operation is the clockwise direction.
[0024] When it is determined based on the third Boolean parameter that the ball of the device to be dragged slides horizontally, based on the second Boolean parameter that the ball of the device to be dragged slides to the right, and based on the fifth Boolean parameter that the ball of the device to be dragged slides below the center of the trust ring, then it is determined that the rotation direction corresponding to the drag operation is the counterclockwise direction.
[0025] When it is determined that the device ball to be dragged is sliding horizontally based on the third Boolean parameter, is sliding leftward based on the second Boolean parameter, and is sliding above the center of the trust ring based on the fifth Boolean parameter, it is determined that the rotation direction corresponding to the drag operation is counterclockwise.
[0026] When it is determined that the device ball to be dragged is sliding horizontally based on the third Boolean parameter, is sliding leftward based on the second Boolean parameter, and is sliding below the center of the trust ring based on the fifth Boolean parameter, it is determined that the rotation direction corresponding to the drag operation is clockwise. Based on this solution, an example of determining the rotation direction corresponding to the drag operation based on the first Boolean parameter, the second Boolean parameter, the third Boolean parameter, the fourth Boolean parameter, and the fifth Boolean parameter is provided.
[0027] In a second aspect, an embodiment of the present disclosure provides a drag rotation device, which can be applied to an electronic device and is used to implement the method in the first aspect above. The functions of the drag rotation device can be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions, such as an acquisition module, a determination module, a display module, etc.
[0028] Among them, the acquisition module is configured to, in response to a user's drag operation on the device ball to be dragged on the trust ring, acquire the initial angle, the first position, and the second position of the device ball to be dragged; the first position is used to represent the position of the device ball to be dragged before dragging, and the second position is used to represent the position of the device ball to be dragged after dragging.
[0029] The determination module is configured to determine the display position of the device ball to be dragged on the trust ring based on the first position, the second position, and the initial angle;
[0030] The display module is configured to display the device ball to be dragged on the trust ring based on the display position of the device ball to be dragged on the trust ring.
[0031] In combination with the second aspect, in a possible implementation manner, the acquisition module is further configured to acquire initialization parameters, and the initialization parameters include the position of the center of the trust ring.
[0032] The determination module is further configured to determine the drag angle corresponding to the device ball to be dragged and the rotation direction corresponding to the drag operation based on the first position, the second position, and the position of the center of the trust ring; and determine the display position of the device ball to be dragged on the trust ring based on the initial angle, the initialization parameters, the drag angle corresponding to the device ball to be dragged, and the rotation direction corresponding to the drag operation.
[0033] In combination with the second aspect, in a possible implementation manner, the determination module is further configured to determine an adjustment angle based on the rotation direction corresponding to the drag operation and the drag angle corresponding to the device ball to be dragged; determine the rotation angle to be of the device ball to be dragged based on the initial angle and the adjustment angle; and determine the display position of the device ball to be dragged on the trust ring based on the initialization parameter and the rotation angle to be of the device ball to be dragged.
[0034] In combination with the second aspect, in a possible implementation manner, the determination module is further configured to, when the rotation direction corresponding to the drag operation is the clockwise direction, determine the drag angle corresponding to the device ball to be dragged as the adjustment angle; and when the rotation direction corresponding to the drag operation is the counterclockwise direction, perform an inversion process on the drag angle corresponding to the device ball to be dragged to obtain a processed angle, and determine the processed angle as the adjustment angle.
[0035] In combination with the second aspect, in a possible implementation manner, the drag rotation device further includes a processing module.
[0036] The processing module is configured to, when the rotation angle to be is within a preset range, correct the rotation angle to be to obtain a corrected rotation angle; the preset range is less than a first threshold or greater than or equal to a second threshold; the value range corresponding to the corrected rotation angle meets the requirements.
[0037] The determination module is further configured to determine the display position of the device ball to be dragged on the trust ring based on the initialization parameter and the corrected rotation angle.
[0038] In combination with the second aspect, in a possible implementation manner, the initialization parameter further includes the trust ring radius and the device ball radius.
[0039] The determination module is further configured to determine the coordinates corresponding to the center display position of the device ball to be dragged on the trust ring based on the trust ring center position, the trust ring radius, and the corrected rotation angle; and obtain the display position of the device ball to be dragged on the trust ring according to the coordinates corresponding to the center display position of the device ball to be dragged on the trust ring and the device ball radius.
[0040] In combination with the second aspect, in a possible implementation manner, the determination module is further configured to determine a first Boolean parameter, a second Boolean parameter, a third Boolean parameter, a fourth Boolean parameter, and a fifth Boolean parameter based on the first position, the second position, and the center position of the trust ring; the first Boolean parameter is used to represent whether the ball of the device to be dragged is sliding downward; the second Boolean parameter is used to represent whether the ball of the device to be dragged is sliding to the right; the third Boolean parameter is used to represent whether the ball of the device to be dragged is sliding vertically; the fourth Boolean parameter is used to represent whether the ball of the device to be dragged is sliding to the left of the center of the trust ring; the fifth Boolean parameter is used to represent whether the ball of the device to be dragged is sliding above the center of the trust ring; and based on the first Boolean parameter, the second Boolean parameter, the third Boolean parameter, the fourth Boolean parameter, and the fifth Boolean parameter, determine the rotation direction corresponding to the drag operation.
[0041] In combination with the second aspect, in a possible implementation manner, the determination module is further configured to determine that the rotation direction corresponding to the drag operation is the clockwise direction when it is determined based on the third Boolean parameter that the ball of the device to be dragged is sliding vertically, based on the first Boolean parameter that the ball of the device to be dragged is sliding upward, and based on the fourth Boolean parameter that the ball of the device to be dragged is sliding to the left of the center of the trust ring.
[0042] When it is determined based on the third Boolean parameter that the ball of the device to be dragged is sliding vertically, based on the first Boolean parameter that the ball of the device to be dragged is sliding upward, and based on the fourth Boolean parameter that the ball of the device to be dragged is sliding to the right of the center of the trust ring, then determine that the rotation direction corresponding to the drag operation is the counterclockwise direction.
[0043] When it is determined based on the third Boolean parameter that the ball of the device to be dragged is sliding vertically, based on the first Boolean parameter that the ball of the device to be dragged is sliding downward, and based on the fourth Boolean parameter that the ball of the device to be dragged is sliding to the left of the center of the trust ring, then determine that the rotation direction corresponding to the drag operation is the counterclockwise direction.
[0044] When it is determined based on the third Boolean parameter that the ball of the device to be dragged is sliding vertically, based on the first Boolean parameter that the ball of the device to be dragged is sliding downward, and based on the fourth Boolean parameter that the ball of the device to be dragged is sliding to the right of the center of the trust ring, then determine that the rotation direction corresponding to the drag operation is the clockwise direction.
[0045] When it is determined based on the third Boolean parameter that the ball of the device to be dragged is sliding horizontally, based on the second Boolean parameter that the ball of the device to be dragged is sliding to the right, and based on the fifth Boolean parameter, it is determined that the ball of the device to be dragged is sliding above the center of the trust ring, then determine that the rotation direction corresponding to the drag operation is the clockwise direction.
[0046] When it is determined based on the third Boolean parameter that the device ball to be dragged is sliding horizontally, based on the second Boolean parameter that the device ball to be dragged is sliding to the right, and based on the fifth Boolean parameter that the device ball to be dragged is sliding below the center of the trust ring, then it is determined that the rotation direction corresponding to the drag operation is counterclockwise.
[0047] When it is determined based on the third Boolean parameter that the device ball to be dragged is sliding horizontally, based on the second Boolean parameter that the device ball to be dragged is sliding to the left, and based on the fifth Boolean parameter that the device ball to be dragged is sliding above the center of the trust ring, then it is determined that the rotation direction corresponding to the drag operation is counterclockwise.
[0048] When it is determined based on the third Boolean parameter that the device ball to be dragged is sliding horizontally, based on the second Boolean parameter that the device ball to be dragged is sliding to the left, and based on the fifth Boolean parameter that the device ball to be dragged is sliding below the center of the trust ring, then it is determined that the rotation direction corresponding to the drag operation is clockwise.
[0049] In a third aspect, the present disclosure provides an electronic device, including: a memory, a display screen, and one or more processors; the memory and the display screen are coupled to the processor. Among them, the memory is used to store computer program code, and the computer program code includes computer instructions; when the electronic device runs, the processor is used to execute one or more computer instructions stored in the memory, so that the electronic device executes the drag rotation method according to any one of the above first aspects.
[0050] In a fourth aspect, the present disclosure provides a computer storage medium, including computer instructions, which when running on an electronic device, cause the electronic device to execute the drag rotation method according to any one of the first aspects.
[0051] In a fifth aspect, the present disclosure provides a computer program product, which when running on an electronic device, causes the electronic device to execute the drag rotation method according to any one of the first aspects.
[0052] In a sixth aspect, a device (for example, the device may be a chip system) is provided. The device includes a processor for supporting the first terminal device to implement the functions involved in the above first aspect. In a possible design, the device further includes a memory for storing necessary program instructions and data of the first terminal device. When the device is a chip system, it may be composed of chips or may include chips and other discrete devices.
[0053] It should be understood that the beneficial effects of the above second to sixth aspects can be referred to the relevant descriptions in the above first aspect, and will not be elaborated here. Description of the Drawings
[0054] Figure 1 A schematic diagram of interface display provided by an embodiment of the present application;
[0055] Figure 2 A schematic diagram of drag display provided by an embodiment of the present application;
[0056] Figure 3 A schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present application;
[0057] Figure 4 A schematic diagram of the software structure of an electronic device provided by an embodiment of the present application;
[0058] Figure 5 A schematic flowchart of a drag and rotation method provided by an embodiment of the present application;
[0059] Figure 6 A schematic diagram of the application scenario of a drag and rotation method provided by an embodiment of the present application Figure 1 ;
[0060] Figure 7 A schematic diagram of the application scenario of a drag and rotation method provided by an embodiment of the present application Figure 2 ;
[0061] Figure 8 A schematic diagram of the application scenario of a drag and rotation method provided by an embodiment of the present application Figure 3 ;
[0062] Figure 9 A schematic diagram of the structure of a chip system provided by an embodiment of the present application. Detailed implementation manners
[0063] The technical solutions in the embodiments of the present disclosure will be described below with reference to the accompanying drawings in the embodiments of the present disclosure. Among them, in the description of the present disclosure, unless otherwise specified, " / " means that the objects associated before and after are in an "or" relationship. For example, A / B may represent A or B. The "and / or" in the present disclosure is only a description of the association relationship of the associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. These three situations, where A and B may be singular or plural. Also, in the description of the present disclosure, unless otherwise specified, "a plurality of" means two or more than two. "At least one (item)" or its similar expression below refers to any combination of these items, including any combination of single item (item) or plural items (items). For example, at least one (item) of a, b, or c may represent: a, b, c, a - b, a - c, b - c, or a - b - c, where a, b, and c may be single or multiple. In addition, in order to clearly describe the technical solutions in the embodiments of the present disclosure, in the embodiments of the present disclosure, terms such as "first" and "second" are used to distinguish the same items or similar items with basically the same functions and roles. Those skilled in the art can understand that the terms "first" and "second" do not limit the quantity and execution order, and the terms "first" and "second" do not necessarily mean different. At the same time, in the embodiments of the present disclosure, words such as "exemplary" or "for example" are used to represent examples, illustrations, or explanations. Any embodiment or design solution described as "exemplary" or "for example" in the embodiments of the present disclosure should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Exactly speaking, using words such as "exemplary" or "for example" aims to present relevant concepts in a specific way for easy understanding.
[0064] In addition, the network architecture and service scenarios described in the embodiments of the present disclosure are for more clearly explaining the technical solutions in the embodiments of the present disclosure, and do not constitute a limitation on the technical solutions provided in the embodiments of the present disclosure. Those of ordinary skill in the art know that with the evolution of the network architecture and the emergence of new service scenarios, the technical solutions provided in the embodiments of the present disclosure are equally applicable to similar technical problems.
[0065] The device interconnection application can connect different devices and systems to achieve intelligent control and management. Specifically, it can enable automatic perception between different devices through technologies such as the Internet, the Internet of Things, and artificial intelligence to achieve data exchange and intelligent control, thereby improving production efficiency and quality of life.
[0066] In order to fully reflect the functional effects of the device interconnection application, the device interconnection application designs an interface with the concept of "human-centered trust ring". Figure 1An exemplary illustration of the graphical effect of such an interface is shown. This interface is the corresponding interface when the device interconnection application uses the "screen sharing" service.
[0067] As Figure 1 shown in (a) of [reference], the central position of this interface is used to display the user avatar 101, which is used to represent the user identity. Centered on the user avatar 101, a dotted circle is displayed outside the user avatar 101. This dotted circle can also be referred to as the trust ring 102, and the trust ring 102 is a circle or network composed of mutually trusted devices. Only devices within the trust ring 102 can perform secure data and service transfers.
[0068] At least one device sphere 103 is evenly arranged on the trust ring 102. Each device sphere 103 can represent a specific smart device, for example, a tablet, a computer, a TV, etc. The account logged in to the device sphere 103 is the same as the account corresponding to the user avatar 101, and the device represented by the device sphere 103 is a device trusted by the user.
[0069] In addition, the appearance and color of the device sphere 103 can be customized according to the type, status, or function of the device, and the present disclosure does not limit this. Exemplarily, Figure 1 shown in (a) of [reference] shows 3 device spheres, namely the local device, device 1, and device 2. The local device, device 1, and device 2 are all presented in the form of circular spheres.
[0070] For the device sphere 103 on the trust ring 102, the user can interact with the device sphere 103 through clicking, dragging, or other interaction methods to achieve control and operation of the device. For example, the user can click on the device sphere 103 to turn the device on or off, adjust the device settings, view the device status information, etc.
[0071] In some examples, a service sphere 104 can be mounted on the device sphere 103. The service sphere 104 is used to represent the services provided by the device, and these services can be transferred across devices to other devices within the trust ring. Among them, the appearance and color of the service sphere 104 can be customized according to the type, status, or function of the service. For example, the service sphere is displayed in a semi-transparent form.
[0072] In other examples, a capsule-shaped card can also be mounted on the device sphere 103, and this capsule-shaped card can be called a service capsule 105. The service capsule 105 is used to represent the services that can be transferred on this device. The service capsule 105 can have two states. The first state is used to represent the services that can be transferred on this device, that is, the services that have not been used yet. The second state is used to represent the services that have been transferred, that is, the services that have already been used.
[0073] Among them, these two states can be distinguished by the different colors and positions of the icons. For example, for the service capsule 105, a white icon and the white icon placed below the device sphere indicate that the device can provide transferable services. A black icon and the black icon placed above the device sphere indicate services that have been transferred.
[0074] Figure 1 The service capsule 105 shown in (a) in is an example of a white icon. Figure 1 The service capsule 106 shown in (b) in Figure 1 is an example of a black icon.
[0075] It can be understood that the state of the service capsule 105 can also be displayed by icons of other colors, such as blue, red, etc. The present disclosure places no restrictions on this.
[0076] The user can switch the state of the service capsule through a click operation. For example, when the user clicks on the service capsule with a white icon, it is transferred to a service capsule with a black icon, indicating that the service has been used. Such a design enables the user to conveniently manage and use the services on the device sphere.
[0077] Moreover, when the user drags the service sphere or service capsule, the service sphere or service capsule will move along with the user's finger. If the service sphere or capsule touches other different device spheres, the system will attempt cross-device service transfer. Among them, cross-device service transfer means transferring the service on the current device to other devices so that the user can continue to use the service on different devices.
[0078] For example, if the user uses a certain service on the mobile phone and then drags the service sphere or capsule to the tablet, the system will attempt to transfer the service to the tablet so that the user can continue to use the service on the tablet. Such cross-device service transfer can provide a more convenient and flexible user experience, allowing the user to continue using the service between different devices without having to restart or configure the service on each device.
[0079] That is to say, through the interface of the above-mentioned device interconnection application, the user can conveniently manage and control the devices logged in to the same account, realizing service transfer between devices.
[0080] Based on the interface of the above-mentioned device interconnection application, there is also an interaction form between the user and the device sphere. Specifically, the user drags the device sphere with a finger, causing the device sphere to rotate around the user's avatar (i.e., the center of the trust ring). Due to the uncertainty of the user's finger dragging trajectory, the movement trajectory of the device sphere is also uncertain as the user drags, and this uncertainty causes the displayed movement trajectory of the device sphere to be chaotic.
[0081] Figure 2 Exemplarily, a dragging trajectory of a user's finger dragging device 1 around the user's avatar is shown. Combining Figure 2 it can be seen that the dragging trajectory of the user's finger is irregular.
[0082] Since the device balls are arranged on a regular circular trust ring, ideally, when the user drags a device ball, the device ball should move along the regular circle. However, due to the influence of various factors, the movement trajectory of the device ball is usually an irregular curve graph and cannot completely present a regular circle.
[0083] Therefore, for this phenomenon, if the movement coordinates of the device ball are updated according to the dragging trajectory of the user's finger, it cannot be guaranteed that the device ball updates its position along the regular circular trajectory, and the position of the device ball may become disorderly, not smooth and continuous. If only the part where the dragging trajectory of the user's finger overlaps with the regular circle is responded to update the position of the device ball, then when the user's finger deviates from the regular circle, the device ball will stop moving and no longer follow the finger, which will result in a poor user experience.
[0084] For this reason, the present application provides a dragging and rotating method. The dragging and rotating method is applied to an electronic device. The electronic device can obtain the initial angle of the device ball to be dragged, the position of the device ball to be dragged before dragging, and the position of the device ball to be dragged after dragging, and can obtain the display position of the device ball to be dragged on the trust ring. Then, the device ball to be dragged is displayed on the trust ring according to the display position. In this way, it can be ensured that the device ball to be dragged always moves on the trust ring along with the user's dragging operation, thereby enhancing the interaction between the user and the device and improving the user experience.
[0085] For example, the electronic device can be a mobile terminal such as a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an augmented reality (AR) / virtual reality (VR) device, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), etc., or can also be a device such as a professional camera. The specific type of the electronic device is not limited in the embodiments of the present disclosure.
[0086] Exemplarily, Figure 3 a schematic structural diagram of an electronic device 300 is shown. As Figure 3As shown in the figure, the electronic device may include a processor 310, an external memory interface 320, an internal memory 321, a universal serial bus (USB) interface 330, a charging management module 340, a power management module 341, a battery 342, antenna 1, antenna 2, a mobile communication module 350, a wireless communication module 360, an audio module 370, a speaker 370A, a receiver 370B, a microphone 370C, a headphone jack 370D, a sensor module 380, buttons 390, a motor 391, an indicator 392, a camera 393, a display screen 394, and a subscriber identification module (SIM) card interface 395, etc. Among them, the sensor module 380 may include a pressure sensor 380A, a gyroscope sensor 380B, a barometric pressure sensor 380C, a magnetic sensor 380D, an acceleration sensor 380E, a distance sensor 380F, a proximity light sensor 380G, a fingerprint sensor 380H, a temperature sensor 380J, a touch sensor 380K, an ambient light sensor 380L, a bone conduction sensor 380M, etc.
[0087] It can be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device. In other embodiments, the electronic device may include more or fewer components than those shown in the figure, or combine certain components, or split certain components, or have different component arrangements. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0088] The processor 310 may include one or more processing units. For example, the processor 310 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors.
[0089] The controller may be the nerve center and command center of the electronic device. The controller may generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching instructions and executing instructions.
[0090] A memory may also be provided in the processor 310 for storing instructions and data. In some embodiments, the memory in the processor 310 is a cache memory. This memory may hold the instructions or data that the processor 310 has just used or recycled. If the processor 310 needs to use the instruction or data again, it can be directly called from the memory. This avoids repeated accesses and reduces the waiting time of the processor 310, thus improving the efficiency of the system.
[0091] In some embodiments, the processor 310 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0092] The wireless communication function of the electronic device may be implemented by the antenna 1, the antenna 2, the mobile communication module 350, the wireless communication module 360, the modem processor, and the baseband processor, etc.
[0093] The antenna 1 and the antenna 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device can be used to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization rate of the antennas. For example: the antenna 1 can be multiplexed as the diversity antenna of the wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0094] The mobile communication module 350 can provide solutions for wireless communications such as 2G / 3G / 4G / 5G applied to an electronic device. The mobile communication module 350 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 350 can receive electromagnetic waves through antenna 1, filter and amplify the received electromagnetic waves, and then transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 350 can also amplify the signal modulated by the modulation and demodulation processor and convert it into electromagnetic waves through antenna 1 for radiation. In some embodiments, at least some functional modules of the mobile communication module 350 can be provided in the processor 310. In some embodiments, at least some functional modules of the mobile communication module 350 and at least some modules of the processor 310 can be provided in the same device.
[0095] The wireless communication module 360 can provide solutions for wireless communications such as wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc. applied to an electronic device. The wireless communication module 360 can be one or more devices integrating at least one communication processing module. The wireless communication module 360 receives electromagnetic waves through antenna 2, performs frequency modulation and filtering on the electromagnetic wave signals, and sends the processed signals to the processor 310. The wireless communication module 360 can also receive the signals to be transmitted from the processor 310, perform frequency modulation and amplification on them, and convert them into electromagnetic waves through antenna 2 for radiation.
[0096] In some embodiments, antenna 1 of the electronic device is coupled to the mobile communication module 350, and antenna 2 is coupled to the wireless communication module 360, enabling the electronic device to communicate with the network and other devices through wireless communication technologies. The wireless communication technologies may include Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time-Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technologies, etc.
[0097] The electronic device realizes the display function through the GPU, the display screen 394, and the application processor, etc. The GPU is a microprocessor for image processing, connected to the display screen 394 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 310 may include one or more GPUs, which execute program instructions to generate or change display information.
[0098] The display screen 394 is used to display images, videos, etc. The display screen 394 includes a display panel. The display panel may adopt a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), an Active-Matrix Organic Light Emitting Diode (AMOLED), a Flexible Light-Emitting Diode (FLED), a MiniLED, a MicroLED, a Micro-OLED, a Quantum Dot Light Emitting Diode (QLED), etc. In some embodiments, the electronic device may include one or N display screens 394, where N is a positive integer greater than 1.
[0099] The electronic device can implement the shooting function through the ISP, camera 393, video codec, GPU, display screen 394, application processor, etc. In some embodiments, the electronic device may include one or N cameras 393, where N is a positive integer greater than 1.
[0100] The internal memory 321 can be used to store computer-executable program code, and the executable program code includes instructions. The processor 310 executes various functional applications and data processing of the electronic device by running the instructions stored in the internal memory 321. The internal memory 321 can include a program storage area and a data storage area. Among them, the program storage area can store the operating system, application programs required for at least one function (such as the sound playback function, image playback function, etc.). The data storage area can store the data established during the use of the electronic device (such as audio data, phone book, etc.). In addition, the internal memory 321 can include high-speed random access memory, and can also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
[0101] In addition, an operating system runs on the above components, such as etc. Application programs can be installed and run on this operating system. In some other embodiments, there can be multiple operating systems running in the electronic device.
[0102] It should be understood that Figure 3 The hardware modules included in the illustrated electronic device are only described exemplarily and do not limit the specific structure of the electronic device. In fact, the electronic device provided in the embodiments of the present disclosure may also include other hardware modules having an interaction relationship with the hardware modules schematically shown in the figure, which are not specifically limited here. For example, the electronic device may also include a flash light, a micro projection device, etc. Another example is that if the electronic device is a PC, then the electronic device may also include components such as a keyboard and a mouse.
[0103] It can be understood that generally, in addition to the support of hardware, the implementation of the functions of the electronic device also requires the cooperation of software.
[0104] The software system of the above electronic device can adopt a layered architecture, event-driven architecture, microkernel architecture, microservices architecture, or cloud architecture. In the embodiments of the present invention, taking the system of the layered architecture as an example, the software structure of the electronic device is exemplarily described.
[0105] Figure 4 is the software structure block diagram of the electronic device provided in the embodiments of the present disclosure.
[0106] The layered architecture divides software into several layers, each with a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, the system is divided into four layers, namely the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer from top to bottom.
[0107] The application layer may include a series of application packages. Exemplarily, the application packages may include applications (application, APP) such as camera, gallery, calendar, phone, map, navigation, WLAN, Bluetooth, music, video, device connectivity applications (also known as smart connectivity applications), etc.
[0108] The application framework layer provides application programming interfaces (API) and programming frameworks for the applications in the application layer. The application framework layer includes some predefined functions.
[0109] The application framework layer may include an activity manager, a window manager, a content provider, a view system, a resource manager, a notification manager, etc., and the embodiments of the present disclosure do not impose any restrictions on this.
[0110] Activity Manager: Used to manage the life cycle of each application. Applications usually run in the operating system in the form of Activities. For each Activity, there will be a corresponding application record (ActivityRecord) in the activity manager, and this ActivityRecord records the state of the Activity of the application. The activity manager can use this ActivityRecord as an identifier to schedule the Activity process of the application.
[0111] WindowManagerService: Used to manage the graphical user interface (GUI) resources used on the screen, and can specifically be used for: obtaining the screen size, creating and destroying windows, displaying and hiding windows, laying out windows, managing focus, and managing the input method and wallpaper, etc.
[0112] The content provider is used to store and obtain data, and make this data accessible to application programs. The data may include videos, images, audio, dialed and answered calls, browsing history and bookmarks, phone books, etc. The resource manager provides various resources for application programs, such as localized strings, icons, pictures, layout files, video files, etc.
[0113] The Android Runtime includes the core libraries and the virtual machine. The Android runtime is responsible for the scheduling and management of the Android system. The core libraries consist of two parts: one part is the functional functions that need to be called by the Java language, and the other part is the core libraries of Android. The application layer and the application framework layer run in the virtual machine. The virtual machine executes the Java files in the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
[0114] The system libraries can include multiple functional modules. For example: surface manager, Media Libraries, 3D graphics processing libraries (such as OpenGL ES), 2D image engines (such as SGL), etc.
[0115] The surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications. The media libraries support the playback and recording of multiple common audio and video formats, as well as static image files, etc. The media libraries can support multiple audio and video coding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc. OpenGL ES is used to implement 3D graphics drawing, image rendering, synthesis, and layer processing, etc. SGL is a drawing engine for 2D drawing.
[0116] The kernel layer is the layer between the hardware and the software. The kernel layer at least includes display drivers, camera drivers, audio drivers, sensor drivers, etc., and the embodiments of the present disclosure do not make any limitations thereto.
[0117] The methods in the following embodiments can all be implemented in an electronic device having the above hardware structure or software structure.
[0118] The following will elaborate in detail a drag and rotation method provided by the embodiments of the present disclosure with reference to the accompanying drawings. This method can be applied to the above-mentioned electronic device. As Figure 5 shown, this method specifically includes:
[0119] Step 501, the electronic device detects a user's startup operation on the device interconnection application.
[0120] The electronic device can include a device interconnection application. The user can connect more devices through the device interconnection application on the electronic device to achieve functions such as application continuation, call sharing, notification sharing, and network sharing.
[0121] Among them, application continuity means that the work in progress on one device can be continued on another device with seamless content connection. For example, a mobile phone document being edited can be seamlessly continued on a computer for further editing.
[0122] Call sharing means making or receiving calls on devices such as the currently used tablet or computer without missing any incoming calls or interrupting tasks. For example, when there is an incoming call on the mobile phone, it can be directly answered on the tablet.
[0123] Notification sharing means viewing and handling mobile phone notification messages on devices such as the currently used tablet or computer without missing any important information. For example, when the mobile phone alarm goes off, it can be directly turned off on the computer.
[0124] Network sharing means that devices such as tablets and computers can use the mobile network of the local device to access the Internet. For example, when a tablet without a network gets close to a mobile phone using a mobile data network, it can achieve fast Internet connection.
[0125] When the user needs to implement the above functions through the device interconnection application on the electronic device, the user can open the device interconnection application on the electronic device, that is, the electronic device can receive the user's operation to open the device interconnection application. For example, the electronic device can receive the user's click operation on the icon corresponding to the device interconnection application.
[0126] Step 502: In response to the start operation, the device interconnection application performs interface initialization to display the device service interface.
[0127] After the electronic device receives the user's start operation on the device interconnection application, in response, the electronic device starts the device interconnection application. After starting, the device interconnection application can perform interface initialization to display the device service interface.
[0128] In some examples, the process of the device interconnection application performing interface initialization to display the device service interface in response to the start operation can be: in response to the start operation, the device interconnection application performs interface initialization based on the initialization parameters to display the device service interface.
[0129] Exemplarily, the device service interface is as Figure 1 shown. The device service interface is used to display the trust ring and the trust ring devices (i.e., the devices represented by the device balls). For example, the trust ring devices include the local device, Device 1, and Device 2.
[0130] Among them, the initialization parameters may include coordinate axis parameters, angle parameters, the center position of the trust ring, the trust ring shape parameters (such as the radius of the trust ring), the device ball shape parameters (such as the radius of the device ball), the initial angle of the device ball, and the arrangement position of the device ball in the trust ring (i.e., the first position), etc.
[0131] The initialization parameters can be parameters preset by the device interconnection application, or can be custom parameters input by the user in the device interconnection application through an interaction device (such as a mouse, keyboard, etc.). The present disclosure places no restrictions thereon.
[0132] Exemplarily, the above axis parameters are used to define the axes of the trust ring. The axis parameters may include the axis origin and the direction of the axis. As Figure 6 shown in (a) of , the axis origin may be: the upper left corner of the screen. The direction of the axis may be: with the origin of coordinates to the right as the positive direction of the x-axis, and the origin of coordinates downward as the positive direction of the y-axis.
[0133] The angle parameter may include the angle direction. Figure 6 Exemplarily, (a) of characterizes the angle direction with "an arc". As Figure 6 shown in (a) of , the angle direction may be: the direction parallel to the X-axis in the coordinate axis and to the right is 0°, and the direction perpendicular to the X-axis in the coordinate axis and upward is 270°.
[0134] The center position of the trust ring can be represented by the coordinates of the trust ring center. When the trust ring is circular, the center position of the trust ring is the center position of the trust ring circle. Therefore, the center position of the trust ring can also be represented by the coordinates of the trust ring center. As Figure 6 shown in (a) of , the coordinates of the trust ring center are the O point (x o , y o ). Since the center position of the trust ring is the same as the center position of the user avatar, therefore, the center position of the trust ring can also be used to represent the center position of the user avatar.
[0135] The radius of the trust ring can be represented by R. Multiple device balls can be arranged on the trust ring. The radius of each device ball among the multiple device balls can be represented by r1, and the initial angle of the device ball can be represented by currentAngle. The multiple device balls arranged on the trust ring include the local device and device balls other than the local device. As Figure 6 shown in (a) of , the device balls other than the local device can be represented by FRI.
[0136] When the interface is initialized, all device balls can be evenly arranged on the trust ring. Among them, the local device (i.e., the electronic device) can be located at the position of 270° and intersecting with the trust ring, while the device balls other than the local device can be evenly distributed in turn at other positions of the trust ring, thereby forming the initial position state as shown in (a) of . Figure 1 shown in (a) of .
[0137] It can be understood that the positions of the device balls on the trust ring can also be set at other positions. The present disclosure places no restrictions thereon.
[0138] In addition, the present disclosure exemplarily illustrates that the trust ring is circular and the device ball is also circular. Of course, the trust ring and the device ball can also be of other shapes, and the present disclosure does not limit this.
[0139] When the trust ring and the device ball are of other shapes, the initialization parameters can also include other parameters, and the trust ring shape parameters and device ball shape parameters in the initialization parameters can also be adaptively adjusted. For example, when the trust ring is triangular, the trust ring shape parameter in the initialization parameters can be the side length of the trust ring. When the device ball is rectangular, the device ball shape parameter in the initialization parameters can be the length and width of the device ball.
[0140] In some examples, the account logged in by the device ball on the trust ring is the same as the account corresponding to the user avatar, and the devices represented by the device balls are all devices with Bluetooth and Wi-Fi enabled. In the device service interface of the electronic device, the devices displayed on the trust ring are all devices that have been successfully connected to the local machine (i.e., the electronic device), and each device ball on the trust ring can display the device name corresponding to the device ball. By clicking on the device name of each device ball, it is possible to confirm whether the "screen sharing" service of the device is enabled.
[0141] Step 503: The device interconnection application detects a dragging operation by the user on the device ball to be dragged in the device service interface.
[0142] Among them, the device ball to be dragged can be any device ball on the trust ring, and the device ball to be dragged can be the local machine or a device ball other than the local machine.
[0143] After the electronic device displays the device service interface, the user can perform a dragging operation on the device ball to be dragged on the trust ring in the device service interface, so that the device ball to be dragged moves its position along with the user's dragging operation.
[0144] Exemplarily, the dragging operation can include a first operation and a second operation. The first operation can be a click operation by the user on the device ball to be dragged. The second operation can be a sliding operation by the user on the device ball to be dragged. The occurrence time corresponding to the second operation is the next time after the occurrence time corresponding to the first operation.
[0145] For example, the first operation can be that the user single-finger clicks on the device ball to be dragged or double-finger clicks on the device ball to be dragged. The second operation is that the user single-finger slides on the device ball to be dragged or double-finger slides on the device ball to be dragged.
[0146] Step 504: In response to the user's dragging operation, the device interconnection application records the first position and the second position of the device ball to be dragged.
[0147] Among them, the first position is used to represent the position of the device ball to be dragged before dragging. The second position is used to represent the position of the device ball to be dragged after dragging.
[0148] Exemplarily, the drag operation includes a first operation and a second operation.
[0149] After detecting the user's first operation, the device interconnection application can record the initial position information of the device ball to be dragged. The initial position information includes the initial angle of the device ball to be dragged (i.e., currentAngle) and the arrangement position of the device ball to be dragged in the trust ring (i.e., the first position).
[0150] After detecting the user's second operation, the device interconnection application can record the second position of the device ball to be dragged. Subsequently, the display position of the device ball to be dragged on the trust ring can be updated based on the first position and the second position.
[0151] For example, the first position and the second position can be represented by coordinates. For instance, the first position is represented by the first coordinates (startX, startY). The second position is represented by the second coordinates (endX, endY).
[0152] As Figure 6 shown in (a) of A , the first coordinates can be the coordinates of point A, and the coordinates of point A are (x A ), y B ). The second coordinates can be the coordinates of point B, and the coordinates of point B are (x B ).
[0153] As Figure 6 shown in (a) of Figure 6 and (b) of Figure 6 , the second position (i.e., point B) can be on the trust ring. As
[0154] shown in (c) of
[0155] the second position (i.e., point B) can also be outside the trust ring.
[0156] After obtaining the first position and the second position of the device ball to be dragged, the corresponding drag angle of the device ball to be dragged can be determined based on the center position of the trust ring, the first position, and the second position, so as to subsequently update the display position of the device ball to be dragged on the trust ring based on the corresponding drag angle of the device ball to be dragged.
[0157] In some examples, the process of determining the dragging angle corresponding to the device ball to be dragged based on the center position of the trust ring, the first position, and the second position may be: based on the center position of the trust ring, the first coordinate corresponding to the first position, and the first coordinate corresponding to the second position, determine the first side, the second side, and the third side; based on the first side, the second side, and the third side, determine the dragging angle corresponding to the device ball to be dragged.
[0158] Among them, the value range of the dragging angle corresponding to the device ball to be dragged is [0, π].
[0159] In some examples, the process of determining the first side, the second side, and the third side based on the center position of the trust ring, the first coordinate corresponding to the first position, and the first coordinate corresponding to the second position may be: connect the center position of the trust ring and the first coordinate to obtain the first side; connect the center position of the trust ring and the second coordinate to obtain the second side; connect the first coordinate and the second coordinate to obtain the third side.
[0160] Exemplarily, as Figure 6 shown in (a) of o , connect the center position of the trust ring (i.e., the coordinate (x o )) and the first coordinate (i.e., the coordinate (x A , y A )) of point A to obtain the first side (i.e., OA). Connect the center position of the trust ring (i.e., the coordinate of point O) and the second coordinate (i.e., the coordinate (x B , y B )) of point B to obtain the second side (i.e., OB). Connect the first coordinate and the second coordinate B to obtain the third side (i.e., AB).
[0161] According to steps 502 and 504, it can be known that the center position of the trust ring is (x o , y o ), the coordinate corresponding to point A is (x A , y A ), and the coordinate corresponding to point B is (x B , y B ). Then, according to the center position of the trust ring and the coordinate corresponding to point A, the first side OA can be obtained. According to the center position of the trust ring and the coordinate corresponding to point B, the second side OB can be obtained.
[0162] Since the dragging trajectory of the user is uncertain, the △AOB generated according to the center position of the trust ring, the first coordinate, and the second coordinate is not necessarily a right triangle. In this way, it will be difficult to determine the dragging angle corresponding to the device ball to be dragged. Therefore, for this scenario, the dragging angle corresponding to the device ball to be dragged can be determined by making auxiliary lines.
[0163] For example, asFigure 6 As shown in (c), the coordinates corresponding to point B fall outside the trust ring. The triangle formed by the center position of the trust ring, the coordinates corresponding to point A, and the coordinates corresponding to point B is not a right triangle. Then, auxiliary lines AC and BC can be created based on the coordinates corresponding to point A and point B. Auxiliary lines AC, BC, and the third side AB can form a right triangle ACB.
[0164] After obtaining the right triangle ACB, since the third side AB is the hypotenuse of the right triangle ACB, the third side AB can be obtained according to the coordinates corresponding to point A and point B.
[0165] After the first side, the second side and the third side are obtained, the dragging angle corresponding to the device ball to be dragged may be determined based on the first side, the second side and the third side.
[0166] In some examples, the dragging angle corresponding to the device ball to be dragged can be determined according to the law of cosines and inverse trigonometric functions.
[0167] Exemplarily, the process of determining the drag angle corresponding to the device ball to be dragged based on the first side, the second side and the third side can be: determining the cosine value of the drag angle corresponding to the device ball to be dragged according to the first side, the second side and the third side; then performing inverse trigonometric operation on the cosine value of the drag angle corresponding to the device ball to be dragged to obtain the drag angle (i.e., angle) corresponding to the device ball to be dragged.
[0168] For example, Figure 6 As shown in (a), the first side is OA, the second side is OB, and the third side is AB. The dragging angle corresponding to the device ball to be dragged is ∠A0B.
[0169] According to the first side, the second side and the third side, the process of determining the cosine value of the drag angle corresponding to the device ball to be dragged can be: According to the cosine theorem, cos AOB =(OA 2 +OB 2 -AB 2 ) / (2×OA×OB). Then, the cosine value of the drag angle corresponding to the dragged device ball is calculated by the inverse trigonometric function arccos to obtain the drag angle corresponding to the dragged device ball. Therefore, ∠A0B=arccos(cos AOB ).
[0170] Step 506: Determine the rotation direction corresponding to the drag operation based on the trust ring center position, the first position, and the second position.
[0171] The rotation direction corresponding to the drag operation may be clockwise or counterclockwise.
[0172] After obtaining the central position, the first position, and the second position of the trust ring, the rotation direction corresponding to the drag operation can be obtained based on the central position, the first position, and the second position of the trust ring.
[0173] In some examples, the process of obtaining the rotation direction corresponding to the drag operation based on the central position, the first position, and the second position of the trust ring can be: determining at least one Boolean parameter based on the central position, the first position, and the second position of the trust ring; and obtaining the rotation direction corresponding to the drag operation based on the at least one Boolean parameter.
[0174] Wherein, the at least one Boolean parameter includes a first Boolean parameter, a second Boolean parameter, a third Boolean parameter, a fourth Boolean parameter, and a fifth Boolean parameter.
[0175] The first Boolean parameter is used to determine whether the device ball to be dragged is sliding downward. The second Boolean parameter is used to determine whether the device ball to be dragged is sliding to the right. The third Boolean parameter is used to represent whether the device ball to be dragged is sliding vertically. The fourth Boolean parameter is used to represent whether the device ball to be dragged is sliding to the left of the center of the trust ring. The fifth Boolean parameter is used to represent whether the device ball to be dragged is sliding above the center of the trust ring.
[0176] For example, the first Boolean parameter can be represented by boolean isDownward. The second Boolean parameter can be represented by boolean isRightward. The third Boolean parameter can be represented by boolean isVerticalScroll. The fourth Boolean parameter can be represented by boolean isOnLeft. The fifth Boolean parameter can be represented by boolean isOnTop.
[0177] Exemplarily, the first Boolean parameter (i.e., boolean isDownward) can be determined by judging whether the ordinate (i.e., y B ) in the second position of the device ball to be dragged is greater than the ordinate (i.e., y A ) in the second position. That is, boolean isDownward = y B > y A .
[0178] The second Boolean parameter (i.e., boolean isRightward) can be determined by judging whether the abscissa (i.e., x B ) in the second position of the device ball to be dragged is greater than the abscissa (i.e., x A ) in the second position. That is, boolean isRightward = x B > x A .
[0179] The third Boolean parameter (i.e., boolean isVerticalScroll) can be determined by judging whether the first numerical value is greater than the second numerical value. The first numerical value can be the absolute value difference between the ordinate (i.e., y B ) in the second position of the device ball to be dragged and the ordinate (i.e., y A ). The second numerical value can be the absolute value difference between the abscissa (i.e., x B ) in the second position of the device ball to be dragged and the ordinate (i.e., x A ). That is, boolean isVerticalScroll = |y B - y A | > |x B - x A |.
[0180] The fourth Boolean parameter (i.e., boolean isOnLeft) can be determined by judging whether the abscissa (i.e., x B ) in the second position of the device ball to be dragged is greater than the abscissa (i.e., x o ) in the center position of the trust ring. That is, boolean isOnLeft = x B < x o .
[0181] The fifth Boolean parameter (i.e., boolean isOnTop) can be determined by judging whether the ordinate (i.e., y B ) in the second position of the device ball to be dragged is greater than the ordinate (i.e., y o ) in the center position of the trust ring. That is, boolean isOnTop = y B < y o .
[0182] After obtaining the above at least one Boolean parameter; the process of obtaining the rotation direction corresponding to the drag operation based on the at least one Boolean parameter can be: determining the rotation parameter corresponding to the drag operation based on the at least one Boolean parameter; and obtaining the rotation direction corresponding to the drag operation based on the rotation parameter corresponding to the drag operation.
[0183] Among them, the rotation parameter corresponding to the drag operation is used to characterize the rotation direction corresponding to the drag operation. For example, the rotation parameter corresponding to the drag operation can be represented by isClockwise.
[0184] For example, when the rotation parameter corresponding to the drag operation (i.e., isClockwise) is true, it can be determined that the rotation direction corresponding to the drag operation is the clockwise direction. When the rotation parameter corresponding to the drag operation (i.e., isClockwise) is false, it can be determined that the rotation direction corresponding to the drag operation is the counterclockwise direction.
[0185] For another example, when the rotation parameter corresponding to the drag operation (i.e., isClockwise) is false, it can be determined that the rotation direction corresponding to the drag operation is the clockwise direction. When the rotation parameter corresponding to the drag operation (i.e., isClockwise) is true, it can be determined that the rotation direction corresponding to the drag operation is the counterclockwise direction.
[0186] The present disclosure does not limit the rotation direction corresponding to the drag operation represented by the rotation parameter corresponding to the drag operation, and it shall be subject to the actual application.
[0187] Taking isClockwise being true to represent that the rotation direction corresponding to the drag operation is the clockwise direction and isClockwise being false to represent that the rotation direction corresponding to the drag operation is the counterclockwise direction as an example, an exemplary illustration is given below.
[0188] In some examples, based on at least one boolean parameter, the process of determining the rotation parameter corresponding to the drag operation can be as follows: based on the above-mentioned third boolean parameter (i.e., isVerticalScroll), determine whether the device ball to be dragged is vertically scrolled or horizontally scrolled; when it is determined that the device ball to be dragged is vertically scrolled, through the first boolean parameter (i.e., isDownward), determine whether the device ball to be dragged is scrolled upward or downward; after determining whether the device ball to be dragged is scrolled upward or downward, through the fourth boolean parameter (i.e., isOnLeft), determine whether the device ball to be dragged is scrolled to the left or right of the center of the trust ring; after determining whether the device ball to be dragged is scrolled to the left or right of the center of the trust ring, further determine whether the first boolean parameter and the fourth boolean parameter are the same, so as to obtain the rotation parameter corresponding to the drag operation according to the first boolean parameter and the fourth boolean parameter.
[0189] In some examples, after obtaining the first boolean parameter and the fourth boolean parameter, determine whether the first boolean parameter and the fourth boolean parameter are different, so as to obtain the rotation parameter corresponding to the drag operation according to the judgment result of the first boolean parameter and the fourth boolean parameter.
[0190] For example, when isVerticalScroll == true (i.e., the device ball to be dragged is vertically scrolled), the rotation parameter corresponding to the drag operation is obtained according to isClockwise = (isDownward != isOnLeft).
[0191] Exemplarily, when it is determined, based on the third boolean parameter, that the device ball to be dragged is vertically scrolled (i.e., isVerticalScroll == true), when it is determined, based on the first boolean parameter, that the device ball to be dragged is scrolled upward (i.e., isDownward = false), and when it is determined, based on the fourth boolean parameter, that the device ball to be dragged is scrolled to the left of the center of the trust ring (i.e., isOnLeft = true), it indicates that the values of isDownward and isOnLeft are different. Therefore, it is determined that the rotation parameter corresponding to the drag operation (i.e., isClockwise) is true, that is, it indicates that the rotation direction corresponding to the drag operation is the clockwise direction.
[0192] When it is determined, based on the third boolean parameter, that the device ball to be dragged is vertically scrolled (i.e., isVerticalScroll == true), when it is determined, based on the first boolean parameter, that the device ball to be dragged is scrolled upward (i.e., isDownward = false), and when it is determined, based on the fourth boolean parameter, that the device ball to be dragged is scrolled to the right of the center of the trust ring (i.e., isOnLeft = false), it indicates that the values of isDownward and isOnLeft are the same. Therefore, it is determined that the rotation parameter corresponding to the drag operation (i.e., isClockwise) is false, that is, it indicates that the rotation direction corresponding to the drag operation is the counterclockwise direction.
[0193] When it is determined, based on the third boolean parameter, that the device ball to be dragged is vertically scrolled (i.e., isVerticalScroll == true), when it is determined, based on the first boolean parameter, that the device ball to be dragged is scrolled downward (i.e., isDownward = true), and when it is determined, based on the fourth boolean parameter, that the device ball to be dragged is scrolled to the left of the center of the trust ring (i.e., isOnLeft = true), it indicates that the values of isDownward and isOnLeft are the same. Therefore, it is determined that the rotation parameter corresponding to the drag operation (i.e., isClockwise) is false, that is, it indicates that the rotation direction corresponding to the drag operation is the counterclockwise direction.
[0194] When it is determined, based on the third boolean parameter, that the device ball to be dragged is vertically scrolled (i.e., isVerticalScroll == true), based on the first boolean parameter, that the vertically scrolled device ball to be dragged is scrolled downward (i.e., isDownward = true), and based on the fourth boolean parameter, that the device ball to be dragged is scrolled to the right of the center of the trust ring (i.e., isOnLeft = false), it indicates that the values of isDownward and isOnLeft are different. Therefore, it is determined that the rotation parameter corresponding to the drag operation (i.e., isClockwise) is true, which means that the rotation direction corresponding to the drag operation is clockwise.
[0195] In some examples, the process of determining the rotation parameter corresponding to the drag operation based on at least one boolean parameter may also be: based on the above-mentioned third boolean parameter (i.e., isVerticalScroll), determine whether the device ball to be dragged is vertically scrolled or horizontally scrolled; when it is determined that the device ball to be dragged is horizontally scrolled, through the second boolean parameter (i.e., isRightward), determine whether the device ball to be dragged is scrolled to the right or to the left; when it is determined whether the device ball to be dragged is scrolled to the right or to the left, through the fifth boolean parameter (i.e., isOnTop), determine whether the device ball to be dragged is scrolled above or below the center of the trust ring. After determining whether the device ball to be dragged is scrolled above or below the center of the trust ring, further determine whether the second boolean parameter and the fifth boolean parameter are the same, so as to obtain the rotation parameter corresponding to the drag operation according to the second boolean parameter and the fifth boolean parameter.
[0196] In some examples, after obtaining the second boolean parameter and the fifth boolean parameter, determine whether the second boolean parameter and the fifth boolean parameter are the same, so as to obtain the rotation parameter corresponding to the drag operation according to the judgment result of the second boolean parameter and the fifth boolean parameter.
[0197] For example, when isVerticalScroll == false (i.e., the device ball to be dragged is horizontally scrolled), according to isClockwise = (isOnTop == isRightward), the rotation parameter corresponding to the drag operation is obtained.
[0198] Exemplarily, when it is determined based on the third Boolean parameter that the device ball to be dragged is horizontally slid (i.e., isVerticalScroll == false), it is determined based on the second Boolean parameter that the device ball to be dragged is slid to the right (i.e., isRightward = true), and it is determined based on the fifth Boolean parameter that the device ball to be dragged is slid above the center of the trust ring (i.e., isOnTop = true), it indicates that the values of isRightward and isOnTop are the same. Therefore, the rotation parameter corresponding to the drag operation (i.e., isClockwise) is determined to be true, which means that the rotation direction corresponding to the drag operation is the clockwise direction.
[0199] When it is determined based on the third Boolean parameter that the device ball to be dragged is horizontally slid (i.e., isVerticalScroll == false), it is determined based on the second Boolean parameter that the device ball to be dragged is slid to the right (i.e., isRightward = true), and it is determined based on the fifth Boolean parameter that the device ball to be dragged is slid below the center of the trust ring (i.e., isOnTop = false), it indicates that the values of isRightward and isOnTop are different. Therefore, the rotation parameter corresponding to the drag operation (i.e., isClockwise) is determined to be false, which means that the rotation direction corresponding to the drag operation is the counterclockwise direction.
[0200] When it is determined based on the third Boolean parameter that the device ball to be dragged is horizontally slid (i.e., isVerticalScroll == false), it is determined based on the second Boolean parameter that the device ball to be dragged is slid to the left (i.e., isRightward = false), and it is determined based on the fifth Boolean parameter that the device ball to be dragged is slid above the center of the trust ring (i.e., isOnTop = true), it indicates that the values of isRightward and isOnTop are different. Therefore, the rotation parameter corresponding to the drag operation (i.e., isClockwise) is determined to be false, which means that the rotation direction corresponding to the drag operation is the counterclockwise direction.
[0201] When it is determined based on the third Boolean parameter that the device ball to be dragged is horizontally slid (i.e., isVerticalScroll == false), it is determined based on the second Boolean parameter that the device ball to be dragged is slid to the left (i.e., isRightward = false), and it is determined based on the fifth Boolean parameter that the device ball to be dragged is slid below the center of the trust ring (i.e., isOnTop = false), it indicates that the values of isRightward and isOnTop are the same. Therefore, the rotation parameter corresponding to the drag operation (i.e., isClockwise) is determined to be true, which means that the rotation direction corresponding to the drag operation is the clockwise direction.
[0202] As can be seen from the above steps, the present disclosure obtains parameters related to the positional relationship (such as the center position of the trust ring, the first position, the second position, etc.) through the positional relationship between the ball of the device to be dragged and the trust ring. Then, these parameters are used to determine the dragging angle corresponding to the ball of the device to be dragged and the rotation direction corresponding to the dragging operation, so as to obtain the display position of the ball of the device to be dragged on the trust ring by using the dragging angle corresponding to the ball of the device to be dragged and the rotation direction corresponding to the dragging operation, thereby making the display position of the ball of the device to be dragged on the trust ring more accurate and providing a better display effect for the user.
[0203] Step 507: Determine an adjustment angle based on the rotation direction corresponding to the dragging operation and the dragging angle corresponding to the ball of the device to be dragged, and determine the rotation angle to be of the ball of the device to be dragged based on the initial angle and the adjustment angle.
[0204] After obtaining the rotation direction corresponding to the dragging operation and the dragging angle corresponding to the ball of the device to be dragged, the device interconnection application can determine the adjustment angle based on the rotation direction corresponding to the dragging operation and the dragging angle corresponding to the ball of the device to be dragged, and determine the rotation angle to be of the ball of the device to be dragged based on the initial angle and the adjustment angle.
[0205] In some examples, the process of determining the adjustment angle based on the rotation direction corresponding to the dragging operation and the dragging angle corresponding to the ball of the device to be dragged may be as follows: When the rotation direction corresponding to the dragging operation is the clockwise direction, the dragging angle corresponding to the ball of the device to be dragged is the same as the adjustment angle, so the dragging angle corresponding to the ball of the device to be dragged is determined as the adjustment angle (i.e., angle).
[0206] When the rotation direction corresponding to the dragging operation is the counterclockwise direction, the dragging angle corresponding to the ball of the device to be dragged is different from the adjustment angle. The dragging angle corresponding to the ball of the device to be dragged is negated to obtain a processed angle, and the processed angle is determined as the adjustment angle (i.e., -angle).
[0207] In some examples, the process of determining the rotation angle to be of the ball of the device to be dragged based on the initial angle and the adjustment angle may be as follows: The initial angle and the adjustment angle are added to obtain the rotation angle to be of the ball of the device to be dragged. Among them, the rotation angle to be can be represented by newAngle.
[0208] For example, when the adjustment angle is angle, the rotation angle to be of the ball of the device to be dragged is: the initial angle + the adjustment angle. That is, the rotation angle to be (newAngle) = currentAngle + angle.
[0209] When the adjustment angle is -angle, the angle to be rotated of the device ball to be dragged is: the initial angle + the adjustment angle. That is, the angle to be rotated (newAngle) = currentAngle + (-angle) = currentAngle - angle.
[0210] After obtaining the angle to be rotated, it is also necessary to continue to determine whether the angle to be rotated is outside the preset range. If the angle to be rotated is outside the preset range, based on the angle to be rotated and the initialization parameters, determine the display position of the device ball to be dragged on the trust ring.
[0211] If the angle to be rotated is within the preset range, it is necessary to continue to execute step 508 to obtain the corrected rotation angle, and then based on the corrected rotation angle and the initialization parameters, determine the display position of the device ball to be dragged on the trust ring.
[0212] Among them, the preset range is that the angle to be rotated < 0°, or the angle to be rotated ≥ 360°.
[0213] Through the rotation direction and dragging angle corresponding to the dragging operation, the adjustment angle can be accurately obtained, so as to realize the fine adjustment of the position of the device ball to be dragged. Then, according to the combination of the initial angle and the adjustment angle, the angle to be rotated of the device ball to be dragged is obtained, so that the obtained angle to be rotated is more accurate.
[0214] Step 508: The device interconnection application corrects the angle to be rotated to obtain the corrected rotation angle.
[0215] After obtaining the angle to be rotated, this angle to be rotated may exceed the defined angle range, so it is also necessary to determine whether the angle to be rotated is within the preset range. If the angle to be rotated is within the preset range, it is necessary to correct the angle to be rotated to obtain the corrected rotation angle.
[0216] In some examples, the process of correcting the angle to be rotated to obtain the corrected rotation angle can be: when the angle to be rotated < 0°, correct the angle to be rotated, and the corrected rotation angle obtained is: the angle to be rotated + 360°. That is, the corrected rotation angle = newAngle + 360°.
[0217] When the angle to be rotated ≥ 360°, correct the angle to be rotated, and the corrected rotation angle obtained is: the angle to be rotated - 360°. That is, the corrected rotation angle = newAngle - 360°.
[0218] The above process can be continuously corrected in a loop until the corrected rotation angle falls outside the preset range (that is, [0, 360)). It can be understood that other methods can also be used for the process of correcting the angle to be rotated, and the present disclosure does not limit this.
[0219] That is to say, after obtaining the angle to be rotated, the angle to be rotated can be further corrected to ensure that the corrected rotation angle is within the preset range, thereby avoiding unreasonable rotations beyond the range. In this way, the accuracy and stability of position calculation can be improved, making the displayed position of the device ball to be dragged more accurate and reliable.
[0220] Step 509: The device interconnection application determines the display position of the device ball to be dragged on the trust ring based on the corrected rotation angle and the initialization parameters.
[0221] After obtaining the corrected rotation angle, the display position of the device ball to be dragged on the trust ring can be determined based on the corrected rotation angle and the initialization parameters, so as to display the device ball to be dragged on the trust ring.
[0222] Exemplarily, the display position of the device ball to be dragged on the trust ring can be represented by (left dev , top dev ).
[0223] In some examples, the process of determining the display position of the device ball to be dragged on the trust ring based on the corrected rotation angle and the initialization parameters can be: based on the corrected rotation angle, the radius of the trust ring in the initialization parameters, and the center position of the trust ring, determine the coordinates corresponding to the center display position of the device ball to be dragged on the trust ring; then, based on the coordinates corresponding to the center display position of the device ball to be dragged on the trust ring and the radius of the device ball in the initialization parameters, obtain the display position of the device ball to be dragged on the trust ring.
[0224] Since the second position of the device ball to be dragged can be above the trust ring or outside the trust ring. When the second position of the device ball to be dragged can be above the trust ring, the center display position of the device ball to be dragged on the trust ring is the second position of the device ball to be dragged.
[0225] When the second position of the device ball to be dragged can be outside the trust ring, before determining the coordinates corresponding to the center display position of the device ball to be dragged on the trust ring based on the corrected rotation angle, the radius of the trust ring in the initialization parameters, and the center position of the trust ring, it is also necessary to determine the center display position of the device ball to be dragged on the trust ring.
[0226] Among them, the process of determining the center display position of the device ball to be dragged on the trust ring can be: based on the center position of the trust ring and the second position of the device ball to be dragged, determine the center display position of the device ball to be dragged on the trust ring.
[0227] Exemplarily, the process of determining the center display position of the device ball to be dragged on the trust ring based on the center position of the trust ring and the second position of the device ball to be dragged can be as follows: Connect the center position of the trust ring and the second position of the device ball to be dragged, and determine the intersection point of the line connecting the center position of the trust ring and the second position of the device ball to be dragged with the trust ring as the center display position of the device ball to be dragged on the trust ring.
[0228] Figure 7 Exemplarily, a scenario where the second position of the device ball to be dragged is outside the trust ring is shown. As Figure 7 shown, the process of determining the center display position of the device ball to be dragged on the trust ring based on the center position of the trust ring and the second position of the device ball to be dragged can be as follows: Connect the center position of the trust ring (i.e., point O) and the second position of the device ball to be dragged (i.e., point B), and determine the intersection point (i.e., point H) of the line connecting the center position of the trust ring and the second position of the device ball to be dragged (i.e., OB) with the trust ring as the center display position of the device ball to be dragged on the trust ring.
[0229] After obtaining the center display position of the device ball to be dragged on the trust ring, the coordinates corresponding to the center display position of the device ball to be dragged on the trust ring can be obtained according to the positional relationship among the corrected rotation angle, the radius of the trust ring, the center position of the trust ring, and the center display position of the device ball to be dragged on the trust ring (i.e., the coordinates corresponding to point H (x dev , y dev )). For example, x dev = x0 + R × cos(∠D0B); y dev = y0 + R × sin(∠D0B).
[0230] Where, ∠D0B is the corrected rotation angle.
[0231] In the Android operating system, the shape of a control (e.g., the device ball to be dragged) is usually defaulted to a rectangle (or square), and the display position of the control can be represented by the upper left corner coordinates of the rectangle. Therefore, when displaying the control, the control position can be determined based on the upper left corner coordinates of the control. Thus, the display position of the device ball to be dragged on the trust ring can be represented by the upper left corner coordinates of the rectangle corresponding to the device ball to be dragged.
[0232] It can be understood that when the display shape of the device ball to be dragged is a rectangle, the upper left corner coordinates of the rectangle can be directly obtained and used as the display position of the device ball to be dragged on the trust ring.
[0233] When the display shape of the device ball to be dragged is not rectangular, auxiliary lines can be drawn according to the current shape of the device ball to be dragged, so as to obtain the rectangle corresponding to the device ball to be dragged by using the auxiliary lines, and then obtain the upper left corner coordinates of the rectangle corresponding to the device ball to be dragged; and use the upper left corner coordinates of the rectangle corresponding to the device ball to be dragged as the display position of the device ball to be dragged on the trust ring. The present disclosure does not limit the display shape of the device ball to be dragged.
[0234] As Figure 7 shown, the display shape of the device ball to be dragged is circular, and auxiliary lines EF and EG can be drawn based on the display shape of the device ball to be dragged. Based on the auxiliary lines EF and EG, the upper left corner coordinates (i.e., point E) of the rectangle corresponding to the device ball to be dragged are obtained. Therefore, point E can be used to represent the display position of the device ball to be dragged on the trust ring (left dev , top dev ).
[0235] After obtaining the coordinates corresponding to the center display position of the device ball to be dragged on the trust ring, the display position of the device ball to be dragged on the trust ring can be obtained according to the coordinates corresponding to the center display position of the device ball to be dragged on the trust ring and the device ball radius in the initialization parameters. Among them, the device ball radius is r1.
[0236] For example, the process of obtaining the display position of the device ball to be dragged on the trust ring according to the coordinates corresponding to the center display position of the device ball to be dragged on the trust ring and the device ball radius in the interface initialization parameters can be: according to the coordinates corresponding to the center display position of the device ball to be dragged on the trust ring (i.e., point H (x dev , y dev )) and the device ball radius (i.e., r1), obtain the display position of the device ball to be dragged on the trust ring (i.e., point E (left dev , top dev ).
[0237] Among them, the abscissa left dev in the display position of the device ball to be dragged on the trust ring can be obtained by the abscissa (x dev ) in the center display coordinates of the device ball to be dragged on the trust ring and the device ball radius (i.e., r1), that is, left dev =x dev -r1.
[0238] The ordinate top dev in the display coordinates of the device ball to be dragged on the trust ring can be obtained by the ordinate (y dev ) in the center display coordinates of the device ball to be dragged on the trust ring and the device ball radius (i.e., r1), that is, top dev =ydev -r1。
[0239] After obtaining the display position of the device ball to be dragged on the trust ring, the display position of the device ball to be dragged on the trust ring can be uploaded, so that subsequently, according to the display position of the device ball to be dragged on the trust ring and the radius of the device ball to be dragged, the final position of the device ball to be dragged is drawn on the trust ring.
[0240] Step 510: The device interconnection application updates and displays the device ball to be dragged on the trust ring based on the display position of the device ball to be dragged on the trust ring.
[0241] After determining the display position of the device ball to be dragged on the trust ring, the position of the device ball to be dragged can be updated on the trust ring according to the display position of the device ball to be dragged on the trust ring, so as to ensure that when the user triggers the drag operation, the display position of the device ball to be dragged can be updated in real time on the trust ring, increasing the interactivity between the user and the device.
[0242] In some examples, while updating the display position of the device ball to be dragged on the trust ring, the initial angle of the device ball to be dragged can also be updated to the corrected rotation angle (or the angle to be rotated). So as to update the display position of the device ball to be dragged again according to the corrected rotation angle (or the angle to be rotated) next time.
[0243] It can be understood that when the user drags other device balls on the trust ring, the update method of the display position of other device balls is similar to that of the display position of the device ball to be dragged, which will not be elaborated here.
[0244] In some examples, when there is only the device ball to be dragged on the trust ring, after obtaining the display position of the device ball to be dragged on the trust ring, the device ball to be dragged can be directly updated and displayed on the trust ring.
[0245] When there are multiple device balls on the trust ring and the multiple device balls include the device ball to be dragged, after obtaining the display position of the device ball to be dragged on the trust ring, only the device ball to be dragged can be updated and displayed on the trust ring, and the positions of other device balls remain unchanged.
[0246] Or, the initial positions of other device balls among the multiple device balls and the relative positions between other device balls and the device ball to be dragged are obtained in advance. While updating and displaying the device ball to be dragged on the trust ring, based on the display position of the device ball to be dragged on the trust ring, the initial positions of other device balls, and the relative positions between other device balls and the device ball to be dragged, the display positions of other device balls on the trust ring are obtained, and finally, according to the display positions of other device balls on the trust ring, other device balls are synchronously updated and displayed on the trust ring.
[0247] In some examples, the trust ring can also be any other shape. For example, Figure 8 the triangle shown in (a) of Figure 8 the rectangle shown in (b) of Figure 8 the ellipse shown in (c) of Figure 8 the rectangle shown in (a) of Figure 8 the ellipse shown in (b) of Figure 8 the triangle shown in (c) of
[0248] After the user performs a drag operation on the device ball of different shapes on the trust ring of "triangle", "rectangle" or "ellipse", steps 502 - 510 can be referred to. According to the positional relationship between the trust ring of different shapes and the device ball of different shapes, the display position of the device ball on the trust ring is re - determined. And finally, according to the display position of the device ball on the trust ring, the position of the device ball is updated and displayed on the trust ring.
[0249] That is to say, the content of steps 502 - 510 above only takes the trust ring as a circle and the device ball as a circle as an example to exemplarily illustrate how to determine the display position of the device ball on the trust ring and the process of updating and displaying the device ball on the trust ring.
[0250] It can be understood that when the trust ring is of other shapes and the device ball is of other shapes, the content of steps 502 - 510 above can be referred to. According to the positional relationship between the trust ring and the device ball, the display position of the device ball on the trust ring is re - determined, and the device ball is displayed on the trust ring, which will not be elaborated here.
[0251] Based on the method provided in the embodiments of the present disclosure, the present disclosure obtains the initial angle of the device ball to be dragged, the position of the device ball before dragging, and the position of the device ball after dragging, and obtains the display position of the device ball to be dragged on the trust ring. Then, the device ball to be dragged is displayed on the trust ring according to this display position. In this way, it can not only ensure that the device ball to be dragged always moves on the trust ring along with the user's drag operation, but also enhance the interaction between the user and the device and improve the user experience.
[0252] It should be understood that each step in the above - mentioned method embodiments provided by the present disclosure can be completed by the integrated logic circuit of the hardware in the processor or the instructions in the form of software. The method steps disclosed in combination with the embodiments of the present disclosure can be directly embodied as being executed and completed by the hardware processor, or executed and completed by the combination of the hardware and software modules in the processor.
[0253] In one example, the units in the above device may be one or more integrated circuits configured to implement the above method. For example: one or more ASICs, or one or more DSPs, or one or more FPGAs, or a combination of at least two of these integrated circuit forms.
[0254] For another example, when the units in the device can be implemented in the form of a processing element scheduler, the processing element may be a general-purpose processor, such as a CPU or other processors that can call programs. For another example, these units may be integrated together and implemented in the form of a system-on-chip (SOC).
[0255] In one implementation, the units in the above device that implement the corresponding steps in the above method may be implemented in the form of a processing element scheduler. For example, the device may include a processing element and a storage element. The processing element calls the program stored in the storage element to execute the method of the above method embodiment. The storage element may be a storage element on the same chip as the processing element, that is, an on-chip storage element.
[0256] In another implementation, the program for executing the above method may be stored in a storage element on a different chip from the processing element, that is, an off-chip storage element. At this time, the processing element calls or loads the program from the off-chip storage element onto the on-chip storage element to call and execute the method of the above method embodiment.
[0257] For example, an embodiment of the present disclosure may further provide a device, such as: an electronic device, which may include: a processor and a memory for storing executable instructions of the processor. When the processor is configured to execute the above instructions, the electronic device implements the data processing method as described in the foregoing embodiments. The memory may be located inside the electronic device or outside the electronic device. And the processor includes one or more.
[0258] In yet another implementation, the units in the device that implement the respective steps in the above method may be configured as one or more processing elements, and these processing elements may be provided on the corresponding above-mentioned electronic device. Here, the processing element may be an integrated circuit, for example: one or more ASICs, or one or more DSPs, or one or more FPGAs, or a combination of these types of integrated circuits. These integrated circuits may be integrated together to form a chip.
[0259] For example, an embodiment of the present disclosure also provides a chip, as Figure 9 shown, the chip system includes at least one processor 901 and at least one interface circuit 902. The processor 901 and the interface circuit 902 may be interconnected by a line. For example, the interface circuit 902 may be used to receive signals from other devices. For another example, the interface circuit 902 may be used to send signals to other devices (such as the processor 901).
[0260] For example, the interface circuit 902 can read the instructions stored in the memory of the device and send the instructions to the processor 901. When the instructions are executed by the processor 901, the electronic device (such as Figure 3 the electronic device 300 shown) can execute each step in the above embodiments. Of course, the chip system may also include other discrete devices, and the embodiments of the present disclosure do not specifically limit this.
[0261] The embodiments of the present disclosure also provide a computer-readable storage medium, on which computer program instructions are stored. When the computer program instructions are executed by an electronic device, the electronic device can implement the data processing method as described above.
[0262] The embodiments of the present disclosure also provide a computer program product, including computer instructions for running on the above-mentioned electronic device. When the computer instructions run on the electronic device, the electronic device can implement the data processing method as described above. Through the description of the above embodiments, those skilled in the art can clearly understand that for the convenience and brevity of description, only the above-mentioned division of each functional module is used as an example. In actual applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
[0263] In several embodiments provided by the present disclosure, it should be understood that the disclosed device and method can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection can be through some interfaces. The indirect coupling or communication connection of the device or unit can be in electrical, mechanical or other forms.
[0264] The units described as separate components may or may not be physically separated. The components shown as units may be one physical unit or multiple physical units, that is, they can be located in one place or distributed to multiple different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0265] In addition, each functional unit in the various embodiments of the present disclosure can be integrated in one processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units.
[0266] When an integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiments of the present disclosure, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product, such as a program. This software product is stored in a program product, such as a computer-readable storage medium, and includes several instructions for causing a terminal device (which can be a single-chip microcomputer, a chip, etc.) or a processor to execute all or part of the steps of the methods of the various embodiments of the present disclosure. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, ROM, RAM, magnetic disks, or optical discs.
[0267] For example, the embodiments of the present disclosure can also provide a computer-readable storage medium, on which computer program instructions are stored. When the computer program instructions are executed by an electronic device, the electronic device is caused to implement the data processing method as in the method embodiments described above.
[0268] The above is only the specific implementation manner of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any changes or substitutions within the technical scope disclosed by the present disclosure should be covered by the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be subject to the protection scope of the claims.
Claims
1. A drag and rotation method, characterized in that, Including: In response to a user's drag operation on a device ball to be dragged on a trust ring, obtaining an initial angle, a first position, and a second position of the device ball to be dragged; the first position is used to represent the position of the device ball to be dragged before dragging, and the second position is used to represent the position of the device ball to be dragged after dragging; Based on the first position, the second position, and the initial angle, determining a display position of the device ball to be dragged on the trust ring; Based on the display position of the device ball to be dragged on the trust ring, displaying the device ball to be dragged on the trust ring.
2. The method according to claim 1, characterized in that, The determining the display position of the device ball to be dragged on the trust ring based on the first position, the second position, and the initial angle includes: Obtaining initialization parameters, where the initialization parameters include the center position of the trust ring; Based on the first position, the second position, and the center position of the trust ring, determining a drag angle corresponding to the device ball to be dragged and a rotation direction corresponding to the drag operation; Based on the initial angle, the initialization parameters, the drag angle corresponding to the device ball to be dragged, and the rotation direction corresponding to the drag operation, determining the display position of the device ball to be dragged on the trust ring.
3. The method according to claim 2, characterized in that, The determining the display position of the device ball to be dragged on the trust ring based on the initial angle, the initialization parameters, the drag angle corresponding to the device ball to be dragged, and the rotation direction corresponding to the drag operation includes: Based on the rotation direction corresponding to the drag operation and the drag angle corresponding to the device ball to be dragged, determining an adjustment angle; Based on the initial angle and the adjustment angle, determining a rotation angle to be rotated for the device ball to be dragged; Based on the initialization parameters and the rotation angle to be rotated for the device ball to be dragged, determining the display position of the device ball to be dragged on the trust ring.
4. The method according to claim 3, characterized in that, The determining the adjustment angle based on the rotation direction corresponding to the drag operation and the drag angle corresponding to the device ball to be dragged includes: When the rotation direction corresponding to the drag operation is the clockwise direction, determining the drag angle corresponding to the device ball to be dragged as the adjustment angle; When the rotation direction corresponding to the drag operation is the counterclockwise direction, performing an inversion process on the drag angle corresponding to the device ball to be dragged to obtain a processed angle, and determining the processed angle as the adjustment angle.
5. The method according to claim 3, wherein After determining the rotation angle to be rotated for the device ball to be dragged, the method further includes: When the rotation angle to be rotated is within a preset range, correcting the rotation angle to be rotated to obtain a corrected rotation angle; the preset range is less than a first threshold or greater than or equal to a second threshold; the value range corresponding to the corrected rotation angle meets the requirements; Based on the initialization parameters and the corrected rotation angle, determining the display position of the device ball to be dragged on the trust ring.
6. The method according to claim 5, wherein The initialization parameters further include the radius of the trust ring and the radius of the device ball; the determining the display position of the device ball to be dragged on the trust ring based on the initialization parameters and the corrected rotation angle includes: Determine the coordinates corresponding to the center display position of the device ball to be dragged on the trust ring based on the center position of the trust ring, the radius of the trust ring, and the corrected rotation angle; Obtain the display position of the device ball to be dragged on the trust ring according to the coordinates corresponding to the center display position of the device ball to be dragged on the trust ring and the radius of the device ball.
7. The method according to claim 2, wherein The determining of the rotation direction corresponding to the drag operation based on the first position, the second position, and the center position of the trust ring includes: Based on the first position, the second position, and the center position of the trust ring, determine a first Boolean parameter, a second Boolean parameter, a third Boolean parameter, a fourth Boolean parameter, and a fifth Boolean parameter; the first Boolean parameter is used to represent whether the device ball to be dragged is sliding downwards; the second Boolean parameter is used to represent whether the device ball to be dragged is sliding to the right; the third Boolean parameter is used to represent whether the device ball to be dragged is sliding vertically; the fourth Boolean parameter is used to represent whether the device ball to be dragged is sliding to the left of the center of the trust ring; the fifth Boolean parameter is used to represent whether the device ball to be dragged is sliding above the center of the trust ring; Determine the rotation direction corresponding to the drag operation based on the first Boolean parameter, the second Boolean parameter, the third Boolean parameter, the fourth Boolean parameter, and the fifth Boolean parameter.
8. The method according to claim 7, wherein The determining of the rotation direction corresponding to the drag operation based on the first Boolean parameter, the second Boolean parameter, the third Boolean parameter, the fourth Boolean parameter, and the fifth Boolean parameter includes: In the case where it is determined based on the third Boolean parameter that the device ball to be dragged is sliding vertically, based on the first Boolean parameter that the device ball to be dragged is sliding upwards, and based on the fourth Boolean parameter that the device ball to be dragged is sliding to the left of the center of the trust ring, then determine that the rotation direction corresponding to the drag operation is the clockwise direction; In the case where it is determined based on the third Boolean parameter that the device ball to be dragged is sliding vertically, based on the first Boolean parameter that the device ball to be dragged is sliding upwards, and based on the fourth Boolean parameter that the device ball to be dragged is sliding to the right of the center of the trust ring, then determine that the rotation direction corresponding to the drag operation is the counterclockwise direction; In the case where it is determined based on the third Boolean parameter that the device ball to be dragged is sliding vertically, based on the first Boolean parameter that the device ball to be dragged is sliding downwards, and based on the fourth Boolean parameter that the device ball to be dragged is sliding to the left of the center of the trust ring, then determine that the rotation direction corresponding to the drag operation is the counterclockwise direction; In the case where it is determined based on the third Boolean parameter that the device ball to be dragged is sliding vertically, based on the first Boolean parameter that the device ball to be dragged is sliding downwards, and based on the fourth Boolean parameter that the device ball to be dragged is sliding to the right of the center of the trust ring, then determine that the rotation direction corresponding to the drag operation is the clockwise direction; When it is determined that the device ball to be dragged slides horizontally based on the third Boolean parameter, slides to the right based on the second Boolean parameter, and slides above the center of the trust ring based on the fifth Boolean parameter, then it is determined that the rotation direction corresponding to the drag operation is the clockwise direction; When it is determined that the device ball to be dragged slides horizontally based on the third Boolean parameter, slides to the right based on the second Boolean parameter, and slides below the center of the trust ring based on the fifth Boolean parameter, then it is determined that the rotation direction corresponding to the drag operation is the counterclockwise direction; When it is determined that the device ball to be dragged slides horizontally based on the third Boolean parameter, slides to the left based on the second Boolean parameter, and slides above the center of the trust ring based on the fifth Boolean parameter, then it is determined that the rotation direction corresponding to the drag operation is the counterclockwise direction; When it is determined that the device ball to be dragged slides horizontally based on the third Boolean parameter, slides to the left based on the second Boolean parameter, and slides below the center of the trust ring based on the fifth Boolean parameter, then it is determined that the rotation direction corresponding to the drag operation is the clockwise direction.
9. An electronic device, characterized in that, Comprising: A processor, a memory, a bus, and a communication interface; The memory is used to store computer execution instructions, the processor is connected to the memory through the bus, and when the terminal runs, the processor executes the computer execution instructions stored in the memory, so that the terminal executes the drag rotation method according to any one of claims 1-8.
10. A computer-readable storage medium storing instructions therein, characterized in that, When the instruction runs on the terminal, it causes the terminal to execute the drag rotation method according to any one of claims 1-8.
Citation Information
Patent Citations
Touch interaction with a curved display
CN102105853A
Three-dimensional model positioning method, device and equipment
CN114723925A
Target object 3D sphere rotation animation display method and device and electronic equipment
CN115904157A
Equipment interconnection interaction method, electronic equipment and storage medium
CN116700572A
Rotation control method and electronic equipment
CN117348782A