WO2022206770A1 - Method for collaborative work of applications between devices, and device - Google Patents

Method for collaborative work of applications between devices, and device Download PDF

Info

Publication number
WO2022206770A1
WO2022206770A1 PCT/CN2022/083743 CN2022083743W WO2022206770A1 WO 2022206770 A1 WO2022206770 A1 WO 2022206770A1 CN 2022083743 W CN2022083743 W CN 2022083743W WO 2022206770 A1 WO2022206770 A1 WO 2022206770A1
Authority
WO
WIPO (PCT)
Prior art keywords
application
information
electronic device
request
pin
Prior art date
Application number
PCT/CN2022/083743
Other languages
French (fr)
Chinese (zh)
Inventor
张飞
徐菁
朱明亮
刘跃华
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2022206770A1 publication Critical patent/WO2022206770A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/10Office automation; Time management
    • G06Q10/103Workflow collaboration or project management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K19/00Record carriers for use with machines and with at least a part designed to carry digital markings
    • G06K19/06Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K19/00Record carriers for use with machines and with at least a part designed to carry digital markings
    • G06K19/06Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
    • G06K19/06009Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking
    • G06K19/06037Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking multi-dimensional coding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/10Office automation; Time management

Definitions

  • the embodiments of the present application relate to the field of electronic devices, and in particular, to a method and device for inter-device application collaboration.
  • the coordinated instructions between two or more devices are forwarded through the cloud server.
  • both device 1 and device 2 are connected to the Internet, and the coordination instruction from device 1 to device 2 is first sent by device 1 to the cloud server, and then the cloud server forwards the coordination instruction to device 2.
  • the coordination instruction from device 2 to device 1 is first sent by device 2 to the cloud server, and then the cloud server forwards the coordination instruction to device 1.
  • device 1 and device 2 also need to log in to the same account to authenticate the two devices, so that the collaborative instruction between device 1 and device 2 can be safely and reliably forwarded by the cloud server.
  • the embodiments of the present application provide a method and device for inter-device application collaboration, which solves the problem that inter-device collaboration instructions need to be forwarded by a cloud server, resulting in high response delay for inter-device collaboration.
  • an embodiment of the present application provides a method for inter-device application collaboration, and the method can be applied to a first electronic device.
  • the method may include: generating coded information; receiving a first request sent from a second electronic device, wherein the first request corresponds to the coded information; establishing a communication connection with the second electronic device according to the first request; binding the first electronic device
  • the first application and the second application of the second electronic device; the first application and the second application transmit coordination information.
  • the cooperation information is instruction information or data or the like transmitted when the first application and the second execution cooperate with each other.
  • the first electronic device A communication connection can be established between the electronic device and the second electronic device by scanning a QR code or touching the device, and the first application and the second application can be bound to each other, so that the cooperation between the first application and the second application can be achieved.
  • Commands can be directly transmitted between the first electronic device and the second electronic device, avoiding the forwarding of collaborative commands by the cloud server, shortening the transmission path of collaborative commands, and reducing the impact of network quality on the transmission of collaborative commands, thereby reducing collaborative
  • the transmission delay of the command improves the transmission stability. It enables users to have a better application collaboration experience in scenarios with high latency requirements, such as multi-person conferences and instant games.
  • the method may further include: displaying a two-dimensional code including encoding information, where the encoding information includes networking information, and the first request corresponds to the networking information.
  • the first electronic device displays a two-dimensional code containing coded information, so that the second electronic device can quickly and conveniently obtain the coded information by scanning the two-dimensional code, thereby facilitating the second electronic device according to
  • the encoded information establishes a communication connection with the first electronic device to realize cooperative work.
  • the encoded information generated by the first electronic device includes the information of the first application and the information of the second application. Therefore, the second electronic device can conveniently obtain the information of the first application and the information of the second application according to the encoded information, so as to subsequently request the first electronic device for the first application according to the information of the first application and the information of the second application.
  • the binding of the application and the second application For example, when requesting the first electronic device to bind the first application and the second application, the second electronic device may carry the information of the first application and the information of the second application in the request.
  • the encoded information further includes group information and a personal identification code (PIN); before establishing a communication connection with the second electronic device according to the first request, the method may further include : Obtain the group information and PIN obtained by the second electronic device according to the coded information, as well as the information of the first application and the information of the second application; determine the group information, PIN, and PIN obtained by the second electronic device obtained according to the coded information.
  • the information of the first application and the information of the second application are consistent with the group information, the PIN, and the information of the first application and the information of the second application included in the encoded information.
  • a security group can be established according to the group information and the PIN information.
  • the first electronic device can determine whether the group information and PIN in the self-encoded information are consistent with the group information and PIN of the second electronic device. Whether the second electronic device is trustworthy. For example, when the group information and the PIN are compared and consistent, it is determined that the second electronic device is credible, and then the first electronic device establishes a communication connection with the second electronic device. Thus, it is ensured that a secure connection can be established between the first electronic device and the second electronic device.
  • the method may further include: generating a PIN; generating group information according to the PIN, the information of the first application and the information of the second application.
  • the PIN can be refreshed according to a fixed time. For example, refresh the PIN every 5 minutes. Therefore, the periodic update of the group information and the PIN is facilitated, and the security of the first electronic device for verifying the second electronic device according to the PIN and the group information is improved.
  • group information is generated according to the PIN, the first application information and the second application information, which can ensure the uniqueness of the group information, and can ensure that the group information is associated with the first application and the second application, Therefore, when the first electronic device authenticates the second electronic device as credible according to the group information, it can be ensured that the credible authentication is for the first application and the second application.
  • the information of the first application includes: the package name of the first application; the information of the second application includes: the package name of the second application, and the page name of the second application , at least one of the minimum version number of the second application and the system flag of the second application.
  • the second electronic device After the second electronic device obtains the information of the second application according to the coding information, it is convenient to determine the page of the second application to be pulled up according to the page name of the second application, and determine the page of the second application according to the minimum version number of the second application. Whether the second application installed on the second electronic device supports binding with the first application of the first electronic device for cooperative work, and whether the system of the second electronic device supports the second application and the first application according to the system flag of the second application The first application of the electronic device is bound to work together.
  • an embodiment of the present application provides an apparatus for inter-device application collaboration, and the apparatus can be applied to an electronic device to implement the method in the first aspect.
  • the functions of the apparatus may be implemented by hardware, or by executing corresponding software by hardware.
  • the hardware or software includes one or more modules corresponding to the above functions, for example, a processing module, a request module, a display module, and the like.
  • the processing module can be used to generate coded information; the request module can be used to receive a first request sent from the second electronic device, where the first request corresponds to the coded information; the processing module can also be used to communicate with the second electronic device according to the first request.
  • the electronic device establishes a communication connection; binds the first application of the first electronic device and the second application of the second electronic device; the first application and the second application transmit coordination information.
  • the display module may be used to display a two-dimensional code containing encoded information, where the encoded information includes networking information; wherein the first request corresponds to the networking information.
  • the encoded information includes information of the first application and information of the second application; the request module can also be used to receive a second request from the second electronic device, the second request
  • the information includes the information of the first application and the information of the second application; the processing module may be specifically configured to bind the first application and the second application according to the second request.
  • the encoded information further includes group information and a personal identification code (PIN); the processing module can also be used to acquire group information obtained by the second electronic device according to the encoded information and PIN, as well as the information of the first application and the information of the second application; determine the acquired group information obtained by the second electronic device according to the encoded information, the PIN, the information of the first application and the information of the second application, and the encoded information
  • the group information, PIN, and information included in the first application are consistent with the information of the second application.
  • the processing module may also be used to generate a PIN; and generate group information according to the PIN, the information of the first application and the information of the second application.
  • the information of the first application includes: the package name of the first application; the information of the second application includes: the package name of the second application, and the page name of the second application , at least one of the minimum version number of the second application and the system flag of the second application.
  • embodiments of the present application provide an electronic device, which may include a memory and one or more processors; the memory and the processor are coupled; the memory is used to store computer program codes, and the computer program codes include computer instructions, when When the computer instructions are executed by the processor, the electronic device performs the following steps: generating encoded information; receiving a first request sent from the second electronic device, where the first request corresponds to the encoded information; establishing communication with the second electronic device according to the first request Connect; bind the first application of the electronic device and the second application of the second electronic device; the first application and the second application transmit coordination information.
  • the electronic device further includes a display screen, the display screen is coupled to the memory and the processor, and when the computer instructions are executed by the processor, the electronic device further performs the following steps: displaying on the display screen A two-dimensional code containing encoded information, where the encoded information includes networking information; wherein, the first request corresponds to the networking information.
  • the encoded information includes information of the first application and information of the second application; binding the first application of the electronic device and the second application of the second electronic device, including: Receive a second request from the second electronic device, where the second request includes information of the first application and information of the second application; and bind the first application and the second application according to the second request.
  • the encoded information further includes group information and a personal identification code (PIN); when the computer instruction is executed by the processor, the following steps are also performed: obtaining the second electronic device according to the The group information and PIN obtained from the encoded information, as well as the information of the first application and the information of the second application; determine the group information and PIN obtained by the second electronic device obtained according to the encoded information, as well as the information of the first application and the information of the second application.
  • the information of the application is consistent with the group information, the PIN, and the information of the first application and the information of the second application included in the encoded information.
  • the following steps are also performed: generating a PIN; generating group information according to the PIN, the information of the first application and the information of the second application .
  • the information of the first application includes: the package name of the first application; the information of the second application includes: the package name of the second application, and the page name of the second application , at least one of the minimum version number of the second application and the system flag of the second application.
  • an embodiment of the present application provides a chip system, and the chip system is applied to the electronic device described in the third aspect and any design manner thereof.
  • the chip system includes one or more interface circuits and one or more of the above-mentioned processors.
  • the interface circuit and the processor are interconnected by wires.
  • the processor is adapted to receive and execute the above-mentioned computer instructions from the memory of the electronic device through the interface circuit.
  • embodiments of the present application provide a computer-readable storage medium, where the computer-readable storage medium is used to store the computer instructions executed by the electronic device described in the third aspect and any possible design manner thereof .
  • an embodiment of the present application provides a computer program product, including the computer instructions executed by the electronic device according to the third aspect and any possible design manner thereof.
  • an embodiment of the present application provides a method for inter-device application collaboration, and the method can be used for a second electronic device.
  • the method may include: acquiring coded information generated by the first electronic device; sending a first request to the first electronic device according to the coded information, where the first request is used for establishing a communication connection between the first electronic device and the second electronic device; When the device is bound to the first application of the first electronic device and the second application of the second electronic device, the second application and the first application transmit the coordination information.
  • the first electronic device A communication connection can be established between the electronic device and the second electronic device by scanning a QR code or touching the device, and the first application and the second application can be bound to each other, so that the cooperation between the first application and the second application can be achieved.
  • Commands can be directly transmitted between the first electronic device and the second electronic device, avoiding the forwarding of collaborative commands by the cloud server, shortening the transmission path of collaborative commands, and reducing the impact of network quality on the transmission of collaborative commands, thereby reducing collaborative
  • the transmission delay of the command improves the transmission stability. It enables users to have a better application collaboration experience in scenarios with high latency requirements, such as multi-person conferences and instant games.
  • acquiring the coded information generated by the first electronic device includes: scanning and recognizing a two-dimensional code containing the coded information displayed by the first electronic device to obtain the coded information, where the coded information includes: Networking information; sending the first request to the first electronic device according to the encoded information includes: sending the first request to the first electronic device according to the networking information.
  • the first electronic device displays a two-dimensional code containing coded information, so that the second electronic device can quickly and conveniently obtain the coded information by scanning the two-dimensional code, thereby facilitating the second electronic device according to
  • the encoded information establishes a communication connection with the first electronic device to realize cooperative work.
  • the encoded information includes: information of the first application and information of the second application; the method further includes: sending a second request to the first electronic device, where the second request includes the first application The information of the first application and the information of the second application, and the second request is for the first electronic device to bind the first application and the second application.
  • the encoded information generated by the first electronic device includes the information of the first application and the information of the second application. Therefore, the second electronic device can conveniently obtain the information of the first application and the information of the second application according to the encoded information, so as to subsequently request the first electronic device for the first application according to the information of the first application and the information of the second application.
  • the binding of the application and the second application For example, when requesting the first electronic device to bind the first application and the second application, the second electronic device may carry the information of the first application and the information of the second application in the request.
  • the encoded information further includes group information and a personal identification code (PIN); before sending the first request to the first electronic device according to the encoded information, the method further includes: Store group information and PIN.
  • PIN personal identification code
  • a security group can be established according to the group information and the PIN information.
  • the first electronic device can determine whether the group information and PIN in the self-encoded information are consistent with the group information and PIN of the second electronic device. Whether the second electronic device is trustworthy. For example, when the group information and the PIN are compared and consistent, it is determined that the second electronic device is credible, and then the first electronic device establishes a communication connection with the second electronic device. Thus, it is ensured that a secure connection can be established between the first electronic device and the second electronic device.
  • the method before sending the second request to the first electronic device, the method further includes: according to the information of the first application, the information of the second application and the networking information, The second application performs application permission verification.
  • the second electronic device can perform application permission verification on the second application according to the information of the first application, the information of the second application, and the networking information, so as to determine the request to be bound by the second electronic device. Whether the application corresponds to the first application, so as to prevent other applications on the second electronic device from requesting to bind with the first application of the first electronic device through the second electronic device.
  • the method further includes: determining, according to the information of the second application, that the second electronic device does not have the second application installed; Go to the download page of the second app.
  • the second electronic device when the second electronic device determines that the second application is not installed according to the second application information, the second electronic device jumps to the download page of the second application, which can make it more convenient for the user to download and install the second application, so as to communicate with the first application. Work together to improve the convenience of user operations.
  • an embodiment of the present application provides an apparatus for inter-device application collaboration, and the apparatus can be applied to an electronic device to implement the method in the seventh aspect.
  • the functions of the device can be implemented by hardware, or by executing corresponding software by hardware.
  • the hardware or software includes one or more modules corresponding to the above functions, for example, a processing module, a request module, and the like.
  • the processing module can be used to obtain the coding information generated by the first electronic device; the request module can be used to make a first request to the first electronic device according to the coding information, and the first request is used for the first electronic device and the second electronic device establishing a communication connection; the processing module is further configured to transmit coordination information between the second application and the first application when the first electronic device binds the first application of the first electronic device and the second application of the second electronic device.
  • the processing module can be specifically configured to scan and identify a two-dimensional code containing encoded information displayed by the first electronic device to obtain the encoded information, where the encoded information includes networking information; requesting The module is specifically configured to send the first request to the first electronic device according to the networking information.
  • the encoded information includes: information of the first application and information of the second application; the request module can also be used to send a second request to the first electronic device, the second The request includes information of the first application and information of the second application, and the second request is for the first electronic device to bind the first application and the second application.
  • the encoded information further includes group information and a personal identification code (PIN); the processing module can also be used to store the group information and PIN.
  • PIN personal identification code
  • the processing module may also be configured to perform application permission verification on the second application according to the information of the first application, the information of the second application and the networking information.
  • the processing module may be further configured to determine that the second application is not installed on the second electronic device according to the information of the second application; and jump to the download page of the second application.
  • embodiments of the present application provide an electronic device, the electronic device may include a memory and one or more processors; the memory and the processor are coupled; the memory is used to store computer program code, and the computer program code includes computer instructions, when When the computer instructions are executed by the processor, the electronic device is caused to perform the following steps: acquiring encoded information generated by the first electronic device; sending a first request to the first electronic device according to the encoded information, where the first request is used for the first electronic device and the electronic device A communication connection is established; in the case that the first electronic device binds the first application of the first electronic device and the second application of the electronic device, the second application and the first application transmit coordination information.
  • acquiring the encoded information generated by the first electronic device includes: scanning and recognizing a two-dimensional code containing the encoded information displayed by the first electronic device to obtain the encoded information, where the encoded information includes Networking information; sending the first request to the first electronic device according to the encoded information includes: sending the first request to the first electronic device according to the networking information.
  • the encoded information includes: the information of the first application and the information of the second application; when the computer instruction is executed by the processor, the electronic device further performs the following steps: to the first application The electronic device sends a second request, where the second request includes information of the first application and information of the second application, and the second request is for the first electronic device to bind the first application and the second application.
  • the encoded information further includes group information and a personal identification code (PIN); when the computer instructions are executed by the processor, the following steps are also performed: storing the group information and the PIN .
  • PIN personal identification code
  • the following steps are also performed: according to the information of the first application, the information of the second application and the networking information, perform the following steps on the second application. Perform application permission verification.
  • the following steps are also performed: determining according to the information of the second application that the electronic device does not have the second application installed; jumping to the second application Download page.
  • an embodiment of the present application provides a chip system, where the chip system is applied to the electronic device described in the ninth aspect and any design manner thereof.
  • the chip system includes one or more interface circuits and one or more of the above-mentioned processors.
  • the interface circuit and the processor are interconnected by wires.
  • the processor is adapted to receive and execute the above-mentioned computer instructions from the memory of the electronic device through the interface circuit.
  • an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium is used to store the computer run by the electronic device described in the ninth aspect and any possible design manner thereof instruction.
  • an embodiment of the present application provides a computer program product, including the computer instructions executed by the electronic device according to the ninth aspect and any possible design manner thereof.
  • FIG. 1 is a schematic diagram of an application scenario of a method for inter-device application collaboration provided by an embodiment of the present application
  • FIG. 2 is a schematic diagram of an application scenario of another method for inter-device application collaboration provided by an embodiment of the present application
  • FIG. 3 is a schematic diagram of an application scenario of another method for inter-device application collaboration provided by an embodiment of the present application
  • FIG. 4 is a schematic diagram of an application scenario of another method for inter-device application collaboration provided by an embodiment of the present application
  • FIG. 5 is a schematic diagram of an application scenario of another method for inter-device application collaboration provided by an embodiment of the present application.
  • FIG. 6 is a schematic diagram of an application scenario of another method for inter-device application collaboration provided by an embodiment of the present application.
  • FIG. 7 is a schematic diagram of an application scenario of another method for inter-device application collaboration provided by an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
  • FIG. 9 is a schematic diagram of a system architecture provided by an embodiment of the present application.
  • FIG. 10 is a schematic diagram of another system architecture provided by an embodiment of the present application.
  • FIG. 11 is a schematic flowchart of a method for generating a two-dimensional code according to an embodiment of the present application.
  • FIG. 12 is a schematic flowchart of a method for scanning a two-dimensional code for networking according to an embodiment of the present application
  • FIG. 13 is an interface diagram when a method for inter-device application collaboration provided by an embodiment of the present application is applied;
  • 15 is a schematic flowchart of another method for inter-device application collaboration provided by an embodiment of the present application.
  • 16 is a schematic flowchart of another method for inter-device application collaboration provided by an embodiment of the present application.
  • 17 is a schematic structural diagram of an apparatus for inter-device application collaboration provided by an embodiment of the present application.
  • FIG. 18 is a schematic structural diagram of another apparatus for inter-device application collaboration provided by an embodiment of the present application.
  • the presenter or the chairman
  • the presenter can work collaboratively between the mobile phone and the large screen (such as a smart screen) through the office application, and the document on the mobile phone, as well as the doodling and page turning operations on the document.
  • Displayed on a large screen eg, a smart screen.
  • the player can use the mobile phone as a gamepad to operate and control the game on the large screen through the cooperative work between the mobile phone and the large screen through the game application.
  • the collaborative work of applications between different devices is realized through cloud servers. That is, the cooperative instructions applied between two or more devices are forwarded through the cloud server.
  • the mobile phone is used as a gamepad to operate and control the game on the large screen through the cooperative work between the mobile phone and the large screen through the game application
  • the player can use the game client on the mobile phone to control the game on the large screen.
  • the mobile phone can send the operation instruction of the game client (that is, the collaborative instruction) to the cloud server, and then the cloud server forwards the operation instruction to the big screen, so that the game
  • the game client can respond according to the operation command received by the large screen, and generate the corresponding game screen.
  • the collaborative work of applications between different devices is realized through cloud servers, which requires application service providers to deploy corresponding servers, and the cost is relatively high.
  • the cloud server forwarding the cooperative instructions applied between two or more devices the transmission path of the cooperative instructions is long, and the transmission quality of the cooperative instructions has a strong dependence on the network quality. Therefore, when the cooperative work between the devices responds The higher the delay, the lower the stability. As a result, the user experience is poor for scenarios with high latency requirements, such as multi-person conferences and instant games.
  • an embodiment of the present application provides a method for inter-device applications to work cooperatively, and the method can be applied to a scenario where applications work cooperatively between different devices.
  • FIG. 1 is a schematic diagram of an application scenario of a method for inter-device application collaboration provided by an embodiment of the present application.
  • users can use office applications (eg, ) cooperates between the mobile phone 101 and the large screen 102 (eg, a smart screen), and displays the documents on the mobile phone 101 and the graffiti on the documents on the large screen 102 .
  • the large screen 201 can display a two-dimensional code.
  • the user can first open the document on the mobile phone 202 and click the share icon 203 .
  • the mobile phone 202 can turn on the camera so that the user can scan the code.
  • the user can scan the two-dimensional code displayed on the large screen 201 through the mobile phone 202 .
  • the mobile phone 202 scans the two-dimensional code, it can establish a connection with the large screen 201 according to the two-dimensional code, and as shown in (d) in FIG.
  • the large screen 301 may display a prompt for prompting the user to use the near field communication (NFC) technology for collaborative work, such as "Please turn on the mobile phone. NFC, touch the remote".
  • NFC near field communication
  • the user can use the operation shown in (b) of FIG. 2 to activate the function of sharing the document on the mobile phone.
  • the mobile phone 302 is able to activate the NFC tap function.
  • the user can touch the mobile phone 302 with the remote control 303 .
  • the mobile phone 302 touches the remote control 303, the mobile phone 302 can establish a connection with the large screen 301 according to the data transmitted by the NFC when touching, and as shown in (c) of FIG. Synchronized to the large screen 301 for display.
  • the user can also share the document displayed on the large screen 102 and the operations such as graffiti on the document to the tablet 103 through the collaborative work between the tablet 103 and the large screen 102 through the office application.
  • the large screen 401 may also display a two-dimensional code (wherein, the document displayed on the large screen 401 may be as shown in FIG. 2 or FIG. 3 ).
  • the document on the mobile phone displayed on the large screen synchronously is as shown in (d) in Figure 2 or (c) in Figure 3. It can also be directly displayed on the large screen 401 and stored in it. documentation, etc.).
  • the user can scan the two-dimensional code displayed on the large screen 401 through the tablet 402 . After the tablet 402 scans the two-dimensional code, it can establish a connection with the large screen 401 according to the two-dimensional code. And as shown in (c) of FIG. 4 , the tablet 402 can display the documents synchronized by the large screen 401 .
  • FIG. 5 is a schematic diagram of an application scenario of another method for inter-device application collaboration provided by an embodiment of the present application.
  • the user can use the mobile phone 501 as a gamepad to operate and control the game on the large screen 502 through the cooperative work of the game application between the mobile phone 501 and the large screen 502 (eg, a smart screen).
  • the large screen 601 may also display a two-dimensional code.
  • the user needs to use the mobile phone 602 as a gamepad to control the game application on the large screen 601 .
  • the user can scan the two-dimensional code displayed on the large screen 601 through the mobile phone 602 .
  • the mobile phone 602 can establish a connection with the large screen 601 according to the two-dimensional code.
  • the mobile phone 602 can pull up the application related to the gamepad, so that the user can use the mobile phone 602 as a gamepad to control the game application on the large screen 601 .
  • the large screen 701 may also display a prompt for prompting the user to use NFC for collaborative work, such as “Please turn on the NFC of the mobile phone, Touch the remote".
  • the user When the user needs to use the mobile phone 702 as a gamepad to control the game application on the large screen 701 .
  • the user can touch the mobile phone 702 with the remote control 703 .
  • the mobile phone 702 touches the remote control 703, the mobile phone 702 can establish a connection with the large screen 701 according to the data transmitted by the NFC when touching, and as shown in (c) of FIG. 7, the mobile phone 702 can start the game Handle related applications, so that the user can use the mobile phone 702 as a game handle to control the game application on the large screen 701 .
  • the method for inter-device application collaboration may be: when the first electronic device (eg, the large screen 102 shown in FIG. 1 , the large screen 201 shown in FIG. 2 , etc.) an application, and a second application corresponding to the first application on the second electronic device (eg, the mobile phone 101 and the tablet 103 shown in FIG.
  • the first electronic device eg, the large screen 102 shown in FIG. 1 , the large screen 201 shown in FIG. 2 , etc.
  • a second application corresponding to the first application on the second electronic device eg, the mobile phone 101 and the tablet 103 shown in FIG.
  • the first electronic device and the second electronic device can be established to communicate connect and bind the first electronic device to the first application of the first electronic device and the second application of the second electronic device, so that the first application of the first electronic device and the second application of the second electronic device can communicate with each other.
  • Transmission of coordination information For example, the first electronic device can generate encoded information, so that the second electronic device can obtain the encoded information and establish a communication connection with the first electronic device according to the encoded information.
  • the first electronic device can generate and display a two-dimensional code (such as the two-dimensional code displayed on the large screen 102 in FIG. 1 , the two-dimensional code displayed on the large screen 201 in FIG. 2 , etc.) or barcode containing the encoded information
  • the second electronic device can establish a communication connection with the first electronic device by scanning the two-dimensional code or barcode, and bind the second application and the first application to each other.
  • the second electronic device can obtain the encoded information from the first electronic device by means of NFC touch (for example, the mobile phone as shown in FIG. 3 or FIG. 7 is connected to the large screen by touch).
  • the connection established between the first electronic device and the second electronic device may be a communication connection established based on the same local area network, or may be a communication connection established based on mobile communication (such as mobile communication-based sidelink communication).
  • a communication connection established by field communication eg, Bluetooth
  • the binding of the first application of the first electronic device and the second application of the second electronic device may be the establishment of a cross-device communication link between the service of the first application and the service of the second application, so that the first application and the second application can interact across devices.
  • the first electronic device and the second electronic device can use the For example, by scanning the two-dimensional code, a communication connection is established between the two, and the first application and the second application are bound to each other, so that the coordinated instructions of the first application and the second application can be executed on the first electronic device and the second electronic device.
  • Direct transmission between devices avoids the forwarding of cooperative instructions by the cloud server, shortens the transmission path of cooperative instructions, and reduces the impact of network quality on the transmission of cooperative instructions, thereby reducing the transmission delay of cooperative instructions and improving transmission stability. It enables users to have a better application collaboration experience in scenarios with high latency requirements, such as multi-person conferences and instant games.
  • the above-mentioned first electronic device and second electronic device may be mobile phones, tablet computers, handheld computers, PCs, cellular phones, personal digital assistants (personal digital assistants, PDAs), wearable devices (such as : smart watch, smart bracelet), smart home equipment (such as: TV), car machine (such as: car computer), smart screen, game console, smart speaker, smart projector, smart TV box, and augmented reality (augmented reality) reality, AR)/virtual reality (virtual reality, VR) devices, etc.
  • PDAs personal digital assistants
  • wearable devices such as : smart watch, smart bracelet
  • smart home equipment such as: TV
  • car machine such as: car computer
  • smart screen such as: game console
  • smart speaker smart projector
  • smart TV box smart TV box
  • augmented reality (augmented reality) reality, AR)/virtual reality (virtual reality, VR) devices etc.
  • the embodiments of the present application do not specifically limit the specific device form of the electronic device.
  • the device forms of the first electronic device and the second electronic device may be the same.
  • both the first electronic device and the second electronic device are cell phones.
  • the device forms of the first electronic device and the second electronic device may also be different.
  • the first electronic device is a smart screen
  • the second electronic device is a mobile phone.
  • the first electronic device and the second electronic device are electronic devices that can run an operating system and install applications.
  • the operating system run by the first electronic device and the second electronic device may be Android system, Hongmeng system, etc.
  • the operating systems of the first electronic device and the second electronic device may be the same.
  • both the first electronic device and the second electronic device run Android system, or both the first electronic device and the second electronic device run the Hongmeng system.
  • the operating systems of the first electronic device and the second electronic device may also be different.
  • the first electronic device runs Hongmeng system
  • the second electronic device runs Android system.
  • FIG. 8 shows a schematic structural diagram of an electronic device provided by an embodiment of the present application. That is, exemplarily, the electronic device shown in FIG. 8 may be a mobile phone.
  • the electronic device may include a processor 810, an external memory interface 820, an internal memory 821, a universal serial bus (USB) interface 830, a charge management module 840, a power management module 841, a battery 842, Antenna 1, Antenna 2, Mobile Communication Module 850, Wireless Communication Module 860, Audio Module 870, Speaker 870A, Receiver 870B, Microphone 870C, Headphone Interface 870D, Sensor Module 880, Key 890, Motor 891, Indicator 892, Camera 893, Display screen 894, and subscriber identification module (subscriber identification module, SIM) card interface 895, etc.
  • a processor 810 an external memory interface 820, an internal memory 821, a universal serial bus (USB) interface 830, a charge management module 840, a power management module 841, a battery 842, Antenna 1, Antenna 2, Mobile Communication Module 850, Wireless Communication Module 860, Audio Module 870, Speaker 870A, Receiver 870B, Microphone
  • the sensor module 880 may include a pressure sensor 880A, a gyroscope sensor 880B, an air pressure sensor 880C, a magnetic sensor 880D, an acceleration sensor 880E, a distance sensor 880F, a proximity light sensor 880G, a fingerprint sensor 880H, a temperature sensor 880J, a touch sensor 880K, and an environmental sensor.
  • an electronic device may include more or fewer components than shown, or some components may be combined, or some components may be split, or a different arrangement of components.
  • the illustrated components may be implemented in hardware, software, or a combination of software and hardware.
  • the processor 810 may include one or more processing units, for example, the processor 810 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU) Wait. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
  • application processor application processor, AP
  • modem processor graphics processor
  • graphics processor graphics processor
  • image signal processor image signal processor
  • ISP image signal processor
  • controller memory
  • video codec digital signal processor
  • DSP digital signal processor
  • NPU neural-network processing unit
  • a controller can be the nerve center and command center of an electronic device.
  • the controller can generate an operation control signal according to the instruction operation code and timing signal, and complete the control of fetching and executing instructions.
  • a memory may also be provided in the processor 810 for storing instructions and data.
  • the memory in processor 810 is cache memory. This memory may hold instructions or data that have just been used or recycled by the processor 810 . If the processor 810 needs to use the instruction or data again, it can be called directly from the memory. Repeated accesses are avoided, and the waiting time of the processor 810 is reduced, thereby increasing the efficiency of the system.
  • processor 810 may include one or more interfaces.
  • the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transceiver (universal asynchronous transmitter) receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and / or universal serial bus (universal serial bus, USB) interface, etc.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • PCM pulse code modulation
  • UART universal asynchronous transceiver
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB universal serial bus
  • the wireless communication function of the electronic device can be implemented by the antenna 1, the antenna 2, the mobile communication module 850, the wireless communication module 860, the modulation and demodulation processor, the baseband processor, and the like.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in an electronic device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
  • the antenna 1 can be multiplexed as a diversity antenna of the wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
  • the mobile communication module 850 can provide a wireless communication solution including 2G/3G/4G/5G etc. applied on the electronic device.
  • the mobile communication module 850 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), and the like.
  • the mobile communication module 850 can receive electromagnetic waves from the antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.
  • the mobile communication module 850 can also amplify the signal modulated by the modulation and demodulation processor, and then convert it into electromagnetic waves and radiate it out through the antenna 1 .
  • at least part of the functional modules of the mobile communication module 850 may be provided in the processor 810 .
  • at least part of the functional modules of the mobile communication module 850 may be provided in the same device as at least part of the modules of the processor 810 .
  • the wireless communication module 860 can provide applications on electronic devices including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite systems (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions.
  • WLAN wireless local area networks
  • BT wireless fidelity
  • GNSS global navigation satellite systems
  • frequency modulation frequency modulation, FM
  • NFC near field communication technology
  • infrared technology infrared, IR
  • the wireless communication module 860 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 860 receives electromagnetic waves via the antenna 2 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 810 .
  • the wireless communication module 860 can also receive the signal to be sent from the processor 810 , perform frequency modulation on the signal, amplify the signal,
  • the antenna 1 of the electronic device is coupled with the mobile communication module 850, and the antenna 2 is coupled with the wireless communication module 860, so that the electronic device can communicate with the network and other devices through wireless communication technology.
  • the wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband Code Division Multiple Access (WCDMA), Time Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc.
  • the GNSS may include global positioning system (global positioning system, GPS), global navigation satellite system (global navigation satellite system, GLONASS), Beidou navigation satellite system (beidou navigation satellite system, BDS), quasi-zenith satellite system (quasi -zenith satellite system, QZSS) and/or satellite based augmentation systems (SBAS).
  • global positioning system global positioning system, GPS
  • global navigation satellite system global navigation satellite system, GLONASS
  • Beidou navigation satellite system beidou navigation satellite system, BDS
  • quasi-zenith satellite system quadsi -zenith satellite system, QZSS
  • SBAS satellite based augmentation systems
  • the electronic device realizes the display function through the GPU, the display screen 894, and the application processor.
  • the GPU is a microprocessor for image processing, and is connected to the display screen 894 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 810 may include one or more GPUs that execute program instructions to generate or alter display information.
  • Display screen 894 is used to display images, videos, and the like.
  • Display screen 894 includes a display panel.
  • the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (active-matrix organic light).
  • LED diode AMOLED
  • flexible light-emitting diode flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (quantum dot light emitting diodes, QLED) and so on.
  • the electronic device may include 1 or N display screens 894, where N is a positive integer greater than 1.
  • the electronic device can realize the shooting function through ISP, camera 893, video codec, GPU, display screen 894, and application processor.
  • the electronic device may include 1 or N cameras 893 , where N is a positive integer greater than 1.
  • the electronic device may scan the two-dimensional code through the photographing function to obtain the two-dimensional code image.
  • Internal memory 821 may be used to store computer executable program code, which includes instructions.
  • the processor 810 executes various functional applications and data processing of the electronic device by executing the instructions stored in the internal memory 821 .
  • the internal memory 821 may include a storage program area and a storage data area.
  • the storage program area can store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), and the like.
  • the storage data area can store data (such as audio data, phone book, etc.) created during the use of the electronic device.
  • the internal memory 821 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (UFS), and the like.
  • FIG. 8 is only an exemplary illustration when the form of the electronic device is a mobile phone.
  • the electronic devices are tablet computers, handheld computers, PCs, PDAs, wearable devices (such as smart watches, smart bracelets), smart home devices (such as TV sets), car devices (such as car computers), smart screens , game consoles, AR/VR devices and other device forms
  • the structure of the electronic device may include fewer structures than those shown in FIG. 8 , or may include more structures than those shown in FIG. 8 , which is not limited here. .
  • the above-mentioned electronic devices in the embodiments of the present application for example, the system architectures of the first electronic device and the second electronic device all adopt a distributed service framework.
  • FIG. 9 is a schematic diagram of a system architecture provided by an embodiment of the present application.
  • the system architecture includes a driver layer, namely the kernel (Kernel), a hardware abstraction layer (HAL), and an application framework layer, namely the Android Open Source Project (AOSP) application framework, distributed service platform and application layer.
  • kernel kernel
  • HAL hardware abstraction layer
  • AOSP Android Open Source Project
  • the distributed service platform may include an application collaborative service module (app router service, ARS), a device management module (device manager, DM), a communication module (network module), a two-dimensional code identification module, and a security management module (HiChain) , and the distributed execution framework (DEF).
  • app router service ARS
  • device management module device manager, DM
  • communication module network module
  • HiChain security management module
  • HiChain security management module
  • DEF distributed execution framework
  • the application collaboration service module can provide portable near-field application collaboration capabilities, and provide scan connection methods (such as touch connection, scan code connection, etc.) to facilitate the access of devices between different users.
  • the application collaboration service module may include business adaptation capabilities, distributed capabilities, and basic capabilities.
  • the service adaptation capabilities may include broadcast receivers, protocol parsing, service routing, and unified pop-up user interface (user interface, UI), and the like.
  • Distributed capabilities can include collaborative management, near field communication (NFC) touch-to-connect, application market association, and availability zone (AZ) interoperability.
  • Basic capabilities include communication registration, application management, personal identification number (PIN) code mechanism, exception handling, device maintenance, access control, operational management, and multiple concurrent callbacks.
  • PIN personal identification number
  • the two-dimensional code identification module can identify the two-dimensional code image obtained by the camera, and extract the content contained in the two-dimensional code image.
  • a distributed execution framework that provides atomic service discovery, registration, query and migration. It can also provide communication and device discovery functions for underlying data between devices.
  • the device management module can maintain local device information, such as device internet protocol (IP) address, device network unique identification (identity document, ID), device account information, etc.
  • IP internet protocol
  • ID device network unique identification
  • the device management module may also maintain device group information for establishing secure and trusted connections.
  • the security management module can manage device groups in distributed scenarios and perform device group authentication to ensure secure and trusted communication and connection between devices and applications and applications in distributed scenarios.
  • the communication module can manage the self-discovery and self-organization of devices with the same account in distributed scenarios, as well as scan and discover devices with different accounts, provide a channel for communication between different devices, and ensure the safe and stable transmission of data.
  • the application deployed at the application layer may be an Android application integrated with the Application Collaborative Service Module Toolkit (ARS kit) and the Distributed Execution Framework Toolkit (DEF kit).
  • ARS kit can provide functions to generate QR codes, parse QR codes and send messages/files.
  • FIG. 10 is a schematic diagram of another system architecture provided by an embodiment of the present application.
  • the system architecture is similar to the system architecture shown in Figure 9, the difference is that the application framework layer of the system architecture is the Hongmeng application framework, and the applications deployed in the application layer are integrated with ARS kit and Hongmeng software development tools Hongmeng application package (software development kit, SDK).
  • the distributed service platform of the system architecture adds a distributed scheduling management service (DMS) compared to the system architecture shown in Figure 9.
  • the distributed scheduling management service can provide cross-device service binding. , and the ability to call AIDL interfaces across devices.
  • system architecture shown in FIG. 9 and the system architecture shown in FIG. 10 may also be combined into one system architecture, which is not limited here.
  • the second electronic device establishes a communication connection with the first electronic device by scanning a two-dimensional code containing coded information displayed by the first electronic device.
  • the user can first start the first application on the first electronic device, and the first electronic device can generate a two-dimensional code associated with the first application, so that the user can scan the two-dimensional code through the second electronic device to connect the second electronic device with the first electronic device.
  • An electronic device is connected, and the first application and the second application are bound.
  • the information contained in the two-dimensional code generated by the first electronic device that is, the coding information contained in the two-dimensional code, or referred to as two-dimensional code information
  • Table 1 the information contained in the two-dimensional code generated by the first electronic device
  • the AS, TP and ACT fields in Table 1 are the feature code information of the two-dimensional code information, which are used to instruct the two-dimensional code identification module to identify the two-dimensional code and send the obtained two-dimensional code information to the ARS, and to indicate
  • the business type of the two-dimensional code information is to swipe to open an application (application, APP) or touch to open an APP.
  • the data types of the AS and TP fields are reference types (String), and the data types of the ACT fields are integer types (int).
  • the PKG, ST, MV, SPKG and OS fields are application information of applications that need to work together.
  • the data type of the PKG, ST and SPKG fields is String
  • the data type of the MV field is long integer type (long)
  • the OS field The data type is int.
  • the application information includes the package name of the APP expected to be pulled, the name of the activity (or page name) expected to be pulled, the minimum version number of the APP expected to be pulled, the package name of the server APP, and the expected Pull up the system logo of the APP, etc.
  • the APP expected to be pulled up refers to the corresponding APP of the application to be cooperating on the electronic device that scans the QR code
  • the activity expected to be pulled up is a related activity of the APP expected to be pulled up.
  • the server-side APP refers to the corresponding APP on the electronic device that generates the QR code for the applications to work together.
  • the server is the first electronic device
  • the server APP is the first application on the first electronic device.
  • the APP to be pulled up is the second application on the second electronic device
  • the activity expected to be pulled up is the activity of the second application that is expected to be pulled up.
  • the PKG field that is, the name of the APP package expected to be pulled up, can be automatically filled in by the caller of the ARS read Binder.
  • the PKG field can be read by the ARS of the first electronic device. Take the first application to automatically fill in.
  • the DID, IP, HID, PIN and GID fields are the networking information required to establish a secure and trusted communication connection between different electronic devices, and their data types are all String.
  • the networking information includes the network unique identifier of the device (that is, the electronic device that generates the QR code), that is, the device network ID, the IP address of the device, the hash value (Hash) of the logged-in account name of the device, the device network ID The connection authorization PIN code, and the temporary group ID of the different account of this device.
  • the first electronic device when the first application on the first electronic device and the second application corresponding to the first application on the second electronic device need to work together, the first electronic device generates a two-dimensional code, and the first electronic device uses such as
  • the architecture shown in FIG. 9 or FIG. 10 is taken as an example to illustrate the specific implementation manner of the electronic device generating the above two-dimensional code.
  • FIG. 11 shows a schematic flowchart of a method for generating a two-dimensional code provided by an embodiment of the present application.
  • the method for generating a two-dimensional code by an electronic device may include the following S1101-S1107.
  • the first application binds the ARS service.
  • the ARS binds the device management module, and after the binding is successful, the device management module calls back the binding success message to the ARS, and accordingly, the ARS calls back the binding success message to the first application.
  • the first application is an application integrated with ARS kit.
  • the first application can call the initialization interface in the ARS kit, and trigger onServiceConnected through the bindService mechanism to bind the ARS service and the device management module.
  • the first application is bound with the ARS and the device management module, which can facilitate subsequent interface invocation and information exchange between the first application, the ARS, and the device management module.
  • the first application sends application information to the ARS.
  • the application information may include the page name of the second application that is expected to be pulled up (that is, the page name that is expected to be pulled up), the package name of the first application (that is, the package name of the server APP), and the package name of the second application (that is, the package name of the server-side APP).
  • the package name of the APP that is expected to be pulled), the minimum version number of the desired second application (that is, the lowest version number of the APP that is expected to be pulled), and the system flag of the second application (that is, the system flag of the APP that is expected to be pulled) For example, android system, Hongmeng system, etc.).
  • the package name of the first application and the package name of the second application may be the same or different.
  • the first application may send application information by invoking the two-dimensional code generation interface genQrCode(bundle, new IAppRouter.GenQrListener()) provided in its integrated ARS kit.
  • the bundle can be filled with specific application information. For example, bundle can be filled with:
  • bundle.putString (ACTIVITY, "cn.wps.moffice.lite.huawei_ars.MainActivy"), that is, the page name of the second application to be pulled up is "cn.wps.moffice.lite.huawei_ars.MainActivy";
  • bundle.putString (PACKAGE_NAME, "cn.wps.moffice.lite.huawei_ars"), that is, the package name of the second application is "cn.wps.moffice.lite.huawei_ars";
  • the above S1101 may not be executed, that is, the first application may not be bound to the ARS service.
  • the first application may directly send application information to the ARS. There are no restrictions here.
  • the ARS invokes the device management module to acquire networking information from the device management module.
  • the device management module returns the networking information to the ARS.
  • the networking information may include the device network ID of the first electronic device, the device IP address, and the hash-encrypted ID of the logged-in account.
  • the ARS may acquire networking information from the device management module by calling the interface getLocalDeviceInfo provided by the device management module.
  • the ARS may also generate a connection trust PIN code.
  • the connection trust PIN code may be refreshed at a fixed time. For example, ARS refreshes the connection credit PIN code every 5 minutes.
  • the ARS sends a request for configuring group information to the device management module.
  • the request can carry the connection credit PIN code (PIN code) generated by ARS, and the application information obtained by ARS in S1102, such as the package name of the first application (or called the server package name (serverPkg)) and the second The package name of the application (or client package name (clientPkg)).
  • the device management module sends a request for creating a device authentication group to the security management module.
  • the request may carry the first application package name, the second application package name and the connection credit PIN carried in the request for configuring group information sent by the ARS.
  • the security management module After the security management module creates a device authentication group according to the received request, it can return a successful creation response to the device management module, and the response can carry the group information of the created device authentication group, such as group ID and group name etc.
  • the device management module stores the group information after receiving the creation success response, and can also return the creation success response to the ARS.
  • the security management module can generate group information, such as the above-mentioned group ID and group name, according to the package names of the applications (eg, the package names of the first application and the second application) and the connection trust PIN code.
  • the ARS may send a request for configuring group information to the device management module through the setServerAuth interface.
  • the device management module can send a request for creating a device authentication group to the security management module through the setAuthInfo interface.
  • the ARS invokes the device management module to acquire group information.
  • the device management module returns group information to the ARS.
  • the ARS can obtain group information by calling the getAuthInfo interface provided by the device management module.
  • S1104 and S1105 may also be executed before S1103, or S1104 may be executed first, and then S1103 and S1105 may be executed (wherein, the sequence between S1103 and S1105 may be omitted. Restriction, that is, S1103 may be executed first and then S1105 may be executed, or S1105 may be executed first and then S1103 may be executed, or S1103 and S1105 may be executed simultaneously), which is not limited in this embodiment of the present application.
  • the ARS generates two-dimensional code information according to the obtained application information, networking information, group information, and the generated connection credit PIN code. Correspondingly, the two-dimensional code information is returned to the first application.
  • the generated two-dimensional code information may include the content shown in Table 1.
  • the ARS may return the two-dimensional code information to the first application through the GenQrListener callback of the genQrCode interface used by the first application to send the application information to the ARS in S1102.
  • the first application displays a two-dimensional code picture.
  • the two-dimensional code picture contains the above two-dimensional code information.
  • connection trust PIN code generated by the ARS when the connection trust PIN code generated by the ARS is refreshed, the ARS may send a connection trust PIN code timeout notification to the first application. After receiving the connection trust PIN code timeout notification, the first application can re-execute the above S1101 to S1107 to regenerate and display the two-dimensional code.
  • the second electronic device establishes a communication connection with the first electronic device by scanning a two-dimensional code containing coded information displayed by the first electronic device.
  • the first application on the first electronic device and the second application corresponding to the first application on the second electronic device need to work together, if the first electronic device generates a QR code, the user can use the second electronic device to generate a QR code.
  • the device scans the two-dimensional code generated by the first electronic device to connect the second electronic device with the first electronic device and bind the first application and the second application.
  • the first electronic device when the first application on the first electronic device and the second application corresponding to the first application on the second electronic device need to work together, the first electronic device generates a two-dimensional code by the method shown in FIG. 11 .
  • the second electronic device establishes a connection with the first electronic device by scanning the two-dimensional code generated by the first electronic device, and the first electronic device and the second electronic device use the architecture shown in FIG. 9 or FIG. 10 as an example.
  • the specific implementation of the device scanning the two-dimensional code to form a network is illustrated by an example.
  • FIG. 12 is a schematic flowchart of a method for forming a network by scanning a two-dimensional code according to an embodiment of the present application. As shown in FIG. 12 , the method for the second electronic device to scan the two-dimensional code for networking may include the following S1201-S1208.
  • the two-dimensional code identification module identifies the two-dimensional code image, and transmits the identified two-dimensional code information to the ARS.
  • the two-dimensional code image can be obtained by scanning the two-dimensional code image displayed by the first electronic device by the second electronic device through a camera.
  • the second electronic device is a mobile phone, and the user can hold the mobile phone, open the camera application of the mobile phone, and select Scan to scan the QR code image displayed by the first electronic device.
  • the ARS parses the two-dimensional code information to obtain the two-dimensional code content.
  • the two-dimensional code image recognized by the two-dimensional code identification module is a two-dimensional code generated by the first electronic device using the method shown in FIG.
  • the content of the two-dimensional code is the same as the content of the two-dimensional code generated in the method shown in FIG. 11 .
  • the QR code content obtained by ARS parsing the QR code information may include the page name of the second application to be pulled up, the package name of the first application, the package name of the second application, and the expected minimum version number of the second application, The system flag of the second application. and the device network ID of the first electronic device, the device IP address, and the hash-encrypted ID of the logged-in account. And the connection credit PIN code, group ID and group name, etc.
  • the second electronic device may pop up a box to prompt the specific error message, and end the process of scanning the QR code for networking. For example, as shown in FIG. 13 , the second electronic device may display a pop-up box prompting "invalid QR code".
  • the above mandatory parameters are the parameters necessary for scanning the QR code to form a network.
  • the feature code information of the two-dimensional code information the page name of the second application to be pulled up, the package name of the first application, the package name of the second application, and the device network ID and device IP address of the first electronic device, And the connection credit PIN code, group ID and group name, etc.
  • the ARS can also check whether the second application has been installed according to the second application information in the two-dimensional code content. For example, the following S1203 is performed.
  • the ARS checks whether the second application has been installed. It should be noted that, when the QR code content obtained by the ARS further includes the expected minimum version number of the second application, the ARS may also check whether the version number of the second application satisfies the minimum version number. Correspondingly, when the second application has been installed and the version number of the installed second application meets the minimum version number, the ARS can launch the second application, and when the second application is launched, the ARS can be invoked to perform initialization. In some possible implementations, when the second application is not installed, the application market can be jumped to to facilitate the user to download and install the second application.
  • the ARS can launch the second application by calling startActivity.
  • the request (Intent) sent when calling startActivity to start the second application may carry parameters required for ARS initialization (eg, ARS_BUNDLE).
  • the second application can call the collaborative module initialization interface initDataModel(Bundle params, Context context) of ARS to initialize. Among them, param is filled in with the received Intent parameter, for example, ARS_BUNDLE.
  • the ARS binds the service of the device management module.
  • the device management module may return a binding successful response to the ARS.
  • the ARS can bind the device management module by calling the bindService interface.
  • the ARS sends a request for configuring group information to the device management module.
  • the device management module invokes the second security management module (ie, the security management module of the second electronic device) to configure group information.
  • the second security management module may return a configuration success response to the device management module, and the device management module may return a configuration success response to the ARS.
  • the ARS may send a request for configuring group information to the device management module through the setAuthInfo interface.
  • the request may carry group information obtained after parsing the two-dimensional code information, such as group name, group ID, connection credit PIN code, package name of the first application and package name of the second application, etc.
  • the device management module can store the group information.
  • the above S1204 may not be executed, that is, the ARS does not need to bind the services of the device management module, and can directly send a request for configuring group information to the device management module, which is not performed here. limit.
  • the electronic device can connect to the communication module of the first electronic device through the second communication module, for example, perform the following S1206.
  • the ARS invokes the device management module, and invokes the second communication module (ie, the communication module of the second electronic device) through the device management module to connect to the communication module (ie, the first communication module) of the first electronic device.
  • the ARS may send a device connection request (eg, connectDevice) (or referred to as a first request) to the device management module by invoking the connect interface of the device management module, and the request may include the device of the first electronic device obtained in S1202 Parameter information required for device connection, such as network ID, device IP address, port ID, and connection trusted PIN code, as well as application information such as the package name of the first application and the package name of the second application.
  • the device management module can call the second communication module to forward the device connection request (or referred to as the first request) to the communication module of the first electronic device, so that the ARS can call the device management module, and the second communication module can be called to connect through the device management module.
  • a communication module of the first electronic device can call the second communication module to forward the device connection request (or referred to as the first request) to the communication module of the first electronic device, so that the ARS can call the device management module, and the second communication module can be called to connect through the device management module.
  • a communication module of the first electronic device can call the second communication module to forward the device connection request (or referred to as the first request) to the communication module of the first electronic device, so that the ARS can call the device management module, and the second communication module can be called to connect through the device management module.
  • a communication module of the first electronic device can call the second communication module to forward the device connection request (or referred to as the first request) to the communication module of the first electronic device, so that the ARS can call the
  • the first communication module invokes the first security management module (ie, the security management module of the first electronic device) to perform security verification.
  • the first security management module can return a response that the verification is passed to the first communication module.
  • the first communication module receives the response that the verification passes, it can establish a connection with the communication module of the second electronic device, and return a successful connection response to the communication module of the second electronic device, and then the communication module of the second electronic device can report to the device.
  • the management module sends a message that the device goes online, and accordingly, the device management module of the second electronic device may return a connection success response to the ARS.
  • the security management module of the first electronic device ie the first security management module
  • the security management module of the second electronic device ie the second security management module
  • the security management module of the first electronic device can obtain the group information (eg, group ID, etc.) configured by the security management module of the second electronic device from the security management module of the second electronic device , so as to facilitate the security management module of the first electronic device, according to the obtained group information, PIN code, application package name (such as the first application package name and the second application package name) configured after scanning the code of the second electronic device, and
  • the first electronic device performs security verification by checking whether the group information, PIN code, and application package name configured by itself are consistent when generating the two-dimensional code. When the above information is consistent, the verification is successful.
  • the ARS may also notify the second application that the connection is successful, so that the second application knows that the connection is successful and then performs subsequent steps of binding with the first application. For example, the following S1208 is performed.
  • the ARS sends a notification that the device is connected successfully to the second application.
  • the second electronic device establishes a communication connection with the first electronic device by scanning a two-dimensional code containing coded information displayed by the first electronic device. After the second electronic device is connected to the network by scanning the QR code on the first electronic device, the second application on the second electronic device can be bound with the first application on the first electronic device to realize the second The second application on the electronic device and the first application on the first electronic device perform cross-device interaction.
  • the scenario shown in Figure 1 Take the scenario shown in Figure 1 as an example. That is, take the first electronic device as a smart screen and the second electronic device as a mobile phone or tablet as an example. After the mobile phone or tablet is connected to the network by scanning the QR code on the smart screen, the second application on the mobile phone or tablet (for example, the mobile version of the office application) can be connected with the first application on the smart screen (for example, the TV version of office application). application) to bind to realize cross-device interaction between the second application on the mobile phone or tablet and the first application on the smart screen.
  • the second application on the mobile phone or tablet for example, the mobile version of the office application
  • the first application on the smart screen for example, the TV version of office application
  • the user when the user needs to display the document on the mobile office application on the mobile phone and the operation on the document on the smart screen for a meeting.
  • Users can first open the TV version of the office application on the smart screen. After the smart screen opens the TV version of the office application, the QR code image used to connect to the conference can be displayed.
  • the user can open the mobile version of the office application on the mobile phone and open the document to be used, and then choose to start the meeting on the interface displayed on the mobile phone, so that the mobile phone can call the camera to scan the QR code.
  • the mobile phone and the smart screen can establish a communication connection, and bind the mobile version of the office application on the mobile phone with the TV version of the office application on the smart screen.
  • the smart screen can display the documents opened by the mobile version of the office application on the mobile phone, as well as the page turning and graffiti operations on the document.
  • the QR code image used to connect to the meeting can also be displayed, so that users can scan the QR code to join the meeting through other electronic devices.
  • the user can scan the QR code image on the smart screen displaying the document through the tablet camera, so as to establish a communication connection between the tablet and the smart screen, and connect the tablet to the smart screen.
  • the mobile version of the office application on the smart screen is bound to the TV version of the office application on the smart screen.
  • the document displayed on the smart screen and the operations on the document can be displayed on the tablet.
  • FIG. 14 shows a schematic flowchart of a method for inter-device application collaboration provided by an embodiment of the present application. As shown in FIG. 14, the following S1401-S1406 may be included.
  • the TV version office application of the smart screen displays the QR code image.
  • the specific implementation of generating and displaying the two-dimensional code image may refer to the method shown in FIG. 11 , which will not be repeated here.
  • the mobile office application of the mobile phone pulls up the camera to scan the two-dimensional code, so that the mobile phone establishes a communication connection with the smart screen by scanning the two-dimensional code.
  • the specific implementation of the mobile phone establishing a communication connection by scanning the two-dimensional code of the smart screen may refer to the method shown in FIG. 12 , which will not be repeated here. It should be noted that since the user has already started the mobile office application of the mobile phone, when the mobile phone is networked with the smart screen using the method shown in Figure 12, it is not necessary to launch the mobile office application.
  • the mobile office application of the mobile phone sends a request (or referred to as the second request) for binding the service of the TV version office application of the smart screen to the DEF of the mobile phone (or called the second DEF, to be distinguished from the DEF of the smart screen). ).
  • the mobile office application may use the cross-device service binding interface connectAbility(Intent intent, IAbilityConnection conn) of the second DEF to send the above request to the second DEF.
  • the request can carry intent.setElement(new ElementName(netId,pkgName,serviceName)), that is, the device network ID of the smart screen, the application package name of the TV version of the office application, the service name to be bound, etc.
  • the ARS of the mobile phone in S1402 can obtain the device network ID of the smart screen, the application package name of the TV version of the office application, the service name to be bound and other parameter information through the QR code analysis, the parameters carried in the above request are Information can be obtained from the mobile phone's ARS by the mobile office application.
  • the second DEF may also perform permission verification on the mobile version office application of the mobile phone, for example, perform the following S1404.
  • the second DEF can be performed according to the device network ID of the smart screen, the application package name of the TV version of the office application, the name of the service to be bound and other parameter information carried in the received request for binding the service of the office application of the TV version of the smart screen. App permission check.
  • the second DEF can obtain the device network ID of the smart screen and the application package name of the TV version office application stored in the device management module when the mobile phone performs networking by scanning the QR code in S1402 from the device management module of the mobile phone.
  • the device network ID of the smart screen obtained from the device management module, the application package name of the TV version of the office application , when it is the same as the device network ID of the smart screen and the application package name of the TV version of the office application carried in the received request for binding the service of the TV version office application of the smart screen.
  • the application that is allowed to bind that is, the application permission verification is passed.
  • S1405 When the verification of the application authority by the second DEF is successful, the following S1405 is performed. Of course, in some possible implementations, S1405 may be directly performed without performing S1404, which is not limited here.
  • the second DEF sends a service request (or a second request) for binding the TV version of the office application of the smart screen to the DEF of the smart screen (or referred to as the first DEF, to be distinguished from the DEF of the mobile phone).
  • the first DEF sends the above request to the DMS of the smart screen, so that the DMS sends the above request to the TV version office application, and the TV version office application completes the binding after receiving the request, and returns a successful binding response to the DMS.
  • the DMS may return a binding success response to the first DEF
  • the first DEF may return a binding success response to the second DEF
  • the second DEF returns a binding success response to the mobile office application of the mobile phone.
  • the first DEF may send a request for binding the service of the TV version of the office application to the DMS by calling the binding interface connectRemoteAbility of the DMS.
  • the TV version of the office application can return a successful binding response through the callback of the connectRemoteAbility interface.
  • the mobile phone and the smart screen can exchange information by calling their respective DEFs, so as to realize the information interaction between the mobile version office application and the TV version office application.
  • the first DEF and the second DEF can perform interaction through AIDL interface invocation through the communication connection established in S1402. It should be noted that the information transmitted by the TV version of the office application needs to be forwarded to the first DEF through the DMS.
  • the mobile version office application and the TV version office application can exchange information through the DMS of the respective devices (that is, when the two electronic devices When both devices have DMS, the application cross-device interaction can be performed directly through the DMS).
  • the mobile version office application of the mobile phone sends a document to the TV version office application of the smart screen, so that the smart screen displays the document opened by the mobile version office application of the mobile phone.
  • the mobile version of the office application when the mobile version of the office application performs operations such as page turning and graffiti on the document, the mobile version of the office application will also synchronously send corresponding instructions or status information to the TV version of the office application on the smart screen.
  • FIG. 15 shows a schematic flowchart of another method for inter-device application collaboration provided by an embodiment of the present application. As shown in FIG. 15, the following S1501-S1506 may be included.
  • the TV version of the smart screen office application displays the QR code image.
  • the specific implementation of generating and displaying the two-dimensional code image may refer to the method shown in FIG. 11 , which will not be repeated here. It should be noted that when the smart screen displays the document opened by the mobile office application of the mobile phone by the method shown in Figure 14, the smart screen can also generate and display the QR code image. For example, the QR code image can be displayed in the upper right corner of the smart screen.
  • the two-dimensional code recognition module of the tablet recognizes the two-dimensional code image to obtain the content of the two-dimensional code, so that the tablet establishes a communication connection with the smart screen by scanning the two-dimensional code, and pulls up the mobile version office application of the tablet.
  • the tablet for the specific implementation of the tablet establishing a communication connection by scanning the two-dimensional code of the smart screen, reference may be made to the method shown in FIG. 12 , which will not be repeated here.
  • the mobile version office application of the tablet sends a service request for binding the TV version office application of the smart screen to the DEF of the tablet (or called the second DEF, to be distinguished from the DEF of the smart screen).
  • the second DEF sends a request for binding the service of the TV version of the office application of the smart screen to the DEF of the smart screen (or referred to as the first DEF, to be distinguished from the DEF of the tablet).
  • the first DEF sends the above request to the DMS of the smart screen, so that the DMS sends the above request to the TV version office application, and the TV version office application completes the binding after receiving the request, and returns a successful binding response to the DMS.
  • the DMS may return a binding success response to the first DEF
  • the first DEF may return a binding success response to the second DEF
  • the second DEF returns a binding success response to the tablet mobile office application.
  • the TV version office application of the smart screen sends document information to the mobile version office application of the tablet, so that the tablet displays the document displayed on the smart screen.
  • the document information sent by the TV version office application of the smart screen to the mobile version office application of the tablet may be the document sent by the mobile version office application of the mobile phone received by the TV version office application of the smart screen, as well as page turning and graffiti of the document.
  • Information such as the instruction or status of the operation.
  • the scenario shown in FIG. 5 takes the scenario shown in FIG. 5 as an example. That is, take the first electronic device as a smart screen and the second electronic device as a mobile phone as an example. After the mobile phone is connected to the network by scanning the QR code on the smart screen, the second application on the mobile phone (such as a mobile version game application) can be bound with the first application (such as a TV version game application) on the smart screen to realize cross-device interaction between the second application on the mobile phone and the first application on the smart screen.
  • the second application on the mobile phone such as a mobile version game application
  • the first application such as a TV version game application
  • the user when the user needs to use the mobile phone as a game handle to operate and control the TV version of the game application on the smart screen.
  • the user can first open the TV version of the game application on the smart screen.
  • the QR code image used for device connection can be displayed. Users can scan the QR code image displayed on the smart screen through the camera of the mobile phone, so that the mobile phone and the smart screen can establish a communication connection, and bind the mobile version of the game application on the mobile phone with the TV version of the game application on the smart screen.
  • the mobile phone can operate and control the TV version of the game application on the smart screen through the mobile version of the game application.
  • FIG. 16 shows a schematic flowchart of another method for inter-device application collaboration provided by an embodiment of the present application. As shown in FIG. 16, the following S1601-S1606 may be included.
  • the TV version of the game application of the smart screen displays the QR code image.
  • the specific implementation of generating and displaying the two-dimensional code image may refer to the method shown in FIG. 11 , which will not be repeated here.
  • the two-dimensional code recognition module of the mobile phone recognizes the two-dimensional code image to obtain the two-dimensional code content, so that the mobile phone establishes a communication connection with the smart screen by scanning the two-dimensional code, and launches the mobile version game application of the mobile phone.
  • the specific implementation of the mobile phone establishing a communication connection by scanning the two-dimensional code of the smart screen may refer to the method shown in FIG. 12 , which will not be repeated here.
  • the mobile version game application of the mobile phone sends a service request for binding the TV version game application of the smart screen to the DMS of the mobile phone (or called a second DMS, to be distinguished from the DMS of the smart screen).
  • the mobile version game application can send the above request through the connectAbility interface provided by the DMS.
  • the second DMS performs application permission verification.
  • the second DMS sends a service request for binding the TV version game application of the smart screen to the DMS of the smart screen (or called the first DMS, to be distinguished from the DMS of the mobile phone).
  • the first DMS sends the above request to the TV version game application, and the TV version game application completes the binding after receiving the request, and returns a successful binding response to the first DMS.
  • the first DMS may return a successful binding response to the second DMS, and finally, the second DMS returns a binding successful response to the mobile version game application of the mobile phone.
  • the mobile version game application sends a corresponding operation instruction to the TV version game application, so that the smart screen displays a corresponding game screen according to the operation instruction.
  • the user can control the TV version of the game application by shaking the phone.
  • the mobile phone can transfer the collected gravity sensor data to the TV version game application of the smart screen through the cross-device AIDL interface call capability provided by the DMS, so that the smart screen can display the corresponding game screen.
  • the game application is a rowing game
  • the faster the user shakes the mobile phone the faster the displayed character rowing speed will be displayed on the smart screen according to the received gravity sensor data.
  • the first electronic device and the second electronic device can establish a communication connection between the two by scanning the two-dimensional code, and bind the first application and the second application to each other, so that the first application and the second application can be connected to each other.
  • the collaborative instruction of the second application can be directly transmitted between the first electronic device and the second electronic device, avoiding the forwarding of the collaborative instruction by the cloud server, shortening the transmission path of the collaborative instruction, and reducing the impact of network quality on the collaborative instruction transmission. In this way, the transmission delay of cooperative instructions is reduced, and the transmission stability is improved. It enables users to have a better application collaboration experience in scenarios with high latency requirements, such as multi-person conferences and instant games.
  • the embodiments of the present application further provide an apparatus for inter-device application collaboration.
  • the apparatus can be applied to the above-mentioned first electronic device to implement the method related to the first electronic device in the foregoing embodiment.
  • the functions of the apparatus may be implemented by hardware, or by executing corresponding software by hardware.
  • the hardware or software includes one or more modules corresponding to the above functions.
  • FIG. 17 shows a schematic structural diagram of an apparatus for inter-device application cooperation. As shown in FIG. 17 , the apparatus includes: a display module 1701 , a processing module 1702 , a request module 1703 , and the like.
  • the processing module 1702 can be used to generate encoded information; the request module 1703 can be used to receive a first request sent from the second electronic device, where the first request corresponds to the encoded information; the processing module 1702 can also be used to receive the first request according to the first request. establishing a communication connection with the second electronic device; binding the first application of the first electronic device and the second application of the second electronic device; and transmitting the coordination information with the first application and the second application.
  • the display module 1701 may be configured to display a two-dimensional code including coding information, where the coding information includes networking information; wherein, the first request corresponds to the networking information.
  • the encoded information includes information of the first application and information of the second application; the request module 1703 is further configured to receive a second request from the second electronic device, where the second request includes the first application and the information of the second application; the processing module 1702 may be specifically configured to bind the first application and the second application according to the second request.
  • the encoded information further includes group information and a personal identification code (PIN); the processing module 1702 may also be configured to acquire the group information and PIN obtained by the second electronic device according to the encoded information, and The information of the first application and the information of the second application; determine the group information obtained by the second electronic device according to the coded information, the PIN, and the information of the first application and the information of the second application, and the group information included in the coded information.
  • the group information, PIN, and information of the first application are consistent with the information of the second application.
  • the processing module 1702 may also be configured to generate a PIN; and generate group information according to the PIN, the information of the first application and the information of the second application.
  • the information of the first application includes: the package name of the first application; the information of the second application includes: the package name of the second application, and the page name of the second application, and the second application is the lowest at least one of a version number and a system flag of the second application.
  • the embodiments of the present application further provide an apparatus for inter-device application collaboration.
  • the apparatus can be applied to the above-mentioned second electronic device to implement the method related to the second electronic device in the foregoing embodiments.
  • the functions of the device may be implemented by hardware, or by executing corresponding software by hardware.
  • the hardware or software includes one or more modules corresponding to the above functions.
  • FIG. 18 shows a schematic structural diagram of an apparatus for inter-device application cooperation. As shown in FIG. 18 , the apparatus includes: a processing module 1801 and a request module 1802 and the like.
  • the processing module 1801 can be used to obtain the coding information generated by the first electronic device; the request module 1802 can be used to make a first request to the first electronic device according to the coding information, and the first request is used for the first electronic device and the second electronic device.
  • the electronic device establishes a communication connection; the processing module 1801 can also be used to coordinate the transmission of the second application and the first application when the first electronic device binds the first application of the first electronic device and the second application of the second electronic device information.
  • the processing module 1801 can be specifically configured to scan and identify a two-dimensional code containing coding information displayed by the first electronic device to obtain the coding information, and the coding information includes networking information; the requesting module 1802, specifically It can be used to send the first request to the first electronic device according to the networking information.
  • the encoded information includes: information of the first application and information of the second application; the request module 1802 can also be configured to send a second request to the first electronic device, where the second request includes the first application The application information and the second application information, and the second request is for the first electronic device to bind the first application and the second application.
  • the encoded information further includes group information and a personal identification number (PIN); the processing module 1801 can also be used to store the group information and the PIN.
  • PIN personal identification number
  • the processing module 1801 may also be configured to perform application permission verification on the second application according to the information of the first application, the information of the second application and the networking information.
  • the processing module 1801 may be further configured to determine, according to the information of the second application, that the second application is not installed on the second electronic device; and jump to the download page of the second application.
  • units in the above apparatus is only a division of logical functions, and may be fully or partially integrated into a physical entity in actual implementation, or may be physically separated.
  • all the units in the device can be realized in the form of software calling through the processing element; also can all be realized in the form of hardware; some units can also be realized in the form of software calling through the processing element, and some units can be realized in the form of hardware.
  • each unit can be a separately established processing element, or can be integrated in a certain chip of the device to be implemented, and can also be stored in the memory in the form of a program, which can be called by a certain processing element of the device and execute the unit's processing. Function.
  • all or part of these units can be integrated together, and can also be implemented independently.
  • the processing element described here may also be called a processor, which may be an integrated circuit with signal processing capability.
  • each step of the above method or each of the above units may be implemented by an integrated logic circuit of hardware in the processor element or implemented in the form of software being invoked by the processing element.
  • the units in the above apparatus may be one or more integrated circuits configured to implement the above method, such as: one or more ASICs, or, one or more DSPs, or, one or more FPGAs, or a combination of at least two of these integrated circuit forms.
  • the processing element can be a general-purpose processor, such as a CPU or other processors that can invoke programs.
  • these units can be integrated together and implemented in the form of a system-on-a-chip (SOC).
  • the unit of the above apparatus for implementing each corresponding step in the above method may be implemented in the form of a processing element scheduler.
  • the apparatus may include a processing element and a storage element, and the processing element invokes a program stored in the storage element to execute the method described in the above method embodiments.
  • the storage element may be a storage element on the same chip as the processing element, ie, an on-chip storage element.
  • the program for performing the above method may be in a storage element on a different chip from the processing element, ie, an off-chip storage element.
  • the processing element calls or loads the program from the off-chip storage element to the on-chip storage element, so as to call and execute the methods described in the above method embodiments.
  • an embodiment of the present application may further provide an apparatus, such as an electronic device (for example, the first electronic device or the second electronic device in the foregoing embodiments, etc.), which may include: a processor for storing the executable of the processor memory for instructions.
  • the processor When the processor is configured to execute the above instructions, the electronic device implements the method for inter-device application cooperation implemented by the first electronic device or the second electronic device in the foregoing embodiment.
  • the memory may be located within the electronic device or external to the electronic device.
  • the processor includes one or more.
  • the unit of the apparatus for implementing each step in the above method may be configured as one or more processing elements, and these processing elements may be provided on the corresponding electronic equipment described above, and the processing elements here may be integrated circuits , for example: one or more ASICs, or, one or more DSPs, or, one or more FPGAs, or a combination of these types of integrated circuits. These integrated circuits can be integrated together to form chips.
  • an embodiment of the present application further provides a chip system, and the chip system can be applied to the above electronic device.
  • the chip system includes one or more interface circuits and one or more processors; the interface circuit and the processor are interconnected by lines; the processor receives and executes computer instructions from the memory of the electronic device through the interface circuit, so as to realize the first method in the above method embodiment.
  • Embodiments of the present application further provide a computer program product, including computer instructions for running an electronic device, such as the above-mentioned electronic device.
  • the disclosed apparatus and method may be implemented in other manners.
  • the device embodiments described above are only illustrative.
  • the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be Incorporation may either be integrated into another device, or some features may be omitted, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place, or may be distributed to multiple different places . Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
  • the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a readable storage medium.
  • the software product is stored in a program product, such as a computer-readable storage medium, and includes several instructions to cause a device (which may be a single-chip microcomputer, a chip, etc.) or a processor (processor) to execute all of the methods described in the various embodiments of the present application. or part of the steps.
  • the aforementioned storage medium includes: U disk, removable hard disk, ROM, RAM, magnetic disk or optical disk and other media that can store program codes.
  • the embodiments of the present application may further provide a computer-readable storage medium on which computer program instructions are stored.
  • the computer program instructions are executed by the electronic device, the electronic device is made to implement the method for inter-device application cooperation as described in the foregoing method embodiments.

Abstract

Embodiments of the present application relate to the field of electronic devices, and disclosed are a method for collaborative work of applications between devices, and a device. The problem that a collaborative instruction between devices needs to be forwarded by a cloud server, resulting in a high response delay for collaborative work between devices. The specific solution comprises: a first electronic device generates coded information, and a second electronic device obtains the coded information and then sends a first request to the first electronic device according to the coded information; the first electronic device establishes a communication connection with the second electronic device according to the first request; the first electronic device binds a first application to a second application of the second electronic device, so that the first application and the second application can mutually transmit cooperative information.

Description

一种设备间应用协同工作的方法及设备A method and device for application collaboration between devices
本申请要求于2021年03月31日提交国家知识产权局、申请号为202110350379.9、申请名称为“一种设备间应用协同工作的方法及设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number of 202110350379.9 and the application name "A method and device for inter-device application collaboration work", which was submitted to the State Intellectual Property Office on March 31, 2021, the entire contents of which are by reference Incorporated in this application.
技术领域technical field
本申请实施例涉及电子设备领域,尤其涉及一种设备间应用协同工作的方法及设备。The embodiments of the present application relate to the field of electronic devices, and in particular, to a method and device for inter-device application collaboration.
背景技术Background technique
相同应用在不同设备间进行协同工作,通常是通过云服务器来实现。即通过云服务器对两个或多个设备间的协同指令进行转发。例如,设备1和设备2均连接互联网,设备1到设备2的协同指令,先由设备1发送到云服务器,然后由云服务器将协同指令转发给设备2。设备2到设备1的协同指令,先由设备2发送到云服务器,然后由云服务器将协同指令转发给设备1。并且,设备1和设备2还需要登录相同的账号以对两个设备进行验证,使设备1和设备2之间的协同指令可以安全可靠的被云服务器转发。The same application works collaboratively between different devices, usually through a cloud server. That is, the coordinated instructions between two or more devices are forwarded through the cloud server. For example, both device 1 and device 2 are connected to the Internet, and the coordination instruction from device 1 to device 2 is first sent by device 1 to the cloud server, and then the cloud server forwards the coordination instruction to device 2. The coordination instruction from device 2 to device 1 is first sent by device 2 to the cloud server, and then the cloud server forwards the coordination instruction to device 1. In addition, device 1 and device 2 also need to log in to the same account to authenticate the two devices, so that the collaborative instruction between device 1 and device 2 can be safely and reliably forwarded by the cloud server.
但是,采用云服务器实现相同应用在不同设备间的协同工作,由于设备间的协同指令需要经过云服务器的转发,因此设备间的协同工作响应时延较高。However, when a cloud server is used to realize the collaborative work of the same application between different devices, since the collaborative instructions between the devices need to be forwarded by the cloud server, the response delay of the collaborative work between the devices is relatively high.
发明内容SUMMARY OF THE INVENTION
本申请实施例提供一种设备间应用协同工作的方法及设备,解决了设备间的协同指令需要经过云服务器的转发,导致设备间的协同工作响应时延较高的问题。The embodiments of the present application provide a method and device for inter-device application collaboration, which solves the problem that inter-device collaboration instructions need to be forwarded by a cloud server, resulting in high response delay for inter-device collaboration.
为达到上述目的,本申请实施例采用如下技术方案:In order to achieve the above purpose, the embodiment of the present application adopts the following technical solutions:
第一方面,本申请实施例提供一种设备间应用协同工作的方法,该方法可以应用于第一电子设备。该方法可以包括:生成编码信息;接收来自第二电子设备发送的第一请求,其中,第一请求与编码信息对应;根据第一请求与第二电子设备建立通信连接;绑定第一电子设备的第一应用和第二电子设备的第二应用;第一应用与第二应用传输协同信息。其中,协同信息为第一应用和第二执行相互协作时传输的指令信息或数据等。In a first aspect, an embodiment of the present application provides a method for inter-device application collaboration, and the method can be applied to a first electronic device. The method may include: generating coded information; receiving a first request sent from a second electronic device, wherein the first request corresponds to the coded information; establishing a communication connection with the second electronic device according to the first request; binding the first electronic device The first application and the second application of the second electronic device; the first application and the second application transmit coordination information. The cooperation information is instruction information or data or the like transmitted when the first application and the second execution cooperate with each other.
基于第一方面所述的方法,当第一应用和第二应用在第一电子设备和第二电子设备间需要协同工作时(即应用需要在不同电子设备间协同工作时),第一电子设备和第二电子设备可以通过如扫描二维码或碰一碰的方式在两者间建立通信连接,并使第一应用和第二应用相互绑定,从而使第一应用和第二应用的协同指令可以在第一电子设备和第二电子设备间直接进行传输,避免云服务器对协同指令的转发,减短协同指令的传递路径,并减小网络质量对协同指令传输造成的影响,从而降低协同指令的传输时延,提高传输稳定性。使用户在多人会议、即时游戏等对时延要求较高的场景下具有更好的应用协同体验。Based on the method described in the first aspect, when the first application and the second application need to work collaboratively between the first electronic device and the second electronic device (that is, when the applications need to work collaboratively between different electronic devices), the first electronic device A communication connection can be established between the electronic device and the second electronic device by scanning a QR code or touching the device, and the first application and the second application can be bound to each other, so that the cooperation between the first application and the second application can be achieved. Commands can be directly transmitted between the first electronic device and the second electronic device, avoiding the forwarding of collaborative commands by the cloud server, shortening the transmission path of collaborative commands, and reducing the impact of network quality on the transmission of collaborative commands, thereby reducing collaborative The transmission delay of the command improves the transmission stability. It enables users to have a better application collaboration experience in scenarios with high latency requirements, such as multi-person conferences and instant games.
结合第一方面,在一种可能的设计方式中,该方法还可以包括:显示包含编码信息的二维码,其中,编码信息包括组网信息,第一请求与组网信息对应。With reference to the first aspect, in a possible design manner, the method may further include: displaying a two-dimensional code including encoding information, where the encoding information includes networking information, and the first request corresponds to the networking information.
基于该可能的设计方式,第一电子设备显示包含编码信息的二维码,能够使第二电子设备可通过扫描该二维码的方式快速便捷的获取到编码信息,从而便于第二电子设备根据编码信息与第一电子设备建立通信连接以实现协同工作。Based on this possible design method, the first electronic device displays a two-dimensional code containing coded information, so that the second electronic device can quickly and conveniently obtain the coded information by scanning the two-dimensional code, thereby facilitating the second electronic device according to The encoded information establishes a communication connection with the first electronic device to realize cooperative work.
结合第一方面,在另一种可能的设计方式中,编码信息包括第一应用的信息和第二应用的信息。绑定第一电子设备的第一应用和第二电子设备的第二应用,可以包括:接收来自第二电子设备的第二请求,其中,第二请求包括第一应用的信息和第二应用的信息;根据第二请求,绑定第一应用和第二应用。With reference to the first aspect, in another possible design manner, the encoded information includes information of the first application and information of the second application. Binding the first application of the first electronic device and the second application of the second electronic device may include: receiving a second request from the second electronic device, where the second request includes information of the first application and information of the second application information; according to the second request, bind the first application and the second application.
基于该可能的设计方式,第一电子设备生成的编码信息中包括第一应用的信息和第二应用的信息。从而能够使第二电子设备根据该编码信息可以便捷的获取到第一应用的信息和第二应用的信息,以便后续根据第一应用的信息和第二应用的信息向第一电子设备请求第一应用和第二应用的绑定。例如,第二电子设备在请求第一电子设备绑定第一应用和第二应用时,可以在请求中携带第一应用的信息和第二应用的信息。Based on this possible design manner, the encoded information generated by the first electronic device includes the information of the first application and the information of the second application. Therefore, the second electronic device can conveniently obtain the information of the first application and the information of the second application according to the encoded information, so as to subsequently request the first electronic device for the first application according to the information of the first application and the information of the second application. The binding of the application and the second application. For example, when requesting the first electronic device to bind the first application and the second application, the second electronic device may carry the information of the first application and the information of the second application in the request.
结合第一方面,在另一种可能的设计方式中,编码信息还包括群组信息和个人识别码(PIN);在根据第一请求与第二电子设备建立通信连接之前,该方法还可以包括:获取第二电子设备根据编码信息得到的群组信息和PIN,以及第一应用的信息和第二应用的信息;确定获取的第二电子设备根据编码信息得到的群组信息,PIN,以及第一应用的信息和第二应用的信息,与编码信息中包括的群组信息,PIN,以及第一应用的信息和第二应用的信息一致。With reference to the first aspect, in another possible design manner, the encoded information further includes group information and a personal identification code (PIN); before establishing a communication connection with the second electronic device according to the first request, the method may further include : Obtain the group information and PIN obtained by the second electronic device according to the coded information, as well as the information of the first application and the information of the second application; determine the group information, PIN, and PIN obtained by the second electronic device obtained according to the coded information. The information of the first application and the information of the second application are consistent with the group information, the PIN, and the information of the first application and the information of the second application included in the encoded information.
基于该可能的设计方式,通过编码信息包括群组信息和PIN,能够使第二电子设备获取到编码信息后,可以根据群组信息和PIN信息建立安全群组。当第二电子设备请求与第一电子设备建立通信连接时,第一电子设备便能够通过比对自身编码信息中的群组信息和PIN与第二电子设备的群组信息和PIN是否一致来确定第二电子设备是否可信。例如,当上述群组信息和PIN比对一致时则确定第二电子设备可信,然后第一电子设备在于第二电子设备建立通信连接。从而保证第一电子设备和第二电子设备间能够建立安全连接。Based on this possible design manner, by using the coded information including the group information and the PIN, after the second electronic device obtains the coded information, a security group can be established according to the group information and the PIN information. When the second electronic device requests to establish a communication connection with the first electronic device, the first electronic device can determine whether the group information and PIN in the self-encoded information are consistent with the group information and PIN of the second electronic device. Whether the second electronic device is trustworthy. For example, when the group information and the PIN are compared and consistent, it is determined that the second electronic device is credible, and then the first electronic device establishes a communication connection with the second electronic device. Thus, it is ensured that a secure connection can be established between the first electronic device and the second electronic device.
结合第一方面,在另一种可能的设计方式中,在生成编码信息之前,该方法还可以包括:生成PIN;根据PIN,第一应用的信息和第二应用的信息生成群组信息。With reference to the first aspect, in another possible design manner, before generating the encoded information, the method may further include: generating a PIN; generating group information according to the PIN, the information of the first application and the information of the second application.
其中,PIN可以按照固定时间进行刷新。例如,每5分钟刷新一次PIN。从而便于群组信息和PIN周期性更新,提高第一电子设备根据PIN和群组信息验证第二电子设备的安全性。Among them, the PIN can be refreshed according to a fixed time. For example, refresh the PIN every 5 minutes. Therefore, the periodic update of the group information and the PIN is facilitated, and the security of the first electronic device for verifying the second electronic device according to the PIN and the group information is improved.
基于该可能的设计方式,根据PIN和第一应用信息和第二应用信息生成群组信息,能够保证群组信息的唯一性,并且能够保证群组信息与第一应用和第二应用相关联,从而当第一电子设备根据群组信息对第二电子设备认证为可信时,便能够保证该可信认证是针对第一应用和第二应用的。Based on this possible design method, group information is generated according to the PIN, the first application information and the second application information, which can ensure the uniqueness of the group information, and can ensure that the group information is associated with the first application and the second application, Therefore, when the first electronic device authenticates the second electronic device as credible according to the group information, it can be ensured that the credible authentication is for the first application and the second application.
结合第一方面,在另一种可能的设计方式中,第一应用的信息包括:第一应用的包名;第二应用的信息包括:第二应用的包名,以及第二应用的页面名,第二应用最低版本号以及第二应用的系统标志中的至少一个。With reference to the first aspect, in another possible design manner, the information of the first application includes: the package name of the first application; the information of the second application includes: the package name of the second application, and the page name of the second application , at least one of the minimum version number of the second application and the system flag of the second application.
基于该可能的设计方式,第二电子设备根据编码信息得到第二应用的信息后,能够便于根据第二应用的页面名确定需要拉起的第二应用的页面,根据第二应用最低版 本号确定第二电子设备安装的第二应用是否支持与第一电子设备的第一应用绑定以进行协同工作,以及根据第二应用的系统标志确定第二电子设备的系统是否支持第二应用与第一电子设备的第一应用进行绑定以进行协同工作。Based on this possible design method, after the second electronic device obtains the information of the second application according to the coding information, it is convenient to determine the page of the second application to be pulled up according to the page name of the second application, and determine the page of the second application according to the minimum version number of the second application. Whether the second application installed on the second electronic device supports binding with the first application of the first electronic device for cooperative work, and whether the system of the second electronic device supports the second application and the first application according to the system flag of the second application The first application of the electronic device is bound to work together.
第二方面,本申请实施例提供一种设备间应用协同工作的装置,该装置可以应用于电子设备,用于实现上述第一方面中的方法。该装置的功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。硬件或软件包括一个或多个与上述功能相对应的模块,例如,处理模块、请求模块、显示模块等。In a second aspect, an embodiment of the present application provides an apparatus for inter-device application collaboration, and the apparatus can be applied to an electronic device to implement the method in the first aspect. The functions of the apparatus may be implemented by hardware, or by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the above functions, for example, a processing module, a request module, a display module, and the like.
其中,处理模块,可用于生成编码信息;请求模块,可用于接收来自第二电子设备发送的第一请求,第一请求与编码信息对应;处理模块,还可以用于根据第一请求与第二电子设备建立通信连接;绑定第一电子设备的第一应用和第二电子设备的第二应用;第一应用与第二应用传输协同信息。The processing module can be used to generate coded information; the request module can be used to receive a first request sent from the second electronic device, where the first request corresponds to the coded information; the processing module can also be used to communicate with the second electronic device according to the first request. The electronic device establishes a communication connection; binds the first application of the first electronic device and the second application of the second electronic device; the first application and the second application transmit coordination information.
结合第二方面,在一种可能的设计方式中,显示模块,可以用于显示包含编码信息的二维码,编码信息包括组网信息;其中,第一请求与组网信息对应。With reference to the second aspect, in a possible design manner, the display module may be used to display a two-dimensional code containing encoded information, where the encoded information includes networking information; wherein the first request corresponds to the networking information.
结合第二方面,在另一种可能的设计方式中,编码信息包括第一应用的信息和第二应用的信息;请求模块,还可用于接收来自第二电子设备的第二请求,第二请求包括第一应用的信息和第二应用的信息;处理模块,可具体用于根据第二请求,绑定第一应用和第二应用。With reference to the second aspect, in another possible design manner, the encoded information includes information of the first application and information of the second application; the request module can also be used to receive a second request from the second electronic device, the second request The information includes the information of the first application and the information of the second application; the processing module may be specifically configured to bind the first application and the second application according to the second request.
结合第二方面,在另一种可能的设计方式中,编码信息还包括群组信息和个人识别码(PIN);处理模块,还可以用于获取第二电子设备根据编码信息得到的群组信息和PIN,以及第一应用的信息和第二应用的信息;确定获取的第二电子设备根据编码信息得到的群组信息,PIN,以及第一应用的信息和第二应用的信息,与编码信息中包括的群组信息,PIN,以及第一应用的信息和第二应用的信息一致。In combination with the second aspect, in another possible design, the encoded information further includes group information and a personal identification code (PIN); the processing module can also be used to acquire group information obtained by the second electronic device according to the encoded information and PIN, as well as the information of the first application and the information of the second application; determine the acquired group information obtained by the second electronic device according to the encoded information, the PIN, the information of the first application and the information of the second application, and the encoded information The group information, PIN, and information included in the first application are consistent with the information of the second application.
结合第二方面,在另一种可能的设计方式中,处理模块,还可以用于生成PIN;根据PIN,第一应用的信息和第二应用的信息生成群组信息。With reference to the second aspect, in another possible design manner, the processing module may also be used to generate a PIN; and generate group information according to the PIN, the information of the first application and the information of the second application.
结合第二方面,在另一种可能的设计方式中,第一应用的信息包括:第一应用的包名;第二应用的信息包括:第二应用的包名,以及第二应用的页面名,第二应用最低版本号以及第二应用的系统标志中的至少一个。With reference to the second aspect, in another possible design manner, the information of the first application includes: the package name of the first application; the information of the second application includes: the package name of the second application, and the page name of the second application , at least one of the minimum version number of the second application and the system flag of the second application.
第三方面,本申请实施例提供一种电子设备,该电子设备可以包括存储器和一个或多个处理器;存储器和处理器耦合;存储器用于存储计算机程序代码,计算机程序代码包括计算机指令,当计算机指令被处理器执行时,使得电子设备执行以下步骤:生成编码信息;接收来自第二电子设备发送的第一请求,第一请求与编码信息对应;根据第一请求与第二电子设备建立通信连接;绑定电子设备的第一应用和第二电子设备的第二应用;第一应用与第二应用传输协同信息。In a third aspect, embodiments of the present application provide an electronic device, which may include a memory and one or more processors; the memory and the processor are coupled; the memory is used to store computer program codes, and the computer program codes include computer instructions, when When the computer instructions are executed by the processor, the electronic device performs the following steps: generating encoded information; receiving a first request sent from the second electronic device, where the first request corresponds to the encoded information; establishing communication with the second electronic device according to the first request Connect; bind the first application of the electronic device and the second application of the second electronic device; the first application and the second application transmit coordination information.
结合第三方面,在一种可能的设计方式中,电子设备还包括显示屏,显示屏与存储器和处理器耦合,当计算机指令被处理器执行时,电子设备还执行以下步骤:在显示屏显示包含编码信息的二维码,编码信息包括组网信息;其中,第一请求与组网信息对应。With reference to the third aspect, in a possible design, the electronic device further includes a display screen, the display screen is coupled to the memory and the processor, and when the computer instructions are executed by the processor, the electronic device further performs the following steps: displaying on the display screen A two-dimensional code containing encoded information, where the encoded information includes networking information; wherein, the first request corresponds to the networking information.
结合第三方面,在另一种可能的设计方式中,编码信息包括第一应用的信息和第二应用的信息;绑定电子设备的第一应用和第二电子设备的第二应用,包括:接收来 自第二电子设备的第二请求,第二请求包括第一应用的信息和第二应用的信息;根据第二请求,绑定第一应用和第二应用。With reference to the third aspect, in another possible design manner, the encoded information includes information of the first application and information of the second application; binding the first application of the electronic device and the second application of the second electronic device, including: Receive a second request from the second electronic device, where the second request includes information of the first application and information of the second application; and bind the first application and the second application according to the second request.
结合第三方面,在另一种可能的设计方式中,编码信息还包括群组信息和个人识别码(PIN);当计算机指令被处理器执行时,还执行以下步骤:获取第二电子设备根据编码信息得到的群组信息和PIN,以及第一应用的信息和第二应用的信息;确定获取的第二电子设备根据编码信息得到的群组信息,PIN,以及第一应用的信息和第二应用的信息,与编码信息中包括的群组信息,PIN,以及第一应用的信息和第二应用的信息一致。With reference to the third aspect, in another possible design manner, the encoded information further includes group information and a personal identification code (PIN); when the computer instruction is executed by the processor, the following steps are also performed: obtaining the second electronic device according to the The group information and PIN obtained from the encoded information, as well as the information of the first application and the information of the second application; determine the group information and PIN obtained by the second electronic device obtained according to the encoded information, as well as the information of the first application and the information of the second application. The information of the application is consistent with the group information, the PIN, and the information of the first application and the information of the second application included in the encoded information.
结合第三方面,在另一种可能的设计方式中,当计算机指令被处理器执行时,还执行以下步骤:生成PIN;根据PIN,第一应用的信息和第二应用的信息生成群组信息。With reference to the third aspect, in another possible design manner, when the computer instructions are executed by the processor, the following steps are also performed: generating a PIN; generating group information according to the PIN, the information of the first application and the information of the second application .
结合第三方面,在另一种可能的设计方式中,第一应用的信息包括:第一应用的包名;第二应用的信息包括:第二应用的包名,以及第二应用的页面名,第二应用最低版本号以及第二应用的系统标志中的至少一个。With reference to the third aspect, in another possible design manner, the information of the first application includes: the package name of the first application; the information of the second application includes: the package name of the second application, and the page name of the second application , at least one of the minimum version number of the second application and the system flag of the second application.
第四方面,本申请实施例提供一种芯片系统,该芯片系统应用于如第三方面及其任一种设计方式所述的电子设备。该芯片系统包括一个或多个接口电路和一个或多个上述处理器。该接口电路和处理器通过线路互联。该处理器通过接口电路用于从电子设备的存储器接收并执行上述计算机指令。In a fourth aspect, an embodiment of the present application provides a chip system, and the chip system is applied to the electronic device described in the third aspect and any design manner thereof. The chip system includes one or more interface circuits and one or more of the above-mentioned processors. The interface circuit and the processor are interconnected by wires. The processor is adapted to receive and execute the above-mentioned computer instructions from the memory of the electronic device through the interface circuit.
第五方面,本申请实施例提供一种计算机可读存储介质,该计算机可读存储介质用于存储如第三方面及其任一种可能的设计方式所述的电子设备运行的所述计算机指令。In a fifth aspect, embodiments of the present application provide a computer-readable storage medium, where the computer-readable storage medium is used to store the computer instructions executed by the electronic device described in the third aspect and any possible design manner thereof .
第六方面,本申请实施例提供一种计算机程序产品,包括如第三方面及其任一种可能的设计方式所述的电子设备运行的所述计算机指令。In a sixth aspect, an embodiment of the present application provides a computer program product, including the computer instructions executed by the electronic device according to the third aspect and any possible design manner thereof.
应当理解的是,上述第二方面至第六方面的有益效果可以参见上述第一方面中的相关描述,在此不再赘述。It should be understood that, for the beneficial effects of the foregoing second aspect to the sixth aspect, reference may be made to the relevant descriptions in the foregoing first aspect, and details are not described herein again.
第七方面,本申请实施例提供一种设备间应用协同工作的方法,该方法可以用于第二电子设备。该方法可以包括:获取第一电子设备生成的编码信息;根据编码信息向第一电子设备发送第一请求,第一请求用于第一电子设备与第二电子设备建立通信连接;在第一电子设备绑定第一电子设备的第一应用和第二电子设备的第二应用的情况下,第二应用与第一应用传输协同信息。In a seventh aspect, an embodiment of the present application provides a method for inter-device application collaboration, and the method can be used for a second electronic device. The method may include: acquiring coded information generated by the first electronic device; sending a first request to the first electronic device according to the coded information, where the first request is used for establishing a communication connection between the first electronic device and the second electronic device; When the device is bound to the first application of the first electronic device and the second application of the second electronic device, the second application and the first application transmit the coordination information.
基于第七方面所述的方法,当第一应用和第二应用在第一电子设备和第二电子设备间需要协同工作时(即应用需要在不同电子设备间协同工作时),第一电子设备和第二电子设备可以通过如扫描二维码或碰一碰的方式在两者间建立通信连接,并使第一应用和第二应用相互绑定,从而使第一应用和第二应用的协同指令可以在第一电子设备和第二电子设备间直接进行传输,避免云服务器对协同指令的转发,减短协同指令的传递路径,并减小网络质量对协同指令传输造成的影响,从而降低协同指令的传输时延,提高传输稳定性。使用户在多人会议、即时游戏等对时延要求较高的场景下具有更好的应用协同体验。Based on the method described in the seventh aspect, when the first application and the second application need to work collaboratively between the first electronic device and the second electronic device (that is, when the applications need to work collaboratively between different electronic devices), the first electronic device A communication connection can be established between the electronic device and the second electronic device by scanning a QR code or touching the device, and the first application and the second application can be bound to each other, so that the cooperation between the first application and the second application can be achieved. Commands can be directly transmitted between the first electronic device and the second electronic device, avoiding the forwarding of collaborative commands by the cloud server, shortening the transmission path of collaborative commands, and reducing the impact of network quality on the transmission of collaborative commands, thereby reducing collaborative The transmission delay of the command improves the transmission stability. It enables users to have a better application collaboration experience in scenarios with high latency requirements, such as multi-person conferences and instant games.
结合第七方面,在一种可能的设计方式中,获取第一电子设备生成的编码信息, 包括:扫描并识别第一电子设备显示的包含编码信息的二维码,得到编码信息,编码信息包括组网信息;根据编码信息向第一电子设备发送第一请求,包括:根据组网信息向第一电子设备发送第一请求。With reference to the seventh aspect, in a possible design manner, acquiring the coded information generated by the first electronic device includes: scanning and recognizing a two-dimensional code containing the coded information displayed by the first electronic device to obtain the coded information, where the coded information includes: Networking information; sending the first request to the first electronic device according to the encoded information includes: sending the first request to the first electronic device according to the networking information.
基于该可能的设计方式,第一电子设备显示包含编码信息的二维码,能够使第二电子设备可通过扫描该二维码的方式快速便捷的获取到编码信息,从而便于第二电子设备根据编码信息与第一电子设备建立通信连接以实现协同工作。Based on this possible design method, the first electronic device displays a two-dimensional code containing coded information, so that the second electronic device can quickly and conveniently obtain the coded information by scanning the two-dimensional code, thereby facilitating the second electronic device according to The encoded information establishes a communication connection with the first electronic device to realize cooperative work.
结合第七方面,在另一种可能的设计方式中,编码信息包括:第一应用的信息和第二应用的信息;方法还包括:向第一电子设备发送第二请求,第二请求包括第一应用的信息和第二应用的信息,第二请求用于第一电子设备绑定第一应用和第二应用。With reference to the seventh aspect, in another possible design manner, the encoded information includes: information of the first application and information of the second application; the method further includes: sending a second request to the first electronic device, where the second request includes the first application The information of the first application and the information of the second application, and the second request is for the first electronic device to bind the first application and the second application.
基于该可能的设计方式,第一电子设备生成的编码信息中包括第一应用的信息和第二应用的信息。从而能够使第二电子设备根据该编码信息可以便捷的获取到第一应用的信息和第二应用的信息,以便后续根据第一应用的信息和第二应用的信息向第一电子设备请求第一应用和第二应用的绑定。例如,第二电子设备在请求第一电子设备绑定第一应用和第二应用时,可以在请求中携带第一应用的信息和第二应用的信息。Based on this possible design manner, the encoded information generated by the first electronic device includes the information of the first application and the information of the second application. Therefore, the second electronic device can conveniently obtain the information of the first application and the information of the second application according to the encoded information, so as to subsequently request the first electronic device for the first application according to the information of the first application and the information of the second application. The binding of the application and the second application. For example, when requesting the first electronic device to bind the first application and the second application, the second electronic device may carry the information of the first application and the information of the second application in the request.
结合第七方面,在另一种可能的设计方式中,编码信息还包括群组信息和个人识别码(PIN);在根据编码信息向第一电子设备发送第一请求之前,该方法还包括:存储群组信息和PIN。With reference to the seventh aspect, in another possible design manner, the encoded information further includes group information and a personal identification code (PIN); before sending the first request to the first electronic device according to the encoded information, the method further includes: Store group information and PIN.
基于该可能的设计方式,通过编码信息包括群组信息和PIN,能够使第二电子设备获取到编码信息后,可以根据群组信息和PIN信息建立安全群组。当第二电子设备请求与第一电子设备建立通信连接时,第一电子设备便能够通过比对自身编码信息中的群组信息和PIN与第二电子设备的群组信息和PIN是否一致来确定第二电子设备是否可信。例如,当上述群组信息和PIN比对一致时则确定第二电子设备可信,然后第一电子设备在于第二电子设备建立通信连接。从而保证第一电子设备和第二电子设备间能够建立安全连接。Based on this possible design manner, by using the coded information including the group information and the PIN, after the second electronic device obtains the coded information, a security group can be established according to the group information and the PIN information. When the second electronic device requests to establish a communication connection with the first electronic device, the first electronic device can determine whether the group information and PIN in the self-encoded information are consistent with the group information and PIN of the second electronic device. Whether the second electronic device is trustworthy. For example, when the group information and the PIN are compared and consistent, it is determined that the second electronic device is credible, and then the first electronic device establishes a communication connection with the second electronic device. Thus, it is ensured that a secure connection can be established between the first electronic device and the second electronic device.
结合第七方面,在另一种可能的设计方式中,在向第一电子设备发送第二请求之前,该方法还包括:根据第一应用的信息、第二应用的信息和组网信息,对第二应用进行应用权限校验。With reference to the seventh aspect, in another possible design manner, before sending the second request to the first electronic device, the method further includes: according to the information of the first application, the information of the second application and the networking information, The second application performs application permission verification.
基于该可能的设计方式,第二电子设备可以根据第一应用的信息、第二应用的信息和组网信息,对第二应用进行应用权限校验,从而确定第二电子设备请求要绑定的应用是否与第一应用相对应,从而避免第二电子设备上的其他应用通过第二电子设备请求与第一电子设备的第一应用绑定。Based on this possible design method, the second electronic device can perform application permission verification on the second application according to the information of the first application, the information of the second application, and the networking information, so as to determine the request to be bound by the second electronic device. Whether the application corresponds to the first application, so as to prevent other applications on the second electronic device from requesting to bind with the first application of the first electronic device through the second electronic device.
结合第七方面,在另一种可能的设计方式中,在获取第一电子设备生成的编码信息之后,该方法还包括:根据第二应用的信息确定第二电子设备未安装第二应用;跳转第二应用的下载页面。With reference to the seventh aspect, in another possible design manner, after acquiring the encoded information generated by the first electronic device, the method further includes: determining, according to the information of the second application, that the second electronic device does not have the second application installed; Go to the download page of the second app.
基于该可能的设计方式,在第二电子设备根据第二应用信息确定未安装第二应用时,跳转第二应用的下载页面,能够更加方便用户下载安装第二应用,从而与第一应用进行协同工作,提高用户操作的便捷性。Based on this possible design method, when the second electronic device determines that the second application is not installed according to the second application information, the second electronic device jumps to the download page of the second application, which can make it more convenient for the user to download and install the second application, so as to communicate with the first application. Work together to improve the convenience of user operations.
第八方面,本申请实施例提供一种设备间应用协同工作的装置,该装置可以应用于电子设备,用于实现上述第七方面中的方法。该装置的功能可以通过硬件实现,也 可以通过硬件执行相应的软件实现。硬件或软件包括一个或多个与上述功能相对应的模块,例如,处理模块、请求模块等。In an eighth aspect, an embodiment of the present application provides an apparatus for inter-device application collaboration, and the apparatus can be applied to an electronic device to implement the method in the seventh aspect. The functions of the device can be implemented by hardware, or by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the above functions, for example, a processing module, a request module, and the like.
其中,处理模块,可以用于获取第一电子设备生成的编码信息;请求模块,可以用于根据编码信息向第一电子设备第一请求,第一请求用于第一电子设备与第二电子设备建立通信连接;处理模块,还可用于在第一电子设备绑定第一电子设备的第一应用和第二电子设备的第二应用的情况下,第二应用与第一应用传输协同信息。Wherein, the processing module can be used to obtain the coding information generated by the first electronic device; the request module can be used to make a first request to the first electronic device according to the coding information, and the first request is used for the first electronic device and the second electronic device establishing a communication connection; the processing module is further configured to transmit coordination information between the second application and the first application when the first electronic device binds the first application of the first electronic device and the second application of the second electronic device.
结合第八方面,在一种可能的设计方式中,处理模块,具体可以用于扫描并识别第一电子设备显示的包含编码信息的二维码,得到编码信息,编码信息包括组网信息;请求模块,具体可用于根据组网信息向第一电子设备发送第一请求。With reference to the eighth aspect, in a possible design method, the processing module can be specifically configured to scan and identify a two-dimensional code containing encoded information displayed by the first electronic device to obtain the encoded information, where the encoded information includes networking information; requesting The module is specifically configured to send the first request to the first electronic device according to the networking information.
结合第八方面,在另一种可能的设计方式中,编码信息包括:第一应用的信息和第二应用的信息;请求模块,还可以用于向第一电子设备发送第二请求,第二请求包括第一应用的信息和第二应用的信息,第二请求用于第一电子设备绑定第一应用和第二应用。With reference to the eighth aspect, in another possible design manner, the encoded information includes: information of the first application and information of the second application; the request module can also be used to send a second request to the first electronic device, the second The request includes information of the first application and information of the second application, and the second request is for the first electronic device to bind the first application and the second application.
结合第八方面,在另一种可能的设计方式中,编码信息还包括群组信息和个人识别码(PIN);处理模块,还可以用于存储群组信息和PIN。With reference to the eighth aspect, in another possible design manner, the encoded information further includes group information and a personal identification code (PIN); the processing module can also be used to store the group information and PIN.
结合第八方面,在另一种可能的设计方式中,处理模块,还可以用于根据第一应用的信息、第二应用的信息和组网信息,对第二应用进行应用权限校验。With reference to the eighth aspect, in another possible design manner, the processing module may also be configured to perform application permission verification on the second application according to the information of the first application, the information of the second application and the networking information.
结合第八方面,在另一种可能的设计方式中,处理模块,还可以用于根据第二应用的信息确定第二电子设备未安装第二应用;跳转第二应用的下载页面。With reference to the eighth aspect, in another possible design manner, the processing module may be further configured to determine that the second application is not installed on the second electronic device according to the information of the second application; and jump to the download page of the second application.
第九方面,本申请实施例提供一种电子设备,该电子设备可以包括存储器和一个或多个处理器;存储器和处理器耦合;存储器用于存储计算机程序代码,计算机程序代码包括计算机指令,当计算机指令被处理器执行时,使得电子设备执行以下步骤:获取第一电子设备生成的编码信息;根据编码信息向第一电子设备发送第一请求,第一请求用于第一电子设备与电子设备建立通信连接;在第一电子设备绑定第一电子设备的第一应用和电子设备的第二应用的情况下,第二应用与第一应用传输协同信息。In a ninth aspect, embodiments of the present application provide an electronic device, the electronic device may include a memory and one or more processors; the memory and the processor are coupled; the memory is used to store computer program code, and the computer program code includes computer instructions, when When the computer instructions are executed by the processor, the electronic device is caused to perform the following steps: acquiring encoded information generated by the first electronic device; sending a first request to the first electronic device according to the encoded information, where the first request is used for the first electronic device and the electronic device A communication connection is established; in the case that the first electronic device binds the first application of the first electronic device and the second application of the electronic device, the second application and the first application transmit coordination information.
结合第九方面,在一种可能的设计方式中,获取第一电子设备生成的编码信息,包括:扫描并识别第一电子设备显示的包含编码信息的二维码,得到编码信息,编码信息包括组网信息;根据编码信息向第一电子设备发送第一请求,包括:根据组网信息向第一电子设备发送第一请求。With reference to the ninth aspect, in a possible design manner, acquiring the encoded information generated by the first electronic device includes: scanning and recognizing a two-dimensional code containing the encoded information displayed by the first electronic device to obtain the encoded information, where the encoded information includes Networking information; sending the first request to the first electronic device according to the encoded information includes: sending the first request to the first electronic device according to the networking information.
结合第九方面,在另一种可能的设计方式中,编码信息包括:第一应用的信息和第二应用的信息;当计算机指令被处理器执行时,电子设备还执行以下步骤:向第一电子设备发送第二请求,第二请求包括第一应用的信息和第二应用的信息,第二请求用于第一电子设备绑定第一应用和第二应用。With reference to the ninth aspect, in another possible design manner, the encoded information includes: the information of the first application and the information of the second application; when the computer instruction is executed by the processor, the electronic device further performs the following steps: to the first application The electronic device sends a second request, where the second request includes information of the first application and information of the second application, and the second request is for the first electronic device to bind the first application and the second application.
结合第九方面,在另一种可能的设计方式中,编码信息还包括群组信息和个人识别码(PIN);当计算机指令被处理器执行时,还执行以下步骤:存储群组信息和PIN。With reference to the ninth aspect, in another possible design manner, the encoded information further includes group information and a personal identification code (PIN); when the computer instructions are executed by the processor, the following steps are also performed: storing the group information and the PIN .
结合第九方面,在另一种可能的设计方式中,当计算机指令被处理器执行时,还执行以下步骤:根据第一应用的信息、第二应用的信息和组网信息,对第二应用进行应用权限校验。With reference to the ninth aspect, in another possible design manner, when the computer instructions are executed by the processor, the following steps are also performed: according to the information of the first application, the information of the second application and the networking information, perform the following steps on the second application. Perform application permission verification.
结合第九方面,在另一种可能的设计方式中,当计算机指令被处理器执行时,还 执行以下步骤:根据第二应用的信息确定电子设备未安装第二应用;跳转第二应用的下载页面。With reference to the ninth aspect, in another possible design manner, when the computer instruction is executed by the processor, the following steps are also performed: determining according to the information of the second application that the electronic device does not have the second application installed; jumping to the second application Download page.
第十方面,本申请实施例提供一种芯片系统,该芯片系统应用于如第九方面及其任一种设计方式所述的电子设备。该芯片系统包括一个或多个接口电路和一个或多个上述处理器。该接口电路和处理器通过线路互联。该处理器通过接口电路用于从电子设备的存储器接收并执行上述计算机指令。In a tenth aspect, an embodiment of the present application provides a chip system, where the chip system is applied to the electronic device described in the ninth aspect and any design manner thereof. The chip system includes one or more interface circuits and one or more of the above-mentioned processors. The interface circuit and the processor are interconnected by wires. The processor is adapted to receive and execute the above-mentioned computer instructions from the memory of the electronic device through the interface circuit.
第十一方面,本申请实施例提供一种计算机可读存储介质,该计算机可读存储介质用于存储如第九方面及其任一种可能的设计方式所述的电子设备运行的所述计算机指令。In an eleventh aspect, an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium is used to store the computer run by the electronic device described in the ninth aspect and any possible design manner thereof instruction.
第十二方面,本申请实施例提供一种计算机程序产品,包括如第九方面及其任一种可能的设计方式所述的电子设备运行的所述计算机指令。In a twelfth aspect, an embodiment of the present application provides a computer program product, including the computer instructions executed by the electronic device according to the ninth aspect and any possible design manner thereof.
应当理解的是,上述第八方面至第十二方面的有益效果可以参见上述第七方面中的相关描述,在此不再赘述。It should be understood that, for the beneficial effects of the eighth aspect to the twelfth aspect, reference may be made to the relevant description in the seventh aspect, which will not be repeated here.
附图说明Description of drawings
图1为本申请实施例提供的一种设备间应用协同工作的方法的应用场景示意图;FIG. 1 is a schematic diagram of an application scenario of a method for inter-device application collaboration provided by an embodiment of the present application;
图2为本申请实施例提供的另一种设备间应用协同工作的方法的应用场景示意图;2 is a schematic diagram of an application scenario of another method for inter-device application collaboration provided by an embodiment of the present application;
图3为本申请实施例提供的另一种设备间应用协同工作的方法的应用场景示意图;3 is a schematic diagram of an application scenario of another method for inter-device application collaboration provided by an embodiment of the present application;
图4为本申请实施例提供的另一种设备间应用协同工作的方法的应用场景示意图;4 is a schematic diagram of an application scenario of another method for inter-device application collaboration provided by an embodiment of the present application;
图5为本申请实施例提供的另一种设备间应用协同工作的方法的应用场景示意图;5 is a schematic diagram of an application scenario of another method for inter-device application collaboration provided by an embodiment of the present application;
图6为本申请实施例提供的另一种设备间应用协同工作的方法的应用场景示意图;6 is a schematic diagram of an application scenario of another method for inter-device application collaboration provided by an embodiment of the present application;
图7为本申请实施例提供的另一种设备间应用协同工作的方法的应用场景示意图;7 is a schematic diagram of an application scenario of another method for inter-device application collaboration provided by an embodiment of the present application;
图8为本申请实施例提供的一种电子设备的结构示意图;FIG. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
图9为本申请实施例提供的一种系统架构的示意图;FIG. 9 is a schematic diagram of a system architecture provided by an embodiment of the present application;
图10为本申请实施例提供的另一种系统架构的示意图;10 is a schematic diagram of another system architecture provided by an embodiment of the present application;
图11为本申请实施例提供的一种生成二维码的方法的流程示意图;11 is a schematic flowchart of a method for generating a two-dimensional code according to an embodiment of the present application;
图12为本申请实施例提供的一种扫描二维码进行组网的方法的流程示意图;12 is a schematic flowchart of a method for scanning a two-dimensional code for networking according to an embodiment of the present application;
图13为本申请实施例提供的一种设备间应用协同工作的方法应用时的界面图;13 is an interface diagram when a method for inter-device application collaboration provided by an embodiment of the present application is applied;
图14为本申请实施例提供的一种设备间应用协同工作的方法的流程示意图;14 is a schematic flowchart of a method for inter-device application collaboration provided by an embodiment of the present application;
图15为本申请实施例提供的另一种设备间应用协同工作的方法的流程示意图;15 is a schematic flowchart of another method for inter-device application collaboration provided by an embodiment of the present application;
图16为本申请实施例提供的另一种设备间应用协同工作的方法的流程示意图;16 is a schematic flowchart of another method for inter-device application collaboration provided by an embodiment of the present application;
图17为本申请实施例提供的一种设备间应用协同工作的装置的结构示意图;17 is a schematic structural diagram of an apparatus for inter-device application collaboration provided by an embodiment of the present application;
图18为本申请实施例提供的另一种设备间应用协同工作的装置的结构示意图。FIG. 18 is a schematic structural diagram of another apparatus for inter-device application collaboration provided by an embodiment of the present application.
具体实施方式Detailed ways
随着智能设备的普及,很多人都拥有两个甚至更多的设备。在人们使用这些设备的过程中,对于某些应用,可能需要通过不同的设备间的协同工作来获得更好的体验。因此,应用在不同设备间的协同工作技术应运而生。例如,在多人会议时,主讲人(或称为主席)可以通过办公应用在手机和大屏(如,智慧屏)间的协同工作,将手机上的文档以及对文档的涂鸦、翻页操作通过大屏(如,智慧屏)来显示。又例如,在通过大屏游玩游戏时,玩家可以通过游戏应用在手机和大屏间的协同工作,将手机作为 游戏手柄来对大屏上的游戏进行操作控制。With the proliferation of smart devices, many people own two or more devices. In the process of using these devices, for some applications, it may be necessary to obtain a better experience through the collaborative work between different devices. Therefore, the collaborative work technology applied between different devices emerges as the times require. For example, in a multi-person conference, the presenter (or the chairman) can work collaboratively between the mobile phone and the large screen (such as a smart screen) through the office application, and the document on the mobile phone, as well as the doodling and page turning operations on the document. Displayed on a large screen (eg, a smart screen). For another example, when playing a game on a large screen, the player can use the mobile phone as a gamepad to operate and control the game on the large screen through the cooperative work between the mobile phone and the large screen through the game application.
通常,应用在不同设备间的协同工作,是通过云服务器来实现的。即通过云服务器对应用在两个或多个设备间的协同指令进行转发。例如,在通过游戏应用在手机和大屏间的协同工作,将手机作为游戏手柄来对大屏上的游戏进行操作控制的场景中,玩家可以通过手机上的游戏客户端对大屏上的游戏客户端生成的二维码进行扫码,以使手机上的游戏客户端和大屏上的游戏客户端分别与云服务器建立连接。当玩家通过手机上的游戏客户端进行操作时,手机可将其游戏客户端的操作指令(即协同指令)发送给云服务器,再由云服务器将操作指令转发给大屏,以使大屏上的游戏客户端可根据大屏接收到的操作指令作出响应,生成相应的游戏画面。Usually, the collaborative work of applications between different devices is realized through cloud servers. That is, the cooperative instructions applied between two or more devices are forwarded through the cloud server. For example, in the scenario where the mobile phone is used as a gamepad to operate and control the game on the large screen through the cooperative work between the mobile phone and the large screen through the game application, the player can use the game client on the mobile phone to control the game on the large screen. Scan the QR code generated by the client, so that the game client on the mobile phone and the game client on the large screen respectively establish a connection with the cloud server. When the player operates through the game client on the mobile phone, the mobile phone can send the operation instruction of the game client (that is, the collaborative instruction) to the cloud server, and then the cloud server forwards the operation instruction to the big screen, so that the game The game client can respond according to the operation command received by the large screen, and generate the corresponding game screen.
可以看到,目前通过云服务器实现应用在不同设备间的协同工作,需要应用服务商部署相应的服务器,成本相对较高。并且,通过云服务器转发应用在两个或多个设备间的协同指令,协同指令的传递路径较长,且协同指令的传输质量对于网络质量的依赖性较强,因此设备间的协同工作响应时延较高,稳定性较差。导致对于多人会议、即时游戏等对时延要求较高的场景,用户体验较差。It can be seen that at present, the collaborative work of applications between different devices is realized through cloud servers, which requires application service providers to deploy corresponding servers, and the cost is relatively high. In addition, through the cloud server forwarding the cooperative instructions applied between two or more devices, the transmission path of the cooperative instructions is long, and the transmission quality of the cooperative instructions has a strong dependence on the network quality. Therefore, when the cooperative work between the devices responds The higher the delay, the lower the stability. As a result, the user experience is poor for scenarios with high latency requirements, such as multi-person conferences and instant games.
为解决上述问题,本申请实施例提供一种设备间应用协同工作的方法,该方法可以应用于应用在不同设备间进行协同工作的场景中。In order to solve the above problem, an embodiment of the present application provides a method for inter-device applications to work cooperatively, and the method can be applied to a scenario where applications work cooperatively between different devices.
例如,图1为本申请实施例提供的一种设备间应用协同工作的方法的应用场景示意图。如图1所示,用户可以通过办公应用(如,
Figure PCTCN2022083743-appb-000001
)在手机101和大屏102(如,智慧屏)之间的协同工作,将手机101上的文档以及对文档的涂鸦等操作在大屏102进行显示。作为一种示例,如图2中的(a)所示,大屏201可以显示一个二维码。当用户需要将手机202上的文档在大屏201上显示时,如图2中的(b)所示,用户可以先在手机202上打开该文档,并点击共享图标203。响应于上述用户的操作,手机202可以打开相机以便用户进行扫码。如图2中的(c)所示,用户可以通过手机202扫描大屏201上显示的二维码。当手机202扫描到二维码后,便能够根据二维码与大屏201建立连接,并如图2中的(d)所示,将手机202上的文档同步到大屏201上进行显示。作为又一种示例,如图3中的(a)所示,大屏301可以显示用于提示用户使用近距离无线通信技术(near field communication,NFC)进行协同工作的提示,如“请打开手机NFC,碰一碰遥控器”。当用户需要将手机302上的文档在大屏301上显示时,用户可以采用如图2中的(b)所示的操作以启动手机共享文档的功能。响应于该操作,手机302便能够启动NFC碰一碰功能。如图3中的(b)所示,用户可以将手机302与遥控器303碰一碰。当手机302与遥控器303碰一碰之后,手机302便能够根据碰一碰时NFC传输的数据与大屏301建立连接,并如图3中的(c)所示,将手机302上的文档同步到大屏301上进行显示。如图1所示,用户还可以通过办公应用在平板103和大屏102之间的协同工作,将大屏102上显示的文档以及对文档的涂鸦等操作共享到平板103上进行显示。作为一种示例,如图4中的(a)所示,大屏401在显示文档时,还可以显示一个二维码(其中,该大屏401显示的文档可以是如图2或如图3所示的场景下大屏同步显示的手机上的文档,即如图2中的(d)所示或如图3中的(c)所示。还可以是大屏401直接显示的其存储的文档等)。当用户需要将大屏401上显示的文档同步到平板402上时,如图4中的(b)所示,用户可以通过平板402 扫描大屏401上显示的二维码。当平板402扫描到二维码后,便能够根据二维码与大屏401建立连接。并如图4中的(c)所示,平板402可显示由大屏401同步的文档。
For example, FIG. 1 is a schematic diagram of an application scenario of a method for inter-device application collaboration provided by an embodiment of the present application. As shown in Figure 1, users can use office applications (eg,
Figure PCTCN2022083743-appb-000001
) cooperates between the mobile phone 101 and the large screen 102 (eg, a smart screen), and displays the documents on the mobile phone 101 and the graffiti on the documents on the large screen 102 . As an example, as shown in (a) of FIG. 2 , the large screen 201 can display a two-dimensional code. When the user needs to display the document on the mobile phone 202 on the large screen 201 , as shown in (b) of FIG. 2 , the user can first open the document on the mobile phone 202 and click the share icon 203 . In response to the above-mentioned user's operation, the mobile phone 202 can turn on the camera so that the user can scan the code. As shown in (c) of FIG. 2 , the user can scan the two-dimensional code displayed on the large screen 201 through the mobile phone 202 . After the mobile phone 202 scans the two-dimensional code, it can establish a connection with the large screen 201 according to the two-dimensional code, and as shown in (d) in FIG. As another example, as shown in (a) of FIG. 3 , the large screen 301 may display a prompt for prompting the user to use the near field communication (NFC) technology for collaborative work, such as "Please turn on the mobile phone. NFC, touch the remote". When the user needs to display the document on the mobile phone 302 on the large screen 301, the user can use the operation shown in (b) of FIG. 2 to activate the function of sharing the document on the mobile phone. In response to this operation, the mobile phone 302 is able to activate the NFC tap function. As shown in (b) of FIG. 3 , the user can touch the mobile phone 302 with the remote control 303 . When the mobile phone 302 touches the remote control 303, the mobile phone 302 can establish a connection with the large screen 301 according to the data transmitted by the NFC when touching, and as shown in (c) of FIG. Synchronized to the large screen 301 for display. As shown in FIG. 1 , the user can also share the document displayed on the large screen 102 and the operations such as graffiti on the document to the tablet 103 through the collaborative work between the tablet 103 and the large screen 102 through the office application. As an example, as shown in (a) of FIG. 4 , when displaying a document, the large screen 401 may also display a two-dimensional code (wherein, the document displayed on the large screen 401 may be as shown in FIG. 2 or FIG. 3 ). In the scenario shown, the document on the mobile phone displayed on the large screen synchronously is as shown in (d) in Figure 2 or (c) in Figure 3. It can also be directly displayed on the large screen 401 and stored in it. documentation, etc.). When the user needs to synchronize the document displayed on the large screen 401 to the tablet 402 , as shown in (b) in FIG. 4 , the user can scan the two-dimensional code displayed on the large screen 401 through the tablet 402 . After the tablet 402 scans the two-dimensional code, it can establish a connection with the large screen 401 according to the two-dimensional code. And as shown in (c) of FIG. 4 , the tablet 402 can display the documents synchronized by the large screen 401 .
又例如,图5为本申请实施例提供的另一种设备间应用协同工作的方法的应用场景示意图。如图5所示,用户可以通过游戏应用在手机501和大屏502(如,智慧屏)之间的协同工作,将手机501作为游戏手柄来对大屏502上的游戏进行操作控制。作为一种示例,如图6中的(a)所示,大屏601在显示游戏应用的画面时,还可以显示一个二维码。当用户需要将手机602作为游戏手柄来控制大屏601上的游戏应用时。如图6中的(b)所示,用户可以通过手机602扫描大屏601上显示的二维码。当手机602扫描到二维码后,便能够根据二维码与大屏601建立连接。并如图6中的(c)所示,手机602可拉起游戏手柄相关应用,以便于用户将手机602作为游戏手柄对大屏601上的游戏应用进行控制。作为又一种示例,如图7中的(a)所示,大屏701在显示游戏应用的画面时,还可以显示用于提示用户使用NFC进行协同工作的提示,如“请打开手机NFC,碰一碰遥控器”。当用户需要将手机702作为游戏手柄来控制大屏701上的游戏应用时。如图7中的(b)所示,用户可以将手机702与遥控器703碰一碰。当手机702与遥控器703碰一碰之后,手机702便能够根据碰一碰时NFC传输的数据与大屏701建立连接,并如图7中的(c)所示,手机702可拉起游戏手柄相关应用,以便于用户将手机702作为游戏手柄对大屏701上的游戏应用进行控制。For another example, FIG. 5 is a schematic diagram of an application scenario of another method for inter-device application collaboration provided by an embodiment of the present application. As shown in FIG. 5 , the user can use the mobile phone 501 as a gamepad to operate and control the game on the large screen 502 through the cooperative work of the game application between the mobile phone 501 and the large screen 502 (eg, a smart screen). As an example, as shown in (a) of FIG. 6 , when displaying the picture of the game application, the large screen 601 may also display a two-dimensional code. When the user needs to use the mobile phone 602 as a gamepad to control the game application on the large screen 601 . As shown in (b) of FIG. 6 , the user can scan the two-dimensional code displayed on the large screen 601 through the mobile phone 602 . After the mobile phone 602 scans the two-dimensional code, it can establish a connection with the large screen 601 according to the two-dimensional code. And as shown in (c) of FIG. 6 , the mobile phone 602 can pull up the application related to the gamepad, so that the user can use the mobile phone 602 as a gamepad to control the game application on the large screen 601 . As another example, as shown in (a) of FIG. 7 , when displaying the screen of the game application, the large screen 701 may also display a prompt for prompting the user to use NFC for collaborative work, such as “Please turn on the NFC of the mobile phone, Touch the remote". When the user needs to use the mobile phone 702 as a gamepad to control the game application on the large screen 701 . As shown in (b) of FIG. 7 , the user can touch the mobile phone 702 with the remote control 703 . When the mobile phone 702 touches the remote control 703, the mobile phone 702 can establish a connection with the large screen 701 according to the data transmitted by the NFC when touching, and as shown in (c) of FIG. 7, the mobile phone 702 can start the game Handle related applications, so that the user can use the mobile phone 702 as a game handle to control the game application on the large screen 701 .
在本申请实施例中,该设备间应用协同工作的方法可以是,当第一电子设备(如,图1中所示的大屏102,图2中所示的大屏201等)上的第一应用,和第二电子设备(如,图1中所示的手机101和平板103,图2中所示的手机202等)上与第一应用相对应的第二应用(第二应用与第一应用相对应,即第一应用和第二应用为同一应用分别在第一电子设备和第二电子设备上的对应版本)需要协同工作时,可以让第一电子设备与第二电子设备建立通信连接,并使第一电子设备绑定第一电子设备的第一应用和第二电子设备的第二应用,从而使第一电子设备的第一应用与第二电子设备的第二应用之间可以传输协同信息。例如,第一电子设备可生成编码信息,以使第二电子设备可获取编码信息并根据编码信息与第一电子设备建立通信连接。如,第一电子设备可生成并显示包含编码信息的二维码(如,图1中大屏102上显示的二维码,图2中大屏201上显示的二维码等)或条形码,然后第二电子设备可通过扫描该二维码或条形码与第一电子设备建立通信连接,并使第二应用和第一应用相互绑定。又如,第二电子设备可通过NFC碰一碰的方式,从第一电子设备获取编码信息(例如,如图3或图7所示的手机通过碰一碰与大屏连接)。从而,使第一应用和第二应用间可以直接通过第一电子设备和第二电子设备间建立的连接进行信息交互,即第一应用和第二应用在第一电子设备和第二电子设备间的协同指令可以直接通过第一电子设备和第二电子设备间建立的连接相互传输。其中,第一电子设备和第二电子设备间建立的连接可以是基于同一局域网建立的通信连接,也可以是基于移动通信建立的通信连接(如基于移动通信的侧行链路通信),基于近场通信(如,蓝牙)建立的通信连接等。In this embodiment of the present application, the method for inter-device application collaboration may be: when the first electronic device (eg, the large screen 102 shown in FIG. 1 , the large screen 201 shown in FIG. 2 , etc.) an application, and a second application corresponding to the first application on the second electronic device (eg, the mobile phone 101 and the tablet 103 shown in FIG. Corresponding to an application, that is, the first application and the second application are corresponding versions of the same application on the first electronic device and the second electronic device respectively) When the collaborative work is required, the first electronic device and the second electronic device can be established to communicate connect and bind the first electronic device to the first application of the first electronic device and the second application of the second electronic device, so that the first application of the first electronic device and the second application of the second electronic device can communicate with each other. Transmission of coordination information. For example, the first electronic device can generate encoded information, so that the second electronic device can obtain the encoded information and establish a communication connection with the first electronic device according to the encoded information. For example, the first electronic device can generate and display a two-dimensional code (such as the two-dimensional code displayed on the large screen 102 in FIG. 1 , the two-dimensional code displayed on the large screen 201 in FIG. 2 , etc.) or barcode containing the encoded information, Then, the second electronic device can establish a communication connection with the first electronic device by scanning the two-dimensional code or barcode, and bind the second application and the first application to each other. For another example, the second electronic device can obtain the encoded information from the first electronic device by means of NFC touch (for example, the mobile phone as shown in FIG. 3 or FIG. 7 is connected to the large screen by touch). Therefore, information exchange between the first application and the second application can be performed directly through the connection established between the first electronic device and the second electronic device, that is, the first application and the second application are between the first electronic device and the second electronic device. The coordinated instructions of the first electronic device can be directly transmitted to each other through the connection established between the first electronic device and the second electronic device. Wherein, the connection established between the first electronic device and the second electronic device may be a communication connection established based on the same local area network, or may be a communication connection established based on mobile communication (such as mobile communication-based sidelink communication). A communication connection established by field communication (eg, Bluetooth), etc.
其中,第一电子设备的第一应用和第二电子设备的第二应用的绑定,可以是第一应用的服务和第二应用的服务之间建立跨设备通信链路,以使第一应用和第二应用可以跨设备交互。The binding of the first application of the first electronic device and the second application of the second electronic device may be the establishment of a cross-device communication link between the service of the first application and the service of the second application, so that the first application and the second application can interact across devices.
如此,当第一应用和第二应用在第一电子设备和第二电子设备间需要协同工作时(即应用需要在不同电子设备间协同工作时),第一电子设备和第二电子设备可以通过如扫描二维码的方式在两者间建立通信连接,并使第一应用和第二应用相互绑定,从而使第一应用和第二应用的协同指令可以在第一电子设备和第二电子设备间直接进行传输,避免云服务器对协同指令的转发,减短协同指令的传递路径,并减小网络质量对协同指令传输造成的影响,从而降低协同指令的传输时延,提高传输稳定性。使用户在多人会议、即时游戏等对时延要求较高的场景下具有更好的应用协同体验。In this way, when the first application and the second application need to work together between the first electronic device and the second electronic device (that is, when the applications need to work together between different electronic devices), the first electronic device and the second electronic device can use the For example, by scanning the two-dimensional code, a communication connection is established between the two, and the first application and the second application are bound to each other, so that the coordinated instructions of the first application and the second application can be executed on the first electronic device and the second electronic device. Direct transmission between devices avoids the forwarding of cooperative instructions by the cloud server, shortens the transmission path of cooperative instructions, and reduces the impact of network quality on the transmission of cooperative instructions, thereby reducing the transmission delay of cooperative instructions and improving transmission stability. It enables users to have a better application collaboration experience in scenarios with high latency requirements, such as multi-person conferences and instant games.
以下,将结合附图对本申请实施例提供的设备间应用协同工作的方法进行说明。Hereinafter, the method for inter-device application cooperation provided by the embodiments of the present application will be described with reference to the accompanying drawings.
在本申请实施例中,上述第一电子设备和第二电子设备,可以是手机、平板电脑、手持计算机,PC,蜂窝电话,个人数字助理(personal digital assistant,PDA),可穿戴式设备(如:智能手表、智能手环),智能家居设备(如:电视机),车机(如:车载电脑),智慧屏,游戏机,智能音箱,智能投影仪,智能电视盒,以及增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备等。本申请实施例对于电子设备的具体设备形态不作特殊限制。In the embodiment of the present application, the above-mentioned first electronic device and second electronic device may be mobile phones, tablet computers, handheld computers, PCs, cellular phones, personal digital assistants (personal digital assistants, PDAs), wearable devices (such as : smart watch, smart bracelet), smart home equipment (such as: TV), car machine (such as: car computer), smart screen, game console, smart speaker, smart projector, smart TV box, and augmented reality (augmented reality) reality, AR)/virtual reality (virtual reality, VR) devices, etc. The embodiments of the present application do not specifically limit the specific device form of the electronic device.
可选地,在一些实施方式中,上述第一电子设备和第二电子设备的设备形态可以相同。例如,第一电子设备和第二电子设备均为手机。Optionally, in some embodiments, the device forms of the first electronic device and the second electronic device may be the same. For example, both the first electronic device and the second electronic device are cell phones.
或者,在另一些实施方式中,上述第一电子设备和第二电子设备的设备形态还可以不同。例如,第一电子设备为智慧屏,第二电子设备为手机。Alternatively, in other embodiments, the device forms of the first electronic device and the second electronic device may also be different. For example, the first electronic device is a smart screen, and the second electronic device is a mobile phone.
在本申请实施例中,上述第一电子设备和第二电子设备是可以运行操作系统,安装应用的电子设备。可选地,第一电子设备和第二电子设备运行的操作系统可以是安卓
Figure PCTCN2022083743-appb-000002
系统,鸿蒙系统等。在一些可能的实施方式中,第一电子设备和第二电子设备的操作系统可以相同。例如,第一电子设备和第二电子设备均运行安卓
Figure PCTCN2022083743-appb-000003
系统,或第一电子设备和第二电子设备均运行鸿蒙系统。在另一些可能的实施方式中,第一电子设备和第二电子设备的操作系统还可以不同。例如,第一电子设备运行鸿蒙系统,第二电子设备运行安卓
Figure PCTCN2022083743-appb-000004
系统。
In the embodiment of the present application, the first electronic device and the second electronic device are electronic devices that can run an operating system and install applications. Optionally, the operating system run by the first electronic device and the second electronic device may be Android
Figure PCTCN2022083743-appb-000002
system, Hongmeng system, etc. In some possible implementations, the operating systems of the first electronic device and the second electronic device may be the same. For example, both the first electronic device and the second electronic device run Android
Figure PCTCN2022083743-appb-000003
system, or both the first electronic device and the second electronic device run the Hongmeng system. In some other possible implementations, the operating systems of the first electronic device and the second electronic device may also be different. For example, the first electronic device runs Hongmeng system, and the second electronic device runs Android
Figure PCTCN2022083743-appb-000004
system.
示例地,以电子设备(如,上述第一电子设备和第二电子设备)为手机为例,图8示出了本申请实施例提供的一种电子设备的结构示意图。也即,示例性的,图8所示的电子设备可以是手机。For example, taking the electronic device (eg, the above-mentioned first electronic device and second electronic device) as a mobile phone as an example, FIG. 8 shows a schematic structural diagram of an electronic device provided by an embodiment of the present application. That is, exemplarily, the electronic device shown in FIG. 8 may be a mobile phone.
如图8所示,电子设备可以包括处理器810,外部存储器接口820,内部存储器821,通用串行总线(universal serial bus,USB)接口830,充电管理模块840,电源管理模块841,电池842,天线1,天线2,移动通信模块850,无线通信模块860,音频模块870,扬声器870A,受话器870B,麦克风870C,耳机接口870D,传感器模块880,按键890,马达891,指示器892,摄像头893,显示屏894,以及用户标识模块(subscriber identification module,SIM)卡接口895等。其中,传感器模块880可以包括压力传感器880A,陀螺仪传感器880B,气压传感器880C,磁传感器880D,加速度传感器880E,距离传感器880F,接近光传感器880G,指纹传感器880H,温度传感器880J,触摸传感器880K,环境光传感器880L,骨传导传感器880M等。As shown in FIG. 8 , the electronic device may include a processor 810, an external memory interface 820, an internal memory 821, a universal serial bus (USB) interface 830, a charge management module 840, a power management module 841, a battery 842, Antenna 1, Antenna 2, Mobile Communication Module 850, Wireless Communication Module 860, Audio Module 870, Speaker 870A, Receiver 870B, Microphone 870C, Headphone Interface 870D, Sensor Module 880, Key 890, Motor 891, Indicator 892, Camera 893, Display screen 894, and subscriber identification module (subscriber identification module, SIM) card interface 895, etc. The sensor module 880 may include a pressure sensor 880A, a gyroscope sensor 880B, an air pressure sensor 880C, a magnetic sensor 880D, an acceleration sensor 880E, a distance sensor 880F, a proximity light sensor 880G, a fingerprint sensor 880H, a temperature sensor 880J, a touch sensor 880K, and an environmental sensor. Light sensor 880L, bone conduction sensor 880M, etc.
可以理解的是,本实施例示意的结构并不构成对电子设备的具体限定。在另一些实施例中,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者拆 分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device. In other embodiments, an electronic device may include more or fewer components than shown, or some components may be combined, or some components may be split, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
处理器810可以包括一个或多个处理单元,例如:处理器810可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 810 may include one or more processing units, for example, the processor 810 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU) Wait. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
控制器可以是电子设备的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。A controller can be the nerve center and command center of an electronic device. The controller can generate an operation control signal according to the instruction operation code and timing signal, and complete the control of fetching and executing instructions.
处理器810中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器810中的存储器为高速缓冲存储器。该存储器可以保存处理器810刚用过或循环使用的指令或数据。如果处理器810需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器810的等待时间,因而提高了系统的效率。A memory may also be provided in the processor 810 for storing instructions and data. In some embodiments, the memory in processor 810 is cache memory. This memory may hold instructions or data that have just been used or recycled by the processor 810 . If the processor 810 needs to use the instruction or data again, it can be called directly from the memory. Repeated accesses are avoided, and the waiting time of the processor 810 is reduced, thereby increasing the efficiency of the system.
在一些实施例中,处理器810可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments, processor 810 may include one or more interfaces. The interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transceiver (universal asynchronous transmitter) receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and / or universal serial bus (universal serial bus, USB) interface, etc.
电子设备的无线通信功能可以通过天线1,天线2,移动通信模块850,无线通信模块860,调制解调处理器以及基带处理器等实现。The wireless communication function of the electronic device can be implemented by the antenna 1, the antenna 2, the mobile communication module 850, the wireless communication module 860, the modulation and demodulation processor, the baseband processor, and the like.
天线1和天线2用于发射和接收电磁波信号。电子设备中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in an electronic device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, the antenna 1 can be multiplexed as a diversity antenna of the wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
移动通信模块850可以提供应用在电子设备上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块850可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块850可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块850还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块850的至少部分功能模块可以被设置于处理器810中。在一些实施例中,移动通信模块850的至少部分功能模块可以与处理器810的至少部分模块被设置在同一个器件中。The mobile communication module 850 can provide a wireless communication solution including 2G/3G/4G/5G etc. applied on the electronic device. The mobile communication module 850 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), and the like. The mobile communication module 850 can receive electromagnetic waves from the antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 850 can also amplify the signal modulated by the modulation and demodulation processor, and then convert it into electromagnetic waves and radiate it out through the antenna 1 . In some embodiments, at least part of the functional modules of the mobile communication module 850 may be provided in the processor 810 . In some embodiments, at least part of the functional modules of the mobile communication module 850 may be provided in the same device as at least part of the modules of the processor 810 .
无线通信模块860可以提供应用在电子设备上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技 术(infrared,IR)等无线通信的解决方案。无线通信模块860可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块860经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器810。无线通信模块860还可以从处理器810接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The wireless communication module 860 can provide applications on electronic devices including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite systems (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions. The wireless communication module 860 may be one or more devices integrating at least one communication processing module. The wireless communication module 860 receives electromagnetic waves via the antenna 2 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 810 . The wireless communication module 860 can also receive the signal to be sent from the processor 810 , perform frequency modulation on the signal, amplify the signal, and then convert it into an electromagnetic wave for radiation through the antenna 2 .
在一些实施例中,电子设备的天线1和移动通信模块850耦合,天线2和无线通信模块860耦合,使得电子设备可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。In some embodiments, the antenna 1 of the electronic device is coupled with the mobile communication module 850, and the antenna 2 is coupled with the wireless communication module 860, so that the electronic device can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband Code Division Multiple Access (WCDMA), Time Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc. The GNSS may include global positioning system (global positioning system, GPS), global navigation satellite system (global navigation satellite system, GLONASS), Beidou navigation satellite system (beidou navigation satellite system, BDS), quasi-zenith satellite system (quasi -zenith satellite system, QZSS) and/or satellite based augmentation systems (SBAS).
电子设备通过GPU,显示屏894,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏894和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器810可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device realizes the display function through the GPU, the display screen 894, and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 894 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 810 may include one or more GPUs that execute program instructions to generate or alter display information.
显示屏894用于显示图像,视频等。显示屏894包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备可以包括1个或N个显示屏894,N为大于1的正整数。Display screen 894 is used to display images, videos, and the like. Display screen 894 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (active-matrix organic light). emitting diode, AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (quantum dot light emitting diodes, QLED) and so on. In some embodiments, the electronic device may include 1 or N display screens 894, where N is a positive integer greater than 1.
电子设备可以通过ISP,摄像头893,视频编解码器,GPU,显示屏894以及应用处理器等实现拍摄功能。在一些实施例中,电子设备可以包括1个或N个摄像头893,N为大于1的正整数。示例地,在本申请实施例中,电子设备可以通过拍摄功能扫描二维码获取二维码图像。The electronic device can realize the shooting function through ISP, camera 893, video codec, GPU, display screen 894, and application processor. In some embodiments, the electronic device may include 1 or N cameras 893 , where N is a positive integer greater than 1. For example, in the embodiment of the present application, the electronic device may scan the two-dimensional code through the photographing function to obtain the two-dimensional code image.
内部存储器821可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器810通过运行存储在内部存储器821的指令,从而执行电子设备的各种功能应用以及数据处理。内部存储器821可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器821可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。Internal memory 821 may be used to store computer executable program code, which includes instructions. The processor 810 executes various functional applications and data processing of the electronic device by executing the instructions stored in the internal memory 821 . The internal memory 821 may include a storage program area and a storage data area. The storage program area can store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), and the like. The storage data area can store data (such as audio data, phone book, etc.) created during the use of the electronic device. In addition, the internal memory 821 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (UFS), and the like.
当然,可以理解的,上述图8所示仅仅为电子设备的形态为手机时的示例性说明。若电子设备是平板电脑,手持计算机,PC,PDA,可穿戴式设备(如:智能手表、智能手环),智能家居设备(如:电视机),车机(如:车载电脑),智慧屏,游戏机以及AR/VR设备等其他设备形态时,电子设备的结构中可以包括比图8中所示更少的结构,也可以包括比图8中所示更多的结构,在此不作限制。Of course, it can be understood that the above-mentioned FIG. 8 is only an exemplary illustration when the form of the electronic device is a mobile phone. If the electronic devices are tablet computers, handheld computers, PCs, PDAs, wearable devices (such as smart watches, smart bracelets), smart home devices (such as TV sets), car devices (such as car computers), smart screens , game consoles, AR/VR devices and other device forms, the structure of the electronic device may include fewer structures than those shown in FIG. 8 , or may include more structures than those shown in FIG. 8 , which is not limited here. .
以下实施例中的方法均可以在具有上述硬件结构的电子设备中实现。The methods in the following embodiments can all be implemented in an electronic device having the above-mentioned hardware structure.
其中,本申请实施例中上述的电子设备,如,第一电子设备和第二电子设备的系统架构均采用分布式服务框架。Wherein, the above-mentioned electronic devices in the embodiments of the present application, for example, the system architectures of the first electronic device and the second electronic device all adopt a distributed service framework.
示例地,图9为本申请实施例提供的一种系统架构的示意图。如图9所示,该系统架构包括驱动层,即内核(Kernel),硬件抽象层(hardware abstract layer,HAL),应用框架层,即安卓开源项目(android open source project,AOSP)应用框架,分布式服务平台,以及应用层。For example, FIG. 9 is a schematic diagram of a system architecture provided by an embodiment of the present application. As shown in Figure 9, the system architecture includes a driver layer, namely the kernel (Kernel), a hardware abstraction layer (HAL), and an application framework layer, namely the Android Open Source Project (AOSP) application framework, distributed service platform and application layer.
其中,分布式服务平台可以包括应用协同服务模块(app router service,ARS),设备管理模块(device manager,DM),通信模块(net work module),二维码识别模块,安全管理模块(HiChain),以及分布式执行框架(distributed execute framework,DEF)。Among them, the distributed service platform may include an application collaborative service module (app router service, ARS), a device management module (device manager, DM), a communication module (network module), a two-dimensional code identification module, and a security management module (HiChain) , and the distributed execution framework (DEF).
应用协同服务模块,能够提供便携的近场应用协同能力,并提供扫描连接方式(如碰一碰连接,扫码连接等),方便不同用户间设备的接入。示例地,应用协同服务模块,可以包括业务适配能力,分布式能力以及基础能力。其中,业务适配能力可以包括广播接收器,协议解析,业务路由,统一弹框用户界面(user interface,UI)等。分布式能力可以包括协同管理,近场通信(near field communication,NFC)碰一碰对接,应用市场关联,可用区(availability zone,AZ)互通等。基础能力可以包括通信注册、应用管理、个人识别码(personal identification number,PIN)码机制,异常处理,设备维护,访问控制,运营打点,回调多并发等。The application collaboration service module can provide portable near-field application collaboration capabilities, and provide scan connection methods (such as touch connection, scan code connection, etc.) to facilitate the access of devices between different users. For example, the application collaboration service module may include business adaptation capabilities, distributed capabilities, and basic capabilities. The service adaptation capabilities may include broadcast receivers, protocol parsing, service routing, and unified pop-up user interface (user interface, UI), and the like. Distributed capabilities can include collaborative management, near field communication (NFC) touch-to-connect, application market association, and availability zone (AZ) interoperability. Basic capabilities include communication registration, application management, personal identification number (PIN) code mechanism, exception handling, device maintenance, access control, operational management, and multiple concurrent callbacks.
二维码识别模块,能够对相机获取的二维码图像进行识别,提取二维码图像包含的内容。The two-dimensional code identification module can identify the two-dimensional code image obtained by the camera, and extract the content contained in the two-dimensional code image.
分布式执行框架,能够提供原子化服务的发现,注册,查询以及迁移。还可以提供设备间底层数据的通信和设备发现功能。A distributed execution framework that provides atomic service discovery, registration, query and migration. It can also provide communication and device discovery functions for underlying data between devices.
设备管理模块,能够维护本地设备信息,如,设备网际互连协议(internet protocol,IP)地址,设备网络唯一标识(identity document,ID),设备账号信息等。设备管理模块还可以维护设备群组信息以用于建立安全可信连接。The device management module can maintain local device information, such as device internet protocol (IP) address, device network unique identification (identity document, ID), device account information, etc. The device management module may also maintain device group information for establishing secure and trusted connections.
安全管理模块,能够管理分布式场景下的设备群组,以及进行设备群组认证,以保证分布式场景下设备与设备间,应用与应用间的安全可信通信和连接。The security management module can manage device groups in distributed scenarios and perform device group authentication to ensure secure and trusted communication and connection between devices and applications and applications in distributed scenarios.
通信模块,能够管理分布式场景下同账号设备的自发现,自组网,以及扫描发现不同账号的设备,为不同设备间的通信提供通道,保障数据的安全稳定传输。The communication module can manage the self-discovery and self-organization of devices with the same account in distributed scenarios, as well as scan and discover devices with different accounts, provide a channel for communication between different devices, and ensure the safe and stable transmission of data.
其中,应用层部署的应用,可以是集成有应用协同服务模块工具包(ARS kit)和分布式执行框架工具包(DEF kit)的安卓(Android)应用。ARS kit可以提供生成二维码,解析二维码以及发送消息/文件的功能。The application deployed at the application layer may be an Android application integrated with the Application Collaborative Service Module Toolkit (ARS kit) and the Distributed Execution Framework Toolkit (DEF kit). ARS kit can provide functions to generate QR codes, parse QR codes and send messages/files.
示例地,图10为本申请实施例提供的另一种系统架构的示意图。如图10所示, 该系统架构与图9所示的系统架构相似,其区别在于,该系统架构的应用框架层为鸿蒙应用框架,应用层部署的应用为集成有ARS kit和鸿蒙软件开发工具包(software development kit,SDK)的鸿蒙应用。并且,该系统架构的分布式服务平台相比于图9所示的系统架构增加了分布式调度管理服务(distributed scheduler manager service,DMS),该分布式调度管理服务,能够提供跨设备的服务绑定,以及跨设备的AIDL接口调用能力。For example, FIG. 10 is a schematic diagram of another system architecture provided by an embodiment of the present application. As shown in Figure 10, the system architecture is similar to the system architecture shown in Figure 9, the difference is that the application framework layer of the system architecture is the Hongmeng application framework, and the applications deployed in the application layer are integrated with ARS kit and Hongmeng software development tools Hongmeng application package (software development kit, SDK). In addition, the distributed service platform of the system architecture adds a distributed scheduling management service (DMS) compared to the system architecture shown in Figure 9. The distributed scheduling management service can provide cross-device service binding. , and the ability to call AIDL interfaces across devices.
需要说明的是,在一些可能的实施方式中,图9所示的系统架构和图10所示的系统架构还可以组合成一个系统架构,此处不做限制。It should be noted that, in some possible implementation manners, the system architecture shown in FIG. 9 and the system architecture shown in FIG. 10 may also be combined into one system architecture, which is not limited here.
在本申请实施例中,以第二电子设备通过扫描第一电子设备显示的包含编码信息的二维码的方式与第一电子设备建立通信连接为例。当第一电子设备上的第一应用,和第二电子设备上与第一应用相对应的第二应用需要协同工作时。用户可以先启动第一电子设备上的第一应用,第一电子设备可生成与第一应用相关联的二维码,以便于用户通过第二电子设备扫描二维码将第二电子设备与第一电子设备相连接,以及绑定第一应用和第二应用。其中,作为一种示例,第一电子设备生成的二维码所包含的信息(即二维码包含的编码信息,或称为二维码信息),可以参考表1所示。In the embodiment of the present application, it is taken as an example that the second electronic device establishes a communication connection with the first electronic device by scanning a two-dimensional code containing coded information displayed by the first electronic device. When the first application on the first electronic device and the second application corresponding to the first application on the second electronic device need to work together. The user can first start the first application on the first electronic device, and the first electronic device can generate a two-dimensional code associated with the first application, so that the user can scan the two-dimensional code through the second electronic device to connect the second electronic device with the first electronic device. An electronic device is connected, and the first application and the second application are bound. Wherein, as an example, the information contained in the two-dimensional code generated by the first electronic device (that is, the coding information contained in the two-dimensional code, or referred to as two-dimensional code information) can be referred to as shown in Table 1.
表1Table 1
Figure PCTCN2022083743-appb-000005
Figure PCTCN2022083743-appb-000005
Figure PCTCN2022083743-appb-000006
Figure PCTCN2022083743-appb-000006
需要说明的是,表1中的AS、TP以及ACT字段为二维码信息的特征码信息,用于指示二维码识别模块识别二维码后向ARS发送得到的二维码信息,以及指示二维码信息的业务类型为扫一扫拉起应用(application,APP)或者碰一碰拉起APP。其中,AS和TP字段的数据类型为引用类型(String),ACT字段的数据类型为整数类型(int)。PKG、ST、MV、SPKG以及OS字段为需要进行协同工作的应用的应用信息,其中,PKG、ST和SPKG字段的数据类型为String,MV字段的数据类型为长整数类型(long),OS字段的数据类型为int。例如,应用信息包括期望拉起的APP的包名,期望拉起的活动(Activity)名(或称为页面名),期望拉起的APP的最低版本号,服务端APP的包名,以及期望拉起的APP的系统标志等。其中,期望拉起的APP是指要协同工作的应用在扫描二维码的电子设备上相应的APP,期望拉起的活动是期望拉起的APP的相关活动。服务端APP是指要协同工作的应用在生成二维码的电子设备上相应的APP。如,以上述第一电子设备生成二维码,上述第二电子设备扫描二维码为例,则服务端为第一电子设备,服务端APP为第一电子设备上的第一应用,期望拉起的APP为第二电子设备上的第二应用,期望拉起的活动为期望拉起的第二应用的活动。需要说明的是,PKG字段,即期望拉起的APP包名,可以由ARS读取Binder调用者自动填写,如,第一电子设备生成二维码时,PKG字段可由第一电子设备的ARS读取第一应用自动填写。DID、IP、HID、PIN以及GID字段为不同电子设备间建立安全可信通信连接所需的组网信息,其数据类型均为String。例如,组网信息包括本设备(即生成二维码的电子设备)的网络唯一标识,即设备网络ID,本设备的IP地址,本设备已登录账号名的哈希值(Hash),本设备的连接授信PIN码,以及本设备的异账号临时群组ID。It should be noted that the AS, TP and ACT fields in Table 1 are the feature code information of the two-dimensional code information, which are used to instruct the two-dimensional code identification module to identify the two-dimensional code and send the obtained two-dimensional code information to the ARS, and to indicate The business type of the two-dimensional code information is to swipe to open an application (application, APP) or touch to open an APP. The data types of the AS and TP fields are reference types (String), and the data types of the ACT fields are integer types (int). The PKG, ST, MV, SPKG and OS fields are application information of applications that need to work together. The data type of the PKG, ST and SPKG fields is String, the data type of the MV field is long integer type (long), and the OS field The data type is int. For example, the application information includes the package name of the APP expected to be pulled, the name of the activity (or page name) expected to be pulled, the minimum version number of the APP expected to be pulled, the package name of the server APP, and the expected Pull up the system logo of the APP, etc. Wherein, the APP expected to be pulled up refers to the corresponding APP of the application to be cooperating on the electronic device that scans the QR code, and the activity expected to be pulled up is a related activity of the APP expected to be pulled up. The server-side APP refers to the corresponding APP on the electronic device that generates the QR code for the applications to work together. For example, taking the above-mentioned first electronic device to generate a two-dimensional code and the above-mentioned second electronic device to scan the two-dimensional code as an example, the server is the first electronic device, and the server APP is the first application on the first electronic device. The APP to be pulled up is the second application on the second electronic device, and the activity expected to be pulled up is the activity of the second application that is expected to be pulled up. It should be noted that the PKG field, that is, the name of the APP package expected to be pulled up, can be automatically filled in by the caller of the ARS read Binder. For example, when the first electronic device generates a QR code, the PKG field can be read by the ARS of the first electronic device. Take the first application to automatically fill in. The DID, IP, HID, PIN and GID fields are the networking information required to establish a secure and trusted communication connection between different electronic devices, and their data types are all String. For example, the networking information includes the network unique identifier of the device (that is, the electronic device that generates the QR code), that is, the device network ID, the IP address of the device, the hash value (Hash) of the logged-in account name of the device, the device network ID The connection authorization PIN code, and the temporary group ID of the different account of this device.
以下将以第一电子设备上的第一应用,和第二电子设备上与第一应用相对应的第二应用需要协同工作时,第一电子设备生成二维码,且第一电子设备采用如图9或图10所示的架构为例,对电子设备生成上述二维码的具体实施方式进行举例说明。In the following, when the first application on the first electronic device and the second application corresponding to the first application on the second electronic device need to work together, the first electronic device generates a two-dimensional code, and the first electronic device uses such as The architecture shown in FIG. 9 or FIG. 10 is taken as an example to illustrate the specific implementation manner of the electronic device generating the above two-dimensional code.
图11示出了本申请实施例提供的一种生成二维码的方法的流程示意图。如图11所示,电子设备生成二维码的方法可以包括以下S1101-S1107。FIG. 11 shows a schematic flowchart of a method for generating a two-dimensional code provided by an embodiment of the present application. As shown in FIG. 11 , the method for generating a two-dimensional code by an electronic device may include the following S1101-S1107.
S1101、第一应用绑定ARS服务。相应地,ARS绑定设备管理模块,绑定成功后,设备管理模块向ARS回调绑定成功的消息,相应地,ARS向第一应用回调绑定成功的消息。S1101. The first application binds the ARS service. Correspondingly, the ARS binds the device management module, and after the binding is successful, the device management module calls back the binding success message to the ARS, and accordingly, the ARS calls back the binding success message to the first application.
示例地,第一应用为集成有ARS kit的应用。第一应用可以调用ARS kit里面的初始化接口,通过bindService机制触发onServiceConnected来绑定ARS服务和设备管理模块。For example, the first application is an application integrated with ARS kit. The first application can call the initialization interface in the ARS kit, and trigger onServiceConnected through the bindService mechanism to bind the ARS service and the device management module.
第一应用与ARS和设备管理模块进行绑定,能够便于后续第一应用、ARS以及设备管理模块之间的接口调用和信息交互。The first application is bound with the ARS and the device management module, which can facilitate subsequent interface invocation and information exchange between the first application, the ARS, and the device management module.
S1102、第一应用向ARS发送应用信息。S1102. The first application sends application information to the ARS.
其中,应用信息可以包括期望拉起的第二应用的页面名(即期望拉起的页面名),第一应用的包名(即服务端APP的包名),第二应用的包名(即期望拉起的APP的包名),期望的第二应用最低版本号(即期望拉起的APP的最低版本号),以及第二应用的系统标志(即期望拉起的APP的系统标志)(如,安卓
Figure PCTCN2022083743-appb-000007
系统、鸿蒙系统等)。其中,第一应用的包名和第二应用的包名可以相同,也可以不相同。
The application information may include the page name of the second application that is expected to be pulled up (that is, the page name that is expected to be pulled up), the package name of the first application (that is, the package name of the server APP), and the package name of the second application (that is, the package name of the server-side APP). The package name of the APP that is expected to be pulled), the minimum version number of the desired second application (that is, the lowest version number of the APP that is expected to be pulled), and the system flag of the second application (that is, the system flag of the APP that is expected to be pulled) ( For example, android
Figure PCTCN2022083743-appb-000007
system, Hongmeng system, etc.). The package name of the first application and the package name of the second application may be the same or different.
作为一种示例,第一应用可以通过调用其集成的ARS kit里面提供的生成二维码接口genQrCode(bundle,new IAppRouter.GenQrListener())来发送应用信息。其中,bundle中可填入具体的应用信息。例如,bundle可以填入:As an example, the first application may send application information by invoking the two-dimensional code generation interface genQrCode(bundle, new IAppRouter.GenQrListener()) provided in its integrated ARS kit. The bundle can be filled with specific application information. For example, bundle can be filled with:
bundle.putString(ACTIVITY,“cn.wps.moffice.lite.huawei_ars.MainActitivy”),即期望拉起的第二应用的页面名为“cn.wps.moffice.lite.huawei_ars.MainActitivy”;bundle.putString(ACTIVITY, "cn.wps.moffice.lite.huawei_ars.MainActivy"), that is, the page name of the second application to be pulled up is "cn.wps.moffice.lite.huawei_ars.MainActivy";
bundle.putString(PACKAGE_NAME,“cn.wps.moffice.lite.huawei_ars”),即第二应用的包名为“cn.wps.moffice.lite.huawei_ars”;bundle.putString(PACKAGE_NAME, "cn.wps.moffice.lite.huawei_ars"), that is, the package name of the second application is "cn.wps.moffice.lite.huawei_ars";
bundle.putString(APP_VERSION,20001001),即期望的第二应用的最低版本号为“20001001”;bundle.putString(APP_VERSION,20001001), that is, the expected minimum version number of the second application is "20001001";
bundle.putString(OS_TYPE,TYPE_ANDROID_OS),即第二应用的系统类型为安卓
Figure PCTCN2022083743-appb-000008
系统,也即第二应用为安卓应用。
bundle.putString(OS_TYPE,TYPE_ANDROID_OS), that is, the system type of the second application is Android
Figure PCTCN2022083743-appb-000008
The system, that is, the second application is an Android application.
需要说明的是,在一些可能的实施方式中,上述S1101也可以不执行,即第一应用也可以不绑定ARS服务。第一应用可以直接向ARS发送应用信息。此处不做限制。It should be noted that, in some possible implementation manners, the above S1101 may not be executed, that is, the first application may not be bound to the ARS service. The first application may directly send application information to the ARS. There are no restrictions here.
S1103、ARS调用设备管理模块,以从设备管理模块获取组网信息。相应地,设备管理模块向ARS返回组网信息。S1103. The ARS invokes the device management module to acquire networking information from the device management module. Correspondingly, the device management module returns the networking information to the ARS.
其中,组网信息可以包括第一电子设备的设备网络ID,设备IP地址,已登录账号经过哈希加密后的ID。The networking information may include the device network ID of the first electronic device, the device IP address, and the hash-encrypted ID of the logged-in account.
作为一种示例,ARS可以通过调用设备管理模块提供的接口getLocalDeviceInfo,以从设备管理模块获取组网信息。As an example, the ARS may acquire networking information from the device management module by calling the interface getLocalDeviceInfo provided by the device management module.
需要说明的是,在S1103之前,或者在S1103之后,或者在S1103执行时,ARS还可以生成连接授信PIN码。在一些可能的实施方式中,该连接授信PIN码可以按照固定时间进行刷新。例如,ARS每5分钟刷新一次连接授信PIN码。It should be noted that, before S1103, or after S1103, or when S1103 is executed, the ARS may also generate a connection trust PIN code. In some possible implementations, the connection trust PIN code may be refreshed at a fixed time. For example, ARS refreshes the connection credit PIN code every 5 minutes.
S1104、ARS向设备管理模块发送配置群组信息的请求。在该请求中可以携带ARS生成的连接授信PIN码(PIN code),以及ARS在S1102中得到的应用信息,如第一应用的包名(或称为服务端包名(serverPkg))和第二应用的包名(或称为客户端包名(clientPkg))。相应地,设备管理模块向安全管理模块发送创建设备认证群组的请求。在该请求中可以携带ARS发送的配置群组信息的请求中携带的第一应用包名,第二应用包名以及连接授信PIN码。安全管理模块根据接收到的请求创建设备认证群 组后,可以向设备管理模块返回创建成功响应,在该响应中可携带创建的设备认证群组的群组信息,如,群组ID和群组名称等。设备管理模块接收到创建成功响应后存储群组信息,还可以向ARS返回创建成功响应。S1104. The ARS sends a request for configuring group information to the device management module. The request can carry the connection credit PIN code (PIN code) generated by ARS, and the application information obtained by ARS in S1102, such as the package name of the first application (or called the server package name (serverPkg)) and the second The package name of the application (or client package name (clientPkg)). Correspondingly, the device management module sends a request for creating a device authentication group to the security management module. The request may carry the first application package name, the second application package name and the connection credit PIN carried in the request for configuring group information sent by the ARS. After the security management module creates a device authentication group according to the received request, it can return a successful creation response to the device management module, and the response can carry the group information of the created device authentication group, such as group ID and group name etc. The device management module stores the group information after receiving the creation success response, and can also return the creation success response to the ARS.
其中,安全管理模块可以根据应用的包名(如,第一应用的包名和第二应用的包名)以及连接授信PIN码生成群组信息,如上述的群组ID和群组名称。Wherein, the security management module can generate group information, such as the above-mentioned group ID and group name, according to the package names of the applications (eg, the package names of the first application and the second application) and the connection trust PIN code.
在一些可能的实施方式中,ARS可以通过setServerAuth接口向设备管理模块发送配置群组信息的请求。设备管理模块可以通过setAuthInfo接口向安全管理模块发送创建设备认证群组的请求。In some possible implementations, the ARS may send a request for configuring group information to the device management module through the setServerAuth interface. The device management module can send a request for creating a device authentication group to the security management module through the setAuthInfo interface.
S1105、ARS调用设备管理模块,以获取群组信息。相应地,设备管理模块向ARS返回群组信息。S1105. The ARS invokes the device management module to acquire group information. Correspondingly, the device management module returns group information to the ARS.
其中,ARS可以通过调用设备管理模块提供的getAuthInfo接口来获取群组信息。The ARS can obtain group information by calling the getAuthInfo interface provided by the device management module.
需要说明的是,在一些可能的实施方式中,上述S1104和S1105还可以在S1103之前执行,或者还可以先执行S1104,然后再执行S1103和S1105(其中,S1103和S1105之间的先后顺序可不做限定,即可以先执行S1103再执行S1105,也可以先执行S1105再执行S1103,还可以同时执行S1103和S1105),对此,本申请实施例不做限制。It should be noted that, in some possible implementation manners, the above S1104 and S1105 may also be executed before S1103, or S1104 may be executed first, and then S1103 and S1105 may be executed (wherein, the sequence between S1103 and S1105 may be omitted. Restriction, that is, S1103 may be executed first and then S1105 may be executed, or S1105 may be executed first and then S1103 may be executed, or S1103 and S1105 may be executed simultaneously), which is not limited in this embodiment of the present application.
S1106、ARS根据得到的应用信息,组网信息、群组信息以及生成的连接授信PIN码,生成二维码信息。相应地,向第一应用返回二维码信息。S1106. The ARS generates two-dimensional code information according to the obtained application information, networking information, group information, and the generated connection credit PIN code. Correspondingly, the two-dimensional code information is returned to the first application.
需要说明的是,生成的二维码信息可以包括如表1所示的内容。It should be noted that the generated two-dimensional code information may include the content shown in Table 1.
其中,ARS可以通过S1102中,第一应用向ARS发送应用信息采用的genQrCode接口的GenQrListener回调将二维码信息返回给第一应用。The ARS may return the two-dimensional code information to the first application through the GenQrListener callback of the genQrCode interface used by the first application to send the application information to the ARS in S1102.
S1107、第一应用展示二维码图片。该二维码图片包含有上述的二维码信息。S1107. The first application displays a two-dimensional code picture. The two-dimensional code picture contains the above two-dimensional code information.
需要说明的是,当ARS生成的连接授信PIN码刷新时,ARS可以向第一应用发送连接授信PIN码超时通知。接收到连接授信PIN码超时通知,第一应用可重新执行上述S1101至S1107,以重新生成和展示二维码。It should be noted that, when the connection trust PIN code generated by the ARS is refreshed, the ARS may send a connection trust PIN code timeout notification to the first application. After receiving the connection trust PIN code timeout notification, the first application can re-execute the above S1101 to S1107 to regenerate and display the two-dimensional code.
在本申请实施例中,以第二电子设备通过扫描第一电子设备显示的包含编码信息的二维码的方式与第一电子设备建立通信连接为例。当第一电子设备上的第一应用,和第二电子设备上与第一应用相对应的第二应用需要协同工作时,若第一电子设备生成了二维码,则用户可以通过第二电子设备扫描第一电子设备生成的二维码,以将第二电子设备与第一电子设备连接,并绑定第一应用和第二应用。In the embodiment of the present application, it is taken as an example that the second electronic device establishes a communication connection with the first electronic device by scanning a two-dimensional code containing coded information displayed by the first electronic device. When the first application on the first electronic device and the second application corresponding to the first application on the second electronic device need to work together, if the first electronic device generates a QR code, the user can use the second electronic device to generate a QR code. The device scans the two-dimensional code generated by the first electronic device to connect the second electronic device with the first electronic device and bind the first application and the second application.
以下将以第一电子设备上的第一应用,和第二电子设备上与第一应用相对应的第二应用需要协同工作时,第一电子设备通过如图11所示的方法生成二维码,第二电子设备通过扫描第一电子设备生成的二维码与第一电子设备建立连接,且第一电子设备和第二电子设备采用如图9或图10所示的架构为例,对电子设备扫描二维码进行组网的具体实施方式进行举例说明。In the following, when the first application on the first electronic device and the second application corresponding to the first application on the second electronic device need to work together, the first electronic device generates a two-dimensional code by the method shown in FIG. 11 . , the second electronic device establishes a connection with the first electronic device by scanning the two-dimensional code generated by the first electronic device, and the first electronic device and the second electronic device use the architecture shown in FIG. 9 or FIG. 10 as an example. The specific implementation of the device scanning the two-dimensional code to form a network is illustrated by an example.
图12为本申请实施例提供的一种扫描二维码进行组网的方法的流程示意图。如图12所示,第二电子设备扫描二维码进行组网的方法可以包括以下S1201-S1208。FIG. 12 is a schematic flowchart of a method for forming a network by scanning a two-dimensional code according to an embodiment of the present application. As shown in FIG. 12 , the method for the second electronic device to scan the two-dimensional code for networking may include the following S1201-S1208.
S1201、二维码识别模块识别二维码图像,并将识别得到的二维码信息传递给ARS。S1201. The two-dimensional code identification module identifies the two-dimensional code image, and transmits the identified two-dimensional code information to the ARS.
其中,二维码图像可以由第二电子设备通过相机对第一电子设备展示的二维码图 像进行扫描获取的。例如,第二电子设备为手机,用户可以手持手机,打开手机的相机应用,选择扫一扫来扫描第一电子设备展示的二维码图像。Wherein, the two-dimensional code image can be obtained by scanning the two-dimensional code image displayed by the first electronic device by the second electronic device through a camera. For example, the second electronic device is a mobile phone, and the user can hold the mobile phone, open the camera application of the mobile phone, and select Scan to scan the QR code image displayed by the first electronic device.
S1202、ARS解析二维码信息以得到二维码内容。S1202. The ARS parses the two-dimensional code information to obtain the two-dimensional code content.
其中,由于二维码识别模块识别的二维码图像为第一电子设备采用如图11所示方法生成的二维码,因此,ARS根据二维码识别模块识别得到的二维码信息得到的二维码内容,与如图11所示方法中生成的二维码的内容相同。例如,ARS解析二维码信息得到的二维码内容可以包括期望拉起的第二应用的页面名,第一应用的包名,第二应用的包名,期望的第二应用最低版本号,第二应用的系统标志。以及第一电子设备的设备网络ID,设备IP地址,已登录账号经过哈希加密后的ID。以及连接授信PIN码,群组ID和群组名称等。Among them, since the two-dimensional code image recognized by the two-dimensional code identification module is a two-dimensional code generated by the first electronic device using the method shown in FIG. The content of the two-dimensional code is the same as the content of the two-dimensional code generated in the method shown in FIG. 11 . For example, the QR code content obtained by ARS parsing the QR code information may include the page name of the second application to be pulled up, the package name of the first application, the package name of the second application, and the expected minimum version number of the second application, The system flag of the second application. and the device network ID of the first electronic device, the device IP address, and the hash-encrypted ID of the logged-in account. And the connection credit PIN code, group ID and group name, etc.
作为一种示例,当ARS解析得到的二维码内容中,缺少必选参数,或者必选的String类型参数为空字符串,或零值(null),则第二电子设备可以弹框提示具体的错误信息,并结束该扫描二维码组网的流程。例如,如图13所示,第二电子设备可以显示弹框提示“无效二维码”。As an example, when the content of the QR code parsed by ARS lacks a required parameter, or the required String type parameter is an empty string or a zero value (null), the second electronic device may pop up a box to prompt the specific error message, and end the process of scanning the QR code for networking. For example, as shown in FIG. 13 , the second electronic device may display a pop-up box prompting "invalid QR code".
需要说明的是,上述必选参数为扫描二维码组网所必须的参数。例如,二维码信息的特征码信息,期望拉起的第二应用的页面名,第一应用的包名,第二应用的包名,以及第一电子设备的设备网络ID,设备IP地址,以及连接授信PIN码,群组ID和群组名称等。It should be noted that the above mandatory parameters are the parameters necessary for scanning the QR code to form a network. For example, the feature code information of the two-dimensional code information, the page name of the second application to be pulled up, the package name of the first application, the package name of the second application, and the device network ID and device IP address of the first electronic device, And the connection credit PIN code, group ID and group name, etc.
可选地,当ARS得到二维码内容后,还可以根据二维码内容中的第二应用信息来检查第二应用是否已经安装。例如,执行以下S1203。Optionally, after the ARS obtains the two-dimensional code content, it can also check whether the second application has been installed according to the second application information in the two-dimensional code content. For example, the following S1203 is performed.
S1203、ARS检查第二应用是否已经安装。需要说明的是,当ARS得到的二维码内容中还包括期望的第二应用的最低版本号时,ARS还可以对第二应用的版本号是否满足最低版本号进行检查。相应地,当第二应用已安装,安装的第二应用的版本号满足最低版本号时,ARS可以拉起第二应用,第二应用被拉起时可以调用ARS进行初始化。在一些可能的实施方式中,当第二应用没有安装时,可以跳转应用市场便于用户下载和安装第二应用。S1203, the ARS checks whether the second application has been installed. It should be noted that, when the QR code content obtained by the ARS further includes the expected minimum version number of the second application, the ARS may also check whether the version number of the second application satisfies the minimum version number. Correspondingly, when the second application has been installed and the version number of the installed second application meets the minimum version number, the ARS can launch the second application, and when the second application is launched, the ARS can be invoked to perform initialization. In some possible implementations, when the second application is not installed, the application market can be jumped to to facilitate the user to download and install the second application.
示例地,ARS可以通过调用startActivity来拉起第二应用。在调用startActivity拉起第二应用时发送的请求(Intent)中,可以携带ARS初始化所需的参数(如,ARS_BUNDLE)。第二应用可以调用ARS的协同模块初始化接口initDataModel(Bundle params,Context context)进行初始化。其中,param填写为接收到的Intent参数,如,ARS_BUNDLE。For example, the ARS can launch the second application by calling startActivity. The request (Intent) sent when calling startActivity to start the second application may carry parameters required for ARS initialization (eg, ARS_BUNDLE). The second application can call the collaborative module initialization interface initDataModel(Bundle params, Context context) of ARS to initialize. Among them, param is filled in with the received Intent parameter, for example, ARS_BUNDLE.
S1204、ARS绑定设备管理模块的服务。相应地,绑定成功后设备管理模块可以向ARS返回绑定成功的响应。S1204. The ARS binds the service of the device management module. Correspondingly, after the binding is successful, the device management module may return a binding successful response to the ARS.
其中,ARS可以通过调用bindService接口的方式,绑定设备管理模块。The ARS can bind the device management module by calling the bindService interface.
S1205、ARS向设备管理模块发送配置群组信息的请求。相应地,设备管理模块调用第二安全管理模块(即第二电子设备的安全管理模块)进行群组信息配置。当群组信息配置成功后,第二安全管理模块可以向设备管理模块返回配置成功响应,设备管理模块可以向ARS返回配置成功响应。S1205. The ARS sends a request for configuring group information to the device management module. Correspondingly, the device management module invokes the second security management module (ie, the security management module of the second electronic device) to configure group information. After the group information is successfully configured, the second security management module may return a configuration success response to the device management module, and the device management module may return a configuration success response to the ARS.
示例地,ARS可以通过setAuthInfo接口向设备管理模块发送配置群组信息的请求。 该请求中可以携带解析二维码信息后得到的群组信息,如,群组名称,群组ID,连接授信PIN码以及第一应用的包名和第二应用的包名等。设备管理模块可以存储该群组信息。For example, the ARS may send a request for configuring group information to the device management module through the setAuthInfo interface. The request may carry group information obtained after parsing the two-dimensional code information, such as group name, group ID, connection credit PIN code, package name of the first application and package name of the second application, etc. The device management module can store the group information.
需要说明的是,在一些可能的实施方式中,上述S1204还可以不执行,即ARS不需要绑定设备管理模块的服务,可以直接向设备管理模块发送配置群组信息的请求,此处不做限制。It should be noted that, in some possible implementation manners, the above S1204 may not be executed, that is, the ARS does not need to bind the services of the device management module, and can directly send a request for configuring group information to the device management module, which is not performed here. limit.
当第二安全管理模块配置的群组信息后,电子设备可以通过第二通信模块去连接第一电子设备的通信模块,例如执行以下S1206。After the group information is configured by the second security management module, the electronic device can connect to the communication module of the first electronic device through the second communication module, for example, perform the following S1206.
S1206、ARS调用设备管理模块,通过设备管理模块调用第二通信模块(即第二电子设备的通信模块)去连接第一电子设备的通信模块(即第一通信模块)。其中,ARS可以通过调用设备管理模块的连接(connect)接口向设备管理模块发送设备连接请求(如,connectDevice)(或称为第一请求),该请求可以包括S1202得到的第一电子设备的设备网络ID,设备IP地址,端口ID以及连接授信PIN码等设备连接所需的参数信息,以及第一应用的包名和第二应用的包名等应用信息。设备管理模块可调用第二通信模块向第一电子设备的通信模块转发该设备连接请求(或称为第一请求),从而实现ARS调用设备管理模块,通过设备管理模块调用第二通信模块去连接第一电子设备的通信模块。S1206. The ARS invokes the device management module, and invokes the second communication module (ie, the communication module of the second electronic device) through the device management module to connect to the communication module (ie, the first communication module) of the first electronic device. The ARS may send a device connection request (eg, connectDevice) (or referred to as a first request) to the device management module by invoking the connect interface of the device management module, and the request may include the device of the first electronic device obtained in S1202 Parameter information required for device connection, such as network ID, device IP address, port ID, and connection trusted PIN code, as well as application information such as the package name of the first application and the package name of the second application. The device management module can call the second communication module to forward the device connection request (or referred to as the first request) to the communication module of the first electronic device, so that the ARS can call the device management module, and the second communication module can be called to connect through the device management module. A communication module of the first electronic device.
S1207、第一通信模块调用第一安全管理模块(即第一电子设备的安全管理模块)以进行安全校验。相应地,当第一电子设备的安全管理模块校验通过时,第一安全管理模块可以向第一通信模块返回校验通过的响应。第一通信模块收到校验通过的响应后,可以与第二电子设备的通信模块建立连接,并向第二电子设备的通信模块返回连接成功响应,然后第二电子设备的通信模块可以向设备管理模块发送设备上线的消息,相应地,第二电子设备的设备管理模块可以向ARS返回连接成功的响应。S1207, the first communication module invokes the first security management module (ie, the security management module of the first electronic device) to perform security verification. Correspondingly, when the security management module of the first electronic device passes the verification, the first security management module can return a response that the verification is passed to the first communication module. After the first communication module receives the response that the verification passes, it can establish a connection with the communication module of the second electronic device, and return a successful connection response to the communication module of the second electronic device, and then the communication module of the second electronic device can report to the device. The management module sends a message that the device goes online, and accordingly, the device management module of the second electronic device may return a connection success response to the ARS.
需要说明的是,第一电子设备的安全管理模块(即第一安全管理模块)和第二电子设备的安全管理模块(即第二安全管理模块)可通过两个设备的通信模块间的临时通道或专用通道进行信息交互,从而使第一电子设备的安全管理模块可以从第二电子设备的安全管理模块获取到第二电子设备的安全管理模块配置的群组信息(如,群组ID等),从而便于第一电子设备的安全管理模块,根据得到的第二电子设备扫码后配置的群组信息,PIN码,应用的包名(如第一应用包名和第二应用包名),与第一电子设备生成二维码时自身配置的群组信息,PIN码,应用的包名是否一致,来进行安全校验。当上述信息一致时则校验成功。It should be noted that the security management module of the first electronic device (ie the first security management module) and the security management module of the second electronic device (ie the second security management module) can pass through the temporary channel between the communication modules of the two devices or a dedicated channel for information exchange, so that the security management module of the first electronic device can obtain the group information (eg, group ID, etc.) configured by the security management module of the second electronic device from the security management module of the second electronic device , so as to facilitate the security management module of the first electronic device, according to the obtained group information, PIN code, application package name (such as the first application package name and the second application package name) configured after scanning the code of the second electronic device, and The first electronic device performs security verification by checking whether the group information, PIN code, and application package name configured by itself are consistent when generating the two-dimensional code. When the above information is consistent, the verification is successful.
可选地,当第一电子设备与第二电子设备建立了通信连接后,ARS还可以通知第二应用连接成功,以便第二应用知晓连接成功后再进行后续与第一应用绑定的步骤。例如,执行以下S1208。Optionally, after the first electronic device establishes a communication connection with the second electronic device, the ARS may also notify the second application that the connection is successful, so that the second application knows that the connection is successful and then performs subsequent steps of binding with the first application. For example, the following S1208 is performed.
S1208、ARS向第二应用发送设备连接成功的通知。S1208. The ARS sends a notification that the device is connected successfully to the second application.
在本申请实施例中,以第二电子设备通过扫描第一电子设备显示的包含编码信息的二维码的方式与第一电子设备建立通信连接为例。当第二电子设备通过扫描第一电子设备上的二维码进行组网连接之后,第二电子设备上的第二应用可以与第一电子设备上的第一应用进行绑定,以实现第二电子设备上的第二应用和第一电子设备上的第 一应用进行跨设备交互。In the embodiment of the present application, it is taken as an example that the second electronic device establishes a communication connection with the first electronic device by scanning a two-dimensional code containing coded information displayed by the first electronic device. After the second electronic device is connected to the network by scanning the QR code on the first electronic device, the second application on the second electronic device can be bound with the first application on the first electronic device to realize the second The second application on the electronic device and the first application on the first electronic device perform cross-device interaction.
例如,以如图1所示的场景为例。即以第一电子设备为智慧屏,第二电子设备为手机或平板为例。当手机或平板通过扫描智慧屏上的二维码进行组网连接之后,手机或平板上的第二应用(如,移动版办公应用)可以与智慧屏上的第一应用(如,电视版办公应用)进行绑定,以实现手机或平板上的第二应用和智慧屏上的第一应用进行跨设备交互。For example, take the scenario shown in Figure 1 as an example. That is, take the first electronic device as a smart screen and the second electronic device as a mobile phone or tablet as an example. After the mobile phone or tablet is connected to the network by scanning the QR code on the smart screen, the second application on the mobile phone or tablet (for example, the mobile version of the office application) can be connected with the first application on the smart screen (for example, the TV version of office application). application) to bind to realize cross-device interaction between the second application on the mobile phone or tablet and the first application on the smart screen.
作为一种示例,当用户需要将手机上的移动版办公应用上的文档以及对文档的操作展示在智慧屏上进行会议时。用户可以先打开智慧屏上的电视版办公应用,智慧屏打开电视版办公应用后,可以展示用于连接会议的二维码图像。用户可以打开手机上的移动版办公应用并打开要使用的文档,然后在手机显示的界面中选择开始会议,以便手机调用摄像头进行二维码扫描。当用户通过手机扫描智慧屏展示的二维码图像后,手机和智慧屏便能够建立通信连接,并将手机上的移动版办公应用和智慧屏上的电视版办公应用绑定。之后,智慧屏便能够展示手机上的移动版办公应用打开的文档,以及对文档进行的翻页,涂鸦等操作。在智慧屏展示移动版办公应用的文档时,还可以继续显示用于连接会议的二维码图像,以便于用户通过其他电子设备扫描二维码加入会议。当其他用户需要加入会议时,如用户需要通过平板进入会议时,用户可以通过平板的相机扫描正在展示文档的智慧屏上的二维码图像,从而使平板与智慧屏建立通信连接,并将平板上的移动版办公应用与智慧屏上的电视版办公应用绑定。之后,平板上便能够显示智慧屏上展示的文档以及对文档的操作。通过办公应用在手机、平板和智慧屏上的跨设备协同工作,能够使多人会议时,主讲人可方便的通过智慧屏分享文档,并且坐在后排且视力不好的人可通过手机或平板观看文档,提高会议效果。As an example, when the user needs to display the document on the mobile office application on the mobile phone and the operation on the document on the smart screen for a meeting. Users can first open the TV version of the office application on the smart screen. After the smart screen opens the TV version of the office application, the QR code image used to connect to the conference can be displayed. The user can open the mobile version of the office application on the mobile phone and open the document to be used, and then choose to start the meeting on the interface displayed on the mobile phone, so that the mobile phone can call the camera to scan the QR code. When the user scans the QR code image displayed on the smart screen through the mobile phone, the mobile phone and the smart screen can establish a communication connection, and bind the mobile version of the office application on the mobile phone with the TV version of the office application on the smart screen. After that, the smart screen can display the documents opened by the mobile version of the office application on the mobile phone, as well as the page turning and graffiti operations on the document. When the smart screen displays the documents of the mobile version of the office application, the QR code image used to connect to the meeting can also be displayed, so that users can scan the QR code to join the meeting through other electronic devices. When other users need to join the meeting, such as when the user needs to enter the meeting through the tablet, the user can scan the QR code image on the smart screen displaying the document through the tablet camera, so as to establish a communication connection between the tablet and the smart screen, and connect the tablet to the smart screen. The mobile version of the office application on the smart screen is bound to the TV version of the office application on the smart screen. After that, the document displayed on the smart screen and the operations on the document can be displayed on the tablet. Through the cross-device collaboration of office applications on mobile phones, tablets and smart screens, during a multi-person meeting, the presenter can easily share documents through the smart screen, and people sitting in the back row with poor eyesight can use their mobile phones or View documents on the tablet to improve the meeting effect.
示例地,以手机采用如图9所示的系统架构,智慧屏采用如图10所示的系统架构为例,上述用户通过手机与智慧屏连接进行会议的具体实施方式可以参考图14所示。图14示出了本申请实施例提供的一种设备间应用协同工作的方法的流程示意图。如图14所示,可以包括以下S1401-S1406。For example, taking the mobile phone using the system architecture shown in FIG. 9 and the smart screen using the system architecture shown in FIG. 10 as an example, the specific implementation of the above-mentioned user connecting the mobile phone to the smart screen to conduct a conference can be referred to as shown in FIG. 14 . FIG. 14 shows a schematic flowchart of a method for inter-device application collaboration provided by an embodiment of the present application. As shown in FIG. 14, the following S1401-S1406 may be included.
S1401、智慧屏的电视版办公应用展示二维码图像。其中,生成并展示二维码图像的具体实施方式可以参考如图11所示的方法,此处不做赘述。S1401, the TV version office application of the smart screen displays the QR code image. The specific implementation of generating and displaying the two-dimensional code image may refer to the method shown in FIG. 11 , which will not be repeated here.
当用户通过手机上的移动版办公应用打开文档,并选择开始会议时,执行以下S1402。When the user opens the document through the mobile version office application on the mobile phone and selects to start the meeting, the following S1402 is performed.
S1402、手机的移动版办公应用拉起相机以进行二维码扫描,以使手机通过二维码扫描与智慧屏建立通信连接。其中,手机通过扫描智慧屏的二维码建立通信连接的具体实施方式可以参考如图12所示的方法,此处不做赘述。需要说明的是,由于用户已经启动了手机的移动端办公应用,因此,手机采用如图12所示的方法与智慧屏组网时,不需要再拉起移动版办公应用。S1402, the mobile office application of the mobile phone pulls up the camera to scan the two-dimensional code, so that the mobile phone establishes a communication connection with the smart screen by scanning the two-dimensional code. The specific implementation of the mobile phone establishing a communication connection by scanning the two-dimensional code of the smart screen may refer to the method shown in FIG. 12 , which will not be repeated here. It should be noted that since the user has already started the mobile office application of the mobile phone, when the mobile phone is networked with the smart screen using the method shown in Figure 12, it is not necessary to launch the mobile office application.
S1403、手机的移动版办公应用向手机的DEF(或称为第二DEF,以与智慧屏的DEF进行区分)发送绑定智慧屏的电视版办公应用的服务的请求(或称为第二请求)。S1403 , the mobile office application of the mobile phone sends a request (or referred to as the second request) for binding the service of the TV version office application of the smart screen to the DEF of the mobile phone (or called the second DEF, to be distinguished from the DEF of the smart screen). ).
示例地,移动版办公应用可以使用第二DEF的跨设备服务绑定接口connectAbility(Intent intent,IAbilityConnection conn)向第二DEF发送上述请求。其中,该请求可以携带intent.setElement(new ElementName(netId,pkgName,serviceName)),即 智慧屏的设备网络ID,电视版办公应用的应用包名,要绑定的服务名称等。需要说明的是,由于S1402中手机的ARS能够通过二维码解析得到智慧屏的设备网络ID,电视版办公应用的应用包名,要绑定的服务名称等参数信息,因此上述请求携带的参数信息可以由移动版办公应用从手机的ARS获取。For example, the mobile office application may use the cross-device service binding interface connectAbility(Intent intent, IAbilityConnection conn) of the second DEF to send the above request to the second DEF. Wherein, the request can carry intent.setElement(new ElementName(netId,pkgName,serviceName)), that is, the device network ID of the smart screen, the application package name of the TV version of the office application, the service name to be bound, etc. It should be noted that since the ARS of the mobile phone in S1402 can obtain the device network ID of the smart screen, the application package name of the TV version of the office application, the service name to be bound and other parameter information through the QR code analysis, the parameters carried in the above request are Information can be obtained from the mobile phone's ARS by the mobile office application.
可选地,当第二DEF接收到第二请求后,还可以对手机的移动版办公应用进行权限校验,例如,执行以下S1404。Optionally, after receiving the second request, the second DEF may also perform permission verification on the mobile version office application of the mobile phone, for example, perform the following S1404.
S1404、第二DEF进行应用权限校验。S1404, the second DEF performs application permission verification.
第二DEF可以根据接收到的绑定智慧屏的电视版办公应用的服务的请求中携带的智慧屏的设备网络ID,电视版办公应用的应用包名,要绑定的服务名称等参数信息进行应用权限校验。例如,第二DEF可以从手机的设备管理模块中获取S1402中手机通过扫描二维码进行组网时存储在设备管理模块中的智慧屏的设备网络ID,电视版办公应用的应用包名。由于设备管理模块中存储的上述信息为手机通过扫描二维码组网时解析二维码得到的,因此,当从设备管理模块获取的智慧屏的设备网络ID,电视版办公应用的应用包名,与接收到的绑定智慧屏的电视版办公应用的服务的请求中携带的智慧屏的设备网络ID,电视版办公应用的应用包名一致时,则说明移动版办公应用是设备组网后所允许绑定的应用,即应用权限校验通过。The second DEF can be performed according to the device network ID of the smart screen, the application package name of the TV version of the office application, the name of the service to be bound and other parameter information carried in the received request for binding the service of the office application of the TV version of the smart screen. App permission check. For example, the second DEF can obtain the device network ID of the smart screen and the application package name of the TV version office application stored in the device management module when the mobile phone performs networking by scanning the QR code in S1402 from the device management module of the mobile phone. Since the above information stored in the device management module is obtained by the mobile phone by scanning the two-dimensional code to form a network, the device network ID of the smart screen obtained from the device management module, the application package name of the TV version of the office application , when it is the same as the device network ID of the smart screen and the application package name of the TV version of the office application carried in the received request for binding the service of the TV version office application of the smart screen The application that is allowed to bind, that is, the application permission verification is passed.
当第二DEF对应用权限校验成功时,执行以下S1405,当然在一些可能的实施方式中,还可以不执行S1404直接执行S1405,此处不做限制。When the verification of the application authority by the second DEF is successful, the following S1405 is performed. Of course, in some possible implementations, S1405 may be directly performed without performing S1404, which is not limited here.
S1405、第二DEF向智慧屏的DEF(或称为第一DEF,以与手机的DEF进行区分)发送绑定智慧屏的电视版办公应用的服务的请求(或称为第二请求)。相应地,第一DEF向智慧屏的DMS发送上述请求,以使DMS将上述请求发送给电视版办公应用,电视版办公应用收到请求后完成绑定,并向DMS返回绑定成功的响应。相应地,DMS可以向第一DEF返回绑定成功的响应,第一DEF可以向第二DEF返回绑定成功的响应,最终,第二DEF向手机的移动版办公应用返回绑定成功的响应。S1405. The second DEF sends a service request (or a second request) for binding the TV version of the office application of the smart screen to the DEF of the smart screen (or referred to as the first DEF, to be distinguished from the DEF of the mobile phone). Correspondingly, the first DEF sends the above request to the DMS of the smart screen, so that the DMS sends the above request to the TV version office application, and the TV version office application completes the binding after receiving the request, and returns a successful binding response to the DMS. Correspondingly, the DMS may return a binding success response to the first DEF, the first DEF may return a binding success response to the second DEF, and finally, the second DEF returns a binding success response to the mobile office application of the mobile phone.
其中,第一DEF可以通过调用DMS的绑定接口connectRemoteAbility向DMS发送绑定电视版办公应用的服务的请求。电视版办公应用可以通过connectRemoteAbility接口的回调来返回绑定成功的响应。The first DEF may send a request for binding the service of the TV version of the office application to the DMS by calling the binding interface connectRemoteAbility of the DMS. The TV version of the office application can return a successful binding response through the callback of the connectRemoteAbility interface.
将移动版办公应用和电视版办公应用绑定后,手机和智慧屏便能够通过调用各自的DEF进行信息交互,以实现移动版办公应用和电视版办公应用的信息交互。其中,第一DEF和第二DEF间可以通过S1402建立的通信连接进行AIDL接口调用实现交互。需要说明的是,电视版办公应用传输的信息需要通过DMS转发给第一DEF。在一些可能的实施方式中,当手机和智慧屏均采用如图10所示的系统架构时,移动版办公应用和电视版办公应用可以通过各自设备的DMS进行信息交互(即当两个电子设备均具有DMS时,则可以直接通过DMS进行应用跨设备交互),两个设备的DMS间的交互可参考上述第一DEF和第二DEF间的交互。当手机采用如图10所示的系统架构,智慧屏采用如图9所示的系统架构时,则移动版办公应用与手机的DEF间的信息需要手机的DMS进行传递。After binding the mobile version office application and the TV version office application, the mobile phone and the smart screen can exchange information by calling their respective DEFs, so as to realize the information interaction between the mobile version office application and the TV version office application. The first DEF and the second DEF can perform interaction through AIDL interface invocation through the communication connection established in S1402. It should be noted that the information transmitted by the TV version of the office application needs to be forwarded to the first DEF through the DMS. In some possible implementations, when both the mobile phone and the smart screen adopt the system architecture shown in FIG. 10 , the mobile version office application and the TV version office application can exchange information through the DMS of the respective devices (that is, when the two electronic devices When both devices have DMS, the application cross-device interaction can be performed directly through the DMS). For the interaction between the DMSs of the two devices, reference may be made to the above-mentioned interaction between the first DEF and the second DEF. When the mobile phone adopts the system architecture shown in Figure 10 and the smart screen adopts the system architecture shown in Figure 9, the information between the mobile office application and the DEF of the mobile phone needs to be transmitted by the DMS of the mobile phone.
S1406、手机的移动版办公应用向智慧屏的电视版办公应用发送文档,以使智慧屏展示手机的移动版办公应用打开的文档。S1406, the mobile version office application of the mobile phone sends a document to the TV version office application of the smart screen, so that the smart screen displays the document opened by the mobile version office application of the mobile phone.
需要说明的是,当移动版办公应用对文档进行翻页,涂鸦等操作时,移动版办公应用也会同步向智慧屏的电视版办公应用发送相应的指令或状态等信息。It should be noted that when the mobile version of the office application performs operations such as page turning and graffiti on the document, the mobile version of the office application will also synchronously send corresponding instructions or status information to the TV version of the office application on the smart screen.
示例地,以平板采用如图9所示的系统架构,智慧屏采用如图10所示的系统架构为例,上述用户通过平板与智慧屏连接加入会议的具体实施方式可以参考图15所示。图15示出了本申请实施例提供的另一种设备间应用协同工作的方法的流程示意图。如图15所示,可以包括以下S1501-S1506。For example, taking the system architecture as shown in FIG. 9 for the tablet and the system architecture as shown in FIG. 10 for the smart screen as an example, the specific implementation of the above-mentioned user joining the conference through the connection between the tablet and the smart screen can be referred to as shown in FIG. 15 . FIG. 15 shows a schematic flowchart of another method for inter-device application collaboration provided by an embodiment of the present application. As shown in FIG. 15, the following S1501-S1506 may be included.
S1501、智慧屏的电视版办公应用展示二维码图像。其中,生成并展示二维码图像的具体实施方式可以参考如图11所示的方法,此处不做赘述。需要说明的是,当智慧屏通过如图14所示的方法展示手机的移动版办公应用打开的文档时,智慧屏也可以生成并展示的二维码图像。例如,可以将该二维码图像显示在智慧屏的右上角。S1501, the TV version of the smart screen office application displays the QR code image. The specific implementation of generating and displaying the two-dimensional code image may refer to the method shown in FIG. 11 , which will not be repeated here. It should be noted that when the smart screen displays the document opened by the mobile office application of the mobile phone by the method shown in Figure 14, the smart screen can also generate and display the QR code image. For example, the QR code image can be displayed in the upper right corner of the smart screen.
当用户通过平板的相机扫描智慧屏展示的二维码图像时,执行以下S1502。When the user scans the QR code image displayed on the smart screen through the tablet camera, the following S1502 is performed.
S1502、平板的二维码识别模块对二维码图像进行识别得到二维码内容,以使平板通过二维码扫描与智慧屏建立通信连接,并拉起平板的移动版办公应用。其中,平板通过扫描智慧屏的二维码建立通信连接的具体实施方式可以参考如图12所示的方法,此处不做赘述。S1502, the two-dimensional code recognition module of the tablet recognizes the two-dimensional code image to obtain the content of the two-dimensional code, so that the tablet establishes a communication connection with the smart screen by scanning the two-dimensional code, and pulls up the mobile version office application of the tablet. Wherein, for the specific implementation of the tablet establishing a communication connection by scanning the two-dimensional code of the smart screen, reference may be made to the method shown in FIG. 12 , which will not be repeated here.
S1503、平板的移动版办公应用向平板的DEF(或称为第二DEF,以与智慧屏的DEF进行区分)发送绑定智慧屏的电视版办公应用的服务的请求。S1503 , the mobile version office application of the tablet sends a service request for binding the TV version office application of the smart screen to the DEF of the tablet (or called the second DEF, to be distinguished from the DEF of the smart screen).
S1504、第二DEF进行应用权限校验。S1504, the second DEF performs application permission verification.
当第二DEF对应用权限校验成功时,执行以下S1505。When the verification of the application authority by the second DEF succeeds, the following S1505 is performed.
S1505、第二DEF向智慧屏的DEF(或称为第一DEF,以与平板的DEF进行区分)发送绑定智慧屏的电视版办公应用的服务的请求。相应地,第一DEF向智慧屏的DMS发送上述请求,以使DMS将上述请求发送给电视版办公应用,电视版办公应用收到请求后完成绑定,并向DMS返回绑定成功的响应。相应地,DMS可以向第一DEF返回绑定成功的响应,第一DEF可以向第二DEF返回绑定成功的响应,最终,第二DEF向平板的移动版办公应用返回绑定成功的响应。S1505 , the second DEF sends a request for binding the service of the TV version of the office application of the smart screen to the DEF of the smart screen (or referred to as the first DEF, to be distinguished from the DEF of the tablet). Correspondingly, the first DEF sends the above request to the DMS of the smart screen, so that the DMS sends the above request to the TV version office application, and the TV version office application completes the binding after receiving the request, and returns a successful binding response to the DMS. Correspondingly, the DMS may return a binding success response to the first DEF, the first DEF may return a binding success response to the second DEF, and finally, the second DEF returns a binding success response to the tablet mobile office application.
需要说明的是,上述S1503至S1505的具体实施方式可以参考如图14所示的方法中的S1403至S1405的具体描述,此处不做赘述。It should be noted that, for specific implementations of the above S1503 to S1505, reference may be made to the specific descriptions of S1403 to S1405 in the method shown in FIG. 14 , and details are not repeated here.
S1506、智慧屏的电视版办公应用向平板的移动版办公应用发送文档信息,以使平板显示智慧屏展示的文档。S1506 , the TV version office application of the smart screen sends document information to the mobile version office application of the tablet, so that the tablet displays the document displayed on the smart screen.
其中,智慧屏的电视版办公应用向平板的移动版办公应用发送的文档信息,可以是智慧屏的电视版办公应用接收的手机的移动版办公应用发送的文档以及对文档进行翻页、涂鸦等操作的指令或状态等信息。Among them, the document information sent by the TV version office application of the smart screen to the mobile version office application of the tablet may be the document sent by the mobile version office application of the mobile phone received by the TV version office application of the smart screen, as well as page turning and graffiti of the document. Information such as the instruction or status of the operation.
示例地,以如图5所示的场景为例。即以第一电子设备为智慧屏,第二电子设备为手机为例。当手机通过扫描智慧屏上的二维码进行组网连接之后,手机上的第二应用(如,移动版游戏应用)可以与智慧屏上的第一应用(如,电视版游戏应用)进行绑定,以实现手机上的第二应用和智慧屏上的第一应用进行跨设备交互。Illustratively, take the scenario shown in FIG. 5 as an example. That is, take the first electronic device as a smart screen and the second electronic device as a mobile phone as an example. After the mobile phone is connected to the network by scanning the QR code on the smart screen, the second application on the mobile phone (such as a mobile version game application) can be bound with the first application (such as a TV version game application) on the smart screen to realize cross-device interaction between the second application on the mobile phone and the first application on the smart screen.
作为一种示例,当用户需要通过手机作为游戏手柄对智慧屏上的电视版游戏应用进行操作控制时。用户可以先打开智慧屏上的电视版游戏应用,智慧屏打开电视版游戏应用后,可以展示用于设备连接的二维码图像。用户可以通过手机的摄像头扫描智 慧屏展示的二维码图像,以使手机和智慧屏能够建立通信连接,并将手机上的移动版游戏应用和智慧屏上的电视版游戏应用绑定。之后,手机便能够通过移动版游戏应用来操作控制智慧屏上的电视版游戏应用。As an example, when the user needs to use the mobile phone as a game handle to operate and control the TV version of the game application on the smart screen. The user can first open the TV version of the game application on the smart screen. After the smart screen opens the TV version of the game application, the QR code image used for device connection can be displayed. Users can scan the QR code image displayed on the smart screen through the camera of the mobile phone, so that the mobile phone and the smart screen can establish a communication connection, and bind the mobile version of the game application on the mobile phone with the TV version of the game application on the smart screen. After that, the mobile phone can operate and control the TV version of the game application on the smart screen through the mobile version of the game application.
示例地,以手机和智慧屏均采用如图10所示的系统架构为例,上述用户通过手机与智慧屏连接进行游戏操作的具体实施方式可以参考图16所示。图16示出了本申请实施例提供的另一种设备间应用协同工作的方法的流程示意图。如图16所示,可以包括以下S1601-S1606。For example, taking the system architecture shown in FIG. 10 for both the mobile phone and the smart screen as an example, the specific implementation of the above-mentioned user performing game operations through the connection between the mobile phone and the smart screen can be referred to as shown in FIG. 16 . FIG. 16 shows a schematic flowchart of another method for inter-device application collaboration provided by an embodiment of the present application. As shown in FIG. 16, the following S1601-S1606 may be included.
S1601、智慧屏的电视版游戏应用展示二维码图像。其中,生成并展示二维码图像的具体实施方式可以参考如图11所示的方法,此处不做赘述。S1601, the TV version of the game application of the smart screen displays the QR code image. The specific implementation of generating and displaying the two-dimensional code image may refer to the method shown in FIG. 11 , which will not be repeated here.
当用户通过手机的摄像头扫描智慧屏展示的二维码图像时,执行以下S1602。When the user scans the QR code image displayed on the smart screen through the camera of the mobile phone, the following S1602 is performed.
S1602、手机的二维码识别模块对二维码图像进行识别得到二维码内容,以使手机通过二维码扫描与智慧屏建立通信连接,并拉起手机的移动版游戏应用。其中,手机通过扫描智慧屏的二维码建立通信连接的具体实施方式可以参考如图12所示的方法,此处不做赘述。S1602, the two-dimensional code recognition module of the mobile phone recognizes the two-dimensional code image to obtain the two-dimensional code content, so that the mobile phone establishes a communication connection with the smart screen by scanning the two-dimensional code, and launches the mobile version game application of the mobile phone. The specific implementation of the mobile phone establishing a communication connection by scanning the two-dimensional code of the smart screen may refer to the method shown in FIG. 12 , which will not be repeated here.
S1603、手机的移动版游戏应用向手机的DMS(或称为第二DMS,以与智慧屏的DMS进行区分)发送绑定智慧屏的电视版游戏应用的服务的请求。S1603. The mobile version game application of the mobile phone sends a service request for binding the TV version game application of the smart screen to the DMS of the mobile phone (or called a second DMS, to be distinguished from the DMS of the smart screen).
其中,移动版游戏应用可以通过DMS提供的connectAbility接口发送上述请求。The mobile version game application can send the above request through the connectAbility interface provided by the DMS.
S1604、第二DMS进行应用权限校验。S1604. The second DMS performs application permission verification.
当第二DMS对应用权限校验成功时,执行以下S1605。When the second DMS successfully checks the application authority, the following S1605 is performed.
S1605、第二DMS向智慧屏的DMS(或称为第一DMS,以与手机的DMS进行区分)发送绑定智慧屏的电视版游戏应用的服务的请求。相应地,第一DMS将上述请求发送给电视版游戏应用,电视版游戏应用收到请求后完成绑定,并向第一DMS返回绑定成功的响应。相应地,第一DMS可以向第二DMS返回绑定成功的响应,最终,第二DMS向手机的移动版游戏应用返回绑定成功的响应。S1605. The second DMS sends a service request for binding the TV version game application of the smart screen to the DMS of the smart screen (or called the first DMS, to be distinguished from the DMS of the mobile phone). Correspondingly, the first DMS sends the above request to the TV version game application, and the TV version game application completes the binding after receiving the request, and returns a successful binding response to the first DMS. Correspondingly, the first DMS may return a successful binding response to the second DMS, and finally, the second DMS returns a binding successful response to the mobile version game application of the mobile phone.
需要说明的是,上述S1603至S1605的具体实施方式可以参考如图14所示的方法中的S1403至S1405的具体描述,此处不做赘述。It should be noted that, for the specific implementation of the above S1603 to S1605, reference may be made to the specific descriptions of S1403 to S1405 in the method shown in FIG. 14 , and details are not repeated here.
当用户对手机的移动版游戏应用进行操作时,执行以下S1606。When the user operates the mobile version game application of the mobile phone, the following S1606 is performed.
S1606、移动版游戏应用向电视版游戏应用发送相应的操作指令,以使智慧屏根据操作指令显示相应的游戏画面。S1606 , the mobile version game application sends a corresponding operation instruction to the TV version game application, so that the smart screen displays a corresponding game screen according to the operation instruction.
例如,用户可以通过摇晃手机来操作控制电视版游戏应用。当用户摇晃手机时,手机可以将采集的重力传感器数据通过DMS提供的跨设备的AIDL接口调用能力,传输给智慧屏的电视版游戏应用,从而使智慧屏显示相应的游戏画面。如,游戏应用为划船游戏,用户晃动手机的频率越快,智慧屏根据接收到的重力传感器数据,显示的人物划船速度越快。For example, the user can control the TV version of the game application by shaking the phone. When the user shakes the mobile phone, the mobile phone can transfer the collected gravity sensor data to the TV version game application of the smart screen through the cross-device AIDL interface call capability provided by the DMS, so that the smart screen can display the corresponding game screen. For example, if the game application is a rowing game, the faster the user shakes the mobile phone, the faster the displayed character rowing speed will be displayed on the smart screen according to the received gravity sensor data.
采用以上实施例中的方法,当第一应用和第二应用在第一电子设备(如,智慧屏)和第二电子设备(如,手机)间需要协同工作时(即应用需要在不同电子设备间协同工作时),第一电子设备和第二电子设备可以通过扫描二维码的方式在两者间建立通信连接,并使第一应用和第二应用相互绑定,从而使第一应用和第二应用的协同指令可以在第一电子设备和第二电子设备间直接进行传输,避免云服务器对协同指令的转 发,减短协同指令的传递路径,并减小网络质量对协同指令传输造成的影响,从而降低协同指令的传输时延,提高传输稳定性。使用户在多人会议、即时游戏等对时延要求较高的场景下具有更好的应用协同体验。Using the method in the above embodiment, when the first application and the second application need to work together between the first electronic device (eg, a smart screen) and the second electronic device (eg, a mobile phone) (that is, the applications need to work on different electronic devices) When the first electronic device and the second electronic device work together with each other), the first electronic device and the second electronic device can establish a communication connection between the two by scanning the two-dimensional code, and bind the first application and the second application to each other, so that the first application and the second application can be connected to each other. The collaborative instruction of the second application can be directly transmitted between the first electronic device and the second electronic device, avoiding the forwarding of the collaborative instruction by the cloud server, shortening the transmission path of the collaborative instruction, and reducing the impact of network quality on the collaborative instruction transmission. In this way, the transmission delay of cooperative instructions is reduced, and the transmission stability is improved. It enables users to have a better application collaboration experience in scenarios with high latency requirements, such as multi-person conferences and instant games.
上述主要从第一电子设备和第二电子设备之间交互的角度对本申请实施例提供的方案进行了介绍。可以理解的是,为了实现上述功能,本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的步骤,还可以仅实施第一电子设备所涉及的方法,或仅实施第二电子设备所涉及的方法,对此,本申请实施例不做限制。The foregoing mainly introduces the solutions provided by the embodiments of the present application from the perspective of interaction between the first electronic device and the second electronic device. It can be understood that, in order to realize the above functions, those skilled in the art should easily realize that, in conjunction with the steps of the examples described in the embodiments disclosed herein, only the method involved in the first electronic device may be implemented, or only the method involved in the first electronic device may be implemented. The method involved in implementing the second electronic device is not limited in this embodiment of the present application.
对应于前述实施例中的方法,本申请实施例还提供一种设备间应用协同工作的装置。该装置可以应用于上述的第一电子设备,用于实现前述实施例中第一电子设备相关的方法。该装置的功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。硬件或软件包括一个或多个与上述功能相对应的模块。例如,图17示出了一种设备间应用协同工作的装置的结构示意图,如图17所示,该装置包括:显示模块1701、处理模块1702和请求模块1703等。Corresponding to the methods in the foregoing embodiments, the embodiments of the present application further provide an apparatus for inter-device application collaboration. The apparatus can be applied to the above-mentioned first electronic device to implement the method related to the first electronic device in the foregoing embodiment. The functions of the apparatus may be implemented by hardware, or by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the above functions. For example, FIG. 17 shows a schematic structural diagram of an apparatus for inter-device application cooperation. As shown in FIG. 17 , the apparatus includes: a display module 1701 , a processing module 1702 , a request module 1703 , and the like.
其中,处理模块1702,可用于生成编码信息;请求模块1703,可用于接收来自第二电子设备发送的第一请求,第一请求与编码信息对应;处理模块1702,还可以用于根据第一请求与第二电子设备建立通信连接;绑定第一电子设备的第一应用和第二电子设备的第二应用;第一应用与第二应用传输协同信息。The processing module 1702 can be used to generate encoded information; the request module 1703 can be used to receive a first request sent from the second electronic device, where the first request corresponds to the encoded information; the processing module 1702 can also be used to receive the first request according to the first request. establishing a communication connection with the second electronic device; binding the first application of the first electronic device and the second application of the second electronic device; and transmitting the coordination information with the first application and the second application.
在一种可能的设计方式中,显示模块1701,可以用于显示包含编码信息的二维码,编码信息包括组网信息;其中,第一请求与组网信息对应。In a possible design manner, the display module 1701 may be configured to display a two-dimensional code including coding information, where the coding information includes networking information; wherein, the first request corresponds to the networking information.
在另一种可能的设计方式中,编码信息包括第一应用的信息和第二应用的信息;请求模块1703,还可用于接收来自第二电子设备的第二请求,第二请求包括第一应用的信息和第二应用的信息;处理模块1702,可具体用于根据第二请求,绑定第一应用和第二应用。In another possible design manner, the encoded information includes information of the first application and information of the second application; the request module 1703 is further configured to receive a second request from the second electronic device, where the second request includes the first application and the information of the second application; the processing module 1702 may be specifically configured to bind the first application and the second application according to the second request.
在另一种可能的设计方式中,编码信息还包括群组信息和个人识别码(PIN);处理模块1702,还可以用于获取第二电子设备根据编码信息得到的群组信息和PIN,以及第一应用的信息和第二应用的信息;确定获取的第二电子设备根据编码信息得到的群组信息,PIN,以及第一应用的信息和第二应用的信息,与编码信息中包括的群组信息,PIN,以及第一应用的信息和第二应用的信息一致。In another possible design manner, the encoded information further includes group information and a personal identification code (PIN); the processing module 1702 may also be configured to acquire the group information and PIN obtained by the second electronic device according to the encoded information, and The information of the first application and the information of the second application; determine the group information obtained by the second electronic device according to the coded information, the PIN, and the information of the first application and the information of the second application, and the group information included in the coded information. The group information, PIN, and information of the first application are consistent with the information of the second application.
在另一种可能的设计方式中,处理模块1702,还可以用于生成PIN;根据PIN,第一应用的信息和第二应用的信息生成群组信息。In another possible design manner, the processing module 1702 may also be configured to generate a PIN; and generate group information according to the PIN, the information of the first application and the information of the second application.
在另一种可能的设计方式中,第一应用的信息包括:第一应用的包名;第二应用的信息包括:第二应用的包名,以及第二应用的页面名,第二应用最低版本号以及第二应用的系统标志中的至少一个。In another possible design manner, the information of the first application includes: the package name of the first application; the information of the second application includes: the package name of the second application, and the page name of the second application, and the second application is the lowest at least one of a version number and a system flag of the second application.
对应于前述实施例中的方法,本申请实施例还提供一种设备间应用协同工作的装置。该装置可以应用于上述的第二电子设备,用于实现前述实施例中第二电子设备相关的方法。该装置的功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。硬件或软件包括一个或多个与上述功能相对应的模块。例如,图18示出了一种设备间应用协同工作的装置的结构示意图,如图18所示,该装置包括:处理模块1801和请求模块1802等。Corresponding to the methods in the foregoing embodiments, the embodiments of the present application further provide an apparatus for inter-device application collaboration. The apparatus can be applied to the above-mentioned second electronic device to implement the method related to the second electronic device in the foregoing embodiments. The functions of the device may be implemented by hardware, or by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the above functions. For example, FIG. 18 shows a schematic structural diagram of an apparatus for inter-device application cooperation. As shown in FIG. 18 , the apparatus includes: a processing module 1801 and a request module 1802 and the like.
其中,处理模块1801,可以用于获取第一电子设备生成的编码信息;请求模块1802,可以用于根据编码信息向第一电子设备第一请求,第一请求用于第一电子设备与第二电子设备建立通信连接;处理模块1801,还可用于在第一电子设备绑定第一电子设备的第一应用和第二电子设备的第二应用的情况下,第二应用与第一应用传输协同信息。Among them, the processing module 1801 can be used to obtain the coding information generated by the first electronic device; the request module 1802 can be used to make a first request to the first electronic device according to the coding information, and the first request is used for the first electronic device and the second electronic device. The electronic device establishes a communication connection; the processing module 1801 can also be used to coordinate the transmission of the second application and the first application when the first electronic device binds the first application of the first electronic device and the second application of the second electronic device information.
在一种可能的设计方式中,处理模块1801,具体可以用于扫描并识别第一电子设备显示的包含编码信息的二维码,得到编码信息,编码信息包括组网信息;请求模块1802,具体可用于根据组网信息向第一电子设备发送第一请求。In a possible design manner, the processing module 1801 can be specifically configured to scan and identify a two-dimensional code containing coding information displayed by the first electronic device to obtain the coding information, and the coding information includes networking information; the requesting module 1802, specifically It can be used to send the first request to the first electronic device according to the networking information.
在另一种可能的设计方式中,编码信息包括:第一应用的信息和第二应用的信息;请求模块1802,还可以用于向第一电子设备发送第二请求,第二请求包括第一应用的信息和第二应用的信息,第二请求用于第一电子设备绑定第一应用和第二应用。In another possible design manner, the encoded information includes: information of the first application and information of the second application; the request module 1802 can also be configured to send a second request to the first electronic device, where the second request includes the first application The application information and the second application information, and the second request is for the first electronic device to bind the first application and the second application.
在另一种可能的设计方式中,编码信息还包括群组信息和个人识别码(PIN);处理模块1801,还可以用于存储群组信息和PIN。In another possible design manner, the encoded information further includes group information and a personal identification number (PIN); the processing module 1801 can also be used to store the group information and the PIN.
在另一种可能的设计方式中,处理模块1801,还可以用于根据第一应用的信息、第二应用的信息和组网信息,对第二应用进行应用权限校验。In another possible design manner, the processing module 1801 may also be configured to perform application permission verification on the second application according to the information of the first application, the information of the second application and the networking information.
在另一种可能的设计方式中,处理模块1801,还可以用于根据第二应用的信息确定第二电子设备未安装第二应用;跳转第二应用的下载页面。In another possible design manner, the processing module 1801 may be further configured to determine, according to the information of the second application, that the second application is not installed on the second electronic device; and jump to the download page of the second application.
应理解以上装置中单元或模块(以下均称为单元)的划分仅仅是一种逻辑功能的划分,实际实现时可以全部或部分集成到一个物理实体上,也可以物理上分开。且装置中的单元可以全部以软件通过处理元件调用的形式实现;也可以全部以硬件的形式实现;还可以部分单元以软件通过处理元件调用的形式实现,部分单元以硬件的形式实现。It should be understood that the division of units or modules (hereinafter referred to as units) in the above apparatus is only a division of logical functions, and may be fully or partially integrated into a physical entity in actual implementation, or may be physically separated. And all the units in the device can be realized in the form of software calling through the processing element; also can all be realized in the form of hardware; some units can also be realized in the form of software calling through the processing element, and some units can be realized in the form of hardware.
例如,各个单元可以为单独设立的处理元件,也可以集成在装置的某一个芯片中实现,此外,也可以以程序的形式存储于存储器中,由装置的某一个处理元件调用并执行该单元的功能。此外这些单元全部或部分可以集成在一起,也可以独立实现。这里所述的处理元件又可以称为处理器,可以是一种具有信号的处理能力的集成电路。在实现过程中,上述方法的各步骤或以上各个单元可以通过处理器元件中的硬件的集成逻辑电路实现或者以软件通过处理元件调用的形式实现。For example, each unit can be a separately established processing element, or can be integrated in a certain chip of the device to be implemented, and can also be stored in the memory in the form of a program, which can be called by a certain processing element of the device and execute the unit's processing. Function. In addition, all or part of these units can be integrated together, and can also be implemented independently. The processing element described here may also be called a processor, which may be an integrated circuit with signal processing capability. In the implementation process, each step of the above method or each of the above units may be implemented by an integrated logic circuit of hardware in the processor element or implemented in the form of software being invoked by the processing element.
在一个例子中,以上装置中的单元可以是被配置成实施以上方法的一个或多个集成电路,例如:一个或多个ASIC,或,一个或多个DSP,或,一个或者多个FPGA,或这些集成电路形式中至少两种的组合。In one example, the units in the above apparatus may be one or more integrated circuits configured to implement the above method, such as: one or more ASICs, or, one or more DSPs, or, one or more FPGAs, or a combination of at least two of these integrated circuit forms.
再如,当装置中的单元可以通过处理元件调度程序的形式实现时,该处理元件可以是通用处理器,例如CPU或其它可以调用程序的处理器。再如,这些单元可以集成在一起,以片上系统(system-on-a-chip,SOC)的形式实现。For another example, when a unit in the apparatus can be implemented in the form of a processing element scheduler, the processing element can be a general-purpose processor, such as a CPU or other processors that can invoke programs. For another example, these units can be integrated together and implemented in the form of a system-on-a-chip (SOC).
在一种实现中,以上装置实现以上方法中各个对应步骤的单元可以通过处理元件调度程序的形式实现。例如,该装置可以包括处理元件和存储元件,处理元件调用存储元件存储的程序,以执行以上方法实施例所述的方法。存储元件可以为与处理元件处于同一芯片上的存储元件,即片内存储元件。In one implementation, the unit of the above apparatus for implementing each corresponding step in the above method may be implemented in the form of a processing element scheduler. For example, the apparatus may include a processing element and a storage element, and the processing element invokes a program stored in the storage element to execute the method described in the above method embodiments. The storage element may be a storage element on the same chip as the processing element, ie, an on-chip storage element.
在另一种实现中,用于执行以上方法的程序可以在与处理元件处于不同芯片上的存储元件,即片外存储元件。此时,处理元件从片外存储元件调用或加载程序于片内 存储元件上,以调用并执行以上方法实施例所述的方法。In another implementation, the program for performing the above method may be in a storage element on a different chip from the processing element, ie, an off-chip storage element. At this time, the processing element calls or loads the program from the off-chip storage element to the on-chip storage element, so as to call and execute the methods described in the above method embodiments.
例如,本申请实施例还可以提供一种装置,如:电子设备(例如前述实施例中的第一电子设备或第二电子设备等),可以包括:处理器,用于存储该处理器可执行指令的存储器。该处理器被配置为执行上述指令时,使得该电子设备实现如前述实施例中第一电子设备或第二电子设备实施的设备间应用协同工作的方法。该存储器可以位于该电子设备之内,也可以位于该电子设备之外。且该处理器包括一个或多个。For example, an embodiment of the present application may further provide an apparatus, such as an electronic device (for example, the first electronic device or the second electronic device in the foregoing embodiments, etc.), which may include: a processor for storing the executable of the processor memory for instructions. When the processor is configured to execute the above instructions, the electronic device implements the method for inter-device application cooperation implemented by the first electronic device or the second electronic device in the foregoing embodiment. The memory may be located within the electronic device or external to the electronic device. And the processor includes one or more.
在又一种实现中,该装置实现以上方法中各个步骤的单元可以是被配置成一个或多个处理元件,这些处理元件可以设置于对应上述的电子设备上,这里的处理元件可以为集成电路,例如:一个或多个ASIC,或,一个或多个DSP,或,一个或者多个FPGA,或者这些类集成电路的组合。这些集成电路可以集成在一起,构成芯片。In yet another implementation, the unit of the apparatus for implementing each step in the above method may be configured as one or more processing elements, and these processing elements may be provided on the corresponding electronic equipment described above, and the processing elements here may be integrated circuits , for example: one or more ASICs, or, one or more DSPs, or, one or more FPGAs, or a combination of these types of integrated circuits. These integrated circuits can be integrated together to form chips.
例如,本申请实施例还提供一种芯片系统,该芯片系统可以应用于上述电子设备。芯片系统包括一个或多个接口电路和一个或多个处理器;接口电路和处理器通过线路互联;处理器通过接口电路从电子设备的存储器接收并执行计算机指令,以实现以上方法实施例中第一电子设备或第二电子设备相关的方法。For example, an embodiment of the present application further provides a chip system, and the chip system can be applied to the above electronic device. The chip system includes one or more interface circuits and one or more processors; the interface circuit and the processor are interconnected by lines; the processor receives and executes computer instructions from the memory of the electronic device through the interface circuit, so as to realize the first method in the above method embodiment. A method associated with an electronic device or a second electronic device.
本申请实施例还提供一种计算机程序产品,包括电子设备,如上述电子设备,运行的计算机指令。Embodiments of the present application further provide a computer program product, including computer instructions for running an electronic device, such as the above-mentioned electronic device.
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。From the description of the above embodiments, those skilled in the art can clearly understand that for the convenience and brevity of the description, only the division of the above functional modules is used as an example for illustration. In practical applications, the above functions can be allocated as required. It is completed by different functional modules, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the device embodiments described above are only illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be Incorporation may either be integrated into another device, or some features may be omitted, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place, or may be distributed to multiple different places . Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。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 alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,如:程序。该软件产品存储在一个程序产品,如计算机可读存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、 移动硬盘、ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of the present application essentially or contribute to the prior art, or all or part of the technical solutions may be embodied in the form of software products, such as programs. The software product is stored in a program product, such as a computer-readable storage medium, and includes several instructions to cause a device (which may be a single-chip microcomputer, a chip, etc.) or a processor (processor) to execute all of the methods described in the various embodiments of the present application. or part of the steps. The aforementioned storage medium includes: U disk, removable hard disk, ROM, RAM, magnetic disk or optical disk and other media that can store program codes.
例如,本申请实施例还可以提供一种计算机可读存储介质,其上存储有计算机程序指令。当计算机程序指令被电子设备执行时,使得电子设备实现如前述方法实施例中所述的设备间应用协同工作的方法。For example, the embodiments of the present application may further provide a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by the electronic device, the electronic device is made to implement the method for inter-device application cooperation as described in the foregoing method embodiments.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above are only specific embodiments of the present application, but the protection scope of the present application is not limited to this, and any changes or substitutions within the technical scope disclosed in the present application should be covered within the protection scope of the present application. . Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims (25)

  1. 一种设备间应用协同工作的方法,其特征在于,应用于第一电子设备,所述方法包括:A method for inter-device application collaboration, characterized in that, applied to a first electronic device, the method comprising:
    生成编码信息;generate encoded information;
    接收来自第二电子设备发送的第一请求,所述第一请求与所述编码信息对应;receiving a first request sent from a second electronic device, where the first request corresponds to the encoded information;
    根据所述第一请求与所述第二电子设备建立通信连接;establishing a communication connection with the second electronic device according to the first request;
    绑定所述第一电子设备的第一应用和所述第二电子设备的第二应用;binding the first application of the first electronic device and the second application of the second electronic device;
    通过建立的所述通信连接使所述第一应用与所述第二应用传输协同信息。The first application and the second application transmit cooperation information through the established communication connection.
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, wherein the method further comprises:
    显示包含所述编码信息的二维码,所述编码信息包括组网信息;displaying a two-dimensional code containing the encoding information, the encoding information including networking information;
    其中,所述第一请求与所述组网信息对应。The first request corresponds to the networking information.
  3. 根据权利要求1或2所述的方法,其特征在于,所述编码信息包括所述第一应用的信息和所述第二应用的信息;The method according to claim 1 or 2, wherein the encoded information includes information of the first application and information of the second application;
    所述绑定所述第一电子设备的第一应用和所述第二电子设备的第二应用,包括:The binding of the first application of the first electronic device and the second application of the second electronic device includes:
    接收来自所述第二电子设备的第二请求,所述第二请求包括所述第一应用的信息和所述第二应用的信息;receiving a second request from the second electronic device, the second request including the information of the first application and the information of the second application;
    根据所述第二请求,绑定所述第一应用和所述第二应用。According to the second request, the first application and the second application are bound.
  4. 根据权利要求3所述的方法,其特征在于,所述编码信息还包括群组信息和个人识别码PIN;The method according to claim 3, wherein the encoded information further comprises group information and a personal identification code PIN;
    在所述根据所述第一请求与所述第二电子设备建立通信连接之前,所述方法包括:Before establishing a communication connection with the second electronic device according to the first request, the method includes:
    获取所述第二电子设备根据所述编码信息得到的所述群组信息和所述PIN,以及所述第一应用的信息和所述第二应用的信息;Acquire the group information and the PIN obtained by the second electronic device according to the encoded information, as well as the information of the first application and the information of the second application;
    确定获取的所述第二电子设备根据所述编码信息得到的所述群组信息,所述PIN,以及所述第一应用的信息和所述第二应用的信息,与所述编码信息中包括的所述群组信息,所述PIN,以及所述第一应用的信息和所述第二应用的信息一致。It is determined that the acquired group information, the PIN, the information of the first application and the information of the second application obtained by the second electronic device according to the encoded information, and the encoded information include: The group information, the PIN, and the information of the first application are consistent with the information of the second application.
  5. 根据权利要求4所述的方法,其特征在于,在所述生成编码信息之前,所述方法还包括:The method according to claim 4, characterized in that, before the generating the encoded information, the method further comprises:
    生成所述PIN;generating the PIN;
    根据所述PIN,所述第一应用的信息和所述第二应用的信息生成所述群组信息。The group information is generated from the PIN, the information of the first application and the information of the second application.
  6. 根据权利要求3至5任一项所述的方法,其特征在于,The method according to any one of claims 3 to 5, wherein,
    所述第一应用的信息包括:第一应用的包名;The information of the first application includes: the package name of the first application;
    所述第二应用的信息包括:第二应用的包名,以及第二应用的页面名,第二应用最低版本号以及第二应用的系统标志中的至少一个。The information of the second application includes: a package name of the second application, and at least one of a page name of the second application, a minimum version number of the second application, and a system flag of the second application.
  7. 一种设备间应用协同工作的方法,其特征在于,应用于第二电子设备,所述方法包括:A method for inter-device application collaboration, characterized in that, applied to a second electronic device, the method comprising:
    获取第一电子设备生成的编码信息;obtaining the encoded information generated by the first electronic device;
    根据所述编码信息向所述第一电子设备发送第一请求,所述第一请求用于所述第一电子设备与所述第二电子设备建立通信连接;Send a first request to the first electronic device according to the encoded information, where the first request is for the first electronic device to establish a communication connection with the second electronic device;
    在所述第一电子设备绑定所述第一电子设备的第一应用和所述第二电子设备的第 二应用的情况下,通过建立的所述通信连接使所述第二应用与所述第一应用传输协同信息。In the case where the first electronic device binds the first application of the first electronic device and the second application of the second electronic device, the second application is connected to the second application through the established communication connection The first application transmits the coordination information.
  8. 根据权利要求7所述的方法,其特征在于,所述获取第一电子设备生成的编码信息,包括:The method according to claim 7, wherein the acquiring the encoded information generated by the first electronic device comprises:
    扫描并识别所述第一电子设备显示的包含所述编码信息的二维码,得到所述编码信息,所述编码信息包括组网信息;Scanning and recognizing the two-dimensional code containing the encoding information displayed by the first electronic device to obtain the encoding information, where the encoding information includes networking information;
    根据所述编码信息向所述第一电子设备发送第一请求,包括:Sending a first request to the first electronic device according to the encoded information includes:
    根据所述组网信息向所述第一电子设备发送所述第一请求。Send the first request to the first electronic device according to the networking information.
  9. 根据权利要求8所述的方法,其特征在于,所述编码信息包括:所述第一应用的信息和所述第二应用的信息;The method according to claim 8, wherein the encoded information comprises: the information of the first application and the information of the second application;
    所述方法还包括:The method also includes:
    向所述第一电子设备发送第二请求,所述第二请求包括所述第一应用的信息和所述第二应用的信息,所述第二请求用于所述第一电子设备绑定所述第一应用和所述第二应用。Send a second request to the first electronic device, the second request includes the information of the first application and the information of the second application, and the second request is used for binding the first electronic device the first application and the second application.
  10. 根据权利要求9所述的方法,其特征在于,所述编码信息还包括群组信息和个人识别码PIN;The method according to claim 9, wherein the encoded information further comprises group information and a personal identification code PIN;
    在所述根据所述编码信息向所述第一电子设备发送第一请求之前,所述方法还包括:Before the sending the first request to the first electronic device according to the encoded information, the method further includes:
    存储所述群组信息和所述PIN。The group information and the PIN are stored.
  11. 根据权利要求9或10所述的方法,其特征在于,在所述向所述第一电子设备发送第二请求之前,所述方法还包括:The method according to claim 9 or 10, wherein before the sending the second request to the first electronic device, the method further comprises:
    根据所述第一应用的信息、所述第二应用的信息和所述组网信息,对所述第二应用进行应用权限校验。Perform application permission verification on the second application according to the information of the first application, the information of the second application and the networking information.
  12. 根据权利要求9至11任一项所述的方法,其特征在于,在所述获取第一电子设备生成的编码信息之后,所述方法还包括:The method according to any one of claims 9 to 11, wherein after the acquiring the encoded information generated by the first electronic device, the method further comprises:
    根据所述第二应用的信息确定所述第二电子设备未安装所述第二应用;determining that the second application is not installed on the second electronic device according to the information of the second application;
    跳转所述第二应用的下载页面。Jump to the download page of the second application.
  13. 一种电子设备,其特征在于,所述电子设备包括存储器和一个或多个处理器;所述存储器和所述处理器耦合;所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令,当所述计算机指令被所述处理器执行时,使得所述电子设备执行以下步骤:An electronic device, characterized in that the electronic device includes a memory and one or more processors; the memory is coupled to the processor; the memory is used to store computer program code, and the computer program code includes a computer The instructions, when executed by the processor, cause the electronic device to perform the following steps:
    生成编码信息;generate encoded information;
    接收来自第二电子设备发送的第一请求,所述第一请求与所述编码信息对应;receiving a first request sent from a second electronic device, where the first request corresponds to the encoded information;
    根据所述第一请求与所述第二电子设备建立通信连接;establishing a communication connection with the second electronic device according to the first request;
    绑定所述电子设备的第一应用和所述第二电子设备的第二应用;binding the first application of the electronic device and the second application of the second electronic device;
    通过建立的所述通信连接使所述第一应用与所述第二应用传输协同信息。The first application and the second application transmit cooperation information through the established communication connection.
  14. 根据权利要求13所述的电子设备,其特征在于,所述电子设备还包括显示屏,所述显示屏与所述存储器和所述处理器耦合,当所述计算机指令被所述处理器执行时,所述电子设备还执行以下步骤:14. The electronic device of claim 13, further comprising a display screen coupled to the memory and the processor, when the computer instructions are executed by the processor , the electronic device also performs the following steps:
    在所述显示屏显示包含所述编码信息的二维码,所述编码信息包括组网信息;Display a two-dimensional code containing the encoded information on the display screen, and the encoded information includes networking information;
    其中,所述第一请求与所述组网信息对应。The first request corresponds to the networking information.
  15. 根据权利要求13或14所述的电子设备,其特征在于,所述编码信息包括所述第一应用的信息和所述第二应用的信息;The electronic device according to claim 13 or 14, wherein the encoded information includes information of the first application and information of the second application;
    所述绑定所述电子设备的第一应用和所述第二电子设备的第二应用,包括:The binding of the first application of the electronic device and the second application of the second electronic device includes:
    接收来自所述第二电子设备的第二请求,所述第二请求包括所述第一应用的信息和所述第二应用的信息;receiving a second request from the second electronic device, the second request including the information of the first application and the information of the second application;
    根据所述第二请求,绑定所述第一应用和所述第二应用。According to the second request, the first application and the second application are bound.
  16. 根据权利要求15所述的电子设备,其特征在于,所述编码信息还包括群组信息和个人识别码PIN;The electronic device according to claim 15, wherein the encoded information further comprises group information and a personal identification code PIN;
    当所述计算机指令被所述处理器执行时,还执行以下步骤:When the computer instructions are executed by the processor, the following steps are also performed:
    获取所述第二电子设备根据所述编码信息得到的所述群组信息和所述PIN,以及所述第一应用的信息和所述第二应用的信息;Acquire the group information and the PIN obtained by the second electronic device according to the encoded information, as well as the information of the first application and the information of the second application;
    确定获取的所述第二电子设备根据所述编码信息得到的所述群组信息,所述PIN,以及所述第一应用的信息和所述第二应用的信息,与所述编码信息中包括的所述群组信息,所述PIN,以及所述第一应用的信息和所述第二应用的信息一致。It is determined that the acquired group information, the PIN, the information of the first application and the information of the second application obtained by the second electronic device according to the encoded information, and the encoded information include: The group information, the PIN, and the information of the first application are consistent with the information of the second application.
  17. 根据权利要求16所述的电子设备,其特征在于,当所述计算机指令被所述处理器执行时,还执行以下步骤:The electronic device according to claim 16, wherein when the computer instructions are executed by the processor, the following steps are further performed:
    生成所述PIN;generating the PIN;
    根据所述PIN,所述第一应用的信息和所述第二应用的信息生成所述群组信息。The group information is generated from the PIN, the information of the first application and the information of the second application.
  18. 根据权利要求15至17任一项所述的电子设备,其特征在于,The electronic device according to any one of claims 15 to 17, wherein,
    所述第一应用的信息包括:第一应用的包名;The information of the first application includes: the package name of the first application;
    所述第二应用的信息包括:第二应用的包名,以及第二应用的页面名,第二应用最低版本号以及第二应用的系统标志中的至少一个。The information of the second application includes: a package name of the second application, and at least one of a page name of the second application, a minimum version number of the second application, and a system flag of the second application.
  19. 一种电子设备,其特征在于,所述电子设备包括存储器和一个或多个处理器;所述存储器和所述处理器耦合;所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令,当所述计算机指令被所述处理器执行时,使得所述电子设备执行以下步骤:An electronic device, characterized in that the electronic device includes a memory and one or more processors; the memory is coupled to the processor; the memory is used to store computer program code, and the computer program code includes a computer The instructions, when executed by the processor, cause the electronic device to perform the following steps:
    获取第一电子设备生成的编码信息;obtaining the encoded information generated by the first electronic device;
    根据所述编码信息向所述第一电子设备发送第一请求,所述第一请求用于所述第一电子设备与所述电子设备建立通信连接;Send a first request to the first electronic device according to the encoded information, where the first request is for the first electronic device to establish a communication connection with the electronic device;
    在所述第一电子设备绑定所述第一电子设备的第一应用和所述电子设备的第二应用的情况下,通过建立的所述通信连接使所述第二应用与所述第一应用传输协同信息。In the case where the first electronic device binds the first application of the first electronic device and the second application of the electronic device, the second application is connected to the first application through the established communication connection The application transmits the coordination information.
  20. 根据权利要求19所述的电子设备,其特征在于,所述获取第一电子设备生成的编码信息,包括:The electronic device according to claim 19, wherein the acquiring the encoded information generated by the first electronic device comprises:
    扫描并识别所述第一电子设备显示的包含所述编码信息的二维码,得到所述编码信息,所述编码信息包括组网信息;Scanning and recognizing the two-dimensional code containing the encoding information displayed by the first electronic device to obtain the encoding information, where the encoding information includes networking information;
    根据所述编码信息向所述第一电子设备发送第一请求,包括:Sending a first request to the first electronic device according to the encoded information includes:
    根据所述组网信息向所述第一电子设备发送所述第一请求。Send the first request to the first electronic device according to the networking information.
  21. 根据权利要求20所述的电子设备,其特征在于,所述编码信息包括:所述第一应用的信息和所述第二应用的信息;The electronic device according to claim 20, wherein the encoded information comprises: information of the first application and information of the second application;
    当所述计算机指令被所述处理器执行时,所述电子设备还执行以下步骤:When the computer instructions are executed by the processor, the electronic device further performs the following steps:
    向所述第一电子设备发送第二请求,所述第二请求包括所述第一应用的信息和所述第二应用的信息,所述第二请求用于所述第一电子设备绑定所述第一应用和所述第二应用。Send a second request to the first electronic device, the second request includes the information of the first application and the information of the second application, and the second request is used for binding the first electronic device the first application and the second application.
  22. 根据权利要求21所述的电子设备,其特征在于,所述编码信息还包括群组信息和个人识别码PIN;The electronic device according to claim 21, wherein the encoded information further comprises group information and a personal identification code PIN;
    当所述计算机指令被所述处理器执行时,还执行以下步骤:When the computer instructions are executed by the processor, the following steps are also performed:
    存储所述群组信息和所述PIN。The group information and the PIN are stored.
  23. 根据权利要求21或22所述的电子设备,其特征在于,当所述计算机指令被所述处理器执行时,还执行以下步骤:The electronic device according to claim 21 or 22, wherein when the computer instructions are executed by the processor, the following steps are further performed:
    根据所述第一应用的信息、所述第二应用的信息和所述组网信息,对所述第二应用进行应用权限校验。Perform application permission verification on the second application according to the information of the first application, the information of the second application and the networking information.
  24. 根据权利要求21至23任一项所述的电子设备,其特征在于,当所述计算机指令被所述处理器执行时,还执行以下步骤:The electronic device according to any one of claims 21 to 23, wherein when the computer instructions are executed by the processor, the following steps are further performed:
    根据所述第二应用的信息确定所述电子设备未安装所述第二应用;determining that the electronic device does not have the second application installed according to the information of the second application;
    跳转所述第二应用的下载页面。Jump to the download page of the second application.
  25. 一种计算机程序产品,其特征在于,包括如权利要求13至18中任一项所述的电子设备运行的所述计算机指令,或如权利要求19至24中任一项所述的电子设备运行的所述计算机指令。A computer program product, characterized in that it comprises the computer instructions executed by the electronic device according to any one of claims 13 to 18 , or the electronic device executed according to any one of claims 19 to 24 of said computer instructions.
PCT/CN2022/083743 2021-03-31 2022-03-29 Method for collaborative work of applications between devices, and device WO2022206770A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110350379.9 2021-03-31
CN202110350379.9A CN115147056A (en) 2021-03-31 2021-03-31 Method and device for application cooperative work between devices

Publications (1)

Publication Number Publication Date
WO2022206770A1 true WO2022206770A1 (en) 2022-10-06

Family

ID=83403281

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/083743 WO2022206770A1 (en) 2021-03-31 2022-03-29 Method for collaborative work of applications between devices, and device

Country Status (2)

Country Link
CN (1) CN115147056A (en)
WO (1) WO2022206770A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115689506B (en) * 2022-11-07 2023-10-20 中国船舶重工集团公司第七一九研究所 Cross-system physical interface management method in ship three-dimensional design
CN116744267A (en) * 2022-11-16 2023-09-12 荣耀终端有限公司 Data processing method, system, electronic device and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170091732A1 (en) * 2015-09-24 2017-03-30 Square, Inc. Server-assisted pairing for wireless communications
WO2018072085A1 (en) * 2016-10-18 2018-04-26 中兴通讯股份有限公司 Multi-device collaborative operation method and devices, and computer storage medium
CN110727525A (en) * 2014-05-30 2020-01-24 苹果公司 Companion application for campaign collaboration
CN110958475A (en) * 2019-10-30 2020-04-03 华为终端有限公司 Cross-device content projection method and electronic device
CN111028052A (en) * 2019-11-28 2020-04-17 维沃移动通信有限公司 Interface operation method and electronic equipment
CN111078019A (en) * 2020-01-03 2020-04-28 北京边缘创新技术有限公司 Method for opening application program through wireless signal, accessory device and vehicle-mounted device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110727525A (en) * 2014-05-30 2020-01-24 苹果公司 Companion application for campaign collaboration
US20170091732A1 (en) * 2015-09-24 2017-03-30 Square, Inc. Server-assisted pairing for wireless communications
WO2018072085A1 (en) * 2016-10-18 2018-04-26 中兴通讯股份有限公司 Multi-device collaborative operation method and devices, and computer storage medium
CN110958475A (en) * 2019-10-30 2020-04-03 华为终端有限公司 Cross-device content projection method and electronic device
CN111028052A (en) * 2019-11-28 2020-04-17 维沃移动通信有限公司 Interface operation method and electronic equipment
CN111078019A (en) * 2020-01-03 2020-04-28 北京边缘创新技术有限公司 Method for opening application program through wireless signal, accessory device and vehicle-mounted device

Also Published As

Publication number Publication date
CN115147056A (en) 2022-10-04

Similar Documents

Publication Publication Date Title
WO2022206770A1 (en) Method for collaborative work of applications between devices, and device
WO2021233079A1 (en) Cross-device content projection method, and electronic device
CN111684778B (en) Implementation method of application function and electronic equipment
WO2021147406A1 (en) Audio output method and terminal device
EP4029582A1 (en) Information processing method, system and apparatus, and device and storage medium
US20230422154A1 (en) Method for using cellular communication function, and related apparatus and system
WO2017162043A1 (en) Access method, configuration method and apparatus used for inter-device service
WO2021073428A1 (en) Account number binding method, device and system
WO2023284650A1 (en) Communication method and electronic device
WO2022062875A1 (en) Data transmission method and system, electronic device, and storage medium
WO2022127670A1 (en) Call method and system, and related device
CN114077502A (en) Method for establishing data transmission channel, terminal system and storage medium
WO2022199673A1 (en) Login authentication method and electronic device
CN114741008B (en) Distributed cross-device cooperation method, electronic device and communication system
WO2022135156A1 (en) Distributed cross-device collaboration method, and electronic device and communication system
CN116056076B (en) Communication system, method and electronic equipment
EP4297371A1 (en) Function migration method and apparatus
WO2022206630A1 (en) Function migration method and apparatus
WO2022206676A1 (en) Function transfer method and apparatus
WO2022007856A1 (en) Cooperative control method and system for electronic devices
WO2024022124A1 (en) Application login method, electronic device and system
WO2023025059A1 (en) Communication system and communication method
WO2022233237A1 (en) Audio playing method and apparatus, and device
CN117478682A (en) Method, equipment and cooperative work system for establishing point-to-point channel
AlDuaij Multi-Mobile Computing

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22778952

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 22778952

Country of ref document: EP

Kind code of ref document: A1