Method for realizing cross-device operation of application program and electronic device
By transmitting application information between smart terminal devices, the application can be operated across devices, solving the problem of waste of equipment resources during screen projection, optimizing resource utilization and extending the usage time of equipment.
Patent Information
- Application Number
- CN202310960295.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-31
- Publication Date
- 2025-02-14
AI Technical Summary
In the prior art, smart terminal devices cannot effectively utilize the computing power and system resources of the screen projection device during screen projection, resulting in wasting of equipment resources.
The first device transmits the relevant information of the running application to the second device. After receiving the information, the second device starts the application and displays the target interface in the virtual screen. Until the interface display is completed, the first device exits the application after the interface is displayed. program.
It realizes the cross-device operation of applications, optimizes the utilization of device resources, reduces power consumption, extends the usage time of devices, and allows devices to perform other uses while running other applications.
Smart Images

Figure CN119440649A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminal technology, and in particular to a method and electronic device for implementing cross-device operation of an application. Background Art
[0002] Currently, users have a variety of smart terminal products, such as laptops, mobile phones, tablets, surveillance cameras, smart TVs, smart speakers, smart car terminals, smart conference terminals, etc. Existing smart terminals will establish multi-device collaboration, also known as cross-device collaboration or near-field collaboration. In the collaborative scenario, a very important function is screen projection technology, which projects the screen content on one device to another device, including mirror projection or different display projection.
[0003] However, in the prior art, the computing power and system resources of the projected device are not effectively utilized, and the device at the projecting end also needs to keep the central processing unit and memory occupied by the current projected content. Summary of the invention
[0004] The embodiments of the present application provide a method and an electronic device for implementing cross-device running of an application program, so as to at least solve the problem in the related art of wasting device resources due to the inability to truly implement cross-device running of an application program.
[0005] According to one embodiment of the present application, a method for implementing cross-device running of an application is provided, including: a first device transmits first application information of a running application to a second device, the first application information being used by the second device to start the application; the first device transmits second application information of the running application to the second device, the second application information being used to display a target interface of the application running on the first device after the application is started on the second device; and upon receiving a notification that the second device has successfully opened the target interface, the application running on the first device is exited from a running state.
[0006] In an exemplary embodiment, the first device transmits the first application information of the running application to the second device, and the first application information is used by the second device to start the application, including: the first device transmits the first application information of the running application to the second device, and the first application information is used by the second device to start the application through a virtual screen when confirming that the application exists on the second device and the application can be opened by the second device; wherein the first application information of the application includes the name of the application and the version of the application.
[0007] According to another embodiment of the present application, a method for running applications across devices is provided, including: a second device receives first application information of an application running on the first device and sends it from a first device, and starts the application; the second device receives second application information sent by the first device, and opens a target interface in the application running on the first device in the running application according to the second application information; the second device sends a notification of successful transfer of the application to the first device, and the notification is used by the first device to close the application.
[0008] In an exemplary embodiment, the second device receives the first application information of the application run by the first device and sent by the first device, and starts the application, including: the second device receives the first application information of the application run by the first device and sent by the first device, and the second device starts the application through a virtual screen when confirming that the application exists and the application can be opened by the second device; wherein the first application information of the application includes the name of the application and the version of the application.
[0009] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when run.
[0010] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0011] Through the present application, since the first device transmits the first application information and the second application information of the running application to the second device, the first application information and the second application information are respectively used by the second device to start the application and display the page displayed by the application in the first device. After the application successfully runs from the first device to the second device, the first device can close the application, and the first device can run other applications. Therefore, the problem of waste of device resources caused by the inability to truly realize the cross-device running of the application in the related technology can be solved, and the effect of the application being able to continue to run independently of the original device is achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 It is a hardware structure block diagram of a computer terminal for implementing a method for running an application across devices according to an embodiment of the present application;
[0013] Figure 2 is a flowchart of a method for implementing cross-device operation of an application according to an embodiment of the present application;
[0014] Figure 3 is a flowchart of a method for implementing cross-device operation of an application according to yet another embodiment of the present application;
[0015] Figure 4 It is a structural block diagram of an apparatus for implementing cross-device operation of an application according to an embodiment of the present application;
[0016] Figure 5 is a structural block diagram of an apparatus for implementing cross-device operation of an application program according to yet another embodiment of the present application;
[0017] Figure 6 is a flowchart of a method for implementing cross-device operation of an application according to another embodiment of the present application;
[0018] Figure 7 It is a schematic diagram of a method for implementing cross-device execution of an application according to an embodiment of the present application. DETAILED DESCRIPTION
[0019] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0020] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0021] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a computer terminal as an example, Figure 1 1 is a hardware structure block diagram of a computer terminal for implementing a method for running an application across devices in an embodiment of the present application. Figure 1 As shown, the computer terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the above-mentioned computer terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above-mentioned computer terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0022] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the method for implementing the cross-device operation of the application program in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implementing the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0023] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of a computer terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0024] Figure 2 is a flowchart of a method for implementing cross-device operation of an application according to an embodiment of the present application. Figure 2 As shown, the process includes the following steps:
[0025] Step S202, the first device transmits first application information of the running application to the second device, where the first application information is used by the second device to start the application;
[0026] In step S202 of this embodiment, it includes: the first device transmits the first application information of the running application to the second device, and the first application information is used by the second device to start the application through a virtual screen when it is confirmed that the application exists on the second device and the application can be opened by the second device; wherein the first application information of the application includes the name of the application and the version of the application.
[0027] Sending the first application information to the second device is to prepare for the cross-device operation of the application, that is, the application is transferred from the first device to the second device for operation. After receiving the first application information, the second device needs to open the application according to the first application on the premise of confirming the existence of the application, and in order not to affect the normal operation of the second device, the application is started in the virtual screen.
[0028] The transfer of applications in this application can also be called application relay, which is a technology for running applications across devices under the collaboration of multiple devices. In an embodiment of the present application, the application running on the first device is transferred to another second device to continue running according to the user's intention, so that the user can use the application uninterruptedly on two or even more smart devices. The application transfer or relay technology of this application can optimize the computing power and system resources on the device, significantly reduce power consumption problems, increase the use time of the device, and can be used for other purposes on the device in parallel.
[0029] Before step S202 of this embodiment, the method further includes: the first device and the second device establish a collaborative relationship and establish a mutually addressable near field communication channel.
[0030] The manner in which the first device and the second device establish a communication connection through the near field communication includes one of the following: the first device and the second device use the same account to access the same wireless network hotspot; the first device and the second device both turn on Bluetooth; the first device touches the second device through near field communication NFC.
[0031] Step S204, the first device transmits second application information of the running application to the second device, where the second application information is used to display a target interface in the application running on the first device after the application is started on the second device;
[0032] In step S204 of this embodiment, it includes: the first device transmits the second application information of the interface of the running application that meets the flow conditions to the second device, and the second application information is used for the second device to open the target interface in the application launched in the virtual screen and set the virtual screen as the main screen after confirming that the application supports obtaining the second application information and opening the target interface in the application based on the deep link technology; wherein the second application information includes a scheme or link that meets the deep link technology specifications.
[0033] Since the transmitted second application information includes a scheme or link that complies with the deep link technical specifications and meets the conditions for flow, after the second device receives the second application information, it can open the target interface in the virtual screen based on confirming that the application supports obtaining the second application information, wherein application support for obtaining the second application information is an important condition.
[0034] Step S206: upon receiving a notification that the second device has successfully opened the target interface, the application running on the first device is exited from the running state.
[0035] In an exemplary embodiment, the second application information also includes the resource name and playback progress of the audio and video, the uniform resource locator URL of the browser, a product list, product details, store details or an article title.
[0036] Figure 3 is a flowchart of a method for implementing cross-device operation of an application according to another embodiment of the present application. Figure 3 As shown, the process includes the following steps:
[0037] Step S302, the second device receives first application information of an application program running on the first device sent by the first device, and starts the application program;
[0038] In step S302 of this embodiment, it includes: the second device receives the first application information of the application run by the first device sent by the first device, and the second device starts the application through the virtual screen when confirming that the application exists and the application can be opened by the second device; wherein the first application information of the application includes the name of the application and the version of the application.
[0039] Before step S302 of the embodiment of the present application, the method further includes: the second device establishes a collaborative relationship with the first device and establishes a mutually addressable near field communication channel.
[0040] Step S304, the second device receives the second application information sent by the first device, and opens the target interface of the application running on the first device in the running application according to the second application information;
[0041] In step S304 of this embodiment, it includes: the second device receives the second application information of the target interface of the application run by the first device and sent by the first device; and when the second device confirms that the application supports obtaining the second application information and opens the target interface in the application based on the deep link technology, the second device opens the target interface in the application launched in the virtual screen and sets the virtual screen as the main screen; wherein the second application information includes a scheme or link that complies with the deep link technology specifications.
[0042] Step S306: The second device sends a notification of successful transfer of the application to the first device, where the first device is used to close the application.
[0043] In an exemplary embodiment, the second application information also includes the resource name and playback progress of the audio and video, the URL of the browser, a product list, product details, store details or an article title.
[0044] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0045] In the present embodiment, a device for implementing cross-device operation of an application is also provided, and the device is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0046] Figure 4 is a structural block diagram of an apparatus for implementing cross-device operation of an application according to an embodiment of the present application, such as Figure 4 As shown, the device includes a first transmission module 42, a second transmission module 44, and a setting module 46;
[0047] A first transmission module 42, configured for transmitting first application information of a running application from a first device to a second device, wherein the first application information is used by the second device to start the application;
[0048] A second transmission module 44 is used for the first device to transmit second application information of the running application to the second device, where the second application information is used to display a target interface in the application running on the first device after the application is started on the second device;
[0049] The setting module 46 is used to exit the running state of the application running on the first device when receiving a notification that the second device successfully opens the target interface.
[0050] Figure 5 is a structural block diagram of an apparatus for implementing cross-device operation of an application according to yet another embodiment of the present application, such as Figure 5 As shown, the device includes a starting module 52, an opening module 54, and a sending module 56;
[0051] A starting module 52, configured for receiving, by a second device, first application information of an application program running on the first device and sent by the first device, and starting the application program;
[0052] An opening module 54 is configured for the second device to receive the second application information sent by the first device, and to open a target interface in the application running on the first device in the running application according to the second application information;
[0053] The sending module 56 is used for the second device to send a notification of successful transfer of the application to the first device, and the notification is used for the first device to close the application.
[0054] To facilitate the understanding of the technical solution provided by the present application, a detailed explanation will be given below in combination with embodiments of specific scenarios.
[0055] Figure 6 is a flowchart of a method for implementing cross-device operation of an application according to another embodiment of the present application. Figure 6 As shown, the process includes the following steps:
[0056] Step S602, the master device starts the cross-cooperative device collaborative service;
[0057] Step S604: The main device scans in the background to find a collaborative device, and a collaborative relationship is established between the main device and the collaborative device;
[0058] Specifically, establishing a collaborative relationship means that devices discover and trust each other, and establish mutually addressable near-field communication channels to prepare for application relay. Application relay is a technology for running applications across devices under the collaboration of multiple devices. In an embodiment of the present application, the application running on the main device is transferred to the collaborative device to continue running according to the user's intention, so that the user can use the application uninterruptedly on two or even more smart devices. The application flow or relay technology in the embodiment of the present application can optimize the computing power and system resources on the device, significantly reduce power consumption problems, increase the use time of the device, and can be used for other purposes in parallel on the device.
[0059] Step S606, the master device obtains application information of the currently running application program, and transmits the application information to the collaborative device;
[0060] Specifically, the application information includes the application package name, version, and the scheme or link of the deep link technical specification.
[0061] Step S608, the collaborative device receives the application information that may be transferred and determines whether the local end has the application;
[0062] Specifically, if the local end has the application, proceed to step 610; if the local end does not have the application, proceed to step S612.
[0063] Step S610, the collaborative device starts the application in the virtual screen and prompts on the desktop that the application can be transferred;
[0064] Step S612, the collaborative device notifies the master device that the application does not support streaming;
[0065] Step S614, after receiving the application transfer operation, the master device obtains the content information currently presented by the application from the running end of the master device, and transmits the identified content information to the collaborative device;
[0066] Specifically, the application flow operation includes two modes: push and pull, and the identified content information meets the flow condition.
[0067] The content information of the current interface includes: the name of the audio and video resource, the uniform resource locator of the browser, the current news title of the news client, the current article title of the financial software, etc.
[0068] It should be noted that if the user switches the current application while the main device is in operation, the user exits from the standby application on the virtual screen of the collaborative device and starts the switched application.
[0069] Step S616: The collaborative device uses deep linking and other technologies to run the application on the virtual screen to open the content interface, and switches from the virtual screen to the main screen to notify the main device to exit the application.
[0070] Specifically, deep linking is a technical specification that passes specific parameters to an application (Application, APP) in the form of a uniform resource locator, thereby directly opening a specified internal page and achieving a jump from a link directly to the internal page of the application.
[0071] The user can continue to browse the web, read news, read online novels, shop online, or listen to or watch audio and video programs on the slave device. At the same time, the computing power on the master device can be released because the master device has exited the application.
[0072] For the background service to automatically pull up the specified user operation page UI of a specified application, two conditions must be met:
[0073] The APP supports being launched by the device and mastering the Uniform Resource Locator scheme supported by the application. Taking the Android system as an example, open the user interface that makes up the application, and the parameter identifier passed must also match the corresponding page of the application. This requires the support of the relay application itself;
[0074] The application supports opening a specified page after obtaining parameters. Since the application needs to obtain parameters to open the corresponding user interface, the application itself also needs to support obtaining parameters and set the corresponding wake-up specified page.
[0075] Figure 7 is a schematic diagram of a method for implementing cross-device operation of an application according to an embodiment of the present application, such as Figure 7 As shown, the cross-device collaborative service transmits and identifies the application information of the current application 1 on device A, and transmits it to device B that has established a collaborative relationship to create a virtual screen, and starts the APP on the virtual screen. The user operates the current application on device A and transfers it to device B. The cross-device collaborative identification of the content information presented by the APP is transmitted to device B, and the virtual screen jumps to the current content on device A on the application that has been started; and the application on device B is switched to the main screen and presented to the application, and at the same time, device A is notified to exit the APP, releasing the computing power and network resources of device A.
[0076] Through the embodiments of the present application, it is possible to relay the running of the application of the master device on the slave device, and then actively release the computing power and resources occupied by the application on the master device, so that the application can be truly transferred from the master device to the slave device, and the user can seamlessly switch the currently used device.
[0077] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0078] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0079] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0080] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0081] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0082] The embodiments of the present application can be applied to a variety of multi-device collaboration or interconnection scenarios, including: collaboration and interconnection between mobile phones and laptops / tablet computers; collaboration and interconnection between mobile phones and AR glasses or wearable devices; collaboration and interconnection between mobile terminals and smart TVs / displays; collaboration and interconnection between mobile phones or tablet computers and in-car entertainment systems; collaboration and interconnection between mobile terminals and smart conference systems, etc., so as to meet the needs of users in various scenarios such as smart homes, smart offices, and smart travel.
[0083] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
[0084] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0085] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method for implementing cross-device operation of an application, characterized in that: include: The first device transmits first application information of a running application to the second device, where the first application information is used by the second device to start the application; The first device transmits second application information of the running application to the second device, where the second application information is used to display a target interface in the application running on the first device after the second device starts the application; When receiving a notification that the second device successfully opens the target interface, the application running on the first device is exited from the running state.
2. The method according to claim 1, wherein the first device transmits the first application information of the running application to the second device, wherein the first application information is used by the second device to start the application, comprising: The first device transmits the first application information of the running application to the second device, where the first application information is used by the second device to start the application through a virtual screen when confirming that the application exists on the second device and can be opened by the second device; The first application information of the application includes the name of the application and the version of the application.
3. The method according to claim 2, characterized in that The first device transmits second application information of the running application to the second device, wherein the second application information is used to display the target interface of the application running on the first device after starting the application, including: The first device transmits the second application information of the interface of the running application that meets the flow condition to the second device, and the second application information is used by the second device to open the target interface in the application launched in the virtual screen and set the virtual screen as the main screen when confirming that the application supports obtaining the second application information and opening the target interface in the application based on the deep link technology; The second application information includes a solution or a link that complies with the deep link technical specification.
4. The method according to claim 3, characterized in that The second application information also includes the resource name and playback progress of the audio and video, the browser's uniform resource locator URL, a product list, product details, store details or an article title.
5. The method according to claim 1, characterized in that Before the first device transmits the application information of the running application to the second device, the method further includes: The first device establishes a cooperative relationship with the second device and establishes a mutually addressable near field communication channel.
6. A method for implementing cross-device operation of an application, characterized in that: include: The second device receives first application information of an application program running on the first device and sent by the first device, and starts the application program; The second device receives the second application information sent by the first device, and opens a target interface in the application running on the first device in the running application according to the second application information; The second device sends a notification of successful transfer of the application to the first device, where the notification is used by the first device to close the application.
7. The method according to claim 6, characterized in that The second device receives the first application information of the application program running on the first device and sent by the first device, and starts the application program, including: The second device receives the first application information of the application program run by the first device and sent by the first device, and the second device starts the application program through a virtual screen when confirming that the application program exists and can be opened by the second device; The first application information of the application includes the name of the application and the version of the application.
8. The method according to claim 7, characterized in that The second device receives the second application information sent by the first device, and opens the target interface in the application running on the first device in the running application according to the second application information, including: The second device receives the second application information of the target interface of the application run by the first device and sent by the first device, and when confirming that the application supports obtaining the second application information and opening the target interface in the application based on the deep link technology, the second device opens the target interface in the application launched in the virtual screen and sets the virtual screen as the main screen; The second application information includes a solution or a link that complies with the deep link technical specification.
9. The method according to claim 8, characterized in that The second application information also includes the resource name and playback progress of the audio and video, the URL of the browser, a product list, product details, store details or an article title.
10. The method according to claim 6, characterized in that Before the second device receives the application information of the application program run by the first device and sent by the first device, the method further includes: The second device establishes a cooperative relationship with the first device and establishes a mutually addressable near field communication channel.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 5 are implemented, or the steps of the method described in any one of claims 6 to 10 are implemented.
12. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the processor implements the steps of the method described in any one of claims 1 to 5, or implements the steps of the method described in any one of claims 6 to 10.