Disclosure of Invention
At least one embodiment of the invention provides an application program interface display method and device, electronic equipment and a storage medium, and solves the technical problem that two task display interfaces of one application program cannot be simultaneously displayed in the prior art.
In a first aspect, an embodiment of the present invention provides an interface display method for an application program, where the method includes:
receiving a request message for establishing a task display interface for a second application task of the application program;
if a first application task stack corresponding to a first application task of the application program exists, establishing a second application task stack for a second application task, and placing the second application task into the second application task stack;
and establishing a second task display interface corresponding to the second application task.
In some embodiments, the above method further comprises:
acquiring the associated content of the second application task;
and displaying the associated content of the second application task in the second task display interface.
In some embodiments, before establishing the second application task stack for the second application task, further comprises:
and determining that the type of the second application task meets a preset task type.
In some embodiments, the preset task type is an instant notification message type.
In some embodiments, the number of the second application tasks is one or more, and if there are a plurality of second application tasks, establishing a second application task stack for the second application task includes:
establishing a corresponding second application task stack for each second application task, and placing each second application task into the corresponding second application task stack;
establishing a second task display interface corresponding to the second application task comprises:
and establishing a second application task display interface corresponding to each second application task.
In some embodiments, the first application task is a full-screen interface corresponding to the first task display interface, the second task display interface is a partial-screen interface, and the second task display interface is covered on the first task display interface; or,
the first application task is corresponding to a first task display interface and a second task display interface which are partial screen interfaces, and the first task display interface and the second task display interface are arranged in a staggered mode.
In some embodiments, if there already exists a first task display interface corresponding to the first application task, and the first task display interface is a full-screen interface, the method further includes:
and adjusting the first task display interface to be a partial screen interface, and staggering the first task display interface with a second task display interface which is established to correspond to the second application task, wherein the second task display interface is a partial screen interface.
In some embodiments, a first operation instruction for a first task display interface is received, and content associated with the operation instruction is presented on the first task display interface; or,
and receiving a second operation instruction aiming at the second task display interface, and presenting the content associated with the operation instruction on the second task display interface.
In some embodiments, a closing instruction for the first task display interface is received, the first task display interface is closed, and the first application task stack is cleared; or,
and receiving a closing instruction aiming at the second task display interface, closing the second task display interface, and clearing the second application task stack.
In some embodiments, the interface display method of any application program is executed in the android system, a system process management service module of the android system establishes a second application task stack for a second application task, and a window management service module of the android system establishes a second task display interface corresponding to the second application task.
In a second aspect, an embodiment of the present invention further provides an interface display apparatus for an application, including: the system comprises a request receiving module, a task stack establishing module and an interface establishing module;
the request receiving module is used for receiving a request message for establishing an application interface for a second application task of the application program;
the task stack establishing module is used for establishing a second application task stack for a second application task and placing the second application task into the second application task stack if a first application task stack corresponding to the first application task of the application program already exists;
and the interface establishing module is used for establishing a second task display interface corresponding to the second application task and displaying the associated content of the second application task in the second task display interface.
In a third aspect, an embodiment of the present invention further provides an electronic device, including: a processor and a memory;
the processor is configured to perform the steps of any of the methods described above by calling a program or instructions stored in the memory.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, which stores a program or instructions, where the program or instructions cause a computer to execute the steps of any one of the above methods.
In the interface display method for an application program provided in the embodiment of the present invention, when a request message for establishing a task display interface for a second application task of the application program is received, if the application program is already executing the first application task at this time, an operating system already establishes a first application task stack for the first application task, and has already established a first task display interface corresponding to the first application task, a second application task stack is established for the second application task, and the second application task is placed in the second application task stack, and a second task display interface corresponding to the second application task is simultaneously established, so that one application program simultaneously includes the first task display interface corresponding to the first application task and the second task display interface corresponding to the second application task, so that a user can view the two task display interfaces simultaneously, and the operation is carried out on the two task display interfaces, so that good user experience is brought.
Detailed Description
In order that the above objects, features and advantages of the present invention can be more clearly understood, the present invention will be further described in detail with reference to the accompanying drawings and examples. It is to be understood that the embodiments described are only a few embodiments of the present invention, and not all embodiments. The specific embodiments described herein are merely illustrative of the invention and are not to be construed as limiting the invention. All other embodiments, which can be derived by a person skilled in the art from the described embodiments of the invention, are within the scope of the invention.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
The technical scheme provided by the embodiment of the invention mainly aims at the problem that the application program used on the existing intelligent terminal can only display one task display interface generally, and the inventor researches and discovers that the problem is mainly because an application task stack is usually used for managing the application task in each application program in some operating systems, such as an android system, an application task stack is established when the application program is started for each application program, and all the application tasks of the application program, such as a friend circle browsing task, a chat task and the like, are managed by using the application task stack, and the application task stack is a stack with a last-in first-out characteristic, so that only the last-in application task in the application task stack is kept in an activated state, and the android system also establishes a task display interface for the application task in the activated state, for example, in the process of using the micro-messenger, if a user clicks the micro-messenger chat message, the chat task of the micro-messenger can enter an application task stack of an application program of the micro-messenger, and only the chat task is kept in an activated state, and only a chat interface is displayed.
In the technical solution provided in the embodiment of the present invention, when receiving a new application task, the operating system does not directly place the new application task in the established application task stack, but maintains the existing application task and the new application task in an activated state by establishing the new application task stack and placing the new application task in the new application task stack, and establishes a task display interface for the application task, thereby achieving the effect that the same application program simultaneously displays two task display interfaces.
Fig. 1 is a schematic flowchart of an interface display method for an application according to an embodiment of the present invention, where an execution main body of the method may be an operating system of an intelligent terminal, such as an android system, an iOS system, and the method includes the following steps:
step 101, receiving a request message for establishing a task display interface for a second application task of an application program.
Specifically, the application program in this step may be an application program that has been started on the smart terminal and is executing one of the application tasks, for example, a first application task, at this time, a second application task of the application program is triggered due to user triggering or other means, and the operating system receives a request message for establishing a task display interface for the second application task.
Taking the WeChat usage as an example, the process of triggering the second application task may be popping up a WeChat chat message when the user is browsing a friend circle interface, at this time, the user clicks the WeChat chat message, the sensing device on the intelligent terminal can detect the click trigger operation and notify the click trigger operation to the operating system of the intelligent terminal, at this time, the operating system can learn that the trigger operation needs to be responded, establish a chat task for the WeChat, and establish a task display interface corresponding to the chat task.
102, if a first application task stack corresponding to a first application task of an application program already exists, establishing a second application task stack for a second application task, and placing the second application task into the second application task stack;
as depicted instep 101, the application is already executing a first application task and a first application task stack is established for the first application task. In the embodiment of the invention, the first application task and the second application task can be simultaneously kept in the activated state by establishing the second application task stack for the second application task and placing the second application task into the second application task stack.
Still taking the above WeChat usage as an example, if the chat task is triggered, a second application task stack is established for the chat task, the chat task is placed in the second application task stack, and the friend circle task in the first application task stack and the chat task in the second application task stack are kept in an activated state at the same time.
And 103, establishing a second task display interface corresponding to the second application task.
In this step, a second task display interface may be established for the second application task in the activated state, and at this time, the first task display interface and the second task display interface of one application program may be simultaneously displayed on the screen of the intelligent terminal.
Still taking the above WeChat usage as an example, a friend circle interface and a chat interface can be displayed on the screen of the terminal device at the same time.
According to the technical scheme provided by the embodiment of the invention, two task display interfaces of one application program can be displayed simultaneously, so that a user can watch the two task display interfaces simultaneously and operate on the two task display interfaces, and good user experience is brought.
In some embodiments, if the second application task has some associated content, the method may further include:
acquiring the associated content of the second application task;
and displaying the associated content of the second application task in the second task display interface.
For example, if the second application task is a chat task, the chat content of the chat task can be further obtained and displayed on the chat interface. In the embodiment of the present invention, before establishing the second application task stack for the second application task, it may be further determined whether the type of the second application task satisfies the preset task type, and only when the preset task type is satisfied, the second application task stack is established for the second application task, and the second task display interface is established. The step can limit the task display interface to be established for only one part of application tasks with requirements, and avoid the phenomenon that the task display interface is established for each application task of the application program, so that the display interfaces of the application program are too many.
Optionally, in some embodiments, the preset task type may be an instant notification message type. The method mainly considers that when some task display interfaces of the application program are browsed, the instant notification message is usually popped up, and due to timeliness of the instant notification message, the instant notification message needs to be replied in time, and the original task display interface needs to be recovered after the reply is completed; or in other cases, for example, when the task display interface is a video playing interface, the user needs to reply to the instant notification message and play the video at the same time, and in the application scenario, two task display interfaces of the application program need to be maintained at the same time.
In the embodiment of the present invention, the type of the instant notification message may include, but is not limited to, one of a WeChat chat message, a QQ chat message, and a buffalo private chat message, and correspondingly, the application program may be one of a WeChat, a QQ, and a buffalo.
In some embodiments, the number of the second application tasks may be one or more, and if there are multiple second application tasks, a corresponding second application task stack is established for each second application task, each second application task is placed in the corresponding second application task stack, and a second application task display interface corresponding to each second application task is established. For example, when the type of the second application task is an instant notification message type, and there are a plurality of chat objects for sending instant notification messages on the application program, a task display interface may be established for the instant notification message of each chat object to display the content of each instant notification message.
In the above embodiment, a second task display interface is established for one or more second application tasks, where the task display interfaces include two or more, and may be displayed on the display screen of the terminal device in a plurality of ways as follows:
the first display mode may be that the first application task corresponding to the first task display interface is set to be a full-screen interface, the second task display interface is a partial-screen interface, the second task display interface covers the first task display interface, at this time, a plurality of second task display interfaces are provided, the plurality of second task display interfaces may be displayed side by side, or displayed in a partially-covered manner, and for the partially-covered display, one of the second task display interfaces may be triggered by a user through clicking or the like to be located on the uppermost layer, so that the second task display interfaces are displayed completely.
Fig. 2, fig. 3 and fig. 4 are schematic diagrams of a first display mode provided by the embodiment of the invention.
Fig. 2 includes a first task display interface of a full-screen interface and a second task display interface of a partial-screen interface, where the second task display interface is overlaid on the first task display interface.
Fig. 3 includes a first task display interface of a full screen interface and a second task display interface of two partial screen interfaces, where the second task display interface is overlaid on the first task display interface and the two second task display interfaces are displayed side by side.
Fig. 4 includes a first task display interface of a full screen interface and a second task display interface of two partial screen interfaces, where the second task display interface is overlaid on the first task display interface and the two second task display interfaces are partially overlaid for display.
The first display mode can be suitable for displaying a friend circle interface, a public number interface or an applet interface and a chat interface simultaneously after receiving a WeChat chat message when the WeChat browses a friend circle, a public number or an applet.
The second display mode may be that the first task display interface and the second task display interface corresponding to the first application task are both partial screen interfaces, and the first task display interface and the second task display interface are arranged in a staggered manner, and at this time, when the second task display interfaces are multiple, a side-by-side arrangement mode may be used.
Fig. 5 and 6 are schematic diagrams illustrating a second mode of presentation according to an embodiment of the present invention.
Fig. 5 includes a first task display interface of a partial screen interface and a second task display interface of a partial screen interface, where the first task display interface and the second task display interface are arranged in a staggered manner.
Fig. 6 includes a first task display interface of a partial screen interface and second task display interfaces of two partial screen interfaces, where the first task display interface and the second task display interface are arranged in a staggered manner, and the two second task display interfaces are arranged side by side.
This second display mode can be applicable to the situation that the first task display interface is a video playing interface, and the second task display interface does not affect video playing at this moment. For example, in QQ, chat is performed while watching a micro-view; while watching a small video in a tremble, the user replies private information.
In the second display mode, when only the first task display interface is available, the first task display interface is a full-screen interface, and further, when the second task display interface is established, the first task display interface may be adjusted to be a partial-screen interface and arranged in a staggered manner with respect to the established second task display interface corresponding to the second application task. Through the implementation mode, the second task display interface can be effectively prevented from influencing the display of the first task display interface, and the first task display interface can be displayed maximally as far as possible.
In some embodiments, by the above technical scheme, one application program can simultaneously display two task display interfaces, so that a user can respectively operate the two task display interfaces without influencing each other. Namely, a first operation instruction aiming at the first task display interface can be received, and the content related to the operation instruction is presented on the first task display interface; or a second operation instruction aiming at a second task display interface can be received, and the content associated with the operation instruction is presented on the second task display interface. For example, when the first task display interface is a video playing interface and the second task display interface is a chat interface, operations can be performed on the video playing interface to adjust at least one of playing progress, volume, video content switching and the like, and chat content can also be input on the chat interface to meet the operation requirements of a user on the two task display interfaces.
In addition, aiming at the two task display interfaces, a user can close any one task display interface according to the requirement without influencing the continuous use of the other task display interface. Namely, the user can receive a closing instruction aiming at the first task display interface, close the first task display interface and clear the first application task stack; or receiving a closing instruction aiming at the second task display interface, closing the second task display interface, and clearing the second application task stack.
According to the technical scheme of the embodiment of the invention, the interface display method can be applied to the intelligent terminal provided with the android system, and the android system executes the interface display method. The android system comprises a system process management service module AMS and a window management service module WMS, wherein the AMS is mainly responsible for application management functions, establishes an application task stack, and distributes application tasks to the corresponding application task stack, in the embodiment, the android system can be used for establishing a second application task stack for a second application task after receiving a request message for establishing a task display interface for the second application task of an application program, in the android system, each application task can be called as Activity, and for an android 7.0 system and an android 8.0 system, the application task stack can be called as TaskRecord, and for an android 9.0 system, the application task stack can be called as ActivityStack.
Fig. 7 is a schematic structural diagram of an interface display device of an application according to an embodiment of the present invention, and as shown in fig. 7, the device includes: arequest receiving module 201, a taskstack establishing module 202 and aninterface establishing module 203;
arequest receiving module 201, configured to receive a request message for establishing a task display interface for a second application task of an application program;
a taskstack establishing module 202, configured to establish a second application task stack for a second application task and place the second application task in the second application task stack if a first application task stack corresponding to a first application task of an application program already exists;
theinterface establishing module 203 is configured to establish a second task display interface corresponding to the second application task, and display the associated content of the second application task in the second task display interface.
The interface display device of the application program provided by the embodiment of the invention can realize the simultaneous display of two task display interfaces of one application program, so that a user can watch the two task display interfaces simultaneously and operate on the two task display interfaces, and good user experience is brought.
In some embodiments, the apparatus may further include:
and the associated content acquisition module is used for acquiring the associated content of the second application task and displaying the associated content of the second application task in the second task display interface.
In some embodiments, the apparatus may further include:
and the task type determining module is used for determining that the type of the second application task meets the preset task type before establishing a second application task stack for the second application task. The preset task type may be an instant notification message type.
In some embodiments, the number of the second application tasks is one or more, and if there are multiple second application tasks, the taskstack establishing module 202 is specifically configured to establish a corresponding second application task stack for each second application task, and place each second application task in the corresponding second application task stack;
theinterface establishing module 203 is specifically configured to establish a second application task display interface corresponding to each second application task.
In some embodiments, theinterface establishing module 203 is a full-screen interface corresponding to the first task display interface for the first application task, the second task display interface established by theinterface establishing module 203 is a partial-screen interface, and the second task display interface covers the first task display interface; or,
the first task display interface and the second task display interface corresponding to the first application task established by theinterface establishing module 203 are both partial screen interfaces, and the first task display interface and the second task display interface are arranged in a staggered manner.
In some embodiments, if a first task display interface corresponding to the first application task already exists and the first task display interface is a full-screen interface, the interface establishing module is specifically configured to adjust the first task display interface to be a partial-screen interface and to be staggered from a second task display interface corresponding to the second application task, where the second task display interface is a partial-screen interface.
In some embodiments, the apparatus further includes an operation instruction receiving module, configured to receive a first operation instruction for the first task display interface, and present content associated with the operation instruction on the first task display interface; or, the method is used for receiving a second operation instruction aiming at the second task display interface and presenting the content associated with the operation instruction on the second task display interface.
In some embodiments, the apparatus is further configured to receive a close instruction for the first task display interface, close the first task display interface, and clear the first application task stack; or receiving a closing instruction aiming at the second task display interface, closing the second task display interface, and clearing the second application task stack.
In some embodiments, the interface display device of any one of the above-mentioned application programs is included in the android system, the function of the taskstack establishing module 202 is included in a system process management service module of the android system, and the function of theinterface establishing module 203 is included in a window management service module of the android system. The apparatus disclosed in the above embodiments can implement the processes of the methods disclosed in the above method embodiments, and in order to avoid repetition, the details are not described here again.
Fig. 8 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present invention, as shown in fig. 8, the electronic device may include a mobile phone and a PAD intelligent terminal, and the electronic device includes:
one ormore processors 301, oneprocessor 301 being exemplified in fig. 7;
amemory 302;
the electronic device may further include: aninput device 303 and anoutput device 304.
Theprocessor 301, thememory 302, theinput device 303 and theoutput device 304 in the electronic device may be connected by a bus or other means, and fig. 7 illustrates an example of connection by a bus.
Thememory 302 is a non-transitory computer-readable storage medium, and can be used for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the interface display method of the application program in the embodiment of the present invention (for example, therequest receiving module 201, the taskstack establishing module 202, and theinterface establishing module 203 shown in fig. 7). Theprocessor 301 executes various functional applications of the server and data processing by running software programs, instructions and modules stored in thememory 302, that is, implements the interface display method of the above-described method embodiment.
Thememory 302 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the electronic device, and the like. Further, thememory 302 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments,memory 302 optionally includes memory located remotely fromprocessor 301, which may be connected to a terminal device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
Theinput device 303 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic apparatus. The output means 304 may comprise a display device such as a display screen.
An embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium stores a program or an instruction, where the program or the instruction is used to cause a computer to execute an interface display method of an application program when the program or the instruction is executed, where the method includes:
receiving a request message for establishing a task display interface for a second application task of the application program;
if a first application task stack corresponding to a first application task of the application program exists, establishing a second application task stack for a second application task, and placing the second application task into the second application task stack;
and establishing a second task display interface corresponding to the second application task.
Optionally, the computer-executable instructions, when executed by the computer processor, may also be used to implement the technical solution of the interface display method provided by any embodiment of the present invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Those skilled in the art will appreciate that although some embodiments described herein include some features included in other embodiments instead of others, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments.
Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope defined by the appended claims.