Detailed Description
The present disclosure is described in further detail below with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that, in the present disclosure, the embodiments and features of the embodiments may be combined with each other without conflict. The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 1 illustrates an exemplary architecture 100 to which the disclosed method of displaying an operational interface of an application may be applied.
As shown in fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The terminal devices 101, 102, 103 interact with a server 105 via a network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have various communication client applications installed thereon, such as a web browser application, a shopping application, a search application, an instant messaging tool, a mailbox client, social platform software, a text editing application, a browser application, a reading application, and the like.
The terminal apparatuses 101, 102, and 103 may be hardware or software. When the terminal devices 101, 102, 103 are hardware, they may be various electronic devices having a display screen and supporting communication with a server, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III, mpeg compression standard Audio Layer 3), MP4 players (Moving Picture Experts Group Audio Layer IV, mpeg compression standard Audio Layer 4), laptop portable computers, desktop computers, and the like. When the terminal apparatuses 101, 102, 103 are software, they can be installed in the electronic apparatuses listed above. It may be implemented as multiple pieces of software or software modules (e.g., software or software modules used to provide distributed services) or as a single piece of software or software module. And is not particularly limited herein.
The server 105 may be a server providing various services, such as a background application server providing support for applications on the terminal devices 101, 102, 103. The background application server may receive the application data acquisition request sent by the terminal device 101, 102, 103, search for corresponding data, and return the data to the terminal device 101, 102, 103.
It should be noted that the method for displaying the operation interface of the application provided by the embodiment of the present disclosure may be executed by the terminal devices 101, 102, and 103.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to FIG. 2, a flow 200 of one embodiment of a method of displaying an operational interface of an application in accordance with the present disclosure is shown. The method for displaying the operation interface of the application comprises the following steps:
step 201, in response to determining that an operation of invoking the second hosted application is detected at the interface of use of the first hosted application, an interface component of the second hosted application is obtained.
In this embodiment, when an execution subject (for example, the terminal device shown in fig. 1) of the method for displaying the operation interface of the application determines that the user is currently using the first hosted application and the usage interface of the first hosted application is in the front end, an operation for invoking the second hosted application may be detected at the usage interface of the first hosted application. Here, the hosted application is an application that is hosted by the host application to realize its function and can be used without installation. The host application is an application hosted by the hosted application and generally needs to be installed on the execution body. For example, the host application may be a communication application, the first hosted application may be hosted in an applet of the communication application, such as a ticketing application, and the interface used by the first hosted application is an operation interface of the ticketing application. The second hosted application may be hosted by the same hosted application as the first hosted application and different from the first hosted application. For example, the second hosted application may be a weather application hosted by the communication application.
In this embodiment, the execution subject of the method of displaying the operation interface of the application may detect an operation of calling the second hosted application. As an example, the operation of invoking the second hosted application may be an operation performed by a user, such as clicking or dragging a preset icon on the user interface of the first hosted application, or may be a predetermined number of pressing operations on a preset physical key of the execution subject. Specifically, the user clicks or drags a preset icon in the use interface of the first hosted application, and when the execution subject detects the operation of the user, the execution subject may find the second hosted application and start the second hosted application in the background according to the identification information of the second hosted application associated with the preset icon, so as to obtain an interface component of the second hosted application. Here, the interface component may be an encapsulation of data and methods for displaying the operation interface of the second hosted application, and may include display attribute parameters, a display mode, a display time, and the like of elements in the operation interface of the second hosted application. In practice, the first hosted application and the second hosted application may be implemented based on HTML (Hyper Text Markup Language), and a tag for calling other hosted applications, such as < appbrandd >, may be inserted in the HTML file of the first hosted application, and a parameter including an identification of the called second hosted application, etc., is defined under the tag. When the label is analyzed in the running process of the first hosted application, the interface component of the second hosted application is searched according to the identifier of the called second hosted application, or the interface component of the second hosted application is downloaded according to the identifier of the called second hosted application, so that the acquisition of the interface component of the second hosted application is realized.
Step 202, rendering the operation interface of the second hosted application in at least a partial display area of the use interface of the first hosted application according to the interface component of the second hosted application.
In this embodiment, after the execution subject obtains the interface component of the second hosted application, the interface component of the second hosted application is analyzed to obtain data and a method for displaying the operation interface of the second hosted application, and then the operation interface of the second hosted application is drawn in at least a part of the display area of the usage interface of the first hosted application according to the data and the method obtained through analysis. For example, the second hosted application is a weather application, and the operation interface of the second hosted application is an operation interface of the weather application. Here, at least a part of the display area of the user interface of the first hosted application may be a part of the display area of the user interface of the first hosted application, or may be the entire display area of the user interface of the first hosted application. At least a part of the display area of the operation interface for displaying the second hosted application may be a fixed area or a variable area (e.g., a small window area whose position can be changed according to a drag operation of the user).
In some optional implementations of this embodiment, at least a portion of the display area of the operation interface display of the execution subject supporting the second hosted application may also be preset. The execution subject may display the operation interface of the second hosted application in the designated display area, so that the operation interface of the second hosted application may be displayed in the fixed display area, for example, a blank area preset in the usage interface of the first hosted application is a display area for displaying the operation interface of the second hosted application, and the operation interface of the second hosted application may be prevented from affecting the display of the operation interface of the first hosted application.
In some optional implementations of this embodiment, the interface component for executing the second hosted application of the subject includes a display parameter of the second hosted application in the user interface of the first hosted application. When the execution subject performs an operation of rendering the operation interface of the second hosted application in at least a partial display area of the usage interface of the first hosted application, the execution subject may display the operation interface of the second hosted application in at least a partial display area of the usage interface of the first hosted application based on the display parameter. Specifically, the display parameters may include: and displaying a position parameter and/or a display size, wherein the display position parameter may be a position coordinate of the use interface of the second hosted application in the use interface of the first hosted application, and the display size may be a length and a width of a rectangular area, or a radius of a circular area, a length of a major axis and a minor axis of an elliptical area, or the like, displayed in the use interface of the first hosted application by the use interface of the second hosted application. As an example, the display parameters may be: the length is 80 units of length and the width is 40 units of length. Therefore, the operation interface of the second hosted application can be quickly rendered in at least part of the display area of the use interface of the first hosted application according to the specific display parameters included in the interface component and the display mode indicated by the display parameters.
With continued reference to fig. 3, fig. 3 is a schematic diagram of an application scenario of a method of displaying an operational interface of an application according to an embodiment of the present disclosure. In the application scenario of fig. 3, first, in response to the detection of the terminal device 301 that the user interface is currently the user interface of the first hosted application (the user interface of the ticketing application is shown as 302), and the detection of the operation performed by the user on the terminal device 301 to invoke the second hosted application (for example, clicking or dragging a preset icon shown as 303, where clicking or dragging the preset icon can implement an instruction to invoke the second hosted application). Then, an interface component of a second hosted application is obtained. Finally, the operation interface of the second hosted application (the interface for use of the weather application as shown in 304) is rendered in at least a partial display area of the interface for use of the first hosted application according to the interface component of the second hosted application.
The method provided by the above embodiment of the present disclosure obtains the interface component of the second hosted application by responding to the determination that the operation of invoking the second hosted application is detected on the interface of the first hosted application, and renders the operation interface of the second hosted application in at least a partial display area of the interface of the first hosted application according to the interface component of the second hosted application, so as to display the operation interfaces of other hosted applications on the interface of the currently used hosted application, and reduce the time for switching between different hosted applications.
In some optional implementations of this embodiment, the method further includes: and switching the current use interface to the operation interface of the second hosted application in response to detecting the preset operation executed on the operation component displayed in the operation interface of the second hosted application. Specifically, after the operation interface of the second hosted application is rendered in at least a partial display area of the usage interface of the first hosted application, the execution subject detects an operation performed by a user on an operation component (e.g., a preset icon) displayed in the operation interface of the second hosted application, such as clicking or dragging, and jumps from the current usage interface to the operation interface of the second hosted application. Here, the current user interface can be switched to the operation interface of the second hosted application by clicking or dragging the preset icon. Therefore, the operation interface of the second hosted application can be rapidly displayed at the front end by detecting the operation of the user in the operation interface of the second hosted application, and the first hosted application is switched to the background, so that the switching efficiency of the hosted application is improved.
Further, in a scenario where the user interface of the first hosted application detects an operation of invoking at least two second hosted applications, the execution subject may respectively obtain interface components of the at least two second hosted applications, and render at least two operation interfaces corresponding to the at least two second hosted applications in at least a partial display area of the user interface of the first hosted application according to the interface components of the second hosted applications. Specifically, without limiting the number of the second hosted applications, the execution body, in response to detecting an operation of invoking at least two second hosted applications, finds at least two second hosted applications according to the identification information of the at least two second hosted applications, and launches the second hosted applications in the background, thereby obtaining the interface components of the at least two second hosted applications. The execution subject may analyze the interface components of the at least two second hosted applications, and draw the corresponding operation interfaces of the at least two second hosted applications in at least two areas of the usage interface of the first hosted application according to the data and the method obtained by the analysis. Thus, according to the requirement of a user, the operation interface of the second hosted application with at least two calls is rendered by using the interface of the first hosted application. Therefore, more than two operation interfaces of other hosted applications can be simultaneously displayed on the interface of one hosted application, namely, a plurality of operation interfaces of different hosted applications are provided in the front-end interface, so that the time for switching among the hosted applications is further saved, and the efficiency of serving the hosted applications for users is improved.
With further reference to FIG. 4, a flow 400 of yet another embodiment of a method of displaying an operational interface of an application is shown. The process 400 of the method for displaying the operation interface of the application comprises the following steps:
step 401, in response to determining that an operation of invoking a second hosted application is detected on the user interface of the first hosted application, obtaining an interface component of the second hosted application, wherein the interface component of the second hosted application includes a display parameter of the second hosted application in the user interface of the first hosted application.
In this embodiment, when the execution subject determines that the user is currently using the first hosted application and the user interface of the first hosted application is in the front end, an operation of invoking the second hosted application may be detected at the user interface of the first hosted application. When the execution subject detects the operation of the user, the execution subject may find the second hosted application according to the identification information of the associated second hosted application and start the second hosted application in the background, thereby obtaining the interface component of the second hosted application. Here, the interface component may include a display parameter for indicating the second hosted application in the interface of use of the first hosted application. The display parameters may include: the display position parameter and/or the display size, specifically, the parameter of the display position may be a position coordinate of the user interface of the second hosted application displayed in the user interface of the first hosted application, and the display size may be a length size and a width size of an area displayed in the user interface of the first hosted application by the user interface of the second hosted application.
Step 402, running the second hosted application to build a bitmap of an operational interface of the second hosted application.
In this embodiment, when the execution subject detects an operation of calling the second hosted application, the second hosted application is started and executed in the background. A bitmap comprising a graphical representation of the functional components of the second hosted application may be created when the second hosted application is run, i.e., a bitmap of the operational interface of the second hosted application.
And 403, based on the display parameters, displaying the bitmap of the operation interface of the second hosted application in at least part of the display area of the use interface of the first hosted application according to the display parameters.
In this embodiment, the execution subject renders the constructed bitmap of the second hosted application into the operation interface of the second hosted application in at least a partial display area of the usage interface of the first hosted application according to the display parameters of the usage interface of the first hosted application. The display parameters may include position coordinates and/or display size. For example, the display parameters may be: the length is 100 units length and the width is 50 units length. The execution subject may scale the bitmap constructed in step 402 to a corresponding size, and superimpose the scaled bitmap on the user interface of the first hosted application in a floating window form or the like; or the bitmap constructed in step 402 may be presented on the user interface of the first hosted application according to the location coordinates indicated in the display parameters.
As can be seen from fig. 4, in the method for displaying an operation interface of an application in this embodiment, a bitmap of an operation interface of a second hosted application is first constructed, and then the bitmap is presented in at least a part of a display area of a usage interface of a first hosted application, so that the second hosted application can be invoked in the usage interface of the first hosted application without substantially modifying the host application.
With further reference to FIG. 5, a flow 500 of yet another embodiment of a method of displaying an operational interface of an application is shown. The process 500 of the method for displaying the operation interface of the application includes the following steps:
step 501, in response to determining that an operation of invoking a second hosted application is detected on the interface of the first hosted application, obtaining an interface component of the second hosted application, where the interface component of the second hosted application includes a display parameter of the second hosted application in the interface of the first hosted application and an interface rendering manner of the second hosted application.
In this embodiment, when the execution subject determines that the user is currently using the first hosted application and the user interface of the first hosted application is in the front end, an operation of invoking the second hosted application may be detected at the user interface of the first hosted application. When the execution subject detects the operation of the user, the execution subject may find the second hosted application according to the identification information of the associated second hosted application and start the second hosted application in the background, thereby obtaining the interface component of the second hosted application. Here, the interface component may include a display parameter for indicating the second hosted application in the interface of use of the first hosted application, and an interface rendering manner of the second hosted application. Here, the interface rendering manner is used to indicate a method for rendering the operation interface of the second hosted application, and may include a presentation method of colors, positions, sizes, and the like of elements (for example, icons, characters, pictures, and the like) in the second hosted application. In practice, the interface component code predefined by the second hosted application may be read, which may include a set of HTML fragments, JS statements (JavaScript, script), CSS (Cascading Style Sheets) for implementing the interface rendering method. The interface component code may be tagged by a < div > tag in the HTML, and the operational interface of the second hosted application may be rendered by running the interface component code tagged by the < div > tag.
Step 502, rendering the operation interface of the second hosted application according to the display parameters based on the interface rendering mode.
In this embodiment, the execution subject may render the operation interface of the second hosted application according to a method for instructing rendering of the operation interface of the second hosted application. Specifically, interface component code predefined by the second hosted application may be run to render the corresponding interface element in the operational interface of the second hosted application.
As can be seen from fig. 5, in the method for displaying an operation interface of an application according to the embodiment, by acquiring the rendering mode of the operation interface of the second hosted application, the operation interface of the second hosted application can be quickly rendered in the use interface of the first hosted application according to the rendering mode.
Referring now to fig. 6, shown is a schematic diagram of an electronic device (e.g., terminal device in fig. 1) 600 suitable for use in implementing embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a fixed terminal such as a digital TV, a desktop computer, and the like. The terminal device/server shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure. As shown in fig. 6, electronic device 600 may include a processing means (e.g., central processing unit, graphics processor, etc.) 601 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the electronic apparatus 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Generally, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While fig. 6 illustrates an electronic device 600 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided. Each block shown in fig. 6 may represent one device or may represent multiple devices as desired.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 609, or may be installed from the storage means 608, or may be installed from the ROM 602. The computer program, when executed by the processing device 601, performs the above-described functions defined in the methods of embodiments of the present disclosure.
It should be noted that the computer readable medium of the embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In embodiments of the disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In embodiments of the present disclosure, however, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: in response to determining that an operation of invoking a second hosted application is detected at the interface of use of the first hosted application, obtaining an interface component of the second hosted application; rendering the operation interface of the second hosted application in at least a partial display area of the use interface of the first hosted application according to the interface component of the second hosted application.
Computer program code for carrying out operations for embodiments of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention in the embodiments of the present disclosure is not limited to the specific combination of the above-mentioned features, but also encompasses other embodiments in which any combination of the above-mentioned features or their equivalents is made without departing from the inventive concept as defined above. For example, the above features and (but not limited to) technical features with similar functions disclosed in the embodiments of the present disclosure are mutually replaced to form the technical solution.