CN111580920B - Application program interface display method and device and electronic equipment - Google Patents

Application program interface display method and device and electronic equipment Download PDF

Info

Publication number
CN111580920B
CN111580920B CN202010410091.1A CN202010410091A CN111580920B CN 111580920 B CN111580920 B CN 111580920B CN 202010410091 A CN202010410091 A CN 202010410091A CN 111580920 B CN111580920 B CN 111580920B
Authority
CN
China
Prior art keywords
display
terminal equipment
interface
application program
display area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010410091.1A
Other languages
Chinese (zh)
Other versions
CN111580920A (en
Inventor
庄宇轩
孙静
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202010410091.1A priority Critical patent/CN111580920B/en
Publication of CN111580920A publication Critical patent/CN111580920A/en
Application granted granted Critical
Publication of CN111580920B publication Critical patent/CN111580920B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Abstract

The invention provides an interface display method and device of an application program and electronic equipment, and relates to the technical field of display, wherein the method comprises the following steps: acquiring attitude data of the terminal equipment; determining a target display position in a display interface of the terminal equipment according to the attitude data; and displaying a specified function control at the target display position. According to the method and the device, the display position of the designated function control in the client of the application program on the display interface is adjusted according to the posture data of the terminal device, so that the function control can be adjusted to the proper position in the display interface by adjusting the posture of the terminal device under the condition that a user holds the terminal device with one hand, the touch and the operation of the user are facilitated, the operation convenience of the application program is improved, and the user experience is improved.

Description

Application program interface display method and device and electronic equipment
Technical Field
The invention relates to the technical field of display, in particular to an application program interface display method and device and electronic equipment.
Background
The function entry of the existing application program is usually displayed at a fixed position in a terminal display interface, and is not beneficial to a user to operate the application program under certain specific scenes. For example, in a scene where the user can only hold the terminal with the left hand (for example, the right hand holds an article, or the right hand holds an umbrella in rainy days), if the user wants to use the map APP, the user's left hand is difficult to touch the voice input button at the upper right corner of the interface, so that the navigation operation is inconvenient.
Overall, the display interface layout of the existing application program is poor in operation convenience degree in a scene where the terminal is held by a single hand, and the experience of a user is poor.
Disclosure of Invention
In view of this, an object of the present invention is to provide an interface display method and apparatus for an application program, and an electronic device, which enable a client of the application program to adaptively adjust a display position of a function control in a display interface according to an application scenario, thereby improving operation convenience of the application program and improving user experience.
In a first aspect, an embodiment of the present invention provides an interface display method for an application, where a client of the application runs on a terminal device; the method comprises the following steps: acquiring attitude data of the terminal equipment; determining a target display position in a display interface of the terminal equipment according to the attitude data; and displaying a specified function control at the target display position.
In a preferred embodiment of the present invention, before the step of obtaining the attitude data of the terminal device, the method further includes: sending an attitude data acquisition request to the terminal equipment; and receiving an instruction returned by the terminal equipment responding to the attitude data acquisition request.
In a preferred embodiment of the present invention, before sending the attitude data acquisition request to the terminal device, the method further includes: and determining that the terminal equipment is in a designated state.
In a preferred embodiment of the present invention, the step of determining that the terminal device is in the designated state includes: acquiring the position information of the terminal equipment; and determining that the terminal equipment is in a specified state according to the position information.
In a preferred embodiment of the present invention, the step of obtaining the location information of the terminal device includes: if the positioning signal of the terminal equipment is detected, acquiring the position information of the terminal equipment; and the positioning signal of the terminal equipment is sent by the terminal equipment after the positioning authority of the terminal equipment is opened.
In a preferred embodiment of the present invention, the step of determining that the terminal device is in the designated state according to the location information includes: if the position information indicates that the terminal equipment is located outdoors, determining that the terminal equipment is in an appointed state; and if the position change distance of the position information in a preset time period is greater than a preset distance threshold, determining that the terminal equipment is in a specified state.
In a preferred embodiment of the present invention, the step of determining the target display position in the display interface of the terminal device according to the gesture data includes: determining a posture vector of the space posture of the display interface of the terminal equipment in a preset space rectangular coordinate system according to the posture data; the space rectangular coordinate system takes the geometric center of the display interface as an original point and takes the direction vertical to the ground plane as the direction of a vertical axis; calculating the position of the projection line segment of the attitude vector on the horizontal plane of the space rectangular coordinate system; and determining the target display position in the display interface according to the position of the projection line segment.
In a preferred embodiment of the present invention, the attitude data includes direction angle data and tilt data measured by a tilt sensor of the terminal device.
In a preferred embodiment of the present invention, the step of determining the target display position in the display interface according to the position of the projection line segment includes: calculating the projection area of each display area in the display interface on the horizontal plane of the space rectangular coordinate system when the display interface is in the horizontal posture; the display interface is divided into a plurality of display areas in advance; and determining the target display position in the display interface according to the position of the projection line segment and the projection area of each display area on the horizontal plane of the rectangular space coordinate system.
In a preferred embodiment of the present invention, the step of determining the target display position in the display interface according to the position of the projection line segment and the projection area of each display area on the horizontal plane of the rectangular spatial coordinate system includes: calculating the length of the projection line segment in the corresponding projection area of each display area and the included angle value between the projection line segment and the lower boundary of the projection area according to the position of the projection line segment and the projection area of each display area on the horizontal plane of the space rectangular coordinate system; determining a target display area from the plurality of display areas according to the length of the line segment and the included angle value; and determining the target display area as a target display position in the display interface.
In a preferred embodiment of the present invention, the step of determining a target display area from a plurality of display areas according to the segment length and the included angle value includes: determining the weight value of each display area according to the length of the line segment and the included angle value; and determining the display area with the largest weight value as a target display area.
In a preferred embodiment of the present invention, the step of determining the weight value of each display area according to the length of the line segment and the included angle value includes: for each display area, calculating a first variance of the length of the line segment corresponding to the display area and a second variance of the included angle value corresponding to the display area; and determining the weight of the display area according to the first variance and the second variance.
In a preferred embodiment of the present invention, the step of determining the weight of the display area according to the first variance and the second variance comprises: if the display area meets the following preset conditions, determining the weight of the display area to be 1, and determining the weights of the display areas except the display area to be 0; the preset conditions include: the first variance of the display area is continuously larger than a preset first threshold value within a preset time period; the second variance of the display area is continuously larger than a preset second threshold value in the time period; and the first variance of the display area is continuously larger than the first variance of the display areas except the display areas in the plurality of display areas in the time period; the second variance of the display area is continuously greater than the second variance of display areas other than the display area in the plurality of display areas for the period of time.
In a preferred embodiment of the present invention, the step of displaying the designated function control at the target display position includes: and if a display updating instruction is received, displaying the specified function control at the target display position.
In a second aspect, an embodiment of the present invention further provides an interface display method for an application, where the interface display method is applied to a terminal device, a client of the application runs on the terminal device, and the terminal device is in communication connection with a server of the application; the method comprises the following steps: acquiring attitude data of the terminal equipment; sending the attitude data to the server so that the server determines a target display position in a display interface of the terminal equipment according to the attitude data; the target display position is used for displaying a designated function control in a client of the application program; receiving the target display position returned by the server; and displaying the specified function control according to the target display position.
In a preferred embodiment of the present invention, the step of collecting the attitude data of the terminal device includes: receiving a posture data acquisition request of the server; the attitude data collection request is for: confirming whether the gesture data of the terminal equipment is allowed to be collected or not to a user of the terminal equipment; returning an instruction allowing acquisition of the attitude data to the server; the pose data is collected.
In a preferred embodiment of the present invention, before the step of receiving the attitude data collection request of the server, the method further includes: if the positioning authority is detected to be opened, a positioning signal of the terminal equipment is sent to the server, so that the server acquires the position information of the terminal equipment after detecting the positioning signal, judges whether the terminal equipment is in a specified state or not according to the position information, and if yes, sends a posture data acquisition request to the terminal equipment.
In a preferred embodiment of the present invention, the step of receiving the attitude data acquisition request from the server by setting a mode control in the client of the application program includes: receiving an attitude data acquisition request of the server, and displaying the mode control in a display interface of the terminal equipment; the mode control is used to enter a specified mode of a client of the application.
In a preferred embodiment of the present invention, the step of setting a mode control in the client of the application program and returning an instruction allowing acquisition of the posture data to the server includes: and responding to the first touch operation aiming at the mode control, entering a specified mode of the client of the application program, and returning an instruction allowing to collect the gesture data to the server.
In a preferred embodiment of the present invention, after the step of entering the specified mode of the client of the application program in response to the first touch operation directed to the mode control, the method further includes: and responding to a second touch operation aiming at the mode control, exiting the specified mode of the client of the application program, and stopping collecting the attitude data of the terminal equipment.
In a preferred embodiment of the present invention, the step of displaying the designated function control according to the target display position includes: and if a display updating instruction sent by the server is received, displaying the specified function control according to the target display position.
In a preferred embodiment of the present invention, the step of displaying the designated function control according to the target display position includes: and displaying the appointed function control according to a preset mapping strategy according to the target display position.
In a preferred embodiment of the present invention, the mapping policy includes a style mapping policy, a size mapping policy, and a layout mapping policy of the specified functionality control.
In a third aspect, an embodiment of the present invention further provides an interface display apparatus for an application, where a client of the application runs on a terminal device; the device includes: the attitude data acquisition module is used for acquiring attitude data of the terminal equipment; the target display position determining module is used for determining a target display position in a display interface of the terminal equipment according to the attitude data; and the specified function control display module is used for displaying the specified function control at the target display position.
In a fourth aspect, an embodiment of the present invention further provides an interface display apparatus for an application, where the interface display apparatus is applied to a terminal device, a client of the application runs on the terminal device, and the terminal device is in communication connection with a server of the application; the device includes: the attitude data acquisition module is used for acquiring attitude data of the terminal equipment; the attitude data sending module is used for sending the attitude data to the server so that the server can determine a target display position in a display interface of the terminal equipment according to the attitude data; the target display position is used for displaying a designated function control in a client of the application program; the target display position receiving module is used for receiving the target display position returned by the server; and the display module is used for displaying the appointed function control according to the target display position.
In a fifth aspect, an embodiment of the present invention further provides an electronic device, including a processor and a memory, where the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the interface display method for the application program.
In a sixth aspect, the embodiments of the present invention further provide a computer-readable storage medium, where the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are called and executed by a processor, the computer-executable instructions cause the processor to implement the interface display method of the application program.
The embodiment of the invention has the following beneficial effects:
the embodiment of the invention provides an interface display method and device of an application program and electronic equipment, and the method comprises the steps of obtaining attitude data of the terminal equipment; determining a target display position in a display interface of the terminal equipment according to the attitude data; and displaying a specified function control at the target display position. In the method, the display position of the designated function control in the client of the application program on the display interface is adjusted according to the posture data of the terminal device, so that the function control can be adjusted to the proper position in the display interface by adjusting the posture of the terminal device under the condition that a user holds the terminal device with one hand, the touch and operation of the user are facilitated, the operation convenience of the application program is improved, and the user experience is improved.
Additional features and advantages of the disclosure will be set forth in the description which follows, or in part may be learned by the practice of the above-described techniques of the disclosure.
In order to make the aforementioned objects, features and advantages of the present disclosure more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic flowchart of an interface display method for an application according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of another method for displaying an interface of an application according to an embodiment of the present invention;
fig. 3 is a schematic flowchart of another method for displaying an interface of an application according to an embodiment of the present invention;
fig. 4 is a schematic diagram illustrating that a display interface of a terminal device is equivalent to a line segment according to an embodiment of the present invention;
fig. 5 is a schematic diagram illustrating a relationship between an equivalent line segment and a direction angle and an inclination angle of a display interface according to an embodiment of the present invention;
fig. 6 is a flowchart illustrating another interface display method for an application according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an interface display apparatus of an application according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of an interface display apparatus of another application according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Icon: 31-display interface; 32-a terminal device; 33-an equivalent line segment; 41-attitude vector; 51-attitude data acquisition module; 52-target display position determination module; 53-specifying a function control display module; 61-attitude data acquisition module; 62-attitude data transmission module; 63-a target display position receiving module; 64-a display module; 71-a processor; 72-a memory; 73-bus; 74-a communication interface.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
In view of the problem that the display interface layout of the existing application program is poor in operation convenience degree in a scene of holding the terminal with a single hand, the interface display method and device of the application program and the electronic device provided by the embodiment of the invention can be applied to devices running the application program, such as computers, mobile phones, tablet computers, game devices and the like.
To facilitate understanding of the embodiment, a detailed description is first given of an interface display method of an application program disclosed in the embodiment of the present invention.
Referring to fig. 1, a schematic flow chart of an interface display method of an application program according to an embodiment of the present invention is shown, where a client of the application program runs on a terminal device. As can be seen from fig. 1, the method comprises the following steps:
step S102: and acquiring attitude data of the terminal equipment.
Here, the terminal device may be a computer, a mobile phone, a tablet computer, a game machine, or the like, and the application program may be a game, office software, multimedia software, or the like. The terminal device runs a client of the application program, and is in communication connection with a server of the application program.
In actual operation, the execution main body of the interface display method of the application program may be a server corresponding to the application program, or may be the terminal device running the application program. In general, logical operations such as specifying the target display position are executed by the server side and displayed by the terminal device.
In one possible implementation, it is assumed that the interface display method of the application program is executed on a server, where gesture data is collected by a terminal device executing the application program, and the server receives the gesture data of the terminal device, where the gesture data refers to data reflecting a spatial gesture of the terminal device, and taking the terminal device as a mobile phone as an example, when a user holds the mobile phone to read or perform other operations, a spatial position of the mobile phone changes along with swinging of an arm holding the mobile phone or movement of the user, and the like, and the data includes changes of an azimuth angle, an inclination angle, a rotation angle, and the like of the mobile phone, and all reflect the gesture of the mobile phone. Here, the attitude data may be acquired by a gyroscope, an inclination sensor, or the like in the terminal device.
Step S104: and determining a target display position in a display interface of the terminal equipment according to the attitude data.
Taking the above-mentioned interface display method of the application program running on the server as an example, the server calculates a display position corresponding to the posture data according to the received posture data, where the display position is a target display position in the display interface of the terminal device and is used for displaying a designated function control in the client of the application program.
The designated function control may be one or more function controls, and taking the application as the map software as an example, the function control may be an information input box, a navigation control, a zoom control, and the like in a client side of the application, and a user may enter a function corresponding to the function control through the function control. When the application is a game or other possible software, the designated functionality control in the client of the application may be various different controls, which is not limited herein.
Step S106: and displaying a specified function control at the target display position.
In one possible implementation manner, processing for determining a target display position according to the posture data is performed on the terminal device, and the terminal device displays the function control at the target display position according to the determined target display position.
In another possible implementation, the server of the application program, that is, the server, performs processing to determine the target display position according to the gesture data, and the server sends the target display position to the terminal device, and then the terminal device displays the specified functionality control according to the target display position. Therefore, for different attitude data of the terminal equipment, the server determines a corresponding target display position based on the attitude data and then returns the target display position to the terminal equipment so as to display the specified function control at the target display position, thereby realizing the purpose of adjusting the display position of the specified function control according to the attitude data of the terminal equipment.
In actual operation, according to the interface display method for the application program of this embodiment, when a display position of a function control in the application program needs to be adjusted, the function control is preset as a specified function control (for example, preset during program development or user-defined setting), and then when the terminal device runs the application program, the server of the application program obtains posture data of the terminal device by adjusting a posture of the terminal device, and then determines a corresponding target display position according to the posture data to return to the terminal device, and the terminal device adjusts the position of the specified function control to the target display position. Therefore, in a scene facing a single-hand holding of the terminal equipment, the display position of the appointed function control can be flexibly adjusted through the posture of the terminal equipment, a user can conveniently touch the function control, and the convenience of operation is improved.
The interface display method of the application program provided by the embodiment of the invention comprises the steps of firstly obtaining attitude data of the terminal equipment; determining a target display position in a display interface of the terminal equipment according to the attitude data; and displaying the specified function control at the target display position. In the mode, according to the posture data of the terminal device, the display position of the designated function control in the display interface of the client of the application program is adjusted, so that the function control can be adjusted to the proper position in the display interface by adjusting the posture of the terminal device under the condition that a user holds the terminal device by one hand, the touch and the operation of the user are facilitated, the operation convenience of the application program is improved, and the user experience is improved.
On the basis of the interface display method of the application program shown in fig. 1, the embodiment of the present invention further provides another interface display method of the application program, where the method mainly describes a specific implementation process of step S102 (obtaining the attitude data of the terminal device) in the foregoing embodiment.
Referring to fig. 2, a flow chart of the method is shown, wherein the method is applied to a server corresponding to the application program, a client of the application program runs on a terminal device, and the terminal device is in communication connection with the server, as can be seen from fig. 2, the method includes the following steps:
step S202: and acquiring the position information of the terminal equipment.
In actual operation, it is usually required that the positioning authority of the terminal device is turned on, and then the server can obtain the location information of the terminal device.
In one possible implementation, if the server detects a positioning signal of the terminal device, the location information of the terminal device is acquired. The positioning signal is sent by the terminal device after the positioning authority of the terminal device is opened. For example, suppose that a mobile phone user starts a GPS positioning function in the mobile phone when navigating through map software, that is, the positioning authority of the mobile phone is started, at this time, the mobile phone sends a positioning signal to a server of the map software, and the server starts to acquire the location information of the terminal device after receiving the positioning signal.
Step S204: determining whether the terminal equipment is in a specified state according to the position information; if yes, go to step S206; if not, step S202 is executed.
In this embodiment, if the server determines that the terminal device is in the designated state, it sends a gesture data acquisition request to the terminal device, and performs subsequent operations such as determining a target display position according to the gesture data; otherwise, continuing to execute the step of acquiring the position information of the terminal equipment and judging whether the terminal equipment is in the appointed state according to the position information until the terminal equipment is in the appointed state.
The specified state may be that the terminal device is located outdoors, and/or that a user carrying the terminal device is in a mobile state. Taking a terminal device as an example of a mobile phone, when a user is outdoors (for example, in a rainy day, in a scene where the user holds an umbrella with his right hand) or walks, the user often holds the mobile phone with his single hand to operate the mobile phone, and therefore, in these scenes, the user may expect that the mobile phone can be flexibly operated with his single hand.
In actual operation, if the above-mentioned location information indicates that the terminal device is located outdoors, it is determined that the terminal device is in the specified state, for example, it is determined that the terminal device is in the specified state on the assumption that the terminal device displays an outdoor location located on a road, a square, a rural area, or the like in a map. In addition, if the position change distance of the position information in the preset time period is greater than the preset distance threshold, it is also determined that the terminal device is in the designated state, for example, if the terminal device moves 50 meters in position in one minute, the user of the terminal device may be walking, and at this time, it is also determined that the terminal device is in the designated state.
Therefore, when the terminal equipment is located outdoors or a user of the terminal equipment is in a moving state, the terminal equipment is determined to be in an appointed state, so that subsequent operations such as determining a target display position according to the attitude data are performed, the display position of an appointed function control in the application program client side is correspondingly adjusted according to the attitude adjustment of the terminal equipment, and the user can conveniently operate the appointed function control.
In other possible embodiments, the specified state may also be other application scenarios besides that the terminal device is located outdoors and that the user of the terminal device is in a mobile state, which is not limited herein.
Step S206: sending an attitude data acquisition request to the terminal equipment; the attitude data collection request is for: and confirming whether the terminal equipment is allowed to acquire the attitude data of the terminal equipment or not to a user of the terminal equipment.
When the server determines that the terminal equipment is in the designated state, sending a posture data acquisition request to the terminal equipment so as to confirm whether the terminal equipment is allowed to acquire the posture data of the terminal equipment to a user of the terminal equipment.
Step S208: and receiving an instruction returned by the terminal equipment in response to the attitude data acquisition request, and acquiring and receiving the attitude data of the terminal equipment through the terminal equipment.
And if an instruction which is returned by the terminal equipment and allows the attitude data to be collected is received, collecting and receiving the attitude data of the terminal equipment through the terminal equipment. Here, the terminal device collects attitude data of itself and transmits the attitude data to the server.
Step S210: and determining a target display position in a display interface of the terminal equipment according to the attitude data.
Step S212: and displaying a specified function control at the target display position.
Here, step S210 and step S212 in this embodiment correspond to step S104 to step S106 in the foregoing embodiment, and corresponding portions of the foregoing embodiment may be referred to for description, and are not repeated herein.
Therefore, according to the interface display method of the application program provided by the embodiment, whether the terminal device is in the designated state is judged according to the position information of the terminal device, when the terminal device is determined to be in the designated state, the attitude data acquisition request is actively sent to the terminal device, and then the service for determining the target display position is provided for the terminal device based on the attitude data, so that the designated function control of the application program client can adapt to the operation requirement of a user, the position is adjusted according to the attitude of the terminal device, the user can conveniently operate the designated function control, and the convenience and the flexibility of the operation are improved.
In addition, on the basis of the interface display method of the application program shown in fig. 1, the embodiment of the present invention further provides another interface display method of the application program, where the method focuses on a specific implementation process of step S104 (determining a target display position in the display interface of the terminal device according to the posture data) in the foregoing embodiment.
Referring to fig. 3, a flow chart of the method is shown, wherein the method is applied to a server running an application program, a client of the application program runs on a terminal device, and the terminal device is in communication connection with the server, as can be seen from fig. 3, the method includes the following steps:
step S302: and acquiring attitude data of the terminal equipment.
Step S304: determining a posture vector of the space posture of the display interface of the terminal equipment in a preset space rectangular coordinate system according to the posture data; the rectangular space coordinate system takes the geometric center of the display interface as an origin and takes the direction perpendicular to the ground plane as the direction of a vertical axis.
In this embodiment, a spatial rectangular coordinate system is established in advance, where the spatial rectangular coordinate system uses a geometric center of a display interface of the device terminal as an origin and a vertical ground plane direction as a vertical axis direction.
In one possible implementation, the attitude data includes direction angle data and inclination data measured by an inclination sensor of the terminal device. Here, the tilt sensor is an angle measuring tool, and the range of the angle amount thereof is wide, wherein the plane angle can be divided into: the horizontal angle (or azimuth angle) in the horizontal plane, the vertical angle (or inclination angle) in the vertical plane, and the spatial angle is the composite of the horizontal angle and the vertical angle. Therefore, the spatial attitude of the terminal device (equivalent to the spatial attitude of the display interface) can be determined according to the direction angle data and the inclination angle data, namely, the direction of the attitude vector is obtained.
In at least one possible implementation, the geometric center line of the terminal device may be equivalent to the display interface of the terminal device, and the length of the geometric center line is equal to the length of the display interface. As shown in fig. 4, which is a schematic diagram of a display interface of a terminal device being equivalent to a line segment, in the embodiment shown in fig. 4, a long axial geometric centerline of the display interface 31 of the terminal device 32 is selected, and a line segment of the geometric centerline in the display interface 31 is taken as an equivalent line segment 33. Further, the spatial direction of the equivalent line segment 33 can be obtained by combining the direction angle and the inclination angle data, so as to obtain the attitude vector of the display interface 31 in the preset spatial rectangular coordinate system.
Referring to fig. 5, a schematic diagram of a relationship between an equivalent line segment of a display interface and a direction angle and an inclination angle is shown, where the spatial rectangular coordinate system uses a geometric center of the display interface as an origin, uses a vertical ground plane direction as a vertical axis direction, an included angle θ between a projection line OA of the equivalent line segment (i.e., a scalar corresponding to the attitude vector 41) of the display interface in an XOY plane and an X axis is an azimuth angle, and an included angle β between a projection line OB of the equivalent line segment in an XOZ vertical plane and a Z axis is an inclination angle, so that the attitude vector 41 of the display interface in the spatial rectangular coordinate system can be determined according to the azimuth angle and the inclination angle by combining with a length of the equivalent line segment. The direction (or spatial position) of the attitude vector 41 can be obtained by backward-estimating the azimuth angle θ and the inclination angle β in combination with the origin position of the spatial rectangular coordinate system.
In practical operation, the tilt sensor may also directly return the coordinate value of the terminal device in the rectangular spatial coordinate system, instead of returning the azimuth angle and the tilt angle, (e.g., (x1, -y1, z1), wherein the positive and negative of the value represent the directions, and the attitude vector of the terminal device (i.e., the vector obtained by pointing the coordinate origin to the coordinate) may also be correspondingly determined according to the returned coordinate value, i.e., the attitude vector is equivalent to the attitude vector of the display interface.
Step S306: and calculating the position of the projection line segment of the attitude vector on the horizontal plane of the rectangular space coordinate system.
Here, the attitude vector is projected onto a horizontal plane of the rectangular spatial coordinate system, and the position of a projected line segment on the horizontal plane is calculated.
Step S308: determining a target display position in the display interface according to the position of the projection line segment; the target display position is used for displaying a specified function control in the client of the application program.
In at least one possible embodiment, the target display position in the display interface may be determined by the following steps 11-12:
(11) calculating the projection area of each display area in the display interface on the horizontal plane of the space rectangular coordinate system when the display interface is in the horizontal posture; the display interface is divided into a plurality of display areas in advance.
Here, the display interface of the terminal device is divided into a plurality of display areas in advance, and here, the display interface may be equally divided into a plurality of grid areas, or may be divided into a plurality of areas of different sizes and different shapes, which is not limited herein.
When the display interface is in a horizontal posture, the display interface is parallel to the horizontal plane of the space rectangular coordinate system, and here, the projection area of each display area in the display interface on the horizontal plane of the space rectangular coordinate system is calculated. Obviously, the projection area of each display area corresponds to a certain plane area in the horizontal plane.
(12) And determining the target display position in the display interface according to the position of the projection line segment and the projection area of each display area on the horizontal plane of the rectangular space coordinate system.
In one possible embodiment, the step (12) can be implemented by the following steps 21 to 23:
(21) and calculating the length of the projection line segment in the corresponding projection area of each display area and the included angle value between the projection line segment and the lower boundary line of the projection area according to the position of the projection line segment and the projection area of each display area on the horizontal plane of the space rectangular coordinate system.
For the projection of the attitude vector of the display interface on the horizontal plane of the rectangular space coordinate system, the projection line segment may fall into one or more projection regions, where the length of the line segment of the projection line segment in the corresponding projection region of each display region and the included angle value between the projection line segment and the lower boundary line of the projection region are respectively calculated. Here, the lower boundary refers to a boundary on a side closer to the user in the projection area.
(22) And determining a target display area from the plurality of display areas according to the length of the line segment and the included angle value.
In one possible implementation manner, a weighted value of each display area may be determined according to the length of the line segment and the included angle value, and then the display area with the largest weighted value may be determined as the target display area.
In practical operation, for each display area in the display interface, a first variance of the length of the line segment corresponding to the display area and a second variance of the included angle value corresponding to the display area can be calculated; then, the weight of the display area is determined according to the first variance and the second variance.
In at least one possible embodiment, when calculating the weight of each display region, if the display region satisfies a preset condition described below, the weight of the display region is determined to be 1, and the weights of the display regions other than the display region are each determined to be 0. Wherein, the preset conditions include: the first variance of the display area is continuously larger than a preset first threshold value in a preset time period, and the second variance of the display area is continuously larger than a preset second threshold value in the time period; and the first variance of the display area is continuously greater than the first variance of the display areas except the display area in the plurality of display areas during the time period; the second variance of the display area is continuously greater than the second variance of the display areas other than the display area in the plurality of display areas during the time period.
For example, suppose that the display interface of the terminal device is equally divided into 9 display regions, wherein the server calculates, according to the posture data of the terminal device acquired at any time, the projection line segment of the posture vector of the display interface on the horizontal plane, the length of the line segment falling into the corresponding projection region of each display region, and the included angle value between the projection line segment and the corresponding lower boundary in each projection region according to the above steps. Here, it is assumed that the segment length and the included angle value corresponding to each display region at the time are recorded as follows: [ (x1 °, y1), (x2 °, y2), (x3 °, y3), (x4 °, y4), (x5 °, y5), (x6 °, y6), (x7 °, y7), (x8 °, y8), (x9 °, y9) ], wherein xn ° represents the angle value between the projected line segment in the projection region corresponding to the nth display region and the lower boundary line thereof, and yn represents the length of the line segment in which the projected line segment falls within the projection region corresponding to the nth display region.
Wherein the first variance of the display area is calculated by the following formula (1.1), and the second variance of the display area is calculated by the formula (1.2):
Figure BDA0002492406020000171
Figure BDA0002492406020000172
wherein D isxiFirst variance, x, representing ith display areaiThe included angle value between the projection line segment and the lower boundary line of the projection area corresponding to the ith display area is shown,
Figure BDA0002492406020000173
the average value of the included angle values corresponding to the display areas is represented; dyiSecond variance, y, representing the ith display areaiThe length of the line segment of the projection line segment in the projection area corresponding to the ith display area is shown,
Figure BDA0002492406020000174
and the average value of the lengths of the line segments of the projection line segments falling into the projection areas corresponding to the display areas is represented.
Thus, it is assumed that, at a plurality of consecutive time points within a period of time, in the nine display areas of the display interface, the first variance of a certain display area M is continuously greater than the first threshold, and the second variance of the certain display area M is continuously greater than the second threshold (comparing from the time dimension to the longitudinal direction, so as to measure the intensity of the change of the first variance of the certain display area); and the first variance of the display area M is continuously greater than the first variances of the other eight display areas in the display interface, and the second variance of the display area M is also continuously greater than the second variances of the other eight display areas in the display interface (which are compared with the other display areas in the horizontal direction to determine a target display area that needs to respond in the time period), then the weight of the display area M is determined to be 1, and the weights of the other display areas except the display area M are determined to be 0, that is, the display area M is determined to be the target display position of the display interface in the time period.
In other possible embodiments, the weight of each display area may also be determined according to other calculation rules according to the first variance and the second variance, which is not limited herein.
(23) And determining the target display area as a target display position in the display interface.
Here, the target display position corresponds to an area range in the display interface, that is, the target display area determined in the foregoing step.
Step S310: and returning the target display position to the terminal equipment so that the terminal equipment displays the specified function control according to the target display position.
In one possible implementation manner, when returning the determined target display position to the terminal device, the server also returns a display update instruction to the terminal device, where the display update instruction is used to instruct the terminal device to display the specified function control according to the target display position. As explained in the above example of the display area M, when the terminal device receives a display update instruction returned by the server, the designated function control is displayed in the display area M.
According to the interface display method of the application program, the display interface is divided into the plurality of display areas in advance, the weight corresponding to each display area is determined according to the posture data of the terminal device, the target display area is determined based on the weight, and finally the appointed function control is displayed in the target display area.
The foregoing method for displaying an interface of an application is described in the embodiment of the present invention from the terminal device side, corresponding to the interface display method of an application shown in fig. 1. Referring to fig. 6, a schematic structural diagram of an interface display apparatus of an application program is shown, the method is applied to a terminal device, and a client of the application program runs on the terminal device, and the terminal device is in communication connection with a server of the application program.
As can be seen from fig. 6, the method comprises the following steps:
step S402: and acquiring attitude data of the terminal equipment.
In actual operation, if the terminal device detects that the positioning authority is opened, a positioning signal of the terminal device is sent to the server, so that the server obtains the position information of the terminal device after detecting the positioning signal, judges whether the terminal device is in an appointed state or not according to the position information, and sends a posture data acquisition request to the terminal device if the terminal device is in the appointed state. Here, the attitude data collection request is for confirming to the user of the terminal device whether or not to permit collection of the attitude data of the terminal device.
Here, the designated state may include that the terminal device is located outdoors and/or that a user carrying the terminal device is in a mobile state. For this part, reference may be made to the corresponding description of the foregoing embodiments, which are not repeated herein.
In one possible implementation mode, when the terminal device receives a posture data acquisition request sent by a server, an instruction for allowing the posture data acquisition is returned to the server, and then the terminal device starts to acquire the posture data of the terminal device.
In order to facilitate a user to select whether to start a function of adjusting a display position of a designated function control according to actual needs, a mode control may be further set in the client of the application program, where the mode control is used to enter a designated mode of the client of the application program. In the appointed mode, the terminal equipment collects posture data of the terminal equipment and adjusts the display position of the appointed function control based on the posture data.
And when the terminal equipment receives the attitude data acquisition request of the server, displaying the mode control in a display interface. And when the user opens the mode control, the terminal device responds to the first touch operation aiming at the mode control, enters a specified mode of the client of the application program, and returns an instruction allowing gesture data acquisition to the server. And when the user closes the mode control, the terminal equipment responds to a second touch operation aiming at the mode control, exits the specified mode and stops collecting the posture data of the terminal equipment.
Step S404: sending the attitude data to the server so that the server determines a target display position in a display interface of the terminal equipment according to the attitude data; the target display position is used for displaying a designated function control in a client of the application program.
Here, the implementation process of the server determining the target display position in the display interface of the terminal device according to the posture data may refer to the corresponding description in the foregoing embodiment, which is not limited herein.
Step S406: and receiving the target display position returned by the server.
Step S408: and displaying the specified function control according to the target display position.
In one possible implementation manner, the server further returns a display update instruction to the terminal device, and when the terminal device receives the display update instruction sent by the server, the specified function control is displayed according to the target display position.
In actual operation, a mapping policy may be preset, and the specified function control is displayed according to the mapping policy, where the mapping policy may include a style mapping policy, a size mapping policy, and a layout mapping policy of the specified function control. Therefore, the terminal equipment can map the specified function control according to the mapping strategy and display the specified function control at the target display position according to the preset style, size and layout.
According to the interface display method of the application program provided by the embodiment, the adjustment of the display position of the designated function control in the display interface in the client of the application program according to the attitude data of the terminal device is realized from the terminal device side. The method can improve the operation convenience of the application program and improve the user experience.
Corresponding to the interface display method of the application program shown in fig. 1, an embodiment of the present invention further provides an interface display apparatus of an application program, where the apparatus is applied to a server running the application program, a client of the application program runs on a terminal device, and the terminal device is in communication connection with the server. Referring to fig. 7, a schematic structural diagram of an interface display apparatus of an application program is shown, and as can be seen from fig. 7, the apparatus includes a posture data obtaining module 51, a target display position determining module 52, and a designated function control display module 53, which are connected in sequence, where functions of the modules are as follows:
an attitude data acquisition module 51, configured to receive attitude data of the terminal device;
a target display position determining module 52, configured to determine a target display position in the display interface of the terminal device according to the gesture data; the target display position is used for displaying a designated function control in the client of the application program;
and a designated function control display module 53, configured to return the target display position to the terminal device, so that the terminal device displays the designated function control according to the target display position.
The interface display device of the application program provided by the embodiment of the invention acquires the attitude data of the terminal equipment; determining a target display position in a display interface of the terminal equipment according to the attitude data; and displaying a specified function control at the target display position. According to the device, the display position of the designated function control in the client of the application program is adjusted according to the posture data of the terminal equipment, so that the function control can be adjusted to the proper position in the display interface by adjusting the posture of the terminal equipment under the condition that a user holds the terminal equipment by one hand, the touch and the operation of the user are facilitated, the operation convenience of the application program is improved, and the user experience is improved.
In one possible implementation, the above-mentioned attitude data acquisition module 51 is further configured to: judging whether the terminal equipment is in a specified state; if yes, sending an attitude data acquisition request to the terminal equipment; the attitude data collection request is for: confirming whether the attitude data of the terminal equipment is allowed to be collected or not to a user of the terminal equipment; and if an instruction which is returned by the terminal equipment and allows the attitude data to be collected is received, collecting and receiving the attitude data of the terminal equipment through the terminal equipment.
In another possible embodiment, the above-mentioned attitude data acquisition module 51 is further configured to: acquiring the position information of the terminal equipment; and judging whether the terminal equipment is in a specified state or not according to the position information.
In another possible embodiment, the above-mentioned attitude data acquisition module 51 is further configured to: if the positioning signal of the terminal equipment is detected, acquiring the position information of the terminal equipment; and the positioning signal of the terminal equipment is sent by the terminal equipment after the positioning authority of the terminal equipment is opened.
In another possible implementation, the specifying state includes: the terminal device is located outdoors and/or a user carrying the terminal device is in a mobile state.
In another possible embodiment, the above-mentioned attitude data acquisition module 51 is further configured to: if the position information indicates that the terminal equipment is located outdoors, determining that the terminal equipment is in a specified state; and if the position change distance of the position information in a preset time period is greater than a preset distance threshold, determining that the terminal equipment is in a specified state.
In another possible implementation, the target display position determining module 52 is further configured to: determining an attitude vector of a display interface of the terminal equipment in a preset space rectangular coordinate system according to the attitude data; the space rectangular coordinate system takes the geometric center of the display interface as an original point and takes the direction vertical to the ground plane as the direction of a vertical axis; calculating the position of the projection line segment of the attitude vector on the horizontal plane of the space rectangular coordinate system; and determining the target display position in the display interface according to the position of the projection line segment.
In another possible implementation, the attitude data includes direction angle data and inclination data measured by an inclination sensor of the terminal device.
In another possible implementation, the target display position determining module 52 is further configured to: calculating the projection area of each display area in the display interface on the horizontal plane of the space rectangular coordinate system when the display interface is in the horizontal posture; the display interface is divided into a plurality of display areas in advance; and determining the target display position in the display interface according to the position of the projection line segment and the projection area of each display area on the horizontal plane of the rectangular space coordinate system.
In another possible implementation, the target display position determining module 52 is further configured to: calculating the length of the projection line segment in each display area and the included angle value of the projection line segment in each display area according to the position of the projection line segment and the projection area of each display area on the horizontal plane of the space rectangular coordinate system; determining a target display area from the plurality of display areas according to the length of the line segment and the included angle value; and determining the target display area as a target display position in the display interface.
In another possible implementation, the target display position determining module 52 is further configured to: determining the weight value of each display area according to the length of the line segment and the included angle value; and determining the display area with the largest weight value as a target display area.
In another possible implementation, the target display position determining module 52 is further configured to: for each display area, calculating a first variance of the length of the line segment corresponding to the display area and a second variance of the included angle value corresponding to the display area; and determining the weight of the display area according to the first variance and the second variance.
In another possible implementation, the target display position determining module 52 is further configured to: if the display area meets the following preset conditions, determining the weight of the display area to be 1, and determining the weights of the display areas except the display area to be 0; the preset conditions include: the first variance of the display area is continuously larger than a preset first threshold value within a preset time period; the second variance of the display area is continuously larger than a preset second threshold value in the time period; the first variance of the display area is continuously larger than the first variance of the display areas except the display area in the plurality of display areas in the time period; the second variance of the display area is continuously greater than the second variance of the display areas other than the display area in the plurality of display areas during the time period.
In another possible implementation, the function-designated control displaying module 53 is further configured to: returning the target display position and a display updating instruction to the terminal equipment; the display update instruction is to: and indicating the terminal equipment to display the specified function control according to the target display position.
The implementation principle and the generated technical effect of the interface display device of the application program provided by the embodiment of the invention are the same as those of the interface display method embodiment of the application program, and for the sake of brief description, the corresponding contents in the interface display method embodiment of the application program can be referred to where the embodiment of the interface display device of the application program is not mentioned.
In addition, corresponding to the interface display method of the application program shown in fig. 6, an embodiment of the present invention further provides another interface display apparatus of an application program, where the apparatus is applied to a terminal device, a client of the application program runs on the terminal device, and the terminal device is in communication connection with a server of the application program. Referring to fig. 8, a schematic structural diagram of another interface display device for an application program is shown, and as can be seen from fig. 8, the device includes a posture data acquisition module 61, a posture data transmission module 62, a target display position receiving module 63, and a display module 64, which are connected in sequence, wherein the functions of the modules are as follows:
the attitude data acquisition module 61 is used for acquiring attitude data of the terminal equipment;
the attitude data sending module 62 is configured to send the attitude data to the server, so that the server determines a target display position in the display interface of the terminal device according to the attitude data; the target display position is used for displaying a designated function control in a client of the application program;
a target display position receiving module 63, configured to receive the target display position returned by the server;
and a display module 64, configured to display the designated function control according to the target display position.
In one possible implementation, the attitude data acquisition module 61 is further configured to: receiving an attitude data acquisition request of the server; the attitude data collection request is for: confirming whether the gesture data of the terminal equipment is allowed to be collected or not to a user of the terminal equipment; returning an instruction allowing acquisition of the attitude data to the server; the attitude data is collected.
In another possible implementation manner, the apparatus further includes a positioning signal sending module, configured to send a positioning signal of the terminal device to the server if it is detected that the positioning right is opened, so that the server obtains location information of the terminal device after detecting the positioning signal, and determines whether the terminal device is in a specified state according to the location information, and if so, sends an attitude data acquisition request to the terminal device.
In another possible embodiment, a mode control is provided in the client of the application program, and the posture data collection module 61 is further configured to: receiving a posture data acquisition request of the server, and displaying the mode control in a display interface of the terminal equipment; the mode control is used to enter a specified mode of a client of the application.
In another possible embodiment, a mode control is provided in the client of the application program, and the posture data collecting module 61 is further configured to: and responding to the first touch operation aiming at the mode control, entering a specified mode of the client of the application program, and returning an instruction allowing to collect the gesture data to the server.
In another possible implementation manner, in response to the first touch operation on the mode control, the gesture data collection module 61 is further configured to: and responding to a second touch operation aiming at the mode control, exiting the specified mode of the client of the application program, and stopping collecting the attitude data of the terminal equipment.
In another possible embodiment, the display module 64 is further configured to: and if a display updating instruction sent by the server is received, displaying the specified function control according to the target display position.
In another possible embodiment, the display module 64 is further configured to: and displaying the appointed function control according to a preset mapping strategy according to the target display position.
In another possible embodiment, the mapping policy includes a style mapping policy, a size mapping policy, and a layout mapping policy of the specified functionality control.
The interface display device of the application program provided by the embodiment of the invention has the same technical characteristics as the interface display method of the application program provided by the embodiment, so that the same technical problems can be solved, and the same technical effects can be achieved.
An embodiment of the present invention further provides an electronic device, as shown in fig. 9, which is a schematic structural diagram of the electronic device, where the electronic device includes a processor 71 and a memory 72, the memory 72 stores machine executable instructions that can be executed by the processor 71, and the processor 71 executes the machine executable instructions to implement the interface display method of the application program.
In the embodiment shown in fig. 9, the electronic device further comprises a bus 73 and a communication interface 74, wherein the processor 71, the communication interface 74 and the memory 72 are connected by the bus.
The Memory 72 may include a Random Access Memory (RAM) and a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. The communication connection between the network element of the system and at least one other network element is realized through at least one communication interface 74 (which may be wired or wireless), and the internet, a wide area network, a local network, a metropolitan area network, etc. may be used. The bus may be an ISA bus, PCI bus, EISA bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 9, but this does not indicate only one bus or one type of bus.
The processor 71 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 71. The Processor 71 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules may be located in ram, flash, rom, prom, or eprom, registers, etc. as is well known in the art. The storage medium is located in the memory, and the processor 71 reads the information in the memory 72, and completes the steps of the interface display method of the application program of the foregoing embodiment in combination with the hardware thereof.
The embodiment of the present invention further provides a machine-readable storage medium, where the machine-readable storage medium stores machine-executable instructions, and when the machine-executable instructions are called and executed by a processor, the machine-executable instructions cause the processor to implement the interface display method of the application program, and specific implementation may refer to the foregoing method embodiment, and is not described herein again.
The interface display method of the application program, the interface display apparatus of the application program, and the computer program product of the electronic device provided in the embodiments of the present invention include a computer-readable storage medium storing program codes, where instructions included in the program codes may be used to execute the interface display method of the application program described in the foregoing method embodiments, and specific implementations may refer to the method embodiments, which are not described herein again.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In addition, in the description of the embodiments of the present invention, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, and are only for convenience of description and simplicity of description, but do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus, should not be construed as limiting the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present invention, which are used for illustrating the technical solutions of the present invention and not for limiting the same, and the protection scope of the present invention is not limited thereto, although the present invention is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present invention, and they should be construed as being included therein. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (24)

1. The interface display method of the application program is characterized in that a client of the application program runs on a terminal device; the method comprises the following steps:
acquiring attitude data of the terminal equipment;
determining a posture vector of the space posture of the display interface of the terminal equipment in a preset space rectangular coordinate system according to the posture data; the space rectangular coordinate system takes the geometric center of the display interface as an origin and takes the direction perpendicular to the ground plane as the direction of a vertical axis;
calculating the position of a projection line segment of the attitude vector on the horizontal plane of the space rectangular coordinate system;
calculating the projection area of each display area in the display interface on the horizontal plane of the space rectangular coordinate system when the display interface is in the horizontal posture; the display interface is divided into a plurality of display areas in advance;
calculating the length of the projection line segment in the corresponding projection area of each display area and the included angle value between the projection line segment and the lower boundary of the projection area according to the position of the projection line segment and the projection area of each display area on the horizontal plane of the rectangular space coordinate system;
determining a target display area from the plurality of display areas according to the line segment length and the included angle value;
determining the target display area as a target display position in the display interface;
and displaying a specified function control at the target display position.
2. The method of claim 1, wherein prior to the step of obtaining pose data of the terminal device, the method further comprises:
sending an attitude data acquisition request to the terminal equipment;
and receiving an instruction returned by the terminal equipment in response to the attitude data acquisition request.
3. The method of claim 2, wherein prior to sending the gesture data collection request to the terminal device, the method further comprises:
and determining that the terminal equipment is in a designated state.
4. The method of claim 3, wherein the step of determining that the terminal device is in the designated state comprises:
acquiring the position information of the terminal equipment;
and determining that the terminal equipment is in a specified state according to the position information.
5. The method of claim 4, wherein the step of obtaining the location information of the terminal device comprises:
if the positioning signal of the terminal equipment is detected, acquiring the position information of the terminal equipment; and the positioning signal of the terminal equipment is sent by the terminal equipment after the positioning authority of the terminal equipment is started.
6. The method of claim 4, wherein the step of determining that the terminal device is in the designated state according to the location information comprises:
if the position information indicates that the terminal equipment is located outdoors, determining that the terminal equipment is in a specified state;
and if the position change distance of the position information in a preset time period is greater than a preset distance threshold, determining that the terminal equipment is in an appointed state.
7. The method of claim 1, wherein the attitude data comprises directional angle data and tilt data measured by a tilt sensor of the terminal device.
8. The method of claim 1, wherein the step of determining a target display region from the plurality of display regions based on the segment length and the pinch angle value comprises:
determining a weight value of each display area according to the length of the line segment and the included angle value;
and determining the display area with the largest weight value as a target display area.
9. The method of claim 8, wherein the step of determining a weight value for each of the display regions based on the segment length and the pinch angle value comprises:
for each display area, calculating a first variance of the length of the line segment corresponding to the display area and a second variance of the included angle value corresponding to the display area;
and determining the weight of the display area according to the first variance and the second variance.
10. The method of claim 9, wherein the step of determining the weight of the display area based on the first variance and the second variance comprises:
if the display area meets the following preset conditions, determining the weight of the display area to be 1, and determining the weights of the display areas except the display area to be 0;
the preset conditions include:
the first variance of the display area is continuously larger than a preset first threshold value within a preset time period; the second variance of the display area is continuously larger than a preset second threshold value in the time period;
and the first variance of the display area is continuously greater than the first variance of the display areas except the display area in the plurality of display areas in the time period; the second variance of the display area is continuously greater than the second variance of the display areas other than the display area in the plurality of display areas for the period of time.
11. The method of claim 1, wherein the step of displaying a designated functionality control at the target display location comprises:
and if a display updating instruction is received, displaying the specified function control at the target display position.
12. The interface display method of the application program is characterized by being applied to terminal equipment, wherein a client of the application program runs on the terminal equipment, and the terminal equipment is in communication connection with a server of the application program; the method comprises the following steps:
acquiring attitude data of the terminal equipment;
sending the attitude data to the server so that the server determines an attitude vector of the spatial attitude of the display interface of the terminal equipment in a preset spatial rectangular coordinate system according to the attitude data; the space rectangular coordinate system takes the geometric center of the display interface as an origin and takes the direction perpendicular to the ground plane as the direction of a vertical axis; calculating the position of a projection line segment of the attitude vector on the horizontal plane of the space rectangular coordinate system; calculating the projection area of each display area in the display interface on the horizontal plane of the space rectangular coordinate system when the display interface is in the horizontal posture; the display interface is divided into a plurality of display areas in advance; calculating the length of the projection line segment in the corresponding projection area of each display area and the included angle value between the projection line segment and the lower boundary of the projection area according to the position of the projection line segment and the projection area of each display area on the horizontal plane of the rectangular space coordinate system; determining a target display area from the plurality of display areas according to the line segment length and the included angle value; determining the target display area as a target display position in the display interface; the target display position is used for displaying a designated function control in a client of the application program;
receiving the target display position returned by the server;
and displaying the appointed function control according to the target display position.
13. The method of claim 12, wherein the step of collecting the attitude data of the terminal device comprises:
receiving an attitude data acquisition request of the server; the attitude data acquisition request is to: confirming whether the gesture data of the terminal equipment are allowed to be acquired or not to a user of the terminal equipment;
returning an instruction allowing to collect attitude data to the server;
and collecting the attitude data.
14. The method of claim 13, wherein prior to the step of receiving a request for pose data collection by the server, the method further comprises:
if the positioning authority is detected to be opened, sending a positioning signal of the terminal equipment to the server, so that the server acquires the position information of the terminal equipment after detecting the positioning signal, judging whether the terminal equipment is in a specified state or not according to the position information, and if so, sending an attitude data acquisition request to the terminal equipment.
15. The method according to claim 13, wherein a mode control is provided in the client of the application program, and the step of receiving the gesture data collection request of the server comprises:
receiving an attitude data acquisition request of the server, and displaying the mode control in a display interface of the terminal equipment; the mode control is to enter a specified mode of a client of the application.
16. The method according to claim 13, wherein a mode control is provided in the client of the application program, and the step of returning an instruction allowing acquisition of the gesture data to the server comprises:
and responding to the first touch operation aiming at the mode control, entering a specified mode of the client of the application program, and returning an instruction allowing to collect the gesture data to the server.
17. The method of claim 16, wherein after the step of entering a specified mode of the client of the application in response to the first touch operation directed to the mode control, the method further comprises:
and responding to a second touch operation aiming at the mode control, exiting the specified mode of the client of the application program, and stopping collecting the attitude data of the terminal equipment.
18. The method of claim 12, wherein the step of displaying the designated functionality control according to the target display position comprises:
and if a display updating instruction sent by the server is received, displaying the appointed function control according to the target display position.
19. The method of claim 12, wherein the step of displaying the designated functionality control according to the target display position comprises:
and displaying the appointed function control according to a preset mapping strategy according to the target display position.
20. The method of claim 19, wherein the mapping policy comprises a style mapping policy, a size mapping policy, and a layout mapping policy for the specified functionality control.
21. The interface display device of an application program is characterized in that a client of the application program runs on a terminal device; the device comprises:
the attitude data acquisition module is used for acquiring attitude data of the terminal equipment;
the target display position determining module is used for determining a posture vector of the space posture of the display interface of the terminal equipment in a preset space rectangular coordinate system according to the posture data; the space rectangular coordinate system takes the geometric center of the display interface as an origin and takes the direction perpendicular to the ground plane as the direction of a vertical axis; calculating the position of a projection line segment of the attitude vector on the horizontal plane of the space rectangular coordinate system; calculating the projection area of each display area in the display interface on the horizontal plane of the space rectangular coordinate system when the display interface is in the horizontal posture; the display interface is divided into a plurality of display areas in advance; according to the positions of the projection line segments and the projection areas of the display areas on the horizontal plane of the space rectangular coordinate system, calculating the length of the line segments of the projection line segments in the corresponding projection areas of the display areas and the included angle value between the projection line segments and the lower boundary line of the projection areas; determining a target display area from the plurality of display areas according to the line segment length and the included angle value; determining the target display area as a target display position in the display interface;
and the appointed function control display module is used for displaying the appointed function control at the target display position.
22. The interface display device of the application program is characterized by being applied to terminal equipment, wherein a client of the application program runs on the terminal equipment, and the terminal equipment is in communication connection with a server of the application program; the device comprises:
the attitude data acquisition module is used for acquiring attitude data of the terminal equipment;
the attitude data sending module is used for sending the attitude data to the server so that the server can determine an attitude vector of the space attitude of the display interface of the terminal equipment in a preset space rectangular coordinate system according to the attitude data; the space rectangular coordinate system takes the geometric center of the display interface as an origin and takes the direction perpendicular to the ground plane as the direction of a vertical axis; calculating the position of a projection line segment of the attitude vector on the horizontal plane of the space rectangular coordinate system; calculating the projection area of each display area in the display interface on the horizontal plane of the space rectangular coordinate system when the display interface is in the horizontal posture; the display interface is divided into a plurality of display areas in advance; calculating the length of the projection line segment in the corresponding projection area of each display area and the included angle value between the projection line segment and the lower boundary of the projection area according to the position of the projection line segment and the projection area of each display area on the horizontal plane of the rectangular space coordinate system; determining a target display area from the plurality of display areas according to the line segment length and the included angle value; determining the target display area as a target display position in the display interface; the target display position is used for displaying a designated function control in a client of the application program;
the target display position receiving module is used for receiving the target display position returned by the server;
and the display module is used for displaying the appointed function control according to the target display position.
23. An electronic device comprising a processor and a memory, the memory storing computer-executable instructions executable by the processor, the processor executing the computer-executable instructions to implement the interface display method of an application program according to any one of claims 1 to 20.
24. A computer-readable storage medium having computer-executable instructions stored thereon, which, when invoked and executed by a processor, cause the processor to implement the method of displaying an interface of an application program of any one of claims 1 to 20.
CN202010410091.1A 2020-05-14 2020-05-14 Application program interface display method and device and electronic equipment Active CN111580920B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010410091.1A CN111580920B (en) 2020-05-14 2020-05-14 Application program interface display method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010410091.1A CN111580920B (en) 2020-05-14 2020-05-14 Application program interface display method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN111580920A CN111580920A (en) 2020-08-25
CN111580920B true CN111580920B (en) 2022-07-19

Family

ID=72121044

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010410091.1A Active CN111580920B (en) 2020-05-14 2020-05-14 Application program interface display method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN111580920B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112083858A (en) * 2020-08-31 2020-12-15 珠海格力电器股份有限公司 Method and device for adjusting display position of control

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102750102A (en) * 2012-06-28 2012-10-24 宇龙计算机通信科技(深圳)有限公司 Mobile terminal and operation control element position replacing method
WO2017113379A1 (en) * 2015-12-31 2017-07-06 华为技术有限公司 Menu display method for user interface and hand-held terminal
CN106933446A (en) * 2017-02-27 2017-07-07 东软集团股份有限公司 The location regulation method and device of terminal interface display content
CN108319418A (en) * 2018-01-24 2018-07-24 维沃移动通信有限公司 A kind of interface display control method and mobile terminal
CN110896495A (en) * 2019-11-19 2020-03-20 北京字节跳动网络技术有限公司 View adjustment method and device for target device, electronic device and medium
WO2020062294A1 (en) * 2018-09-30 2020-04-02 华为技术有限公司 Display control method for system navigation bar, graphical user interface, and electronic device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7180283B2 (en) * 2018-10-30 2022-11-30 富士通株式会社 Image processing device and image processing method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102750102A (en) * 2012-06-28 2012-10-24 宇龙计算机通信科技(深圳)有限公司 Mobile terminal and operation control element position replacing method
WO2017113379A1 (en) * 2015-12-31 2017-07-06 华为技术有限公司 Menu display method for user interface and hand-held terminal
CN108475156A (en) * 2015-12-31 2018-08-31 华为技术有限公司 A kind of menu display method and handheld terminal of user interface
CN106933446A (en) * 2017-02-27 2017-07-07 东软集团股份有限公司 The location regulation method and device of terminal interface display content
CN108319418A (en) * 2018-01-24 2018-07-24 维沃移动通信有限公司 A kind of interface display control method and mobile terminal
WO2020062294A1 (en) * 2018-09-30 2020-04-02 华为技术有限公司 Display control method for system navigation bar, graphical user interface, and electronic device
CN110896495A (en) * 2019-11-19 2020-03-20 北京字节跳动网络技术有限公司 View adjustment method and device for target device, electronic device and medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
嵌入式系统显示界面的自适应显示方法;韩壮志等;《液晶与显示》;20100415(第02期);全文 *

Also Published As

Publication number Publication date
CN111580920A (en) 2020-08-25

Similar Documents

Publication Publication Date Title
JP5059932B2 (en) Mobile terminal, system and method
KR100649674B1 (en) Method for recognizing position using a built-in camera and apparatus thereof
US8204684B2 (en) Adaptive mobile device navigation
CN110967024A (en) Method, device, equipment and storage medium for detecting travelable area
US20120113285A1 (en) Overlaying Data in an Augmented Reality User Interface
EP2477105A2 (en) Method for selecting target at touch point on touch screen of mobile terminal
JP4120648B2 (en) Portable terminal, portable terminal control method, program, and recording medium
EP2647957A1 (en) Mobile terminal, system and method
US20150025838A1 (en) Position estimation device, position estimation method, and integrated circuit
TWI587181B (en) Orientation sensing computing devices
CN111580920B (en) Application program interface display method and device and electronic equipment
JP2016075669A (en) Position estimation system, position estimation method, and program
JP2014240754A5 (en)
US20130321244A1 (en) Portable terminal and display method
US9572126B2 (en) Determining effects on communication signals
CN112468959A (en) Position determination method, position determination device, computer equipment and storage medium
KR20180114355A (en) Method and apparatus for estimating a position
CN111433832A (en) Entity globe with touch function, display terminal and map display method
CN110971753A (en) Positioning method and device based on browser, mobile terminal and storage medium
CN110044309B (en) Measuring method and device
CN113432620A (en) Error estimation method, error estimation device, vehicle-mounted terminal and storage medium
CN108871356B (en) Driving navigation method and mobile terminal
JP7355840B2 (en) AR system and terminal
CN113891242B (en) Positioning method, device and system of intelligent wearable equipment
KR101614549B1 (en) Wireless communication apparatus for performing navigation function by close-range wireless lan communication and control method thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant