Detailed Description
The interface switching in mobile applications mostly adopts a progressive forward or backward mode due to the limitation of the current mainstream intelligent terminal operating systems (such as iOS, android and the like) and the touch screen operating modes of terminal equipment. Some applications may provide a skip function similar to "direct return to main interface", which can shorten the switching operation path to a certain extent, for example, according to the switching requirement in the background art, if the main interface can be directly returned from a3, the switching operation paths from a3 to b3 can be shortened to: a3→main interface→b1→b2→b3. However, this approach does not fundamentally solve the problem, because with the complexity of the application functions, the function modules may have more interface levels, and the number of interface levels of the function modules still directly affects the complexity of the handover operation and the waste of system resources.
In addition, in actual use, the user may simply obtain some information at b3, and then needs to return to a3, for example, the user needs to review data in the form filling process, and then returns to fill after searching, and the repeated bidirectional switching requirement can cause the problems of complex operation and more obvious resource consumption.
Aiming at the problems, the scheme provided by the application is as follows: two or more interfaces in the application are allowed to be defined as shortcut switching interfaces in advance, and when a user browses one shortcut switching interface, the user can directly switch to other shortcut switching interfaces through shortcut switching operation, so that the influence of the number of interface layers on the path length of the switching operation is avoided.
Fig. 2 is a flowchart of an intra-application interface switching method provided by the present application, where the method may include the following steps:
s101, determining a set of predefined shortcut switching interfaces;
the shortcut switching interfaces in the scheme of the application are not added with new interfaces in the application, but a new attribute, namely the shortcut switching attribute, is added for some interfaces under the condition of keeping the original number of the interfaces in the application unchanged, and all the interfaces in the application with the attribute form a set of shortcut switching interfaces. In consideration of the requirement of the user for bidirectional switching between interfaces, the set should include at least two elements, corresponding to two interfaces that need to be switched repeatedly. For example, in accordance with the switching requirements in the background art, a3 and b3 can be defined as the interface is switched rapidly. If there is a need to switch between more than three interfaces, a greater number of shortcut switch interfaces may be defined in the collection. In addition, if multiple groups of switching requirements exist, multiple shortcut switching interface sets can be defined. For example: if there is a need to switch between interfaces a3 and b3 and a need to switch between interfaces c3 and d3, a3 and b3 may be defined in the same set of shortcut interfaces and c3 and d3 may be defined in another set of shortcut interfaces.
The shortcut switching interface generally selects an interface with the highest frequency of use by a user or the highest frequency of the interface as a switching start interface/a switching result interface, and herein, the normal switching operation path length between the two interfaces may be taken into consideration, for example: for two interfaces which are originally convenient to switch, the shortcut switch mode of the application is not needed to be used in practice.
The shortcut interface may be preconfigured in the application, and the user can also specify or modify the device according to the actual use requirement. In addition, the related behavior information of the user in the application process, such as the opening times of the interface, the residence time of the interface and the like, can be counted, the switching habit of the user is analyzed according to the behavior information, and the definition suggestion of the shortcut switching interface is recommended to the user according to the analysis result. When the application runs, a set of predefined shortcut switching interfaces can be determined by reading configuration information, and the set of shortcut switching interfaces can be determined according to user operation, so that shortcut switching among interfaces can be realized according to content defined in the set.
S102, if a preset interface shortcut switching operation is detected under the condition that an initial interface currently displayed on a device screen is a shortcut switching interface, determining a switching target interface according to the interface shortcut switching operation;
the scheme of the application can provide the function of directly switching from one shortcut interface to another shortcut interface for the user, namely, if the interface currently browsed by the user on the device belongs to a predefined set of shortcut interfaces, the user can directly switch to the other interface belonging to the set through certain operation. For convenience of description, the interface displayed on the screen of the device before switching is referred to as an initial interface, and the interface to which the user desires to switch is referred to as a switching target interface.
In the present application, a user operation for triggering the above-described direct switching function is referred to as an "interface shortcut switching operation", which may be an operation for various types, such as clicking, sliding, or the like. In this step, the application is configured to, in the case where the initial interface is a shortcut interface, if the interface shortcut switching operation is detected, determining a switching target interface according to the operation. The following list some typical implementations of interface shortcut operations:
in the simplest case, only 2 shortcut interfaces are included in the collection. That is, if the initial interface is one shortcut switching interface in the set, the corresponding switching target interface is necessarily another shortcut switching interface in the set, so that the application can directly determine another shortcut switching interface other than the initial interface as the switching target interface after detecting the shortcut switching operation of the interface. For example: included in the predefined set of shortcut interfaces are a3 and b3, the user is currently browsing a3, after clicking the switch function button on the a3 interface, the application may directly determine that the user wishes to switch to b3.
If the set includes at least 3 shortcut switch interfaces, the application cannot directly determine the switch target interface through a switch operation, in this case, after the shortcut switch operation of the interface is detected, a selection operation prompt of the switch target interface is displayed to the user, and then the switch target interface is further determined according to the selection operation of the user. For example: the predefined shortcut switching interface set comprises a3, b3 and c3, and after the user currently browses a3 and clicks the switching function button on the a3 interface, a selection list comprising options "b3" and "c3" is popped up on the interface, and after the user selects b3 for this list, the application can determine that the user wishes to switch to b3.
In addition, if the set includes not less than 3 shortcut switching interfaces, the application can also directly determine the switching target interface according to the detected specific operation type under the condition that various interface shortcut switching operations are allowed to be defined. For example: the predefined shortcut switching interface set comprises a3, b3 and c3, and shortcut switching operations are defined for 3 shortcut switching interfaces respectively: after the function switching button on the interface is pressed, the interface is switched to a3 when sliding leftwards, to b3 when sliding rightwards, and to c3 when sliding leftwards. After the user is currently browsing a3 and holding the switch function on the interface to slide a certain distance to the right, the application may determine that the user wishes to switch to b3.
It will be appreciated that the several interface shortcut switch operation implementations listed above are for illustrative purposes only and are not limiting of the inventive arrangements. For example the method comprises the following steps: besides basic touch operation, the interface shortcut switching operation can be triggered by utilizing information such as sound, equipment space gesture change and the like. Of course, the specific implementation manner of the switching operation may be preconfigured in the application, or may be specified or modified by the user according to the actual use requirement.
In addition, considering that there are many interfaces that do not support shortcut switching operations in the application, in a specific embodiment of the present application, an effective shortcut switching operation entry (for example, the foregoing switch function button, etc.) may be provided only on the shortcut switching interface, or the shortcut switching operation of the interface may be detected only when the shortcut switching interface is currently displayed, so as to further improve the application operation efficiency and avoid misoperation of the user.
And S103, displaying the switching target interface on a device screen.
After determining the switch target interface, the application may display the interface directly on the device screen. The most basic implementation manner is to completely replace the initial interface currently displayed on the device screen with the switching target interface, and considering the requirement that a user may have the simultaneous browsing of two interfaces, for example, the user needs to fill in the form on the a3 interface according to the information on the b3 interface, in order to facilitate the use of the user, one scheme provided by the application is as follows: the target interface and the initial interface are displayed on the screen of the device on the same screen, for example: displaying a switching target interface on the upper half part of the equipment screen, and displaying an original interface on the lower half part of the equipment screen; or a small window is popped up above the currently displayed original interface for displaying the switching target interface, and a user can adjust the position of the small interface and exchange the display content in the small window and the original interface window. The mode of the same screen display can better meet the requirement of a user for browsing two interfaces at the same time, and repeated switching operation between the user interfaces can be effectively reduced in some application scenes.
It will be appreciated that, if there are more than 3 shortcut switch interfaces, the same screen can also be utilized the mode reveals more interfaces. The implementation manner of the multi-interface displayed on the same screen is different according to the different operating systems, and the implementation manner of the multi-interface displayed on the same screen is not required to be limited in the application.
It can be seen that by applying the above technical scheme, the user can directly switch among several shortcut interfaces through shortcut switching operation. Fundamentally solves the problem of overlong switching operation paths caused by the number of interface layers, effectively simplifies the operation of users, and the system resource waste caused by loading the interface content of the intermediate node of the switching operation path is avoided.
In practical application, some interfaces need longer loading time when being displayed, so that obvious time delay exists in the interface switching process, and the operation experience of a user is influenced. Aiming at the problem, the application provides an improvement scheme that: by preloading the content of the shortcut switching interface, the effect of reducing the interface switching time delay is achieved.
For example, if the predefined shortcut interface set includes a3, b3 and c3, after determining the set in S101, preloading the content of a3, b3 and c3 may be started, so that when a3, b3 and c3 are displayed subsequently, the preloaded data may be directly used to increase the display speed of the interface.
When the plurality of shortcut switch interfaces respectively belong to when different functional modules are used in the application, the preloading can be realized by creating the module process corresponding to the shortcut switching interface in advance. In fact, because there is generally a correlation between different interfaces in the same functional module, the time delay during the mutual switching is often not obvious, and the conventional switching path between different interfaces in the same functional module is shorter, and there is generally no need for quick switching, so that the preloading scheme for the interfaces of different functional modules has more practical significance.
For example, the predefined shortcut switching interface set includes a3 and B3, where a3 is an interface in the module a and B3 is an interface in the module B, and after determining the set in S101, a process may be created in advance for the functional module a and the functional module B, respectively. Assuming that the user is currently browsing a3, the process of the functional module B is reserved as a background process, and when the user needs to switch to B3, the functional module B can be quickly started, so that the effect of quickly displaying B3 is achieved.
If the number of predefined shortcut switch interfaces is large, or if there are multiple shortcut switch interface sets, the above-mentioned preloading scheme may cause a problem that system resources are excessively occupied. For this case, the pre-loading scheme can be further improved as: after the shortcut switching interface set is determined, the corresponding interface content does not need to be preloaded immediately, but the content of other shortcut switching interfaces in the set is preloaded after a certain shortcut switching interface in the set is displayed for the first time.
For example the method comprises the following steps: two shortcut-switching interface sets are predefined, comprising a3 and b3, c3 and d3 respectively, after determining the two sets at S101, the corresponding interface content need not be preloaded immediately. After the user first browses a3, b3 of the same set as a3 starts to be preloaded, to meet the need for fast switching from a3 to b3. If the subsequent user switches to b3, a reservation may also be given to the already loaded a3 content, to meet the need to switch from b3 back to a 3. In addition, if c3 and d3 are not involved in the user's use of the application, then c3 and d3 need not be preloaded. It can be seen that this on-demand preloading approach can effectively reduce the occupation of system resources.
Fig. 3 shows a schematic diagram of an actual application interface for implementing the scheme of the present application, where a predefined shortcut switching interface set includes an interface a and an interface B, and if a user is currently browsing the interface a and needs to switch to the interface B, the corresponding shortcut switching operation of the interface is: pressing the title bar of the initial interface A currently displayed to slide downwards for dragging, wherein the display effect after switching is as follows: the switching target interface B and the initial interface a are displayed above and below the device screen, respectively. On the basis of the two interfaces displayed on the same screen, the title bar of the current interface A is further pressed to slide and drag upwards, so that the content of the interface B can be hidden, and the switch back to the interface A is realized.
Fig. 4 further shows two specific usage scenarios of the corresponding scheme of fig. 3, in which example 1 is a co-screen display effect of a chat interface and a news interface, and a user can browse news information while communicating with friends. Example 2 is the on-screen display of a stock ticker interface and a chat interface, where a user is interested in stock ticker information while communicating with friends.
It should be noted that the above-listed implementations are only illustrative and should not be construed as limiting the present application.
Corresponding to the above method embodiment, the present application further provides an application internal interface switching device, as shown in fig. 5, where the device may include:
the predefined set determining module 110 is configured to determine a set of predefined shortcut switching interfaces, where the shortcut switching interfaces are intra-application interfaces, and the number of the predefined shortcut switching interfaces is not less than 2;
the switching target interface determining module 120 is configured to determine, if a preset interface shortcut switching operation is detected in a case that an initial interface currently displayed on the device screen belongs to a set, that a switching target interface belongs to the set according to the interface shortcut switching operation;
and the display module 130 is used for displaying the switching target interface on the screen of the device.
Referring to fig. 6, the apparatus may further include:
and the preloading module 140 is used for preloading the content of the predefined shortcut interface.
Wherein the preloading module 140 may specifically be configured to: after any shortcut switching interface in the collection is displayed for the first time, the content of other shortcut switching interfaces in the collection is preloaded.
The preloading module 140 may also be specifically configured to: and pre-creating a module process corresponding to the shortcut switching interface.
In one embodiment of the present application, the display module 130 may be specifically configured to:
and displaying the target interface and the initial interface on the screen of the equipment in a same screen.
In a specific embodiment of the present application, the interface shortcut switching operation may be a drag gesture operation for a specific location in the currently displayed interface.
In case the number of predefined shortcut switch interfaces is equal to 2, the handover target interface determination module 120 may be specifically configured to: after the preset interface shortcut switching operation is detected, the other shortcut switching interface except the initial interface is directly determined to be the switching target interface.
In the case where the number of predefined shortcut switch interfaces is greater than 2, the switch target interface determination module 120 may be specifically configured to: after the preset interface shortcut switching operation is detected, a selection operation prompt of a switching target interface is displayed on a device screen, and the switching target interface is determined according to the selection operation of a user.
Under the condition that the number of the predefined shortcut switching interfaces is larger than 2, a plurality of preset interface shortcut switching operations exist, and the preset interface shortcut switching operations correspond to different shortcut switching interfaces respectively; the handover target interface determination module 120 may further be specifically configured to: after the preset interface shortcut switching operation is detected, determining a switching target interface according to the corresponding relation between the interface shortcut switching operation and the shortcut switching interface.
The implementation process of the functions and roles of each module in the above device is specifically shown in the implementation process of the corresponding steps in the above method, and will not be described herein again.
From the above description of embodiments, it will be apparent to those skilled in the art that the present application may be implemented in software plus a necessary general hardware platform. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the embodiments or some parts of the embodiments of the present application.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments for relevant points. The apparatus embodiments described above are merely illustrative, wherein the modules illustrated as separate components may or may not be physically separate, in carrying out the inventive arrangements the functions of the modules can be combined implemented in the same one or more software and/or hardware. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present application without undue burden.
The foregoing is merely illustrative of the embodiments of this application and it will be appreciated by those skilled in the art that variations and modifications may be made without departing from the principles of the application, and it is intended to cover all modifications and variations as fall within the scope of the application.