A method for switching display devices using a quick application and related devices

By minimizing the quick application interface on the first device and sending the virtual document object model to the second device for rendering, the problem of unsmooth switching between quick application devices and high network consumption is solved, and smooth switching is achieved for users with low network bandwidth. experience.

CN115048191BActive Publication Date: 2024-10-18PETAL CLOUD TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110218629.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-02-26
Publication Date
2024-10-18
Estimated Expiration
2041-02-26

AI Technical Summary

Technical Problem

In the existing technology, fast application switching between devices is not smooth and network consumption is large, resulting in poor user experience.

Method used

By running the quick application on the first device and minimizing the interface, the virtual document object model is sent to the second device for rendering and display, preventing the second device from using the mapped IO port of the first device for rendering, thereby reducing network consumption.

Benefits of technology

It enables smooth switching of quick applications between devices, avoids data loss, reduces network bandwidth requirements, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115048191B_ABST
    Figure CN115048191B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention discloses a method for switching display devices of a quick application and related devices, which are applied to a first device, wherein the first device runs a first quick application in the foreground and displays a first interface; receives a device switching request for the first interface; runs the first quick application in the background and minimizes the first interface, and sends a first virtual document object model of the first interface to a second device; receives a target event sent by the second device, wherein the target event is an event generated by the second device receiving a target operation on the first interface; the first device responds to the target event through the first quick application running in the background, generates a second virtual document object model of the second interface, and sends the second virtual document object model of the second interface to the second device. The embodiment of the present invention can realize hot switching of quick applications between different devices, thereby improving user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information processing, and in particular to a method for fast application switching display device and related equipment. Background Art

[0002] With the continuous development of science and technology, smart terminals have become an indispensable electronic product in people's lives. In order to meet the needs of users, quick applications have been derived from traditional application software. Quick applications are programs based on smart terminal hardware platforms that can be run on multiple terminals such as Android and iOS, written by developers with a set of JS codes. Compared with traditional applications, quick applications can run on multiple platforms (such as mobile phones, computers, car computers, etc.) without installing application software.

[0003] At present, some operating systems have two ways to start quick apps. First, click on the global search in the App Center list to search, and then start the target quick app after searching; second, users can add used quick apps to the desktop and start them as shortcut icons. However, in the actual application process, it is found that users use quick apps on multiple platforms and there is a need to switch devices. For example, a user opens a file editing quick app on a mobile phone to fill in form information, but the user prefers to use the computer keyboard to enter information. At this time, switching the file editing quick app to the computer for continued use can improve the user experience.

[0004] Therefore, how to achieve the switching of quick applications between devices and improve user experience is an urgent problem to be solved. Summary of the invention

[0005] The technical problem to be solved by the embodiments of the present invention is to provide a method for switching display devices for quick applications and related devices, which solves the problem that the switching of quick applications between different devices is not smooth and the network consumption is large, resulting in poor user experience.

[0006] In a first aspect, an implementation case of the present invention provides a method for switching display devices by a quick application, characterized in that, applied to a first device, the method includes: running a first quick application in the foreground of the first device and displaying a first interface; the first interface is the interface of the first quick application; receiving a device switching request for the first interface; running the first quick application in the background and minimizing the first interface, sending a first virtual document object model of the first interface to a second device; the first virtual document object model is used by the second device to render and restore the first interface; receiving a target event sent by the second device, the target event being an event generated by the second device receiving a target operation acting on the first interface; generating a second virtual document object model of the second interface in response to the target event by the first quick application running in the background of the first device, and sending the second virtual document object model of the second interface to the second device; the second virtual document object model is used by the second device to render and display the second interface.

[0007] In an embodiment of the present invention, a function of hot-switching a quick application running on a first device to a second device, and the program of the quick application will not exit during the switching process, can be implemented, which can avoid the problem of running data loss during the switching process of the quick application device. Furthermore, after the quick application is successfully switched to the second device, the first device still runs the program of the quick application, but the virtual document object model used to render the display interface of the quick application is no longer sent to itself but to the second device. Therefore, the second device can render and display the display interface of the quick application based on the virtual document object model and using its own IO port, and the first device can release the current IO port, avoiding the second device from using the mapped IO port of the first device for rendering, and avoiding the second device from needing to receive the video stream or picture stream data sent by the first device to display the quick application interface, which causes the problem of large network consumption. Specifically, if the first device runs a quick application in the foreground and displays the first interface, when the first device receives a request from the quick application to switch devices, the first device will minimize the current first interface and send a virtual document object model for rendering the first interface to the second device. After receiving the virtual document object model, the second device can render and display the first interface according to the virtual document object model and use its own IO port. When the second device receives the target operation for the first interface, it generates a corresponding target event and sends the target event to the first device. The first device responds to the target event through the quick application running in the background and generates a virtual document object model of the second interface, and sends the virtual document object model to the second device, so that the second device can render and display the second interface. Through the method provided in the embodiment of the present invention, the quick application running on the first device can be hot-swapped to the second device, avoiding the problem of running data loss during the quick application device switching process and the problem of large network consumption caused by the second device using the mapped IO port of the first device to render and display the quick application interface, thereby reducing the requirements for network bandwidth and improving user experience.

[0008] In a possible implementation, the first device includes a first native layer, a first bridge client and a first bridge server; running the first quick application in the foreground of the first device and displaying the first interface include: establishing a first connection between the first bridge client and the first bridge server; receiving, through the first bridge client, a first virtual document object model sent by the first bridge server based on the first connection; the first virtual document model is used by the first device to render and display the first interface; sending the first virtual document object model to the first native layer through the first bridge client for rendering and displaying the first interface on the first device.

[0009] In an embodiment of the present invention, on the quick application framework of the prior art, the communication bridge layer is split into a bridge client and a bridge server, and one bridge server is allowed to connect to different bridge clients. When the quick application is not switched to the second device, the bridge client of the first device is connected to the bridge server of the first device, and the bridge client of the first device can receive the virtual document object model sent by the bridge server, and then the bridge client sends the virtual document object model to the native layer of the first device, and the native layer renders and displays the display interface of the quick application according to the IO port of the first device. However, communication between the bridge client and the bridge server is carried out through the instruction stream, which reduces the requirements for network bandwidth and improves the user experience.

[0010] In a possible implementation manner, after receiving the device switching request for the first interface, the method further includes: disconnecting the first connection and establishing a second connection between the first bridge server and a second bridge client of the second device.

[0011] In an embodiment of the present invention, on the quick application framework of the prior art, the communication bridging layer is split into a bridge client and a bridge server, and one bridge server is allowed to connect to different bridge clients. When the first device receives a device switching request, the bridge server of the first device disconnects the connection with the bridge client of the first device and establishes a connection with the bridge client of the second device. The bridge server of the first device no longer sends the virtual document object model to the bridge client of the first device, but sends the virtual document object model to the bridge client of the second device to establish the connection, so that the second device can render and display the display interface of the quick application according to the virtual document object model sent by the first device and use its own IO, avoiding the problem of large network consumption caused by the second device needing to receive the video stream or picture stream data sent by the first device when the second device uses the mapped IO port of the first device to render and display the quick application interface, thereby reducing the requirements for network bandwidth and improving user experience.

[0012] In a possible implementation manner, the method further includes: after the first device disconnects the first connection, destroying the first bridge client.

[0013] In an embodiment of the present invention, when the quick application switches to the second device, after the bridge server of the first device disconnects from the bridge client of the first device, the bridge client of the first device no longer functions and can be destroyed and released so as to no longer occupy the resources of the first device, thereby improving the user experience.

[0014] In a possible implementation manner, the receiving the target event sent by the second device includes: receiving, by the first bridge server, the target event sent by the second bridge client based on the second connection.

[0015] In an embodiment of the present invention, after the quick application is successfully switched to the second device, the user can use the hardware resources of the second device to operate the quick application (for example, when the quick application is switched from a mobile phone to a computer, the user can use the computer's keyboard and mouse to operate the quick application, etc.). When the second device receives the user's target operation on the quick application, it generates corresponding target events and sends these target events to the bridge server of the first device through the bridge client of the second device. Then the first device responds to these target events through the quick application running in the background, so that after the quick application is hot-switched to the second device, the first device runs the quick application while ensuring that the user can still use the quick application smoothly, thereby improving the user experience.

[0016] In a possible implementation, the first device also includes a first JS engine layer; the first quick application running in the background of the first device generates a second virtual document object model of the second interface in response to the target event, including: after receiving the target event sent by the second bridge client based on the second connection through the first bridge server, forwarding the target event to the first JS engine layer through the first bridge server; processing the target event through the first JS engine layer and generating the second virtual document model.

[0017] In an embodiment of the present invention, the JS engine layer of the first device is used to run the program of the quick application. When the bridge server of the first device receives the target event sent by the bridge client of the second device, the bridge server of the first device sends the target event to the JS engine layer of the first device, and the JS engine layer responds to these target events and generates a corresponding virtual document object model. Through the method provided by the embodiment of the present invention, the user can hot-switch the quick application running on the first device to the second device more smoothly without exiting the quick application running on the first device. Therefore, the user can operate the quick application on the second device, but it is the first device that actually responds to the user's target operation, avoiding the problem of reopening the quick application on the second device and causing the user to wait for a long time during the switching process of the quick application, thereby improving the user experience.

[0018] In a possible implementation, the sending the second virtual document object model of the second interface to the second device includes: sending the second virtual document object model to the second bridge client based on the second connection through the first bridge server.

[0019] In an embodiment of the present invention, after the first device responds to the target event sent by the second device and generates a corresponding virtual document object model, the bridge server of the first device sends the virtual document object model to the bridge client of the second device with which the connection has been established. Therefore, the second device can render and display the display interface of the quick application according to the received virtual document object model and use its own IO, thereby avoiding the problem of large network consumption caused by the second device needing to receive the video stream or picture stream data sent by the first device when the second device uses the mapped IO port of the first device to render and display the quick application interface, thereby reducing the requirement for network bandwidth and improving user experience.

[0020] In a second aspect, an embodiment of the present invention provides a method for switching display devices by quick applications, characterized in that, when applied to a second device, the method includes: receiving a first virtual document object model sent by a first device; the first virtual document object model is used by the second device to render and restore a first interface; the first interface is a display interface of a first quick application running in the foreground of the first device when the first device receives a device switching request; rendering and displaying the first interface according to the first virtual document object model; receiving a target operation acting on the first interface and generating a target event, and sending the target event to the first device.

[0021] In an embodiment of the present invention, when a quick application running on a first device is hot-switched to a second device, the second device can receive a virtual document object model sent by the first device, and use its own IO port to render and display the display interface of the current quick application according to the virtual document object model. When the second device receives an operation acting on the quick application, it generates a corresponding target event and sends these target events to the first device. Through the method provided by an embodiment of the present invention, it is possible to hot-switch a quick application running on a first device to a second device, avoiding the problem of running data loss during the quick application device switching process and the problem that when the second device uses the mapped IO port of the first device to render and display the quick application interface, the second device needs to receive the video stream or picture stream data sent by the first device, resulting in a large network consumption, thereby reducing the requirements for network bandwidth and improving the user experience.

[0022] In one possible implementation, the second device includes a second bridge client; the receiving of the first virtual document object model sent by the first device includes: establishing a second connection between the first bridge server of the first device and the second bridge client; and receiving the first virtual document object model sent by the first bridge server based on the second connection through the second bridge client.

[0023] In an embodiment of the present invention, on the quick application framework of the prior art, the communication bridging layer is split into a bridge client and a bridge server, and one bridge server is allowed to connect to different bridge clients. When the first device receives a device switching request, the bridge server of the first device disconnects the connection with the bridge client of the first device and establishes a connection with the bridge client of the second device. The bridge server of the first device no longer sends the virtual document object model to the bridge client of the first device, but sends the virtual document object model to the bridge client of the second device to establish the connection, so that the second device can render and display the display interface of the quick application according to the virtual document object model sent by the first device and use its own IO, avoiding the problem of large network consumption caused by the second device needing to receive the video stream or picture stream data sent by the first device when the second device uses the mapped IO port of the first device to render and display the quick application interface, thereby reducing the requirements for network bandwidth and improving user experience.

[0024] In a possible implementation, the second device includes a second native layer; rendering and displaying the first interface according to the first virtual document object model includes: rendering the first virtual document object model through the second native layer and displaying the first interface.

[0025] In an embodiment of the present invention, when a quick application is hot-switched to a second device, the bridge client of the second device is connected to the bridge server of the first device, and the bridge client of the second device can receive the virtual document object model sent by the bridge server of the first device, and then the bridge client sends the virtual document object model to the native layer of the second device, and the native layer renders and displays the display interface of the quick application according to the IO port of the second device. Through the method provided by the embodiment of the present invention, it is possible to hot-switch a quick application running on a first device to a second device, avoiding the problem of running data loss during the quick application device switching process and the problem that when the second device uses the mapped IO port of the first device to render and display the quick application interface, the second device needs to receive the video stream or picture stream data sent by the first device, resulting in a large network consumption, thereby reducing the requirements for network bandwidth and improving the user experience.

[0026] In a possible implementation, the method also includes: receiving, through the second bridge client, a second virtual document object model sent by the first bridge server based on the second connection; the second virtual document object model is used by the second device to render and display a second interface; the second interface is a display interface after the first quick application responds to the target event; and rendering the second virtual document object model through the second native layer and displaying the second interface.

[0027] In an embodiment of the present invention, when the first device receives a target event sent by the second device, the first device will respond to these target events and generate a corresponding virtual document object model. After the bridge client of the second device receives the virtual document object model sent by the bridge server of the first device, the bridge client of the second device will send these virtual document object models to the native layer of the second device, and the native layer will render and display the display interface of the quick application according to the IO port of the second device. Through the method provided by the embodiment of the present invention, it is possible to hot-switch the quick application running on the first device to the second device, avoiding the problem of large network consumption caused by the second device needing to receive the video stream or picture stream data sent by the first device when the second device uses the mapped IO port of the first device to render and display the quick application interface, thereby reducing the requirements for network bandwidth and improving user experience.

[0028] In a third aspect, an embodiment of the present invention provides a device for switching display devices of a quick application, characterized in that the device is applied to a first device, and includes: a first processing unit, used to run a first quick application in the foreground of the first device and display a first interface; the first interface is the interface of the first quick application; a first receiving unit, used to receive a device switching request for the first interface; a second processing unit, used to run the first quick application in the background and minimize the first interface, and send a first virtual document object model of the first interface to a second device; the first virtual document object model is used by the second device to render and restore the first interface; a second receiving unit, used to receive a target event sent by the second device, the target event being an event generated by the second device receiving a target operation acting on the first interface; a third processing unit, used to generate a second virtual document object model of the second interface in response to the target event by the first quick application running in the background of the first device, and send the second virtual document object model of the second interface to the second device; the second virtual document object model is used by the second device to render and display the second interface.

[0029] In one possible implementation, the first device includes a first native layer, a first bridge client and a first bridge server; including: the first processing unit, which is specifically used to establish a first connection between the first bridge client and the first bridge server; receiving a first virtual document object model sent by the first bridge server based on the first connection through the first bridge client; the first virtual document model is used by the first device to render and display the first interface; and sending the first virtual document object model to the first native layer through the first bridge client for rendering and displaying the first interface on the first device.

[0030] In a possible implementation, the device further includes: a fourth processing module, configured to disconnect the first connection and establish a second connection between the first bridge server and a second bridge client of the second device.

[0031] In a possible implementation manner, the device further includes: a fifth processing module, configured to destroy the first bridge client after the first device disconnects the first connection.

[0032] In a possible implementation manner, the fourth processing module is specifically configured to enable the first device to receive the target event sent by the second bridge client through the first bridge server.

[0033] In a possible implementation, the first device also includes a first JS engine layer; including: the second receiving unit, which is specifically used to receive the target event sent by the second bridge client based on the second connection through the first bridge server, and then forward the target event to the first JS engine layer through the first bridge server; process the target event through the first JS engine layer and generate the second virtual document model.

[0034] In a possible implementation manner, the method includes: the third processing unit is specifically configured to send the second virtual document object model to the second bridge client through the first bridge server based on the second connection.

[0035] In a fourth aspect, an embodiment of the present invention provides a device for switching display devices using a quick application, characterized in that, when applied to a second device, the device includes: a first receiving unit, used to receive a first virtual document object model sent by a first device; the first virtual document object model is used by the second device to render and restore a first interface; the first interface is a display interface of a first quick application running in the foreground of the first device when the first device receives a device switching request; a first display unit, used to render and display the first interface according to the first virtual document object model; a first processing unit, used to receive a target operation acting on the first interface and generate a target event, and send the target event to the first device.

[0036] In a possible implementation, the second device includes a second bridge client; including: a first receiving unit, specifically used to establish a second connection between the first bridge server of the first device and the second bridge client; receiving the first virtual document object model sent by the first bridge server based on the second connection through the second bridge client.

[0037] In a possible implementation, the second device includes a second native layer; including: a first display unit, specifically configured to render the first virtual document object model through the second native layer and display the first interface.

[0038] In one possible implementation, the device also includes: a second receiving unit, used to receive a second virtual document object model sent by the first bridge server based on the second connection through the second bridge client; the second virtual document object model is used by the second device to render and display a second interface; the second interface is a display interface after the first quick application responds to the target event; a second processing unit, used to render the second virtual document object model through the second native layer and display the second interface.

[0039] In a fifth aspect, an embodiment of the present invention provides an electronic device, characterized in that it includes a processor, a memory, and a communication interface, wherein the memory is used to store information sending program code, and the processor is used to call the quick application switching display device method program code to execute any one of the methods described in the first aspect above.

[0040] In a sixth aspect, an embodiment of the present invention provides an electronic device, characterized in that it includes a processor, a memory, and a communication interface, wherein the memory is used to store information sending program code, and the processor is used to call the quick application switching display device method program code to execute any one of the methods described in the second aspect above.

[0041] In the seventh aspect, the present application provides a chip system, characterized in that the chip system includes at least one processor, a memory and an interface circuit, the memory, the interface circuit and the at least one processor are interconnected through lines, and instructions are stored in the at least one memory; when the instructions are executed by the processor, the method described in any one of the above-mentioned first aspects is implemented.

[0042] In the eighth aspect, the present application provides a chip system, characterized in that the chip system includes at least one processor, a memory and an interface circuit, the memory, the interface circuit and the at least one processor are interconnected through lines, and instructions are stored in the at least one memory; when the instructions are executed by the processor, the method described in any one of the above second aspects is implemented.

[0043] In a ninth aspect, an embodiment of the present invention provides a computer storage medium, characterized in that the computer storage medium stores a computer program, and when the computer program is executed by a processor, it implements the method described in any one of the above-mentioned first aspects.

[0044] In the tenth aspect, an embodiment of the present invention provides a computer storage medium, characterized in that the computer storage medium stores a computer program, and when the computer program is executed by a processor, it implements the method described in any one of the second aspects above.

[0045] In an eleventh aspect, the present application provides a computer program, characterized in that the computer program includes instructions, and when the computer program is executed by a computer, the computer executes any one of the methods described in the first aspect above.

[0046] In a twelfth aspect, the present application provides a computer program, characterized in that the computer program includes instructions, and when the computer program is executed by a computer, the computer executes any one of the methods described in the second aspect above. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1A A schematic diagram of a method for switching display devices by quick applications provided in the prior art.

[0048] Figure 1B A schematic diagram of another method for switching display devices using a quick application provided in the prior art.

[0049] Figure 1C A schematic diagram of a system architecture of a fast application switching display device provided by an embodiment of the present invention.

[0050] Figure 1D A schematic diagram of the system architecture of another fast application switching display device provided by an embodiment of the present invention.

[0051] Figure 2A The present invention is a flowchart of a method for switching display devices using a quick application in an embodiment of the present application.

[0052] Figure 2B A schematic diagram of a first interface provided by an embodiment of the present invention.

[0053] Figure 2C A schematic diagram of a triggering device switching operation provided by an embodiment of the present invention.

[0054] Figure 2D A schematic diagram of a minimized first interface provided by an embodiment of the present invention.

[0055] Figure 2E A schematic diagram of a fast application switching process provided by an embodiment of the present invention.

[0056] Figure 2F A schematic diagram of a second device receiving a target operation provided by an embodiment of the present invention.

[0057] Figure 2GA schematic diagram of a second device displaying a second interface provided by an embodiment of the present invention.

[0058] Figure 3A An exemplary flowchart of a method for switching display devices using a quick application is provided in an embodiment of the present invention.

[0059] Figure 3B A schematic diagram of an exemplary flow chart of another method for switching display devices using a quick application provided by an embodiment of the present invention.

[0060] Figure 4A The present application provided for an embodiment of the present invention provides a device schematic diagram of a quick application switching display device.

[0061] Figure 4B The present application provided for an embodiment of the present invention provides a device schematic diagram of another quick application switching display device. DETAILED DESCRIPTION

[0062] The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to be used as limitations to the present application. As used in the specification and appended claims of the present application, the singular expressions "one", "a kind of", "said", "above", "the" and "this" are intended to also include plural expressions, unless there is a clear indication to the contrary in the context. It should also be understood that the term "and / or" used in the present application refers to and includes any or all possible combinations of one or more listed items.

[0063] The following describes an electronic device, a user interface for such an electronic device, and embodiments for using such an electronic device. In some embodiments, the electronic device may be a portable electronic device that also includes other functions such as a personal digital assistant and / or a music player function, such as a mobile phone, a tablet computer, a wearable electronic device with wireless communication function (such as a smart watch), etc. Exemplary embodiments of portable electronic devices include but are not limited to devices equipped with Or a portable electronic device with other operating systems. The portable electronic device may also be other portable electronic devices, such as a laptop computer with a touch-sensitive surface or a touch panel. It should also be understood that in some other embodiments, the electronic device may not be a portable electronic device, but a desktop computer with a touch-sensitive surface or a touch panel.

[0064] The term "user interface (UI)" in the specification, claims and drawings of this application refers to the medium interface for interaction and information exchange between an application or operating system and a user, which realizes the conversion between the internal form of information and the form acceptable to the user. The user interface of an application is source code written in a specific computer language such as Java and extensible markup language (XML). The interface source code is parsed and rendered on the terminal device, and finally presented as content that the user can recognize, such as pictures, text, buttons and other controls. Controls, also known as widgets, are the basic elements of the user interface. Typical controls include toolbars, menu bars, text boxes, buttons, scroll bars, pictures and text. The properties and contents of controls in the interface are defined by tags or nodes, such as XML through <textview> 、 <imgview> 、 <videoview>The controls contained in the interface are specified by nodes such as . A node corresponds to a control or attribute in the interface. After parsing and rendering, the node is presented as user-visible content. In addition, many applications, such as hybrid applications, usually also contain web pages in their interfaces. A web page, also known as a page, can be understood as a special control embedded in the application interface. A web page is source code written in a specific computer language, such as hypertext markup language (GTML), cascading style sheets (CSS), JavaScript (JS), etc. The web page source code can be loaded and displayed as user-recognizable content by a browser or a web page display component with similar functions to a browser. The specific content contained in a web page is also defined by tags or nodes in the web page source code. For example, GTML is defined by 、 、 <video> 、 <canvas>To define the elements and attributes of a web page.

[0065] The most common form of user interface is graphical user interface (GUI), which refers to a user interface related to computer operation that is displayed in a graphical manner. It can be an icon, window, control or other interface element displayed on the display screen of an electronic device, where a control can include icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets and other visual interface elements.

[0066] Some terms in this application are explained below to facilitate understanding by those skilled in the art.

[0067] (1) Document Object Model (DOM) is a standard programming interface for processing extensible markup languages ​​recommended by the World Wide Web Consortium. It is a platform- and language-independent application programming interface (API) that can dynamically access programs and scripts to update the content, structure, and style of World Wide Web documents (such as HTML and XML documents are currently defined by the description part). The document can be further processed and the results of the processing can be added to the current page. DOM is a tree-based API document that requires the entire document to be represented in memory during processing.

[0068] (2) Document Object Model Tree (DOM Tree). According to the definition of the World Wide Web Consortium, the attributes of DOM tree nodes include tag name (nodeName), node type (node ​​Type, value is TagTxt), node content (data), parent node object set (parent Node), child node object set (firstChild, lastChild), sibling node object set (previous Sibling, nextSibling), etc. These attributes of DOM tree nodes provide the basic content and structure information of the page, but cannot reflect the relevance of tags, attributes and content to the topic, and therefore lack the semantics required for topic extraction. The overall idea of ​​DOM tree expansion is to consider the category of HTML page tags and the influence of tag attribute values ​​on page topic information, incorporate this influence into the calculation of page content elements, perform semantic expansion on DOM tree nodes, and introduce node influence factors to characterize the importance of the node in the tree.

[0069] (3) Virtual Document Object Model (VDOM) Virtual DOM is designed to solve browser performance issues. For example, if there are 20 requests to update the DOM in one operation, VDOM will not operate the DOM immediately, but save the diff content of these 20 updates to a local JS object, and finally add this JS object to the DOM tree at one time, and then perform subsequent operations, avoiding a lot of unnecessary calculations.

[0070] (4) Quick APP (Qapp) is a new form of application. In the past, there were two main types of mobile applications: web pages and native applications. Web pages do not require installation, but the experience is not very good. Native applications have a smooth experience, but they need to be downloaded and installed from the application store, making it difficult to reach users in one step. The emergence of quick applications is to allow users to experience the application content smoothly without downloading and installing. In order to achieve the above goals, quick applications establish a new language development specification and provide a series of development kit auxiliary support. In short, developers mainly use front-end knowledge and skills, as well as the corresponding integrated development environment, and mobile devices can be used to develop prototypes.

[0071] (5) Java Native Interface (JNI) provides a solution for integrating Java with native code such as C / C++ and assembly. This specification enables Java code running in a Java virtual machine to interoperate with other programming languages, including creating native methods, updating Java objects, calling Java methods, referencing Java classes, catching and throwing exceptions, etc. It also allows Java code to call programs and libraries written in C / C++ or assembly language.

[0072] (6) Central processing unit (CPU) is one of the main modules of electronic devices and the core component of electronic devices. Its main function is to interpret computer instructions and process data in computer software. CPU is the core component of the computer responsible for reading instructions, decoding instructions and executing instructions. The central processing unit mainly consists of two parts, namely the controller and the arithmetic unit, which also includes a cache memory and a data and control bus that realizes the connection between them. The three core components of electronic computers are CPU, internal memory, and input / output devices. The functions of the central processing unit are mainly to process instructions, execute operations, control time, and process data.

[0073] First, the technical problems to be solved by this application are analyzed and proposed. In the prior art, the technology for switching between quick application devices, for example, quick application A is running on device 1, but quick application A needs to be switched to device 2 according to the actual needs of the user, includes the following solutions 1 and 2:

[0074] Solution 1: Data preservation technology. See Figure 1A , Figure 1A The present invention is a schematic diagram of a method for switching display devices of a quick application provided in the prior art. In the figure, device 1 uploads the running data of quick application A to a cloud server for storage, and then enters quick application A on device 2 and downloads the previously saved running data, thereby restoring the display interface of quick application A on device 1. Specifically, the following steps 1-7 may be included:

[0075] Step 1: Device 1 accepts a user's request to switch devices.

[0076] Step 2: Device 1 saves the running data of quick application A running at this time.

[0077] Step 3: Device 1 uploads the saved operation data to the cloud server for storage.

[0078] Step 4: Device 1 exits the running program of quick app A.

[0079] Step 5: After device 1 exits the running program of quick app A, the user can reopen quick app A on device 2. At this time, quick app A runs the program on device 2.

[0080] Step 6: Device 2 downloads the operation data previously saved by device 1 on the cloud server.

[0081] Step 7: Device 2 restores the display interface of quick application A on device 1.

[0082] This solution is more capable of implementing fast application switching between device 1 and device 2, but it has the following disadvantages:

[0083] Disadvantage 1: The switching of quick apps between device 1 and device 2 is not smooth. It takes a certain amount of time to save the running data of the quick app on device 1 and upload it to the cloud server. It also takes a certain amount of time to open the quick app on device 2 and download the running data previously saved in the cloud server. As a result, the quick app cannot be switched between device 1 and device 2 in real time, resulting in a poor user experience.

[0084] Solution 2: Screen projection technology (for example, when a Huawei mobile phone and a Huawei laptop are used together, the mobile phone can project the current screen onto the laptop desktop, and the user can operate the current mobile phone on the laptop). Figure 1B , Figure 1B This is a schematic diagram of another method for switching display devices using a quick application provided in the prior art. In the figure, device 1 selects device 2 as the target screen projection device and projects the screen of device 1 onto device 2. Specifically, the following steps 1-4 may be included:

[0085] Step 1: Device 1 receives the user's screen projection request and uses device 2 as the target screen projection device.

[0086] Step 2: Device 1 maps the current input / output (I / O) port to device 2. Therefore, device 2 can use the mapped IO port of device 1 to render and display the display interface of the quick application.

[0087] Step 3: Run quick app A on device 1, and output the current display to device 2 through video streaming and picture streaming.

[0088] Step 4: Display the interface of quick app A on device 2.

[0089] Solution 2 is more capable of displaying the display interface of the quick application on device 1 on device 2 and using the hardware of device 2 to control the quick application, but it has the following disadvantages:

[0090] Disadvantage 1: When using the mapped IO port of device 1 to render the interface of quick application A on device 2, data needs to be transmitted between device 1 and device 2 through video stream and picture stream, which consumes a lot of network. The reason is that device 1 displays the display interface of quick application A on device 2 through screen projection technology. During this process, device 2 uses the mapped IO port of device 1 to render the screen. Device 2 needs to receive the video stream, picture stream and other data sent by device 1, and then display the display interface of quick application A on device 2, so this consumes a lot of network for device 1 and device 2.

[0091] Disadvantage 2: Device 1 and Device 2 must be synchronized, and Device 1 cannot release the current I / O port. Since Device 1 displays the display interface of Quick App A on Device 2 through screen projection technology, Device 2 does not participate in the program running process of Quick App A. Device 2 only feeds back to Device 1 through the instruction stream when the input event is triggered to achieve I / O port sharing. Therefore, Device 1 must continue to render and run the interface of Quick App A to achieve synchronization between Device 1 and Device 2. Therefore, Device 1 cannot release the current I / O port, which will reduce the user experience.

[0092] In summary, the existing method for switching between quick application devices is not consistent enough during the process of switching display devices for quick applications, and the device currently running the quick application must be synchronized with the switching device, so that the current I / O port cannot be released, resulting in a poor user experience. Therefore, the quick application device switching method provided in this application is used to solve the above technical problems.

[0093] To facilitate understanding of the embodiments of the present invention, the following exemplary scenarios are listed for application of the method for switching between fast application devices in the present application. The following scenarios may be included:

[0094] Scenario 1: User office scenario.

[0095] With the continuous development of science and technology, smart terminals are becoming more and more popular. Smart terminals (such as smart phones) have become an indispensable electronic product in people's lives. In order to meet the needs of use, users will install different types of application software on smart terminals, such as video conferencing application software, file editing application software, information application software, etc., but as the number of installed application software increases, a large amount of storage space of smart terminals will be occupied. Therefore, a kind of quick application (such as applets, etc.) that can meet the user's use needs without installing application software has been derived. There are a large number of office-type quick applications in these quick applications, and users can use these office-type quick applications to improve office efficiency. For example, in an office scenario, if a user only views a document sent by a colleague, he can use the file editing quick application on the mobile phone to browse it, but at this time, the colleague proposes that the document content needs to be modified, and then using the mobile phone to edit the document may cause errors in the document format and reduce the user experience. If the mobile phone is currently switching from the document editing quick application to the computer, the user can edit the document on the computer without exiting the quick application. By using the embodiment of the present invention, it can be achieved that the quick application running on one device can be switched to another device more quickly and the quick application can continue to be used on the device.

[0096] It can be understood that the above application scenarios are only several exemplary implementations in the embodiments of the present invention, and the application scenarios in the embodiments of the present invention include but are not limited to the above application scenarios.

[0097] Based on the above-mentioned technical problems and the corresponding application scenarios in this application, and also to facilitate understanding of the embodiments of the present invention, the system architecture based on which the embodiments of the present invention are based is described below. Figure 1C , Figure 1C 1 is a schematic diagram of a system architecture of a quick application switching display device provided by an embodiment of the present invention, and the system architecture is used to solve the problem of poor user experience when the quick application switches between two devices. The system architecture may include device 10 and device 20, and these two devices may be common electronic devices. Common electronic devices include smart phones, personal computers, tablets, smart screens, smart watches and other devices. Among them,

[0098] The device 10 includes a native layer 101, a communication bridge layer 102, and a JS engine layer 103. Among them, the native layer 101 provides the device 10 with rendering of the quick application interface (for example, rendering the home page interface of the quick application, etc.) and calling of the system interface of the device 10 (for example, calling the rendering application program interface Render API, etc.). The native layer 101 also provides the communication bridge layer 102 with a calling native layer interface 105. If the native layer 101 receives a request from the communication bridge layer 102 by calling the native layer interface 105, it can provide rendering capabilities, system capabilities, event processing capabilities, and cloud service capabilities according to the request. At the same time, before the quick application switches the display device, after the device 10 receives the target operation for the currently running quick application interface, the native layer 101 sends the target event to the JS engine layer 103 through the calling JS interface 104 provided by the communication bridge layer 102 according to the target operation, when the corresponding target event is generated, and then the native layer 101 executes the quick application related interface and triggers the related event callback. For example, when the quick app running on device 10 is successfully switched to device 20 , the native layer 101 notifies the JS engine layer 103 through the communication bridge layer 102 to call an instruction to hide the current quick app display interface, thereby hiding the quick app screen on device 10 .

[0099] The communication bridge layer 102 includes a bridge client 1021 and a bridge server 1022, and the communication bridge layer 102 is used to connect the native layer 101 and the JS engine layer 103. The bridge client 1021 can encapsulate the capabilities of the native layer 101 into a unified application programming interface (calling the native layer interface) for the JS engine layer 103 to call; the bridge server 1022 can encapsulate the capabilities of the JS engine layer 103 into a unified application programming interface (calling the JS interface) for the native layer 101 to call. In an embodiment of the present invention, the bridge server 1022 communicates with the bridge client that establishes the connection through JNI or the network, and the communication content is an instruction stream. It should be noted that the bridge server can establish connections with different bridge clients. For example, when the quick application running on device 10 switches to device 20, the bridge server 1022 disconnects the bridge client 1021 and connects to the bridge client 2021 of the communication bridge layer 202 in device 20.

[0100] The JS engine layer 103 controls the overall operation process of the quick application, and can generate a VDOM for rendering the page in response to a target event generated by a user's target operation and send a rendering request to the native layer 101. For example, when the quick application is running on the device 10, the JS engine layer 103 responds to the target event of displaying the main page and generates a VDOM for rendering the main page, and then sends the VDOM and rendering request for rendering the main page to the native layer 101 through the communication bridge layer 102, so that the main page is displayed on the device 10. For another example, when the quick application running on the device 10 is successfully switched to the device 20, the JS engine layer 103 can be used to execute the quick application page hiding related logic and save the current running status of the quick application.

[0101] Device 20 includes a native layer 201 and a communication bridge layer 202. The native layer 201 provides the rendering of the quick application interface for the device 20 (for example, rendering the home page interface of the quick application, etc.) and calling of the system interface of the device 20 (for example, calling the rendering application program interface Render API, etc.). The native layer 201 also provides the communication bridge layer 202 with a calling native layer interface 204. If the native layer 201 receives a request from the communication bridge layer 202 by calling the native layer interface 204, it can provide rendering capabilities, system capabilities, event processing capabilities, and cloud service capabilities according to the request. At the same time, after the quick application is switched from device 10 to device 20, after the device 20 receives the target operation for the quick application interface, the native layer 201 generates the corresponding target event through the calling JS interface 203 provided by the communication bridge layer 202 according to the target operation, and then the native layer 201 executes the quick application related interface and triggers the related event callback. For example, when a quick application running on device 10 is successfully switched to device 20, if native layer 201 receives the rendering page VDOM information sent by JS engine layer 103 of device 10, the page is rendered according to the VDOM information, thereby restoring the page display of the quick application and the running status of the quick application on device 20.

[0102] The communication bridge layer 202 includes a bridge client 2021. The bridge client 2021 can encapsulate the capabilities of the native layer 201 into a unified application programming interface (calling the native layer interface) for the JS engine layer to call, and can be connected to the bridge server. For example, when the quick application running on the device 10 is successfully switched to the device 20, the bridge server 1022 disconnects the bridge client 1021 and establishes a connection with the bridge client 2021 of the communication bridge layer 202 in the device 20, so that the JS engine layer 103 of the device 10 can interact with the native layer 201 of the device 20, so that the display interface and running status of the quick application are restored on the device 20.

[0103] For example, device 10 is the currently running device and device 20 is the switched running device. Figure 1D , Figure 1D A schematic diagram of the system architecture of another fast application switching display device provided by an embodiment of the present invention, in which the native layer 101 is the native layer Native1, the bridge client 1021 is the bridge instance 1Bridge Instance1, the bridge server 1022 is the bridge manager Bridge Manager1, and the JS engine layer 103 is the JS engine JS Engine as an example in the current running device, and the native layer 201 is the native layer Native2, and the bridge client 2021 is the bridge instance 2Bridge Instance2 as an example in the switching running device.

[0104] Native1 may include an event handler, a cloud application programming interface (Cloud API), a rendering application programming interface (Render API), and a system application programming interface (System API), etc., providing quick application interface rendering and system interface calling functions for the currently running device.

[0105] Bridge Instance1 may include an instance client module Instance Client and a runtime bridge (Runtime Bridge). Instance Client is responsible for communicating with the connected bridge service module Bridge Service. The Runtime Bridge in Bridge Instance1 is used to connect Native and JS Engine.

[0106] Bridge Manager 1 may include Bridge Service and Runtime Bridge. Bridge Service is responsible for communicating with the connected Instance Client, and Runtime Bridge in Bridge Manager 1 is used to connect JS Engine and Native.

[0107] JS Engine includes JS Framework and QuickApp Code. JSEngine controls the overall operation process of QuickApp, generates VDOM for rendering pages and sends rendering requests to the native layer through the communication bridge layer. JS Framework can be used to generate VDOM for rendering pages and provide Call Native and Call JS interfaces; QuickApp Code runs the program code of QuickApp.

[0108] Native2 may include event handlers, cloud APIs, render APIs, and system APIs, which provide quick application interface rendering and system interface calling functions for switching running devices.

[0109] Bridge Instance2 may include Instance Client and Runtime Bridge. Instance Client is responsible for communicating with the connected Bridge Service, and Runtime Bridge in Bridge Instance2 is used to connect Native and JS Engine.

[0110] In the embodiment of the present invention, the native layer is the level for running native programs or interfaces. Codes are written using native application development tools, such as the Android system. The native layer can directly run programs compiled with Java or Kotlin. The JS engine layer is the JS code execution environment, such as the V8 JS engine, which is mainly developed in C language. The communication bridge layer is the communication interface that bridges the native layer and the JS engine layer. For example, the Android native layer cannot directly run programs developed in C language, and communication can only be achieved after the native layer and the JS engine are bridged. It is understandable that Figure 1A The system architecture of the quick application switching display device in the embodiment of the present invention is only an exemplary implementation in the embodiment of the present invention. The system architecture of the quick application switching display device in the embodiment of the present invention includes but is not limited to the above structure.

[0111] The specific method architecture based on the embodiment of the present invention is described below. Figure 2A , Figure 2A This is a flowchart of a method for switching display devices using a quick application in an embodiment of the present application. Figure 2A Based on the above Figure 1C The quick application switching display device system architecture in the embodiment of the present application describes the method of quick application switching display device in the embodiment of the present application from the interaction side of the first device and the second device. It should be noted that in order to describe the method of quick application switching display device in the embodiment of the present application in more detail, the present application describes the corresponding execution subject as the first device or the second device in each process step, but it does not mean that the embodiment of the present application can only perform the corresponding method process through the described execution subject.

[0112] Step S201: The first device runs a first quick application in the foreground of the first device and displays a first interface.

[0113] The first device runs the first quick application in the foreground of the first device and displays the first interface; the first interface is the interface of the first quick application. Specifically, the first device can be understood as an electronic device that can run quick applications, and can be a smart phone, a personal computer, a tablet, a smart screen, and other devices. The first quick application can be understood as a program that can experience the application content without installing an application on the device. For example, the first quick application can be a WPS WeChat applet, a document editing quick application, a video viewing quick application, etc. The first interface can be understood as the display interface of the first quick application currently running on the first device, for example, Figure 2B As shown, Figure 2B A schematic diagram of a first interface provided for an embodiment of the present invention, as shown in the first device interface 301, when the user receives the "2021 Work Report Statistics" file sent by a friend "Lisa" in the WeChat chat application software, the user clicks on the file in the WeChat chat dialog box, and then as shown in the first interface 302 of the first device, the file will be opened in the WPS applet. At this time, the first application is the WPS applet, and the first interface 302 of the first device is the first interface mentioned above.

[0114] In a possible implementation, the first device includes a first native layer, a first bridge client and a first bridge server; the first quick application is run in the foreground of the first device and the first interface is displayed, including: the first device establishes a first connection between the first bridge client and the first bridge server; the first device receives the first virtual document object model sent by the first bridge server based on the first connection through the first bridge client; the first virtual document model of the first device is used by the first device to render and display the first interface; the first device sends the first virtual document object model to the first native layer through the first bridge client for rendering and displays the first interface on the first device. Specifically, in the quick application framework of the prior art, the communication bridge layer is split into a bridge client and a bridge server, and a bridge server is allowed to connect to different bridge clients. When the quick application is not switched to the second device, the bridge client of the first device establishes a first connection with the bridge server of the first device, and the bridge client of the first device can receive the virtual document object model sent by the bridge server through the first connection. It can be understood that the virtual document object model (Virtual Document Object Model, VDOM) can be used to render the display interface of the quick application. Next, the bridge client sends the virtual document object model to the first native layer of the first device, and the first native layer renders and displays the display interface of the current quick application according to the IO port of the first device to restore the running state of the quick application. It can be understood that the first native layer can provide the first device with rendering of the quick application interface (for example, rendering the home page interface of the quick application, etc.) and calling of the system interface of the first device (for example, calling the rendering application program interface Render API, etc.). It should be noted that after the bridge client establishes a connection with the bridge server, the bridge client and the bridge server communicate through the instruction stream, thereby reducing the requirements for network bandwidth and improving the user experience.

[0115] Step S202: The first device receives a device switching request for the first interface.

[0116] Specifically, the device switching request may be a request received by the first device after the user triggers the device switching operation, for example, Figure 2C As shown, Figure 2C A schematic diagram of a triggering device switching operation provided in an embodiment of the present invention, in which operation 1 in the figure allows the user to touch the virtual preset control operation through the touch sensor. It should be noted that the virtual preset control can be displayed on the display interface of the quick application; it can also be operated by drawing a special pattern on the display interface of the application as shown in operation 2; operation 3 presses the physical preset control operation; operation 4 double-clicks the screen on the display interface of the quick application, etc. A preset operation that triggers a device switching operation or a combination of multiple operations is used to notify the electronic device that there is a quick application switching display device request that needs to be processed. When the user triggers the device switching operation, the electronic device receives the device switching request, then searches for switchable devices in the network and displays them to the user for selection. It should be noted that in the embodiment of the present invention, the connection network can be multiple, such as a local area network, a wide area network, Bluetooth, near field communication, a wired connection, etc.

[0117] In a possible implementation, after the first device receives the device switching request for the first interface, it also includes: the first device disconnects the first connection and establishes a second connection between the first bridge server and the second bridge client of the second device. Specifically, in the quick application framework of the prior art, the communication bridging layer is split into a bridge client and a bridge server, and a bridge server is allowed to connect to different bridge clients. When the first device receives the device switching request, the bridge server of the first device disconnects the first connection with the bridge client of the first device and establishes a second connection with the bridge client of the second device. Therefore, the bridge server of the first device no longer sends the virtual document object model to the bridge client of the first device, but sends the virtual document object model to the bridge client of the second device to establish the connection, so that the second device can use its own IO to render and display the display interface of the quick application according to the virtual document object model sent by the first device, avoiding the problem of large network consumption caused by the second device needing to receive the video stream or picture stream data sent by the first device when the second device uses the mapped IO port of the first device to render and display the quick application interface, thereby reducing the requirements for network bandwidth and improving user experience.

[0118] In a possible implementation, the method further includes: the first device destroys the first bridge client after the first device disconnects the first connection. Specifically, when the quick application switches to the second device, after the bridge server of the first device disconnects the first connection with the bridge client of the first device, the bridge client of the first device no longer functions and can be destroyed to release resources of the first device, thereby improving the user experience.

[0119] Step S203: The first device runs the first quick application in the background and minimizes the first interface.

[0120] Specifically, when the first device receives a device switching request for the first interface, the first device may minimize the first interface. Figure 2D As shown, Figure 2D A schematic diagram of minimizing a first interface is provided for an embodiment of the present invention. In the figure, when the first device receives a device switching request for the first interface, the display interface of the first device can hide the first interface of the quick application. Optionally, after minimizing the first interface, the first device can display a WeChat chat dialog box before entering the first interface (such as the display interface of opening a file through a WPS applet).

[0121] Step S204: the first device sends a first virtual document object model of the first interface to the second device.

[0122] The first virtual document object model is used by the second device to render and restore the first interface. Specifically, when the first device minimizes the first quick app, the first device will not exit the first quick app, but continue to run the first quick app in the background, but at this time the first device no longer renders and displays the display interface of the quick app, so the virtual document object model used to render the display interface of the quick app is no longer sent to the first device, but to the second device.

[0123] Step S205: The second device renders and displays the first interface according to the first virtual document object model.

[0124] After receiving the first virtual document object model sent by the first device, the second device renders and displays the first interface according to the first virtual document object model. The first virtual document object model is used by the second device to render and restore the first interface; the first interface is the display interface of the first quick application running in the foreground of the first device when the first device receives the device switching request. Specifically, when the quick application running on the first device is hot-switched to the second device, the second device can receive the virtual document object model sent by the first device, and use its own IO port to render and display the display interface of the current quick application according to the virtual document object model. For example, Figure 2E As shown, Figure 2E A schematic diagram of a quick application switching process provided for an embodiment of the present invention, in which when the first quick application is switched from a first device (such as a mobile phone) to a second device (such as a laptop), the second device can receive a first virtual document object model sent by the first device. It can be understood that the first virtual document object model is a virtual document object model of the display interface of the quick application when the first device receives a device switching request. Then the second device uses its own IO port to render and restore the display interface and running state of the quick application according to the virtual document object model. Through the method provided by the embodiment of the present invention, it is possible to hot-switch the quick application running on the first device to the second device, avoiding the problem of running data loss during the quick application device switching process and the problem that when the second device uses the mapped IO port of the first device to render and display the quick application interface, the second device needs to receive the video stream or picture stream data sent by the first device, resulting in a large network consumption, thereby reducing the requirements for network bandwidth and improving the user experience.

[0125] In a possible implementation, the second device includes a second bridge client; the second device receives the first virtual document object model sent by the first device, including: the second device establishes a second connection between the first bridge server of the first device and the second bridge client; the second device receives the first virtual document object model sent by the first bridge server based on the second connection through the second bridge client. Specifically, in the quick application framework of the prior art, the communication bridging layer is split into a bridge client and a bridge server, and a bridge server is allowed to connect to different bridge clients. When the first device receives the device switching request, the bridge server of the first device disconnects the first connection with the bridge client of the first device, and establishes a second connection with the bridge client of the second device. Therefore, the bridge server of the first device no longer sends the virtual document object model to the bridge client of the first device, but sends the virtual document object model to the bridge client of the second device with which the connection has been established, so that the second device can render and display the display interface of the quick application according to the virtual document object model sent by the first device and use its own IO, thereby avoiding the problem of large network consumption caused by the second device needing to receive the video stream or picture stream data sent by the first device when the second device uses the mapped IO port of the first device to render and display the quick application interface, thereby reducing the requirements for network bandwidth and improving user experience.

[0126] In one possible implementation, the second device includes a second native layer; the second device renders and displays the first interface according to the first virtual document object model, including: the second device renders the first virtual document object model through the second native layer and displays the first interface. Specifically, the second native layer is included on the second device. When the quick application is hot-switched to the second device, since the bridge client of the second device has established a second connection with the bridge server of the first device, the bridge client of the second device can receive the virtual document object model sent by the bridge server of the first device through the second connection, and then the bridge client sends the virtual document object model to the native layer of the second device, and the second native layer renders and displays the display interface of the quick application according to the IO port of the second device. It can be understood that the second native layer can provide the second device with rendering of the quick application interface (for example, rendering the homepage interface of the quick application, etc.) and calling of the second device system interface (for example, calling the rendering application program interface Render API, etc.). Through the method provided in the embodiment of the present invention, it is possible to hot-switch a quick application running on a first device to a second device, thereby avoiding the problem of running data loss during the quick application device switching process and the problem that when the second device uses the mapped IO port of the first device to render and display the quick application interface, the second device needs to receive the video stream or picture stream data sent by the first device, resulting in large network consumption, thereby reducing the requirements for network bandwidth and improving user experience.

[0127] Step S206: The second device receives the target operation on the first interface and generates a target event.

[0128] Specifically, when the second device receives the target operation acting on the first interface, the second device can generate a corresponding target event according to the target operation. Figure 2F As shown, Figure 2F A schematic diagram of a second device receiving a target operation provided by an embodiment of the present invention, in which when the WPS applet (such as the first quick application) on a mobile phone (such as the first device) switches to a laptop computer (such as the second device), if the user uses the laptop computer's keyboard to fill in the "2021 Work Report Statistics" file, and intends to enter "Han Xingxing" in the fourth line of the table in the file, one line below "Li Si", the laptop computer generates a target event for entering Han Xingxing in the fourth line of the file after receiving the target operation. Through the method provided by an embodiment of the present invention, when a document is opened using a quick application on the user's mobile phone, the quick application can be smoothly switched to a laptop computer that is more suitable for office work, and the user can use the computer's hardware resources (such as a mouse and keyboard, etc.) to edit the file content, thereby improving the user experience.

[0129] Step S207: the second device sends a target event to the first device.

[0130] Specifically, since the first quick application is only hot-switched to the second device, but the device that actually responds to the target event generated by the target operation is the first device, the second device cannot respond to the target event, and the target event is sent to the first device. Figure 2F As shown in the figure, when the WPS applet (such as the first quick application) on the mobile phone (such as the first device) is switched to the laptop (such as the second device), if the user uses the computer keyboard to fill in the "2021 Work Report Statistics" file and enters "Han Xingxing" in the fourth line of the table under "Li Si", the second device generates a target event of entering Han Xingxing in the fourth line of the file after receiving the target operation. Then the second device sends a target event of entering Han Xingxing in the fourth line of the file to the first device, and the first device responds to the target event.

[0131] Step S208: The first device generates a second virtual document object model of the second interface in response to the target event through the first quick application running in the background of the first device.

[0132] The second virtual document object model is used for the second device to render and display the second interface. Specifically, when the first quick application is hot-switched from the first device to the second device, the first device does not exit the first quick application, but keeps running the first quick application in the background. When the first device receives the target event sent by the second device, the first device responds to the target event and then generates a corresponding virtual document object model. For example, when the WPS applet (such as the first quick application) on a mobile phone (such as the first device) is switched to a laptop computer (such as the second device), the laptop computer sends a target event of entering Han Xingxing in the fourth line of the file to the mobile phone. When the mobile phone receives the target event of entering Han Xingxing in the fourth line of the file, it responds to the target event and generates a virtual document object model of the display interface of entering Han Xingxing in the fourth line of the file.

[0133] In a possible implementation, the first device receives the target event sent by the second device, including: the first device receives the target event sent by the second bridge client through the first bridge server based on the second connection. Specifically, after the quick application is successfully switched to the second device, the user can use the hardware resources of the second device to operate the quick application (such as after the quick application is switched from the mobile phone to the laptop, the user can use the keyboard and mouse of the laptop to operate the quick application, etc.), and when the second device receives the user's target operation on the quick application, it generates a corresponding target event, and sends these target events to the bridge server of the first device through the bridge client of the second device, and then the first device responds to these target events through the quick application running in the background, so that after the quick application is hot-switched to the second device, the first device runs the quick application while ensuring that the user can still use the quick application smoothly, thereby improving the user experience. For example, the first bridge server of the mobile phone (such as the first device) receives a target event sent by the second bridge client of the laptop (such as the second device) through the second connection, which inputs Han Xingxing in the fourth line of the file.

[0134] In a possible implementation, the first device also includes a first JS engine layer; the first quick application running in the background of the first device responds to the target event to generate a second virtual document object model of the second interface, including: after receiving the target event sent by the second bridge client based on the second connection through the first bridge server, the target event is forwarded to the first JS engine layer through the first bridge server; the target event is processed by the first JS engine layer and the second virtual document model is generated. Specifically, the JS engine layer of the first device is used to run the program of the quick application. When the bridge server of the first device receives the target event sent by the bridge client of the second device, the bridge server of the first device sends the target event to the JS engine layer of the first device, and the JS engine layer responds to these target events and generates a corresponding virtual document object model. Through the method provided by the embodiment of the present invention, the user can hot-switch the quick application to the second device more smoothly without exiting the quick application running on the first device. Therefore, the user can operate the quick application on the second device, but the first device actually responds to the user's target operation, avoiding the problem that the user needs to wait for a long time during the switching process of the quick application due to reopening the quick application on the second device, thereby improving the user experience.

[0135] Step S209: the first device sends a second virtual document object model of the second interface to the second device.

[0136] Specifically, the second virtual document object model can be understood as a virtual document object model of the display interface of the first quick application after the first device responds to the target event. For example, when the WPS applet (such as the first quick application) on the mobile phone (such as the first device) switches to the laptop computer (such as the second device), the second device sends a target event of inputting Han Xingxing in the fourth line of the file to the first device. When the first device receives the target event of inputting Han Xingxing in the fourth line of the file, it responds to the target event and generates a virtual document object model of the display interface of inputting Han Xingxing in the fourth line of the file. Then the first device (such as a mobile phone) sends the virtual document object model used to render the display interface of inputting Han Xingxing in the fourth line of the file to the second device (such as a laptop computer). At this time, the second interface can be understood as the display interface of inputting Han Xingxing in the fourth line of the file.

[0137] In a possible implementation, the first device sends the second virtual document object model of the second interface to the second device, including: the first device sends the second virtual document object model to the second bridge client through the first bridge server based on the second connection. Specifically, after the first device responds to the target event sent by the second device, a corresponding virtual document object model is generated on the first device, and the bridge server of the first device sends the virtual document object model to the bridge client of the second device through the second connection. Therefore, the second device can use its own IO to render and display the display interface of the quick application according to the received virtual document object model, avoiding the problem that when the second device uses the mapped IO port of the first device to render and display the quick application interface, the second device needs to receive the video stream or picture stream data sent by the first device, causing large network consumption, thereby reducing the requirements for network bandwidth and improving user experience. For example, the first bridge server of the first device (such as a mobile phone) sends the virtual document object model for rendering the display interface of Han Xingxing input in the fourth line of the file to the second bridge client of the second device (such as a laptop) through the second connection.

[0138] Step S210: The second device renders and displays the second interface according to the second virtual document object model.

[0139] The second device receives the second virtual document object model sent by the first bridge server based on the second connection through the second bridge client; the second virtual document object model is used by the second device to render and display the second interface; the second interface is the display interface of the first quick application after responding to the target event; the second virtual document object model is rendered and displayed through the second native layer. Specifically, when the first device receives the target event sent by the second device, the first device will respond to these target events and generate a corresponding virtual document object model. After the bridge client of the second device receives the virtual document object model sent by the bridge server of the first device, the bridge client of the second device will send these virtual document object models to the native layer of the second device, and the native layer will render and display the display interface of the quick application according to the IO port of the second device. For example, the second bridge client of a laptop computer (such as the second device) receives the virtual document object model sent by a mobile phone (such as the first device) through the second connection for rendering the display interface of inputting Han Xingxing in the fourth line of the file. Figure 2G As shown, Figure 2G A schematic diagram of a second device displaying a second interface is provided in an embodiment of the present invention. In the figure, when a laptop computer (such as a second device) receives a virtual document object model of the second interface sent by a mobile phone (such as a first device), the second device uses its own IO port to render and display the second interface.

[0140] Through the embodiments of the present invention, it is possible to implement a function of hot-switching a quick application running on a first device to a second device, and the program of the quick application will not exit during the switching process, thereby avoiding the problem of running data loss during the switching process of the quick application device. Furthermore, after the quick application is successfully switched to the second device, the first device still runs the program of the quick application, but the virtual document object model used to render the display interface of the quick application is no longer sent to itself but to the second device. Therefore, the second device can render and display the display interface of the quick application based on the virtual document object model and using its own IO port, and the first device can release the current IO port, avoiding the second device using the mapped IO port of the first device for rendering, and avoiding the second device needing to receive the video stream or picture stream data sent by the first device to display the quick application interface, which causes the problem of large network consumption, thereby reducing the requirements for network bandwidth and improving the user experience.

[0141] For example, the first device is device 1 and the second device is device 2. Figure 3A , Figure 3A The following is an exemplary flow chart of a method for switching display devices using a quick application provided by an embodiment of the present invention. The device switching process may be:

[0142] 1. The user initiates device switching, after which device 1 searches for switchable devices in the network and displays the switchable devices to the user.

[0143] 2. The user chooses to switch the quick app to device 2 and first calls JSEngine to save the current running status.

[0144] 3. The Bridge Manager of device 1 switches the bridge instance and connects to the Bridge Intance of device 2 through the network.

[0145] 4. After the connection is completed, the JS Engine of device 1 sends Vdom to device 2 through Bridge Manager, and device 2 renders the interface.

[0146] 5. If device 2 triggers an event, it calls the Call JS method of device 1 through Bridge to execute the js event code.

[0147] 6. After device 1 completes the execution, device 1 sends the instruction to device 2 by calling the Call Native method, and then device 2 executes Native and renders the display interface.

[0148] See also Figure 3B , Figure 3B This is another exemplary flow chart of a method for switching display devices using a quick application provided by an embodiment of the present invention. The device switching process may be:

[0149] 1. The user initiates device switching, searches for switchable devices in the network, and displays them to the user after discovery. The connection network can be of various types, such as LAN, WAN, Bluetooth, near field communication, wired connection, etc.

[0150] 2. The user starts switching of device 2, and the Native layer of device 1 sends a switching notification to the BridgeInstance of device 1.

[0151] 3. The Bridge Instance of device 1 sends a switching instruction to the BridgeManager module of device 1 through JNI or the network.

[0152] 4. The Bridge Manager of device 1 calls the JS Engine interface of device 1 to notify the switching device, suspend the current page information processing, and hide the page.

[0153] 5. After the Bridge Manager of device 1 successfully calls the JS Engine of device 1, the callback is switched successfully and the Bridge Instance of device 1 is notified.

[0154] 6. The Bridge Instance of device 1 calls back the Native layer of device 1 to notify that the switch is successful, starts the current instance to disconnect from the server, and destroys it.

[0155] 7. After receiving the switching success message, the Nativive layer of device 1 destroys the current page.

[0156] 8. After the Bridge Manage of device 1 is disconnected, device 2 is notified to connect and the BridgeInstance of device 2 is initialized.

[0157] 9. After the Bridge Instance of device 2 is instantiated, connect to the Bridge Manager of device 1.

[0158] 10. After the Bridge Manager of device 1 successfully connects to the Bridge Instance of device 2, it notifies the JS Engine of device 1 to resume the application.

[0159] 11. The JS Engine of device 1 sends Vdom to device 2 through Bridge Manager.

[0160] 12. The Bridge Instance of device 2 sends the Vdom data to the Native layer of device 2.

[0161] 13. Native of device 2 renders the quick app according to Vdom. After rendering is completed, it notifies BridgeInstance of device 2.

[0162] 14. The Bridge Instance of device 2 notifies the Bridge Manager of device 1 to complete the rendering.

[0163] 15. The Bridge Manager of device 1 notifies the JS Engine of device 1 to call the Resume interface of the page to resume the running status of the quick application.

[0164] Through the embodiment of the present invention, it is possible to implement a hot switch of the quick application running on device 1 to device 2, and the program of the quick application will not exit during the switching process, which can avoid the problem of running data loss during the quick application device switching process. Furthermore, when the quick application is successfully switched to device 2, device 1 still runs the program of the quick application, but the virtual document object model used to render the display interface of the quick application is no longer sent to itself but to device 2. Therefore, device 2 can render and display the display interface of the quick application according to the virtual document object model and use its own IO port, thereby reducing the requirements for network bandwidth and improving user experience.

[0165] See also Figure 4A , Figure 4A The present application provides a device schematic diagram of a quick application switching display device provided by an embodiment of the present invention, which is applied to a first device. The quick application switching display device 40 may include: a first processing unit 401, a first receiving unit 402, a second processing unit 403, a second receiving unit 404, a third processing unit 405, a fourth processing module 406, and a fifth processing module 407, wherein each module is described in detail as follows.

[0166] The first processing unit 401 is configured to run a first quick application in the foreground of the first device and display a first interface; the first interface is an interface of the first quick application;

[0167] A first receiving unit 402 is configured to receive a device switching request for the first interface;

[0168] The second processing unit 403 is configured to run the first quick application in the background and minimize the first interface, and send a first virtual document object model of the first interface to a second device; the first virtual document object model is used by the second device to render and restore the first interface;

[0169] A second receiving unit 404 is configured to receive a target event sent by the second device, where the target event is an event generated by the second device receiving a target operation on the first interface;

[0170] The third processing unit 405 is used to generate a second virtual document object model of the second interface in response to the target event through the first quick application running in the background of the first device, and send the second virtual document object model of the second interface to the second device; the second virtual document object model is used by the second device to render and display the second interface.

[0171] In a possible implementation, the first device includes a first native layer, a first bridge client and a first bridge server; including: the first processing unit 401, which is specifically used to establish a first connection between the first bridge client and the first bridge server; receiving a first virtual document object model sent by the first bridge server based on the first connection through the first bridge client; the first virtual document model is used for the first device to render and display the first interface; and sending the first virtual document object model to the first native layer through the first bridge client for rendering and displaying the first interface on the first device.

[0172] In a possible implementation, the device further includes: a fourth processing module 406, configured to disconnect the first connection and establish a second connection between the first bridge server and a second bridge client of the second device.

[0173] In a possible implementation manner, the device further includes: a fifth processing module 407, configured to destroy the first bridge client after the first device disconnects the first connection.

[0174] In a possible implementation, the fourth processing module 406 is specifically configured to enable the first device to receive the target event sent by the second bridge client through the first bridge server.

[0175] In a possible implementation, the first device also includes a first JS engine layer; including: the second receiving unit 403, which is specifically used to receive the target event sent by the second bridge client based on the second connection through the first bridge server, and then forward the target event to the first JS engine layer through the first bridge server; process the target event through the first JS engine layer and generate the second virtual document model.

[0176] In a possible implementation, the method includes: the third processing unit 405 is specifically configured to send the second virtual document object model to the second bridge client through the first bridge server based on the second connection.

[0177] It should be noted that the functions of the various functional units in the fast application switching display device 40 described in the embodiment of the present invention can be referred to in the above Figure 2A The description of the steps performed by the first device in the method embodiment is not repeated here.

[0178] See also Figure 4B , Figure 4B The present application provided by an embodiment of the present invention provides a device schematic diagram of another quick application switching display device, which is applied to a second device. The quick application switching display device 50 may include: a first receiving unit 501, a first display unit 502, a first processing unit 503, and a second receiving unit 504, wherein each module is described in detail as follows.

[0179] The first receiving unit 501 is used to receive a first virtual document object model sent by a first device; the first virtual document object model is used by the second device to render and restore a first interface; the first interface is a display interface of a first quick application running in the foreground of the first device when the first device receives a device switching request;

[0180] A first display unit 502, configured to render and display the first interface according to the first virtual document object model;

[0181] The first processing unit 503 is configured to receive a target operation on the first interface and generate a target event, and send the target event to the first device.

[0182] In a possible implementation, the second device includes a second bridge client; including: a first receiving unit 501, specifically used to establish a second connection between the first bridge server of the first device and the second bridge client; receiving the first virtual document object model sent by the first bridge server based on the second connection through the second bridge client.

[0183] In a possible implementation, the second device includes a second native layer; including: a first display unit 502, specifically configured to render the first virtual document object model through the second native layer and display the first interface.

[0184] In one possible implementation, the device also includes: a second receiving unit 504, used to receive a second virtual document object model sent by the first bridge server based on the second connection through the second bridge client; the second virtual document object model is used by the second device to render and display a second interface; the second interface is a display interface after the first quick application responds to the target event; a second processing unit, used to render the second virtual document object model through the second native layer and display the second interface.

[0185] It should be noted that the functions of the various functional units in the fast application switching display device 50 described in the embodiment of the present invention can be referred to in the above Figure 2A The description of the steps performed by the second device in the method embodiment is not repeated here.

[0186] An embodiment of the present invention provides an electronic device, characterized in that it includes a processor, a memory, and a communication interface, wherein the memory is used to store information sending program code, and the processor is used to call the quick application switching display device method program code to execute any one of the methods described above with the execution subject being the first device.

[0187] An embodiment of the present invention provides an electronic device, characterized in that it includes a processor, a memory, and a communication interface, wherein the memory is used to store information sending program code, and the processor is used to call the quick application switching display device method program code to execute any one of the methods described above where the execution subject is the second device.

[0188] The present application provides a chip system, characterized in that the chip system includes at least one processor, a memory and an interface circuit, the memory, the interface circuit and the at least one processor are interconnected through lines, and instructions are stored in the at least one memory; when the instructions are executed by the processor, the method described in any one of the first devices as the execution subject is implemented.

[0189] The present application provides a chip system, characterized in that the chip system includes at least one processor, a memory and an interface circuit, the memory, the interface circuit and the at least one processor are interconnected through lines, and instructions are stored in the at least one memory; when the instructions are executed by the processor, the method described in any one of the second devices as the above-mentioned execution subject is implemented.

[0190] An embodiment of the present invention provides a computer storage medium, characterized in that the computer storage medium stores a computer program, and when the computer program is executed by a processor, the method described above in which the execution subject is any one of the first devices is implemented.

[0191] An embodiment of the present invention provides a computer storage medium, characterized in that the computer storage medium stores a computer program, and when the computer program is executed by a processor, the method described above in which the execution subject is any one of the second devices is implemented.

[0192] The present application provides a computer program, characterized in that the computer program includes instructions, and when the computer program is executed by a computer, the computer executes any one of the methods described above in which the execution subject is the first device.

[0193] The present application provides a computer program, characterized in that the computer program includes instructions, and when the computer program is executed by a computer, the computer executes any one of the methods described above in which the execution subject is the second device.

[0194] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0195] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the order of the actions described, because according to the present application, some steps may be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0196] In the several embodiments provided in the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of the above-mentioned units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.

[0197] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0198] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0199] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server or a network device, etc., specifically a processor in a computer device) to perform all or part of the steps of the above-mentioned methods of each embodiment of the present application. Among them, the aforementioned storage medium may include: U disk, mobile hard disk, magnetic disk, optical disk, read-only memory (Read-Only Memory, abbreviated: ROM) or random access memory (Random Access Memory, abbreviated: RAM) and other media that can store program codes.

[0200] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.< / canvas> < / video> < / videoview> < / imgview> < / textview>

Claims

1. A method for switching display devices by quick application, characterized in that: Applied to a first device, the method includes: Running a first quick application in the foreground of the first device and displaying a first interface; the first interface is an interface of the first quick application; Receiving a device switching request for the first interface; Running the first quick application in the background and minimizing the first interface, and sending a first virtual document object model of the first interface to a second device; the first virtual document object model is used by the second device to render and restore the first interface; receiving a target event sent by the second device, where the target event is an event generated by the second device receiving a target operation acting on the first interface; The first quick application running in the background of the first device responds to the target event to generate a second virtual document object model of the second interface, and sends the second virtual document object model of the second interface to the second device; the second virtual document object model is used by the second device to render and display the second interface.

2. The method according to claim 1, characterized in that The first device includes a first native layer, a first bridge client, and a first bridge server; and running the first quick application in the foreground of the first device and displaying the first interface includes: Establishing a first connection between the first bridge client and the first bridge server; receiving, through the first bridge client based on the first connection, a first virtual document object model sent by the first bridge server; the first virtual document object model is used by the first device to render and display the first interface; The first virtual document object model is sent to the first native layer through the first bridge client for rendering and the first interface is displayed on the first device.

3. The method according to claim 2, characterized in that After receiving the device switching request for the first interface, the method further includes: The first connection is disconnected, and a second connection is established between the first bridge server and a second bridge client of the second device.

4. The method according to claim 3, characterized in that The method further comprises: After the first device disconnects the first connection, the first bridge client is destroyed.

5. The method according to claim 3, characterized in that The receiving a target event sent by the second device includes: The target event sent by the second bridge client is received through the first bridge server based on the second connection.

6. The method according to any one of claims 3 to 5, characterized in that: The first device further includes a first JS engine layer; the generating a second virtual document object model of a second interface in response to the target event by the first quick application running in the background of the first device includes: After receiving the target event sent by the second bridge client based on the second connection through the first bridge server, forwarding the target event to the first JS engine layer through the first bridge server; The target event is processed by the first JS engine layer and the second virtual document object model is generated.

7. The method according to any one of claims 3 to 5, characterized in that: The sending the second virtual document object model of the second interface to the second device includes: The second virtual document object model is sent to the second bridge client through the first bridge server based on the second connection.

8. A method for switching display devices by quick application, characterized in that: Applied to the second device, the method includes: receiving a first virtual document object model sent by a first device; the first virtual document object model is used by the second device to render and restore a first interface; the first interface is a display interface of a first quick application running in the foreground of the first device when the first device receives a device switching request; Rendering and displaying the first interface according to the first virtual document object model; receiving a target operation on the first interface and generating a target event, and sending the target event to the first device; receiving a second virtual document object model of a second interface sent by the first device; the second virtual document object model is generated by the first device in response to the target event through a first quick application running in the background of the first device; The second interface is rendered and displayed according to the second virtual document object model.

9. The method according to claim 8, characterized in that The second device includes a second bridge client; the receiving of the first virtual document object model sent by the first device includes: Establishing a second connection between the first bridge server of the first device and the second bridge client; The first virtual document object model sent by the first bridge server is received through the second bridge client based on the second connection.

10. The method according to claim 9, characterized in that The second device includes a second native layer; and the rendering and displaying the first interface according to the first virtual document object model includes: The first virtual document object model is rendered through the second native layer and the first interface is displayed.

11. The method according to claim 10, characterized in that The method further comprises: receiving, through the second bridge client based on the second connection, a second virtual document object model sent by the first bridge server; the second virtual document object model is used by the second device to render and display a second interface; the second interface is a display interface of the first quick application after responding to the target event; The second virtual document object model is rendered through the second native layer and the second interface is displayed.

12. A device for fast application switching display device, characterized in that: Applied to a first device, the device comprising: A first processing unit, configured to run a first quick application in the foreground of the first device and display a first interface; the first interface is an interface of the first quick application; A first receiving unit, configured to receive a device switching request for the first interface; A second processing unit is configured to run the first quick application in the background and minimize the first interface, and send a first virtual document object model of the first interface to a second device; the first virtual document object model is used by the second device to render and restore the first interface; A second receiving unit, configured to receive a target event sent by the second device, where the target event is an event generated by the second device receiving a target operation acting on the first interface; The third processing unit is used to generate a second virtual document object model of the second interface in response to the target event by the first quick application running in the background of the first device, and send the second virtual document object model of the second interface to the second device; the second virtual document object model is used by the second device to render and display the second interface.

13. The device according to claim 12, characterized in that The first device includes a first native layer, a first bridge client and a first bridge server; including: The first processing unit is specifically used to establish a first connection between the first bridge client and the first bridge server; receive a first virtual document object model sent by the first bridge server based on the first connection through the first bridge client; the first virtual document object model is used by the first device to render and display the first interface; and the first virtual document object model is sent to the first native layer through the first bridge client for rendering and displaying the first interface on the first device.

14. The device according to claim 13, characterized in that The device also includes: The fourth processing module is configured to disconnect the first connection and establish a second connection between the first bridge server and a second bridge client of the second device.

15. The device according to claim 14, characterized in that The device also includes: The fifth processing module is configured to destroy the first bridge client after the first device disconnects the first connection.

16. The device according to claim 14, characterized in that include: The fourth processing module is specifically configured to receive, through the first bridge server, the target event sent by the second bridge client based on the second connection.

17. The device according to claim 14, characterized in that The first device also includes a first JS engine layer; including: The second receiving unit is specifically used to receive the target event sent by the second bridge client based on the second connection through the first bridge server, and then forward the target event to the first JS engine layer through the first bridge server; process the target event through the first JS engine layer and generate the second virtual document object model.

18. The device according to claim 14, characterized in that include: The third processing unit is specifically configured to send the second virtual document object model to the second bridge client through the first bridge server based on the second connection.

19. A device for fast application switching display device, characterized in that: Applied to a second device, the device comprising: A first receiving unit, configured to receive a first virtual document object model sent by a first device; the first virtual document object model is used by the second device to render and restore a first interface; the first interface is a display interface of a first quick application running in the foreground of the first device when the first device receives a device switching request; A first display unit, configured to render and display the first interface according to the first virtual document object model; A first processing unit, configured to receive a target operation acting on the first interface and generate a target event, and send the target event to the first device; The first receiving unit is further used to receive a second virtual document object model of a second interface sent by the first device; the second virtual document object model is generated by the first device in response to the target event through a first quick application running in the background of the first device; The first display unit is further configured to render and display the second interface according to the second virtual document object model.

20. The device according to claim 19, characterized in that The second device includes a second bridge client; including: The first receiving unit is specifically configured to establish a second connection between the first bridge server of the first device and the second bridge client; and receive the first virtual document object model sent by the first bridge server based on the second connection through the second bridge client.

21. The device according to claim 20, characterized in that The second device includes a second native layer; including: The first display unit is specifically configured to render the first virtual document object model through the second native layer and display the first interface.

22. The device according to claim 21, characterized in that The device also includes: A second receiving unit is used to receive, through the second bridge client, a second virtual document object model sent by the first bridge server based on the second connection; the second virtual document object model is used by the second device to render and display a second interface; the second interface is a display interface of the first quick application after responding to the target event; The second processing unit is used to render the second virtual document object model through the second native layer and display the second interface.

23. An electronic device, characterized in that: It includes a processor, a memory and a communication interface, wherein the memory is used to store information sending program code, and the processor is used to call the quick application switching display device method program code to execute the method described in any one of claims 1-7.

24. An electronic device, characterized in that: It includes a processor, a memory and a communication interface, wherein the memory is used to store information sending program code, and the processor is used to call the quick application switching display device method program code to execute the method described in any one of claims 8-11.

25. A chip system, characterized in that: The chip system includes at least one processor, a memory and an interface circuit. The memory, the interface circuit and the at least one processor are interconnected by lines. Instructions are stored in the at least one memory. When the instructions are executed by the processor, the method described in any one of claims 1 to 7 is implemented.

26. A chip system, characterized in that: The chip system includes at least one processor, a memory and an interface circuit. The memory, the interface circuit and the at least one processor are interconnected by lines. Instructions are stored in the at least one memory. When the instructions are executed by the processor, the method described in any one of claims 8 to 11 is implemented.

27. A computer storage medium, characterized in that The computer storage medium stores a computer program, which, when executed by a processor, implements the method described in any one of claims 1 to 7.

28. A computer storage medium, characterized in that The computer storage medium stores a computer program, which, when executed by a processor, implements the method described in any one of claims 8 to 11.

29. A computer program product, characterized in that The computer program product comprises instructions, and when the computer program product is executed by a computer, the computer is caused to perform the method according to any one of claims 1 to 7.

30. A computer program product, characterized in that The computer program product comprises instructions, which, when executed by a computer, enable the computer to perform the method according to any one of claims 8 to 11.

Citation Information

Patent Citations

  • Interface display method and device

    CN110688042A

  • Page rendering method and device for fast application, storage medium and electronic equipment

    CN112035768A