Human-computer interaction display method, device and equipment and storage medium
By responding to the touch screen sliding event, determining the target rotation angle and adjusting the control position, the problem of performance loss and development workload of the circular slip ring interaction effect control in the prior art is solved, and high performance and flexible interaction effects are achieved.
Patent Information
- Application Number
- CN202411447146.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-16
- Publication Date
- 2025-02-25
AI Technical Summary
In the prior art, the implementation of circular slip ring interaction effect controls in the way of custom Views is likely to cause performance losses, and the development workload is large when it involves expansion or modification of the control.
By acquiring touch data of the sliding touch event in response to triggering a sliding touch event on the touch screen, the touch data of the sliding touch event is obtained, and the target rotation angle of the first control in the display interface is determined based on the touch data, and under the constraint that the distance between the first control and the second control is maintained at a set distance, the display position of the first control in the display interface is adjusted based on the target rotation angle.
The interaction effect of the user controlling the first control to make circular motions around the second control through simple sliding operations is realized, reducing the amount of calculations in the human-computer interactive display process, improving system performance, and simplifying the development work when functional requirements change.
Smart Images

Figure CN119512430A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of touch control, and in particular to a human-computer interaction display method, device, equipment and storage medium. Background Art
[0002] With the rapid development of touch technology, touch screen devices have become the mainstream interactive interface of modern electronic products and are widely used in smart phones, tablet computers, e-book readers and various smart display terminals. In the prior art, a circular slip ring interactive effect control is provided in combination with touch technology. The control can be used as an intuitive tool to adjust the user's observation angle of other observed objects (such as three-dimensional virtual car models), which can bring intuitive and interesting interactive experience to users. For example, see Figure 1 , is a schematic diagram of the interaction effect of circular slip rings. Figure 1 In the example, the user can slide his finger in the response area of the ring. As the user slides his finger, the slider will move along the ring in the sliding direction corresponding to the sliding operation, and as the slider moves, the user's viewing angle of other observed objects will also change. For example, if the slider moves in a clockwise direction along the ring, the 3D virtual car model will also change its rotation angle in the clockwise direction.
[0003] In the prior art, the circular slide ring interactive effect control described above is usually implemented in a custom View (view) mode. In this mode, the circular slide ring interactive effect control inherits the system FrameLayout class, and the main business logic is to convert the touch event coordinates into the coordinates of the slider relative to the center point View.
[0004] It can be seen that in the prior art, coordinate conversion calculation is required to determine the position of the slider. This calculation process will cause performance loss to the system, and when the functional requirements change, such as adding a slider, a lot of changes need to be made to the business code. Summary of the invention
[0005] The present application provides a human-computer interaction display method, device, equipment and storage medium to solve the technical problems in the prior art that implementing a circular slip ring interactive effect control in a customized View manner is prone to performance loss and involves a large amount of development work when the control is expanded or modified.
[0006] In a first aspect, the present application provides a human-computer interaction display method, the method comprising:
[0007] In response to triggering a sliding touch event on the touch screen, acquiring touch data of the sliding touch event;
[0008] Determine a target rotation angle of a first control in the display interface compared to a second control according to the touch data;
[0009] Under the constraint condition that the distance between the first control and the second control remains a set distance, the display position of the first control in the display interface is adjusted based on the target rotation angle.
[0010] In a possible implementation, the touch data includes first position coordinates of a touch end point of the sliding touch event; and determining a target rotation angle of a first control in the display interface compared to a second control according to the touch data includes:
[0011] Obtaining a second position coordinate of a second control in the display interface;
[0012] Determine a horizontal axis offset and a vertical axis offset of the first position coordinate compared to the second position coordinate;
[0013] According to the geometric relationship between the second control, the touch endpoint and the preset 0 degree orientation, trigonometric function operation is performed using the horizontal axis offset and the vertical axis offset to obtain the target rotation angle of the first control in the display interface compared to the second control.
[0014] In a possible implementation, adjusting the display position of the first control in the display interface based on the target rotation angle under the constraint that the distance between the first control and the second control remains a set distance includes:
[0015] Determine a circular path with the second control as the center and the set distance as the radius;
[0016] Determining a target position point on the circular path based on the target rotation angle;
[0017] The first control is moved from the current position point to the target position point along the circular path.
[0018] In a possible implementation, the method further includes:
[0019] The rotation angle of the first control is adjusted based on the target rotation angle.
[0020] In a possible implementation, the first control and the second control inherit the ConstraintLayout class; wherein the layout_constraintCircle attribute of the first control is defined as the control ID of the second control, the layout_constraintCircleRadius attribute of the first control is defined as the set distance, and the layout_constraintCircleAngle attribute of the first control is defined as the target rotation angle.
[0021] In a possible implementation, the method further includes:
[0022] The viewing angle of the target three-dimensional virtual model is adjusted based on the target rotation angle.
[0023] In a possible implementation, the method further includes:
[0024] In response to an instruction to adjust the viewing angle of the target three-dimensional virtual model, adjusting the viewing angle of the target three-dimensional virtual model, and re-determining a target rotation angle of the first control compared to the second control based on the adjusted viewing angle;
[0025] Under the constraint condition that the distance between the first control and the second control remains a set distance, the display position of the first control in the display interface is adjusted based on the re-determined target rotation angle.
[0026] In a second aspect, the present application provides a human-computer interaction display device, the device comprising:
[0027] A touch event triggering module, configured to obtain touch data of a sliding touch event in response to triggering a sliding touch event on the touch screen;
[0028] An angle determination module, used to determine a target rotation angle of a first control in a display interface compared to a second control according to the touch data;
[0029] A position adjustment module is used to adjust the display position of the first control in the display interface based on the target rotation angle under the constraint that the distance between the first control and the second control remains a set distance.
[0030] In a possible implementation manner, the touch data includes the first position coordinates of the touch end point of the sliding touch event; and the angle determination module includes:
[0031] A reference coordinate acquisition unit, used to acquire a second position coordinate of a second control in the display interface;
[0032] an offset calculation unit, used to determine a horizontal axis offset and a vertical axis offset of the first position coordinate compared to the second position coordinate;
[0033] An angle calculation unit is used to perform trigonometric operations using the horizontal axis offset and the vertical axis offset according to the geometric relationship between the second control, the touch end point and the preset 0 degree orientation, so as to obtain the target rotation angle of the first control in the display interface compared to the second control.
[0034] In a possible implementation, the position adjustment module includes:
[0035] A path determination unit, configured to determine a circular path with the second control as the center and the set distance as the radius;
[0036] a target position determination unit, configured to determine a target position point on the circular path based on the target rotation angle;
[0037] An adjustment unit is used to move the first control from a current position point to a target position point along the circular path.
[0038] In a possible implementation, the device further includes:
[0039] The rotation control module is used to adjust the rotation angle of the first control based on the target rotation angle.
[0040] In a possible implementation, the first control and the second control inherit the ConstraintLayout class; wherein the layout_constraintCircle attribute of the first control is defined as the control ID of the second control, the layout_constraintCircleRadius attribute of the first control is defined as the set distance, and the layout_constraintCircleAngle attribute of the first control is defined as the target rotation angle.
[0041] In a possible implementation, the device further includes:
[0042] The viewing angle adjustment module is used to adjust the viewing angle of the target three-dimensional virtual model based on the target rotation angle.
[0043] In a possible implementation, the device further includes:
[0044] a linkage module, configured to adjust the viewing angle of the target three-dimensional virtual model in response to an instruction to adjust the viewing angle of the target three-dimensional virtual model, and to redetermine a target rotation angle of the first control relative to the second control based on the adjusted viewing angle;
[0045] Under the constraint condition that the distance between the first control and the second control remains a set distance, the display position of the first control in the display interface is adjusted based on the re-determined target rotation angle.
[0046] In a third aspect, the present application provides a device, comprising: a processor and a memory, wherein the processor is used to execute a human-computer interaction display program stored in the memory to implement the human-computer interaction display method described in any one of the first aspects.
[0047] In a fourth aspect, the present application provides a storage medium storing one or more programs, and the one or more programs can be executed by one or more processors to implement the human-computer interaction display method described in any one of the first aspects.
[0048] The above technical solution provided by the embodiment of the present application has the following advantages over the prior art: the method provided by the embodiment of the present application, by responding to triggering a sliding touch event on the touch screen, obtains touch data of the sliding touch event, determines the target rotation angle of the first control in the display interface compared with the second control according to the touch data, and adjusts the display position of the first control in the display interface based on the target rotation angle under the constraint condition that the distance between the first control and the second control remains a set distance, thereby realizing the interactive effect of the user controlling the first control to make a circular motion around the second control through a simple sliding operation. This method adjusts the display position of the first control in the display interface by the rotation angle of the first control compared with the second control, eliminating the tedious process of coordinate conversion calculation when determining the position of the first control, thereby reducing the amount of calculation in the human-computer interaction display process, improving system performance, and when there is a change in functional requirements, such as adding a sliding control, it is only necessary to simply add the angle attribute definition of the sliding control, the definition of the surrounding control, and the definition of the set distance, which makes the implementation of new business requirements simpler and more direct, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0050] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0051] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0052] Figure 1 It is a schematic diagram of the interaction effect of circular slip ring;
[0053] Figure 2 A flowchart of an embodiment of a human-computer interaction display method provided in an embodiment of the present application;
[0054] Figure 3 A schematic diagram of adjusting the display position of a first control in a display interface based on a target rotation angle;
[0055] Figure 4 A flowchart of another embodiment of a human-computer interaction display method provided in an embodiment of the present application;
[0056] Figure 5 Schematic diagram for calculating the target rotation angle in different quadrants;
[0057] Figure 6 A block diagram of an embodiment of a human-computer interaction display device provided in an embodiment of the present application;
[0058] Figure 7 A schematic diagram of the structure of a device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0059] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0060] The disclosure below provides many different embodiments or examples to realize the different structures of the present application. In order to simplify the disclosure of the present application, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present application. In addition, the present application can repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed.
[0061] In order to solve the technical problems in the prior art that implementing a circular sliding ring interactive effect control in a customized View manner is prone to performance loss and involves a large amount of development work when the control is expanded or modified, the present application provides a human-computer interactive display method, device, equipment and storage medium. While realizing the interactive effect of a user controlling a first control to make a circular motion around a second control through a simple sliding operation, the tedious process of coordinate conversion calculation when determining the position of the first control is omitted, thereby reducing the amount of calculation in the human-computer interactive display process and improving system performance. In addition, when there are changes in functional requirements, such as adding a sliding control, it is only necessary to simply add the angle attribute definition of the sliding control, the definition of the surrounding control, and the definition of the set distance. This makes the implementation of new business requirements simpler and more direct, thereby improving the user experience.
[0062] Figure 2 The flowchart of an embodiment of a human-computer interactive display method provided in the embodiment of the present application. In one embodiment, the method is applied to a device, which can be various electronic devices supporting a touch screen display, including but not limited to smart phones, tablet computers, e-book readers and various smart display terminals. Figure 2 As shown, the method comprises the following steps:
[0063] Step 201: In response to a sliding touch event being triggered on a touch screen, touch data of the sliding touch event is acquired.
[0064] Slide touch operation refers to the user sliding a finger (usually a single finger, such as the index finger) on the touch screen. Figure 1 As shown, curve AB is a schematic diagram of the sliding track of the user's sliding touch operation. It can also be seen that the user's sliding touch operation on the touch screen is a continuous process. A complete sliding touch operation has a starting position (such as Figure 1 Point A shown in the example), the end point position (such as Figure 1 In this process, the user's finger will continue to touch the screen, forming multiple continuous touch focuses, which form a sliding track, which means that in this process, the touch screen will continue to receive and process a series of sliding touch events.
[0065] In one embodiment, in order to identify and process a sliding touch event that occurs during a sliding touch operation on a touch screen, on a related view of an application (such as Figure 1 A touch event listener is set on the view control shown in the example in the figure, and the touch event listener is responsible for monitoring and responding to sliding touch events occurring on the touch screen. Optionally, the touch event listener is implemented by setting one or more touch event listening interfaces (such as the onTouch interface in the OnTouchListener class on the Android platform) for the view.
[0066] Based on the above description, in the technical solution provided in the embodiment of the present application, during the process of a sliding touch operation occurring on the touch screen, the sliding touch events triggered on the touch screen will be continuously detected. Each time a currently triggered sliding touch event is detected, step 201 and subsequent steps will be executed to ensure the accuracy and smoothness of the sliding touch operation.
[0067] In the technical solution provided in the embodiment of the present application, in response to triggering a sliding touch event on the touch screen, touch data of the sliding touch event is obtained. The touch data includes but is not limited to position information of the starting position and the end position of the sliding touch event. Optionally, the position information is represented by coordinate information, that is, the coordinate information of the starting position and the end position on the coordinate system corresponding to the touch screen.
[0068] Step 202: Determine a target rotation angle of a first control relative to a second control in the display interface according to the touch data.
[0069] Step 203: Under the constraint that the distance between the first control and the second control remains a set distance, adjust the display position of the first control in the display interface based on the target rotation angle.
[0070] For ease of understanding, step 202 and step 203 are described in a unified manner as follows:
[0071] The first control is a movable control in the display interface, that is, a control with a variable position, for example Figure 1 The second control is a control that cannot be moved in the display interface, that is, a control with a fixed position, such as Figure 1 The center point control shown in Figure 12. Figure 1 It can be seen that the center point control 12, that is, the second control, is located at the center of the circle.
[0072] The target rotation angle of the first control relative to the second control refers to the angle that the user wants the first control to rotate around the second control when performing a sliding touch operation on the first control. Optionally, the rotation angle is defined in a clockwise direction with the negative direction of the vertical axis of the screen coordinate system as 0 degrees. Usually, the screen coordinate system takes the upper left corner of the screen as the origin, the horizontal right direction as the positive direction of the horizontal axis, and the vertical downward direction as the positive direction of the vertical axis.
[0073] Maintaining the set distance between the first control and the second control means that no matter how many degrees the first control rotates around the second control, the distance between the first control and the second control will remain unchanged. It can also be seen that when the user performs a sliding touch operation on the first control, the first control will move along a circular path with the second control as the center and the set distance as the radius.
[0074] Based on this, in one embodiment, under the constraint that the distance between the first control and the second control maintains a set distance, the specific implementation of adjusting the display position of the first control in the display interface based on the target rotation angle includes: determining a circular path with the second control as the center and the set distance as the radius, determining the target position point on the circular path based on the target rotation angle of the first control compared to the second control, and moving the first control from the current position point to the target position point along the circular path.
[0075] The arc angle of the arc between the target position point and the preset position point on the circular path is equal to the target rotation angle. The preset position point refers to the point on the circular path corresponding to the 0 degree orientation.
[0076] For example, see Figure 3 For example, assuming that the first control is currently located at the position indicated by point P1 (point P1 is the preset position point mentioned above), the rotation angle of the first control relative to the second control is 90 degrees, and assuming that the user performs a sliding touch operation on the first control as shown by the sliding track shown by curve CD, and assuming that the target rotation angle determined according to the touch data is 90 degrees, then the first control will start from the position indicated by point P1 and move clockwise along the circular path to the position indicated by point P2. Assuming that the user performs a sliding touch operation on the first control as shown by curve EF, and assuming that the target rotation angle determined according to the touch data is 270 degrees, then the first control will start from the position indicated by point P1 and move counterclockwise along the circular path to the position indicated by point P3.
[0077] pass Figure 3 It can be seen from the example that the technical solution provided by the embodiment of the present application can be implemented Figure 1 The circular slip ring interaction effect described in .
[0078] The technical solution provided by the embodiment of the present application obtains touch data of the sliding touch event in response to triggering a sliding touch event on the touch screen, determines the target rotation angle of the first control in the display interface compared with the second control according to the touch data, and adjusts the display position of the first control in the display interface based on the target rotation angle under the constraint that the distance between the first control and the second control remains at a set distance, thereby achieving an interactive effect in which the user controls the first control to make a circular motion around the second control through a simple sliding operation. This method adjusts the display position of the first control in the display interface by the rotation angle of the first control compared with the second control, eliminating the tedious process of coordinate conversion calculation when determining the position of the first control, thereby reducing the amount of calculation in the human-computer interaction display process, improving system performance, and when there is a change in functional requirements, such as adding a sliding control, it is only necessary to simply add the angle attribute definition of the sliding control, the definition of the surrounding control, and the definition of the set distance, which makes the implementation of new business requirements simpler and more direct, thereby improving the user experience.
[0079] Figure 4 A flowchart of another embodiment of a human-computer interaction display method provided in an embodiment of the present application. Figure 4 The process shown in Figure 2 Based on the process shown, it is described how to determine the target rotation angle of the first control in the display interface compared with the second control according to the touch data. Figure 4 As shown, the following steps are included:
[0080] Step 401: In response to a sliding touch event being triggered on the touch screen, touch data of the sliding touch event is acquired.
[0081] The above touch data includes the position coordinates of the touch end point of the sliding touch event (for ease of description, referred to as the first position coordinates). Those skilled in the art can understand that the touch end point is the touch focus formed on the touch screen by the detected touch event during the sliding touch operation on the touch screen.
[0082] Step 402: Obtain the second position coordinates of the second control in the display interface.
[0083] pass Figure 2 It can be seen from the relevant description in the illustrated embodiment that the position coordinates of the second control (referred to as second position coordinates for the convenience of description) are fixed values.
[0084] Step 403: Determine a horizontal axis offset and a vertical axis offset of the first position coordinate compared to the second position coordinate.
[0085] Step 404: Based on the geometric relationship between the second control, the touch endpoint, and the preset 0 degree position, trigonometric operations are performed using the horizontal axis offset and the vertical axis offset to obtain a target rotation angle of the first control in the display interface compared to the second control.
[0086] For ease of understanding, the following combination Figure 5 The example of step 403 and step 404 are described uniformly:
[0087] In one embodiment, taking the location of the second control as the center point, the response area of the sliding trigger operation is divided into four quadrants in a clockwise direction: a first quadrant, a second quadrant, a third quadrant, and a fourth quadrant.
[0088] like Figure 5 As shown, assuming that point P is the touch end point, when point P is located in the first quadrant, the calculation formula for the target rotation angle of the first control compared to the second control is as shown in formula (1):
[0089]
[0090] When point P is located in the second quadrant, the calculation formula for the target rotation angle of the first control compared to the second control is shown in formula (II):
[0091]
[0092] When point P is located in the third quadrant, the calculation formula for the target rotation angle of the first control compared to the second control is shown in formula (III):
[0093]
[0094] When point P is located in the fourth quadrant, the calculation formula for the target rotation angle of the first control compared to the second control is shown in formula (IV):
[0095]
[0096] Based on the above description, the quadrant in which the first position coordinate is located is first determined based on the horizontal axis offset and vertical axis offset of the first position coordinate compared to the second position coordinate, and then the rotation angle calculation formula corresponding to the quadrant (that is, the above formula (1) to formula (5)) is used to perform calculations to obtain the target rotation angle of the first control compared to the second control.
[0097] Among them, see Figure 5It can be seen that when the horizontal axis offset is greater than 0 and the vertical axis offset is less than 0, the first position coordinate is determined to be in the first quadrant. When the horizontal axis offset is greater than 0 and the vertical axis offset is greater than 0, the first position coordinate is determined to be in the second quadrant. When the horizontal axis offset is less than 0 and the vertical axis offset is greater than 0, the first position coordinate is determined to be in the third quadrant. When the horizontal axis offset is less than 0 and the vertical axis offset is less than 0, the first position coordinate is determined to be in the fourth quadrant.
[0098] Figure 4 The process shown in Figure 1 Based on the shown process, the target rotation angle of the first control compared to the second control is determined according to the first position information of the touch point and the second position information of the second control. In this calculation method, only simple horizontal / vertical axis offset calculations and trigonometric function operations are involved, so the calculation process is simple and convenient.
[0099] To achieve Figure 2 and Figure 4 In the process shown, in one embodiment, the first control and the second control inherit the ConstraintLayout class. The ConstraintLayout class is a new generation of layout container, which is flexible to use and has excellent performance. The angle positioning function is a capability that traditional layout containers do not have. The angle positioning function provides a flexible way to position a control so that it can be positioned around a specific point of another control at a certain angle and radius. This function is mainly implemented through the following three properties:
[0100] layout_constraintCircle: This property specifies the ID of the center circle control around which the control is positioned. The center circle control is the base point for positioning operations, and other controls will be positioned based on the position, angle, and radius of this point.
[0101] layout_constraintCircleAngle: This property defines the angle position of the control on the circular path. Through this property, the specific position of the control on the circular path can be precisely controlled.
[0102] layout_constraintCircleRadius: This property specifies the radius of the control relative to the circular path. The radius determines how far the control is from the center of the circle. By adjusting the radius, you can control the specific position of the control on the circular path.
[0103] Accordingly, in the technical solution of the embodiment of the present application, the layout_constraintCircle attribute of the first control is defined as the control ID of the second control, the layout_constraintCircleRadius attribute of the first control is defined as the set distance described above, and the layout_constraintCircleAngle attribute of the first control is defined as the target rotation angle.
[0104] That is, after calculating the target rotation angle of the first control compared to the second control, the target rotation angle is assigned to the layout_constraintCircleAngle property of the first control, so that the first control can be controlled to adjust the display position according to the target rotation angle.
[0105] It can be seen that this method eliminates the tedious process of coordinate conversion calculation when determining the position of the first control, thereby reducing the amount of calculation in the human-computer interaction display process, improving system performance, and when functional requirements change, such as adding a sliding control, you only need to simply add the angle attribute definition of the sliding control, the definition of the surrounding controls, and the definition of the set distance. This makes the implementation of new business requirements simpler and more direct, thereby improving the user experience.
[0106] In addition, in actual applications, when defining controls, in addition to defining the first and second controls, a third control can also be defined. The third control is used to display a circular background image. The circular ring in the image corresponds to the circular path along which the first control moves in a circle around the second control. These three controls form a combined control and inherit the ConstraintLayout class together.
[0107] Continue to see Figure 1 In order to achieve a better visual effect for user experience, in an exemplary application scenario, the slider revolves around the center point along a circular path while also rotating on its own, so that a specific point on the slider is always facing the center point.
[0108] In this regard, in one embodiment, while adjusting the display position of the first control in the display interface based on the target rotation angle, the rotation angle of the first control is adjusted based on the target rotation angle. Here, the 0-degree orientation of the first control itself is the same as the 0-degree orientation of the rotation of the first control relative to the second control, for example, both are in the negative direction of the vertical axis of the screen coordinate system. Furthermore, through the mathematical knowledge of geometric angles, it can be seen that the rotation angle of the first control is the same as the target rotation angle. Therefore, adjusting the rotation angle of the first control based on the target rotation angle mentioned here means: adjusting the rotation angle of the first control to the target rotation angle.
[0109] Continue to see Figure 1 It can be learned from the description that, in one embodiment, the observation angle of the target three-dimensional virtual model is adjusted based on the target rotation angle, so that the user can slide his finger in the response area of the ring. As the user's finger slides, the slider will move along the ring in the sliding direction corresponding to the sliding operation, and as the slider moves, the user's observation angle of other observed objects will also change.
[0110] Furthermore, in one embodiment, in response to an observation angle adjustment instruction for the target three-dimensional virtual model, the observation angle of the target three-dimensional virtual model is adjusted, and the target rotation angle of the first control compared to the second control is redetermined based on the adjusted observation angle; under the constraint that the distance between the first control and the second control remains a set distance, the display position of the first control in the display interface is adjusted based on the redetermined target rotation angle.
[0111] Among them, the observation angle adjustment instruction for the target three-dimensional virtual model can be implemented by the user's sliding touch operation on the touch screen. Here, the calculation method for determining the observation angle of the target three-dimensional virtual model according to the user's sliding touch operation can refer to the calculation method for determining the target rotation angle of the first control compared to the second control according to the user's sliding touch operation, which will not be repeated here. In addition, in an optional implementation method, the observation angle adjustment instruction for the target three-dimensional virtual model can also be triggered by directly inputting the observation angle. Similarly, the display position of the first control in the display interface can also be adjusted by directly inputting the target rotation angle.
[0112] Through the above embodiment, it can be achieved that as the user slides his finger, the target 3D virtual model will adjust the viewing angle according to the sliding direction corresponding to the sliding operation, and the slider will also move on the ring as the viewing angle of the target 3D virtual model changes.
[0113] The above-mentioned embodiment realizes the linkage between the sliding ring control and the viewing angle of the observed object, which can bring an intuitive and interesting human-computer interaction experience to the user.
[0114] Figure 6 This is a block diagram of an embodiment of a human-computer interaction display device provided in an embodiment of the present application. Figure 6 As shown, the device comprises:
[0115] A touch event triggering module 61, configured to obtain touch data of a sliding touch event in response to triggering a sliding touch event on the touch screen;
[0116] An angle determination module 62, configured to determine a target rotation angle of a first control relative to a second control in a display interface according to the touch data;
[0117] The position adjustment module 63 is used to adjust the display position of the first control in the display interface based on the target rotation angle under the constraint that the distance between the first control and the second control remains a set distance.
[0118] In a possible implementation manner, the touch data includes the first position coordinates of the touch end point of the sliding touch event; and the angle determination module 62 includes:
[0119] A reference coordinate acquisition unit, used to acquire a second position coordinate of a second control in the display interface;
[0120] an offset calculation unit, used to determine a horizontal axis offset and a vertical axis offset of the first position coordinate compared to the second position coordinate;
[0121] An angle calculation unit is used to perform trigonometric operations using the horizontal axis offset and the vertical axis offset according to the geometric relationship between the second control, the touch end point and the preset 0 degree orientation, so as to obtain the target rotation angle of the first control in the display interface compared to the second control.
[0122] In a possible implementation, the position adjustment module 63 includes:
[0123] A path determination unit, configured to determine a circular path with the second control as the center and the set distance as the radius;
[0124] a target position determination unit, configured to determine a target position point on the circular path based on the target rotation angle;
[0125] An adjustment unit is used to move the first control from a current position point to a target position point along the circular path.
[0126] In a possible implementation, the device further includes:
[0127] The rotation control module is used to adjust the rotation angle of the first control based on the target rotation angle.
[0128] In a possible implementation, the first control and the second control inherit the ConstraintLayout class; wherein the layout_constraintCircle attribute of the first control is defined as the control ID of the second control, the layout_constraintCircleRadius attribute of the first control is defined as the set distance, and the layout_constraintCircleAngle attribute of the first control is defined as the target rotation angle.
[0129] In a possible implementation, the device further includes:
[0130] The viewing angle adjustment module is used to adjust the viewing angle of the target three-dimensional virtual model based on the target rotation angle.
[0131] In a possible implementation, the device further includes:
[0132] a linkage module, configured to adjust the viewing angle of the target three-dimensional virtual model in response to an instruction to adjust the viewing angle of the target three-dimensional virtual model, and to redetermine a target rotation angle of the first control relative to the second control based on the adjusted viewing angle;
[0133] Under the constraint condition that the distance between the first control and the second control remains a set distance, the display position of the first control in the display interface is adjusted based on the re-determined target rotation angle.
[0134] like Figure 7 As shown, an embodiment of the present application provides a device, including a processor 111, a communication interface 112, a memory 113 and a communication bus 114, wherein the processor 111, the communication interface 112, and the memory 113 communicate with each other through the communication bus 114.
[0135] Memory 113, used for storing computer programs;
[0136] In one embodiment of the present application, the processor 111 is used to execute the program stored in the memory 113 to implement the human-computer interaction display method provided by any of the above method embodiments, including:
[0137] In response to triggering a sliding touch event on the touch screen, acquiring touch data of the sliding touch event;
[0138] Determine a target rotation angle of a first control in the display interface compared to a second control according to the touch data;
[0139] Under the constraint condition that the distance between the first control and the second control remains a set distance, the display position of the first control in the display interface is adjusted based on the target rotation angle.
[0140] An embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the human-computer interaction display method provided in any of the aforementioned method embodiments are implemented.
[0141] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0142] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0143] It should be understood that the terms used herein are only for the purpose of describing specific example embodiments and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used herein may also be meant to include plural forms. The terms "include", "comprise", "contain", and "have" are inclusive, and therefore specify the existence of stated features, steps, operations, elements and / or parts, but do not exclude the existence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not interpreted as necessarily requiring them to be performed in the specific order described or illustrated, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps may be used.
[0144] The above description is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest range consistent with the principles and novel features applied for herein.
Claims
1. A human-computer interactive display method, characterized in that: The method comprises: In response to triggering a sliding touch event on the touch screen, acquiring touch data of the sliding touch event; Determine a target rotation angle of a first control in the display interface compared to a second control according to the touch data; Under the constraint condition that the distance between the first control and the second control remains a set distance, the display position of the first control in the display interface is adjusted based on the target rotation angle.
2. The method according to claim 1, characterized in that The touch data includes the first position coordinates of the touch end point of the sliding touch event; and determining the target rotation angle of the first control in the display interface compared to the second control according to the touch data includes: Obtaining a second position coordinate of a second control in the display interface; Determine a horizontal axis offset and a vertical axis offset of the first position coordinate compared to the second position coordinate; According to the geometric relationship between the second control, the touch end point and the preset 0 degree orientation, trigonometric function operation is performed using the horizontal axis offset and the vertical axis offset to obtain the target rotation angle of the first control in the display interface compared to the second control.
3. The method according to claim 1, characterized in that The adjusting the display position of the first control in the display interface based on the target rotation angle under the constraint that the distance between the first control and the second control maintains a set distance includes: Determine a circular path with the second control as the center and the set distance as the radius; Determining a target position point on the circular path based on the target rotation angle; The first control is moved from the current position point to the target position point along the circular path.
4. The method according to claim 1, characterized in that: The method further comprises: The rotation angle of the first control is adjusted based on the target rotation angle.
5. The method according to any one of claims 1 to 4, characterized in that: The first control and the second control inherit the ConstraintLayout class; wherein the layout_constraintCircle property of the first control is defined as the control ID of the second control, the layout_constraintCircleRadius property of the first control is defined as the set distance, and the layout_constraintCircleAngle property of the first control is defined as the target rotation angle.
6. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: The viewing angle of the target three-dimensional virtual model is adjusted based on the target rotation angle.
7. The method according to claim 6, characterized in that The method further comprises: In response to an instruction to adjust the viewing angle of the target three-dimensional virtual model, adjusting the viewing angle of the target three-dimensional virtual model, and re-determining a target rotation angle of the first control compared to the second control based on the adjusted viewing angle; Under the constraint condition that the distance between the first control and the second control remains a set distance, the display position of the first control in the display interface is adjusted based on the re-determined target rotation angle.
8. A human-computer interactive display device, characterized in that: The device comprises: A touch event triggering module, configured to obtain touch data of a sliding touch event in response to triggering a sliding touch event on the touch screen; An angle determination module, used to determine a target rotation angle of a first control in a display interface compared to a second control according to the touch data; A position adjustment module is used to adjust the display position of the first control in the display interface based on the target rotation angle under the constraint that the distance between the first control and the second control remains a set distance.
9. A device, characterized in that: include: A processor and a memory, wherein the processor is used to execute a human-computer interaction display program stored in the memory to implement the human-computer interaction display method according to any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the human-computer interaction display method according to any one of claims 1 to 7.