Distributed service transmission method and communication apparatus

By obtaining the role information and capability information of the dual-ended devices, determining the transmission strategy of WiFi point-to-point connections, it solves the problem that GC devices cannot establish distributed service connections with other devices, and improves the success rate and user experience of distributed service transmission .

WO2025026090A1PCT designated stage expired Publication Date: 2025-02-06HUAWEI TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/106459
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-08-03
Filing Date
2024-07-19
Publication Date
2025-02-06

AI Technical Summary

Technical Problem

In WiFi point-to-point connection, the client (GC) device in the group cannot establish a distributed service connection with other devices, resulting in the failure of distributed service transmission.

Method used

By obtaining the role information and capability information of the dual-ended device, it determines the transmission strategy, including multiplexing existing connections, disconnecting existing connections and re-establishing, or establishing new connections, to improve the success rate of distributed service transmission.

Benefits of technology

It improves the probability of successful transmission of distributed services through point-to-point connections through WiFi, reduces the probability of discontinuation of distributed services, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024106459_06022025_PF_FP_ABST
    Figure CN2024106459_06022025_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a distributed service transmission method and a communication apparatus. The method comprises: a first device responds to a first operation of a first user, the first operation being used for instructing to transmit a first distributed service by means of a WiFi peer-to-peer connection; the first device sends first role information and / or first capability information, and receives second role information and / or second capability information from a second device, the capability information being used for indicating whether connection to at least two devices is supported, and the role information being used for indicating a group owner (GO) or a group client (GC); and on the basis of the first role information and / or the first capability information, and the second role information and / or the second capability information, the first device and the second device determine a transmission policy of transmitting the first distributed service between the first device and the second device by means of the WiFi peer-to-peer connection.
Need to check novelty before this filing date? Find Prior Art

Description

A distributed service transmission method and communication device

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on August 3, 2023, with application number 202310979972.9 and application name “A Distributed Service Transmission Method and Communication Device”, the entire contents of which are incorporated by reference into this application. Technical Field

[0003] The present application relates to the field of terminal technology, and in particular to a distributed service transmission method and a communication device. Background Art

[0004] WiFi point-to-point (wireless fidelity peer-to-peer) also known as WiFi direct (wireless fidelity direct) is a wireless fidelity (wireless-fidelity, A key technology under the "WiFi DIRECT" standard protocol launched by the Wi-Fi Alliance, WiFi point-to-point connectivity allows two WiFi devices to connect and communicate directly with each other without the need for a WiFi hotspot. WiFi point-to-point connectivity supports interconnection between electronic devices and high-speed data transmission, and is widely used in distributed services such as data sharing and multicasting.

[0005] WiFi point-to-point connections include P2P (peer-to-peer) connections, HML (Huawei Magneto Link) or AWDL (Apple Wireless Direct Link). After the P2P connection is established, the group owner (GO) / group client (GC) role of the device in the P2P connection is fixed. A GO device can be connected to multiple GC devices at the same time, but a GC device can only be connected to one GO device at a time and cannot be connected to other devices. That is, the GC device cannot initiate new distributed services or receive distributed services from other devices. Therefore, when it is necessary to transmit distributed services via WiFi point-to-point connection, the transmission may fail.

[0006] Summary of the Invention

[0007] The embodiments of the present application provide a distributed service transmission method and a communication device for improving the probability of successful transmission of distributed services.

[0008] In a first aspect, a distributed service transmission method is provided, which can be applied to a first device, which is, for example, a sending end of a distributed service, and the method includes: responding to a first operation of a first user, the first operation being used to indicate the transmission of a first distributed service via a WiFi point-to-point connection; sending first role information and / or first capability information, and receiving second role information and / or second capability information from a second device, the capability information being used to indicate whether connection with at least two devices is supported, and the role information being used to indicate a group manager GO or a group client GC; determining a transmission strategy for transmitting the first distributed service between the first device and the second device via the WiFi point-to-point connection based on the first role information and / or first capability information, and the second role information and / or second capability information.

[0009] In an embodiment of the present application, the transmission strategy of the distributed service is determined based on the role information and / or capability information of both ends. Compared with the transmission strategy of the distributed service determined only based on its own role, the transmission strategy of the distributed service determined in the embodiment of the present application is more accurate and comprehensive, which helps to improve the probability of successful transmission of the distributed service.

[0010] In a possible implementation, the transmission strategy of the first distributed service includes one of the following items: transmitting the first distributed service through the existing WiFi point-to-point connection between the first device and the second device; disconnecting the existing WiFi point-to-point connection of the first device, and establishing a WiFi point-to-point connection between the first device and the second device to transmit the first distributed service; disconnecting the existing WiFi point-to-point connection of the second device, and establishing a WiFi point-to-point connection between the first device and the second device to transmit the first distributed service; disconnecting the existing WiFi point-to-point connection between the first device and the second device, and establishing a WiFi point-to-point connection between the first device and the second device to transmit the first distributed service; or, establishing a WiFi point-to-point connection between the first device and the second device to transmit the first distributed service.

[0011] In the above technical solution, when determining the transmission strategy of the first distributed service initiated by the first device according to the role information and / or capability information of both ends, if the role information of both ends indicates that the first device and the second device are the GC and GO of the same group, it is determined that the first device and the second device can reuse the existing WiFi point-to-point connection between the first device and the second device to transmit the first distributed service; if the first role information indicates that the first device is the GC device of the first group, the second role information indicates that the second device is the GO device of the second group or the second device has no second role information (the absence of the second role information can, for example, indicate that the second device has not established a P2P connection with other devices, that is, the second device has no role), it is determined that the first device needs to disconnect the current WiFi point-to-point connection and needs to establish a WiFi point-to-point connection to transmit the first distributed service; if the first role information indicates that the first device is a GO device of the first group or the first device has no role, and the second role information indicates that the second device is a GC device of the second group, it is determined that the second device needs to disconnect the current WiFi point-to-point connection and needs to establish a WiFi point-to-point connection to transmit the first distributed service; if the first role information indicates that the first device is a GC (GO) device and the second role information indicates that the second device is a GC (GO) device, it is determined that the existing WiFi point-to-point connection of the first device needs to be disconnected, and the existing WiFi point-to-point connection of the second device needs to be disconnected, and a WiFi point-to-point connection needs to be established to transmit the first distributed service; if the capability information of both ends indicates that both the first device and the second device support connection with at least two devices, or the first role information indicates that the first device is a GO device and the second role information indicates that the second device has no role, or the first role information indicates that the first device has no role and the second role information indicates that the second device is a GO, it is determined that the first device and the second device can establish a WiFi point-to-point connection to transmit the first distributed service.

[0012] In a possible embodiment, the method further includes: if the transmission strategy of the first distributed service includes disconnecting the existing WiFi point-to-point connection of the first device, displaying first information, the first information being used to indicate whether to disconnect the existing WiFi point-to-point connection; and disconnecting the existing WiFi point-to-point connection of the first device in response to a second operation of the first user to disconnect the existing WiFi point-to-point connection.

[0013] In the above technical solution, if it is determined that the existing WiFi point-to-point connection needs to be disconnected, the first device can also display information to allow the user to confirm whether it needs to be disconnected, thereby reducing the probability of interruption of higher-priority distributed services and improving user experience.

[0014] In one possible embodiment, the method further includes: if the transmission strategy of the first distributed service includes disconnecting the existing WiFi point-to-point connection of the second device, sending second information to the second device, the second information being used to instruct the second device to disconnect the existing WiFi point-to-point connection; and receiving response information from the second device, the response information being used to indicate that the second device has disconnected the existing WiFi point-to-point connection.

[0015] In the above technical solution, when the receiving end needs to disconnect the existing WiFi point-to-point connection, a second message is sent to the second device to instruct the second device to disconnect the existing WiFi point-to-point connection, which helps to increase the probability of successful establishment of the WiFi point-to-point connection between the first device and the second device.

[0016] In a possible implementation manner, the second information is carried in a signaling connection established between the first device and the second device.

[0017] In the above technical solution, the efficiency of establishing a new WiFi point-to-point connection can be improved by instructing the receiving end to disconnect the existing WiFi point-to-point connection through existing signaling (for example, signaling used to encrypt the signaling channel).

[0018] In one possible implementation, the first role information and / or first capability information is carried in a broadcast message of the first device, and the broadcast message is used to discover a device for establishing a signaling connection; or, the first role information and / or first capability information is carried in a signaling connection established between the first device and the second device.

[0019] In the above technical solution, carrying role information and / or capability information in a broadcast message can be applicable to application scenarios where the first device and the second device have not established a signaling connection, while carrying role information and / or capability information in a signaling connection established between the first device and the second device can be applicable to scenarios where the first device and the second device have established a signaling connection, as well as scenarios where the first device and the second device belong to a networked "super terminal".

[0020] According to a second aspect, a distributed service transmission method is provided, which can be applied to a second device, which is, for example, a receiving end of a distributed service. The method includes: receiving first role information and / or first capability information from a first device, wherein the first role information and / or first capability information is sent by the first device in response to a first operation of a first user, wherein the first operation is used to indicate the transmission of a first distributed service via a wireless fidelity WiFi point-to-point connection, the capability information is used to indicate whether connection with at least two devices is supported, and the role information is used to indicate a group manager GO or a group client GC; sending second role information and / or second capability information, the capability information is used to indicate whether connection with at least two devices is supported, and the role information is used to indicate a group manager GO or a group client GC; determining a transmission strategy for transmitting the first distributed service between the second device and the first device via a WiFi point-to-point connection based on the first role information and / or first capability information, and the second role information and / or second capability information.

[0021] In a possible embodiment, the transmission strategy of the first distributed service includes one of the following items: transmitting the first distributed service through the existing WiFi point-to-point connection between the first device and the second device; disconnecting the existing WiFi point-to-point connection of the first device, and establishing a WiFi point-to-point connection between the first device and the second device to transmit the first distributed service; disconnecting the existing WiFi point-to-point connection of the second device, and establishing a WiFi point-to-point connection between the first device and the second device to transmit the first distributed service; disconnecting the existing WiFi point-to-point connection between the first device and the second device, and establishing a WiFi point-to-point connection between the first device and the second device to transmit the first distributed service; or, the first device and the second device establish a WiFi point-to-point connection to transmit the first distributed service.

[0022] In a possible embodiment, the method further includes: receiving second information from the first device, the second information being used to instruct the second device to disconnect the existing WiFi point-to-point connection; displaying first information, the first information being used to indicate whether to disconnect the existing WiFi point-to-point connection; disconnecting the existing WiFi point-to-point connection of the second device in response to a second operation of the second user to disconnect the existing WiFi point-to-point connection of the first device; and sending a response message to the first device, the response message being used to indicate that the second device has disconnected the existing WiFi point-to-point connection.

[0023] In a possible implementation manner, the second information is carried in a signaling connection established between the first device and the second device.

[0024] In one possible implementation, the second role information and / or the second capability information is carried in a broadcast message of the second device, and the broadcast message is used to discover the device for establishing a signaling connection; or, the second role information and / or the second capability information is carried in a signaling connection established between the first device and the second device.

[0025] In a third aspect, a communication device is provided. The communication device may be an electronic device, or a chip or chip system used in an electronic device. The communication device includes a communication interface and a processor, and optionally, a memory. The memory is used to store a computer program. The processor is coupled to the memory and the communication interface. When the processor reads the computer program or instructions, the communication device executes the method performed by the first device in the first aspect or the method performed by the second device in the second aspect.

[0026] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium is used to store a computer program. When the computer program is run on a computer, the computer executes the method provided in the first or second aspect above.

[0027] In a fifth aspect, a computer program product is provided, comprising a computer program, which, when executed on a computer, enables the computer to execute the method described in the first or second aspect above.

[0028] In a sixth aspect, a chip system is provided, comprising a processor and an interface, wherein the processor is configured to call and execute instructions from the interface so that the chip system implements the method described in the first or second aspect above.

[0029] For the beneficial effects of the second to sixth aspects mentioned above, refer to the beneficial effects of the first aspect and will not be repeated. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] FIG1 is a schematic diagram of a communication system applicable to an embodiment of the present application;

[0031] FIG2 is a schematic diagram of the hardware structure of an electronic device 100 provided in an embodiment of the present application;

[0032] FIG3 is a diagram of a software system architecture provided in an embodiment of the present application;

[0033] FIG4 is a schematic diagram of a P2P connection;

[0034] FIG5 is a flow chart of a distributed service transmission method provided in an embodiment of the present application;

[0035] FIG6 is a schematic diagram of a display interface provided in an embodiment of the present application;

[0036] FIG7 is another display interface diagram provided in an embodiment of the present application;

[0037] FIG8 is a flowchart of an example of a distributed service transmission method provided in an embodiment of the present application;

[0038] FIG9 is a flowchart of another example of a distributed service transmission method provided in an embodiment of the present application;

[0039] FIG10 is a schematic structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0040] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. The terms used in the following embodiments are only for the purpose of describing specific embodiments and are not intended to be limiting of the present application. As used in the specification and appended claims of the present application, the singular expressions "one", "a kind of", "said", "above", "the" and "this" are intended to also include expressions such as "one or more", unless there is a clear contrary indication in the context. It should also be understood that in the embodiments of the present application, "one or more" refers to one, two or more; "and / or" describes the association relationship of associated objects, indicating that three relationships may exist; for example, A and / or B can represent: the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural. The character " / " generally indicates that the related objects before and after are in an "or" relationship.

[0041] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in yet other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0042] The "multiple" involved in the embodiments of the present application means greater than or equal to two. It should be noted that in the description of the embodiments of the present application, the words "first" and "second" are only used for the purpose of distinguishing the description and cannot be understood as indicating or implying relative importance or order.

[0043] Please refer to Figure 1, which is a schematic diagram of a communication system applicable to an embodiment of the present application. The communication system may include various electronic devices that can support WiFi point-to-point connections and realize the transmission of distributed services based on WiFi point-to-point connections. Among them, the electronic devices may include, for example, mobile phones 11, tablet computers 12, large-screen devices 13, etc. The embodiment of the present application does not specifically limit the type of electronic devices (such as mobile phones 11, tablet computers 12 or large-screen devices 13). Optionally, the communication system 10 may also include other devices, such as smart home devices and other Internet of Things (IOT) devices, etc., which are not shown in Figure 1.

[0044] For example, the electronic devices in the embodiments of the present application may be mobile phones, wearable devices (such as smart bracelets, smart watches, headphones, etc.), tablet computers, handheld computers, netbooks, laptop computers, handheld computers, notebook computers, ultra-mobile personal computers (UMPC), cellular phones, personal digital assistants (PDA), augmented reality (AR) and virtual reality (VR) devices, etc., and may also be televisions, large screens, speakers, refrigerators, air conditioners, vehicle-mounted devices (also referred to as car machines), printers, projectors, etc. Exemplary embodiments of electronic devices include but are not limited to devices equipped with Or devices with other operating systems.

[0045] The various electronic devices in the communication system can be connected to each other via WiFi point-to-point (such as P2P, HML or AWDL) to form a near-field communication network. WiFi point-to-point means that devices can be connected point-to-point based on short-range communication and other methods, without relying on a local area network.

[0046] After a WiFi point-to-point connection is established between multiple (two or more) electronic devices, they become electronic devices in the network. In the network, different electronic devices can perform their own business, or the business can be distributed on different electronic devices. For example, the various electronic devices shown in Figure 1 constitute a network, and the mobile phone 11 can synchronize the video it plays to the large-screen device 13 for playback via a WiFi point-to-point connection in the form of screen projection; the mobile phone 11 can also transfer its stored photos to the tablet computer 12 via a WiFi point-to-point connection to achieve file sharing.

[0047] In some embodiments, a trust relationship can be established between different electronic devices in the network to enable distributed services. This trust relationship can be established during the discovery phase of the WiFi point-to-point connection initialization process. Optionally, the trust relationship between electronic devices can be established based on a common account. For example, if the mobile phone 11 and the tablet computer 12 are logged into the same account, the mobile phone 11 can directly bind to the tablet computer 12 to establish a trust relationship, for example, by directly clicking the binding button corresponding to the tablet computer 12 on the mobile phone 11 without waiting for confirmation from the tablet computer 12. The trust relationship between electronic devices can also be established based on associated accounts.

[0048] Multiple electronic devices in a network with a trust relationship can be called a "hyperterminal." For example, in the architecture shown in Figure 1, mobile phone 11, tablet computer 12, and large-screen device 13 are all logged into the same account, so the network consisting of mobile phone 11, tablet computer 12, and large-screen device 13 is called a "hyperterminal."

[0049] Please refer to Figure 2, which is a schematic diagram of the hardware structure of an electronic device 100 provided in an embodiment of the present application. The electronic device 100 can be the mobile phone 11, tablet computer 12, or large-screen device 13 in the architecture shown in Figure 1, or other electronic devices that can be used in the above architecture.

[0050] The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a wireless communication module 150, a sensor module 160, etc.

[0051] The structures illustrated in the embodiments of this application do not constitute specific limitations on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented by hardware, software, or a combination of software and hardware.

[0052] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor, a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). Different processing units may be independent components or integrated into one or more processors. In some embodiments, the electronic device 100 may also include one or more processors 110. The controller may generate an operation control signal based on the instruction opcode and the timing signal to complete the control of instruction fetching and execution.

[0053] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a SIM card interface, and / or a USB interface. Among them, the USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transmit data between the electronic device 100 and peripheral devices.

[0054] The interface connection relationship between the modules illustrated in the embodiment of the present application is only for illustrative purposes and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods from the above embodiments, or a combination of multiple interface connection methods.

[0055] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2 and the wireless communication module 150.

[0056] The wireless communication module 150 can provide wireless communication solutions including WiFi, Bluetooth (BT), wireless data transmission modules (e.g., 433MHz, 868MHz, 915MHz), etc. applied to the electronic device 100. The wireless communication module 150 can be one or more devices integrating at least one communication processing module. The wireless communication module 150 receives electromagnetic waves via antenna 1 and / or antenna 2, filters and frequency modulates the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 150 can also receive the signal to be transmitted from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through antenna 1 and / or antenna 2.

[0057] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 via the external memory interface 120 to implement data storage functions. For example, files such as music and videos can be stored on the external memory card.

[0058] The internal memory 121 can be used to store one or more computer programs, which include instructions. The processor 110 can enable the electronic device 100 to execute the distributed service transmission method provided in some embodiments of the present application, as well as various applications and data processing, etc. by running the above-mentioned instructions stored in the internal memory 121. The internal memory 121 may include a code storage area and a data storage area. Among them, the code storage area can store an operating system. The data storage area can store data created during the use of the electronic device 100, etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more disk storage components, flash memory components, universal flash storage (UFS), etc. In some embodiments, the processor 110 can enable the electronic device 100 to execute the distributed service transmission method provided in the embodiments of the present application, as well as other applications and data processing, by running the instructions stored in the internal memory 121, and / or the instructions stored in the memory provided in the processor 110.

[0059] Please refer to Figure 3, which shows a software system architecture diagram provided in an embodiment of the present application. This system architecture, from bottom to top, mainly includes: hardware layer, hardware abstraction layer (HAL), application framework layer (Framework), and application layer. In addition, between the application layer and the application framework layer, there are also a soft bus and a WiFi extension interface (WiFi EXT). Among them, the soft bus and WiFi EXT can also be regarded as components of the application framework layer.

[0060] Applications in the application layer (such as the "Huawei Share" application, "Screen Cast" application, and "Multi-Screen Collaboration" application in Figure 3) are applications that users can directly access using the Framework interface. They run on electronic devices and are windows for users to interact with electronic devices.

[0061] The soft bus includes a WiFi functional module that can provide services such as WiFi device discovery, WiFi connection, networking, as well as tasks and data buses.

[0062] WiFi EXT provides WiFi extension interface functions to enhance WiFi interface functions so that the application layer can call WiFi-related services provided by the Framework.

[0063] Framework refers to some system capabilities running on the operating system of electronic devices. Taking the Android Open Source Project (AOSP) as an example, AOSP provides some related interfaces and services for operating WiFi point-to-point, such as the WiFi service, WiFi point-to-point service and station (STA) service in Figure 3. Among them, the WiFi point-to-point service may include short-range service, and the interface type corresponding to the WiFi point-to-point service is the WiFi point-to-point management (Manager) type. The interface of the WiFi point-to-point management type includes: providing interfaces such as discovering devices (discoverPeers) and connecting (connect), and these interfaces can be used by users to directly control the WiFi point-to-point connection.

[0064] The HAL is an interface layer between the operating system kernel and the hardware circuitry. Its purpose is to abstract the hardware. It hides the hardware interface details of a specific platform and provides a virtual hardware platform for the operating system, making it hardware-independent and portable across multiple platforms.

[0065] The hardware layer may include a variety of communication interfaces, such as the Bluetooth interface, wpa_supplicant, universal serial bus (USB) interface, Ethernet (ETH) interface, modem, etc. shown in Figure 3. The hardware layer may also include a WiFi driver (WiFi Driver), a WiFi chip (Chipset), etc. (not shown in the figure). The WiFi driver is responsible for connecting the WiFi chip to the operating system of the terminal device.

[0066] The Framework layer within the terminal device interacts with the chip through the driver. For example, in AOSP, the Framework layer uses wpa_supplicant to interact with the driver and support encryption and authentication. The application layer provides several interface functions that developers and businesses can directly call. These calls enable the chip to perform corresponding WiFi point-to-point operations through the driver. The Framework layer itself is responsible for message forwarding and coordination between upper-layer applications and lower-layer hardware (including wpa_supplicant, WiFi Driver, and Chipset), as well as connection management.

[0067] The P2P protocol stipulates that when two devices establish a P2P connection and maintain data communication, their roles are fixed, and other devices cannot establish P2P connections with the GC device. Specifically, a group can include one GO and at least one GC. A GO can accept connections from multiple GCs, but a GC can only connect to one GO. For example, see Figure 4, which illustrates a P2P connection.

[0068] Device A, acting as a GC, and device B, acting as a GO, establish a P2P connection. Devices A and B can transmit distributed service 1 via the P2P connection. For example, if device A is the sending device, device B can receive distributed service 1 from device A and forward it to other devices. Alternatively, device B can initiate other distributed services to other devices (e.g., device C). The connection between device B and device C can be a P2P connection or other connection methods, such as an upper-layer Transmission Control Protocol (TCP) connection.

[0069] When device A needs to initiate a distributed service to device D or receive a distributed service from device D, device A may not be able to establish a P2P connection with device D due to the limitation of device A's GC role, resulting in the failure of the distributed service initiated by device A to device D. Device D can be a device that acts as a GC, or a device that acts as a GO, or a device with no role (for example, a device that has not established a P2P connection with other devices). Optionally, after the distributed service initiated by device A to device D fails, device A may display a prompt message that "The P2P channel is occupied, please turn off the wireless access point (AP) or try again after casting the screen."

[0070] This shows that when transmitting distributed services through P2P connections, the device acting as a GC cannot initiate distributed services to other devices, nor can it receive distributed services from other devices, resulting in the failure of distributed service transmission.

[0071] In view of this, an embodiment of the present application provides a distributed service transmission method and a communication device that can implement the method, which are used to improve the probability of successful transmission of distributed services. In the distributed service transmission method provided in the embodiment of the present application, when a distributed service needs to be initiated, the sending end and the receiving end of the distributed service can obtain the role information and / or capability information of both ends, and determine the transmission strategy of the distributed service based on the role information and / or capability information of both ends. This is more accurate and comprehensive than the transmission strategy of the distributed service determined only based on its own role, which helps to improve the probability of successful transmission of the distributed service.

[0072] Based on the network system architecture shown in FIG1 and the above-mentioned related technical introduction, FIG5 shows a flowchart of a distributed service transmission method provided by an embodiment of the present application. FIG5 takes the interaction between a first device and a second device as an example for description. For example, the first device can be the mobile phone 11 in the network system architecture shown in FIG1, and the second device can be the tablet computer 12 or large-screen device 13 in the network system architecture shown in FIG1.

[0073] S501: A first device responds to a first operation of a first user, where the first operation is used to instruct transmission of a first distributed service via a WiFi point-to-point connection.

[0074] The first user can perform a first operation on the first device to trigger the first device to establish a WiFi point-to-point connection to transmit the first distributed service to the second device. The WiFi point-to-point connection can be, for example, a P2P, HML, or AWDL connection.

[0075] Taking the first device as the mobile phone in Figure 1 and the second device as the tablet computer 12 in Figure 1 as an example, if the first user wants to transmit the first distributed service to the second device through a WiFi point-to-point connection, he can click the "Settings" button on the interface shown in a in Figure 6, and the displayed interface is shown in b in Figure 6. The first user can click the "WLAN Direct Connection" menu in the interface shown in b in Figure 6 to trigger the establishment of a WiFi point-to-point connection. After the first user clicks the "WLAN Direct Connection" menu, a list of available devices can be displayed, and the displayed interface can be shown in c in Figure 6. The list of available devices includes the identification of at least one device, and the first user can select the receiving device (such as the second device) of the first distributed service from the list of available devices. Alternatively, the first user can also click on the "Screen Casting" application shown in Figure 3. When the first device detects the first user's operation on the "Screen Casting" application, it can display the interface shown in c in Figure 6.

[0076] S502: The first device sends first role information and / or first capability information, and receives second role information and / or capability information from the second device.

[0077] Before the first device establishes a WiFi point-to-point connection with the second device, a signaling connection may be established first, and security authentication and group information exchange may be performed through the signaling connection. The group information is, for example, information used to negotiate the roles of the first device and the second device in the group. The signaling connection may be, for example, a Bluetooth connection or other types of signaling connections. The Bluetooth connection may be, for example, a Bluetooth low energy (BLE) or Bluetooth basic rate (BR) connection. In the following embodiments, the signaling connection is taken as an example of a Bluetooth connection. Therefore, the list of available devices displayed after the first user clicks "WLAN Direct" may include at least one device that has established a Bluetooth connection with the first device, at least one device that forms a "super terminal" network with the first device, and / or a device that has not established a Bluetooth connection with the first device.

[0078] For devices that have not established a Bluetooth connection with the first device, before displaying the list of available devices, the first device can also send a broadcast message to notify the surrounding Bluetooth devices to establish a Bluetooth connection, and receive broadcast messages from the surrounding Bluetooth devices, and display the identifier of the Bluetooth device that received the broadcast message in the list of available devices; for devices that have established a Bluetooth connection with the first device, and devices that form a "super terminal" network with the first device, the first device can directly establish a Bluetooth connection with them. Therefore, optionally, the first device can carry its role information and / or capability information in a broadcast message; or, the first device can also carry its role information and / or capability information in the Bluetooth connection established between the first device and the second device. For example, the first device can carry the first role information and / or first capability information in a Neg_Req and send it. The Neg_Req is, for example, a signaling message for negotiating a session key. In this way, sending the first role information and / or first capability information through existing signaling can save signaling overhead and help improve the efficiency of establishing WiFi point-to-point connections.

[0079] The first role information sent by the first device refers to the GC or GO role obtained through negotiation when the first device establishes a P2P connection with other devices. The first capability information sent by the first device may be, for example, information on whether it supports connection with at least two devices, determined based on the hardware parameters of the first device. When the first device establishes an HML or AWDL connection with other devices, or does not establish a WiFi point-to-point connection with any device, it indicates that the first device does not have the role information of GO and GC, so the first device may not send the role information, but only send the first capability information. When the first device establishes a P2P connection with other devices, and the role of the first device is GO, it indicates that the first device can establish a WiFi point-to-point connection with other devices, such as a P2P connection or an HML connection, so the first device may not send the capability information, but only send the first role information.

[0080] In some embodiments, the first capability information may also be determined based on the attributes of the distributed service (e.g., the first distributed service) to be transmitted by the first device, and the attribute may indicate whether the first distributed service can be transmitted together with other distributed services. Optionally, the attributes of the first distributed service may be, for example, specified by the developer of the first distributed service during development, or may be registered by the first user with the business rule layer when initiating the first distributed service. Therefore, after the user initiates the distributed service on the device, the device may also display a pop-up box to confirm whether to agree to transmit it together with other distributed services, and the user may make a selection based on the pop-up box. In the embodiment of the present application, the capability information is determined based on the hardware parameters of the device as an example.

[0081] Before sending the first role information and / or the first capability information, the first device may also obtain the role information and capability information of the first device. For example, the first device may obtain the role information of the first device from the short-range service through the Framework shown in FIG3 , and the role information may be, for example, GC, GO, or no role, and the first device may obtain the chip parameters of the first device from the hardware layer shown in FIG3 , and determine the capability information of the first device based on the chip parameters. For example, if the chip of the first device is HiSilicon 1105, it is determined that the first device supports HML connection, that is, the capability information of the first device is to support connection with at least two devices; if the chip of the first device is HiSilicon 1102, it is determined that the first device does not support HML connection, that is, the capability information of the first device is to not support connection with at least two devices. Optionally, the first capability information sent by the first device may be, for example, whether HML connection is supported, or whether AWDL connection is supported.

[0082] Among them, the relevant description of the second device obtaining role information and capability information can refer to the relevant description of the first device obtaining role information and capability information, which will not be repeated here. The role information obtained by the second device is, for example, the second role information, and the capability information is, for example, the second capability information.

[0083] S503: The first device and the second device determine a transmission strategy for the first distributed service based on the first role information and / or the first capability information, and the second role information and / or the second capability information.

[0084] The transmission strategy of the first distributed service determined by the first device and the second device based on the role information and / or capability information of both ends (i.e., the first device and the second device) is the same. The following description is based on the transmission strategy of the first distributed service determined by the first device as an example. The transmission strategy of the first distributed service determined by the first device includes one of the following items:

[0085] Strategy 1: Transmit the first distributed service via an existing WiFi point-to-point connection between the first device and the second device, wherein the WiFi point-to-point connection may be, for example, a P2P connection, an HML connection, or an AWDL connection.

[0086] Strategy 2: disconnect the existing WiFi point-to-point connection of the first device, and establish a WiFi point-to-point connection with the second device to transmit the first distributed service. The WiFi point-to-point connection may be, for example, a P2P connection.

[0087] Strategy 3: disconnect the existing WiFi point-to-point connection of the second device, and establish a WiFi point-to-point connection between the first device and the second device to transmit the first distributed service. The WiFi point-to-point connection may be, for example, a P2P connection.

[0088] Strategy 4: disconnect the existing WiFi point-to-point connection between the first device and the second device, and establish a WiFi point-to-point connection with the second device to transmit the first distributed service. The WiFi point-to-point connection may be, for example, a P2P connection.

[0089] Strategy 5: The first device and the second device establish a WiFi point-to-point connection to transmit the first distributed service. The WiFi point-to-point connection may be, for example, a P2P connection, an HML connection, or an AWDL connection.

[0090] The above describes the transmission strategy of the first distributed service determined by the first device. The following describes an implementation method in which the first device determines the transmission strategy of the first distributed service based on the role information and / or capability information of both terminals.

[0091] Implementation method 1: The first device determines a transmission strategy for the first distributed service based on the first capability information and the second capability information.

[0092] After obtaining the first capability information and the second capability information, the first device can determine whether both ends support connection with at least two devices based on the capability information of the two ends (i.e., the first device and the second device). For example, if the capability information of both ends supports HML connection, or the capability information of both ends supports AWDL connection, then it is considered that both the first device and the second device support connection with at least two devices, and the first device and the second device can establish a WiFi point-to-point connection without disconnecting the existing WiFi point-to-point connection, or the first device and the second device can reuse the existing WiFi point-to-point connection between the first device and the second device. Optionally, the first device can also obtain the identifier of the device to which the first device has been connected via the WiFi point-to-point connection. If the identifier of the device to which the first device has been connected includes the identifier of the second device, the first device can reuse the existing WiFi point-to-point connection between the first device and the second device. Wherein, the WiFi point-to-point connection is, for example, an HML connection or an AWDL connection. The transmission strategy determined by the first device based on the first capability information and the second capability information can refer to Table 1.

[0093] Table 1

[0094] Implementation method 2: The first device determines a transmission strategy for the first distributed service based on the first capability information and the second role information.

[0095] When the first device determines the transmission strategy of the first distributed service based on the first capability information and the second role information, it indicates that the first device may not have established a P2P connection with other devices, or the first device has established an HML connection or AWDL connection with other devices, that is, the first device is roleless and can establish a WiFi point-to-point connection with other devices, and regardless of whether the first device supports connection with at least two devices, the first device can establish a WiFi point-to-point connection with the second device. Therefore, in this case, it can be considered that the first device is actually the transmission strategy of the first distributed service determined based on the second role information. The transmission strategy determined by the first device based on the second role information can be referred to in Table 2.

[0096] Table 2

[0097] Implementation method 3: The first device determines a transmission strategy for the first distributed service based on the first role information and the second capability information.

[0098] When the first device determines the transmission strategy of the first distributed service based on the first role information and the second capability information, it indicates that the second device may not have established a P2P connection with other devices, or the second device has established an HML connection or AWDL connection with other devices, that is, the second device is roleless and can establish a WiFi point-to-point connection with other devices, and regardless of whether the second device supports connection with at least two devices, the second device can establish a WiFi point-to-point connection with the first device. Therefore, in this case, it can be considered that the first device is essentially the transmission strategy of the first distributed service determined based on the first role information. The transmission strategy determined by the first device based on the first role information can refer to Table 3.

[0099] Table 3

[0100] Implementation manner 4: The first device determines a transmission strategy for the first distributed service based on the first role information and the second role information.

[0101] Before determining the transmission strategy for the first distributed service based on the first role information and the second role information, the first device may also obtain the identifier of a device to which the first device is connected via a WiFi point-to-point connection. If the identifier of the device to which the first device is connected includes the identifier of the second device, the first device may reuse the existing WiFi point-to-point connection between the first device and the second device, where the WiFi point-to-point connection is a P2P connection. The transmission strategy determined by the first device based on the first role information and the second role information can be referred to in Table 4, where Table 4 takes the first device as device A and the second device as device B as an example.

[0102] Table 4

[0103] Implementation 5: The first device determines a transmission strategy for the first distributed service based on the first role information, the first capability information, and the second role information.

[0104] When the first device determines the transmission strategy of the first distributed service based on the first role information, the first capability information and the second role information, it indicates that the first device has established a P2P connection and the second device has also established a P2P connection. Therefore, regardless of whether the first capability information indicates whether it supports connection with at least two devices, it can be considered that the first device is actually the transmission strategy of the first distributed service determined based on the first role information and the second role information. Therefore, the transmission strategy determined by the first device based on the first role information, the first capability information and the second role information is shown in Table 4.

[0105] Implementation method 6: The first device determines a transmission strategy for the first distributed service based on the first capability information, the second role information, and the second capability information.

[0106] If the first device determines that the two terminals can coexist based on the first capability information and the second capability information, the transmission strategy determined is as shown in Table 1. In particular, it can be determined that the two terminals cannot coexist when the capability information of the two terminals is as follows:

[0107] Case A: the first capability information indicates support for HTML connection, the second capability information indicates support for AWDL connection, or the second capability information indicates not supporting HTML connection.

[0108] Case B: the first capability information indicates support for AWDL connection, the second capability information indicates support for HML connection, or the second capability information indicates not supporting ADWL connection.

[0109] Case C: the first capability information indicates that the HML connection is not supported or the first capability information indicates that the AWDL connection is not supported, and the second capability information indicates that the HML connection is not supported or the first capability information indicates that the AWDL connection is not supported.

[0110] If it is determined based on the first capability information and the second capability information that the two terminals cannot coexist, it indicates that the first device and the second device need to transmit the first distributed service via a P2P connection. Furthermore, since there is no first role information, it indicates that the first device has not established a P2P connection with other devices, i.e., it can establish a P2P connection with other devices. Therefore, in this case, the first device essentially determines a transmission strategy for the first distributed service based on the second role information. The determined transmission strategy is shown in Table 2.

[0111] Implementation method 7: The first device determines a transmission strategy for the first distributed service based on the first role information, the first capability information, the second role information, and the second capability information.

[0112] If the first device determines that both ends can coexist based on the first capability information and the second capability information, the transmission strategy determined is as shown in Table 1. If the first device determines that both ends cannot coexist based on the capability information of both ends, it indicates that the first device and the second device need to transmit the first distributed service via a P2P connection. Since the first device and the second device both have corresponding role information, indicating that the first device and the second device have established a P2P connection, in this case, the first device actually determines the transmission strategy for the first distributed service based on the first role information and the second role information. The determined transmission strategy is shown in Table 4.

[0113] After introducing the implementation of determining the transmission strategy of the first distributed service, the following introduces the methods of transmitting the first distributed service using different transmission strategies.

[0114] If the transmission strategy of the first distributed service determined by the first device is strategy 1, it indicates that the first device can reuse the P2P connection between the first device and the second device to transmit the first distributed service. Therefore, the first device can transmit the first distributed service to the second device through the existing P2P connection.

[0115] If the transmission strategy of the first distributed service determined by the first device is strategy 2, the first device can display the first information. For example, the first device can display the interface shown in Figure 7, and the first user can confirm whether to disconnect the existing WiFi point-to-point connection based on the interface shown in Figure 7. When the first device detects the operation of the first user confirming to disconnect the existing WiFi point-to-point connection, it disconnects the existing WiFi point-to-point connection (for example, the P2P connection between the first device and the third device). After the first device disconnects the existing WiFi point-to-point connection, S504 can be executed.

[0116] If the first device determines that the transmission strategy of the first distributed service is strategy 3, the first device may send a second message to the second device to instruct the second device to disconnect the existing P2P connection. When the second device receives the second message, it may display the first message. For example, the second device may display an interface as shown in Figure 7, and the second user may confirm whether to disconnect the existing P2P connection based on the interface shown in Figure 7. When the second device detects that the second user confirms to disconnect the existing P2P connection, it disconnects the existing P2P connection (for example, the P2P connection between the second device and the third device) and sends a response message to the first device to indicate that the second device has disconnected the existing P2P connection. After receiving the response message, the first device may execute S504.

[0117] If the first device determines that the transmission strategy for the first distributed service is strategy 4, the first device may display a first message. For example, the first device may display an interface as shown in FIG. 7 , and the first user may confirm whether to disconnect the existing P2P connection based on the interface shown in FIG. 7 . Upon detecting that the first user has confirmed disconnecting the existing P2P connection, the first device disconnects the existing P2P connection and, after disconnecting the existing P2P connection, sends a second message to the second device, instructing the second device to disconnect the existing P2P connection. Upon receiving the second message, the second device may display the first message. For example, the second device may display an interface as shown in FIG. 7 , and the second user may confirm whether to disconnect the existing P2P connection based on the interface shown in FIG. 7 . Upon detecting that the second user has confirmed disconnecting the existing P2P connection, the second device disconnects the existing P2P connection (for example, a P2P connection between the second device and a third device) and sends a response message to the first device, indicating that the second device has disconnected the existing P2P connection. After receiving the response message, the first device may execute S504 .

[0118] If the first device determines that the transmission policy of the first distributed service is policy 5, the first device may execute S504.

[0119] Optionally, the second information can be carried in the Bluetooth connection established between the first device and the second device. For example, if the first role information and / or the first capability information are carried in the broadcast message of the first device, the first device can carry the second information in the Bluetooth connection of the relevant information sent by the first device to the second device for encryption. For example, the first device can carry the second information in Neg_Req and send it. In this way, sending the second information through existing signaling can save signaling overhead and help improve the efficiency of P2P connection establishment.

[0120] Optionally, after establishing the Bluetooth connection, the first device and the second device may further negotiate a session key based on the Bluetooth connection, and the session key is used to encrypt the transmitted information. Furthermore, the first device and the second device may further send information such as their respective media access control addresses (MAC addresses), statuses, supported channel lists, and operating channel attributes to the peer device via the Bluetooth connection.

[0121] S504: The first device establishes a P2P connection with the second device. S504 is an optional step, which is indicated by a dotted line in FIG5 .

[0122] If the transmission strategy of the first distributed service is strategy 2, strategy 3, strategy 4, or strategy 5, and the WiFi point-to-point connection that needs to be established in strategy 5 is a P2P connection, the first device and the second device may also negotiate the roles of the first device and the second device through a Bluetooth connection before establishing the P2P connection. For example, the first device and the second device may send their respective remaining power through a Bluetooth connection. After knowing the remaining power of both parties, the first device and the second device may determine the GO device and the GC device in the P2P connection based on the remaining power. For example, the first device and the second device may determine that the device with more remaining power is the GO device (the device with more remaining power is, for example, the first device), and the device with less remaining power is the GC device (the device with less remaining power is, for example, the second device).

[0123] After negotiating the roles of the transmitting device and the receiving device, the GO (i.e., the first device) can create a group and initiate a P2P connection establishment process to establish a P2P connection. One implementation of the P2P connection establishment process can refer to the WiFi DIRECT protocol, which is not limited in this embodiment of the present application.

[0124] In the above technical solution, when initiating the first distributed service, the first device can determine whether the currently existing WiFi point-to-point connection can be reused and whether a WiFi point-to-point connection needs to be established based on the role information and / or capability information of the first device and the second device. If it is determined that a WiFi point-to-point connection needs to be established, it can also be determined whether the WiFi point-to-point connection is established directly or whether the first device and / or the second device need to disconnect the existing WiFi point-to-point connection before establishing the WiFi point-to-point connection. In this way, the probability of the distributed service being transmitted being disconnected can be reduced, and the probability of the first distributed service being successfully transmitted can be increased.

[0125] The following describes two embodiments using Figures 8 and 9, which are two examples of applying the distributed service transmission method described in the embodiment shown in Figure 5 to different scenarios. In these two examples, the signaling connection established between the first device and the second device is a Bluetooth connection.

[0126] Please refer to Figure 8, which is a flowchart of an example of a distributed service transmission method provided by the embodiment shown in Figure 5. The embodiment shown in Figure 8 is based on a scenario where the second device has not established a Bluetooth connection with the first device.

[0127] S801: When a first device detects a first operation of a first user, a distributed service application of the first device initiates a first distributed service to a distributed framework of the first device.

[0128] Among them, the distributed business application is, for example, the "Huawei Sharing" application, "Screen Casting" application and "Multi-Screen Collaboration" application shown in Figure 3, the distributed framework is, for example, the Framework shown in Figure 3, and the distributed business is, for example, the first distributed business.

[0129] S802: The distributed framework of the first device obtains the first role information of the first device from the short-distance service.

[0130] The short-distance service is a service provided by the distributed framework for short-distance communication, and can record the role information of the first device.

[0131] S803: The distributed framework of the first device sends a broadcast message and receives broadcast messages from other devices.

[0132] In this example, the broadcast message carries the role information and / or capability information of the device. For example, the broadcast message sent by the distributed framework of the first device carries the role information (for example, the first role information) and / or capability information (for example, the first capability information) of the first device. Therefore, the distributed framework can also obtain the first capability information before sending the broadcast message. The way in which the distributed framework obtains the first capability information can, for example, refer to the way in which the first device obtains the first capability information in S502, and the specific information carried in the broadcast message sent by the distributed framework can refer to the way in which the first device sends the first role information and / or first capability information in S502, which will not be repeated here. The other device, for example, includes a second device, which is a receiving device for the first distributed service.

[0133] S804: The distributed framework of the first device displays a list of available devices on a display interface of the first device.

[0134] The available device list includes an identifier of the second device, and the user can click the identifier of the second device from the available device list.

[0135] S805: The distributed framework of the first device responds to the first user's second operation on the second device identifier in the available device list.

[0136] S806: The distributed framework of the first device determines a transmission strategy for the first distributed service based on the first role information and / or first capability information, and the second role information and / or second capability information of the second device.

[0137] Among them, after receiving the broadcast message of the first device, the distributed framework of the second device can also determine the transmission strategy of the distributed service based on the first role information and / or first capability information of the first device, and the second role information and / or second capability information of the second device. The manner in which the distributed framework of the first device and the distributed framework of the second device determine the transmission strategy can refer to the manner in which the first device determines the transmission strategy of the first distributed service in S503, and will not be repeated here.

[0138] Optionally, if the transmission strategy is strategy 2 or strategy 4, i.e., it is necessary to disconnect the existing WiFi point-to-point connection of the first device, then S807 can be executed. If the transmission strategy is strategy 1, the first distributed service is transmitted through the existing WiFi point-to-point connection between the first device and the second device, i.e., it is not necessary to execute the following steps S807 to S815. If the transmission strategy is strategy 5, i.e., it is necessary to establish a WiFi point-to-point connection, then S809 can be executed.

[0139] S807: The distributed framework of the first device sends the first information to the distributed business application, and the distributed business application displays the first information in a pop-up window.

[0140] Among them, when it is necessary to disconnect the existing WiFi point-to-point connection of the first device, it indicates that the first device may have established a P2P connection with other devices. Taking the establishment of a P2P connection between the first device and the third device as an example, the first information may be, for example, "whether to disconnect the connection with the third device". If the first user performs a second operation to confirm the disconnection with the third device, for example, the first user selects "Yes" in the pop-up box, S808 can be executed. If the first user performs an operation to refuse to disconnect the connection with the third device, for example, the first user selects "No" in the pop-up box, a prompt message "First distributed service transmission failed" can be displayed, and no Bluetooth connection request is initiated to the second device.

[0141] S808: The distributed framework of the first device disconnects the existing WiFi point-to-point connection.

[0142] When the distributed framework of the first device disconnects the existing WiFi point-to-point connection, it indicates that the WiFi point-to-point connection P2P connection established between the first device and the second device needs to be interrupted to transmit the existing distributed service, so the distributed framework of the first device can execute S809.

[0143] S809: The distributed framework of the first device establishes a Bluetooth connection with the distributed framework of the second device.

[0144] S810: The distributed framework of the first device sends a Neg_Req to the second device based on the Bluetooth connection.

[0145] The Neg_Req is used to transmit relevant information for negotiating a session key, as well as information such as the MAC address, status, supported channel list, and operating channel attributes of the first device.

[0146] Optionally, if the transmission strategy is strategy 2, strategy 3, strategy 4 or strategy 5, and the WiFi point-to-point connection required to be established by strategy 5 is a P2P connection, the Neg_Req may further include information for negotiating the GO / GC roles of both ends.

[0147] If the transmission policy is policy 3 or policy 4, the Neg_Req may further include second information for instructing the second device to disconnect the existing WiFi point-to-point connection. Upon receiving the Neg_Req from the first device, the second device executes S811. If the Neg_Req does not include the second information, upon receiving the Neg_Req from the first device, the second device executes S813.

[0148] S811: The distributed framework of the second device sends the first information to the distributed business application, and the distributed business application displays the first information in a pop-up window.

[0149] When the existing WiFi point-to-point connection of the second device needs to be disconnected, it indicates that the first device may have established a P2P connection with another device. For example, taking the second device having established a P2P connection with a third device as an example, the first information may be, for example, "whether to disconnect the connection with the third device." If the second user performs a second operation to confirm the disconnection with the third device, for example, by selecting "Yes" in a pop-up window, S812 may be executed.

[0150] S812: The distributed framework of the second device disconnects the existing WiFi point-to-point connection.

[0151] S813: The distributed framework of the second device sends a Neg_Rsp to the first device based on the Bluetooth connection.

[0152] When the second device receives the Neg_Req from the first device, the distributed framework of the second device can send a response message Neg_Rsp to the first device. The Neg_Rsp is used to transmit relevant information for negotiating the session key, as well as information such as the MAC address, status, supported channel list, and operating channel attributes of the second device.

[0153] Optionally, if the Neg_Req from the first device includes information for negotiating the GO / GC roles of both ends, the Neg_Rsp may also include information for negotiating the GO / GC roles of both ends. Optionally, if both ends have roles negotiated, S812 may be executed. In this example, the negotiation assumes that the first device is the GO device and the second device is the GC device.

[0154] If the Neg_Req from the first device includes the second information, the Neg_Rsp may further include response information indicating that the existing WiFi point-to-point connection has been disconnected.

[0155] S814: The distributed framework of the first device creates a group.

[0156] S815: The distributed framework of the first device and the distributed framework of the second device establish a WiFi point-to-point connection.

[0157] In the above technical solution, the first device and the second device can carry their respective role information and / or capability information in the broadcast message, determine whether a WiFi point-to-point connection needs to be established before establishing a signaling connection, and complete the negotiation of the dual-end roles in the existing signaling message, which can reduce signaling overhead and increase the probability of successful distributed service transmission.

[0158] Please refer to Figure 9, which is a flowchart of another example of the distributed service transmission method provided by the embodiment shown in Figure 5. The embodiment shown in Figure 9 is based on a scenario where the second device has established a Bluetooth connection with the first device.

[0159] S901: When a first device detects a first operation of a first user, a distributed service application of the first device initiates a first distributed service to a distributed framework of the first device.

[0160] Among them, the distributed business applications are, for example, the "Huawei Sharing" application, the "Screen Casting" application, and the "Multi-Screen Collaboration" application shown in Figure 3, and the distributed framework is, for example, the Framework shown in Figure 3.

[0161] S902: The distributed framework of the first device establishes a Bluetooth connection with the distributed framework of the second device.

[0162] S903: The distributed framework of the first device obtains first role information from the short distance service of the first device, and the distributed framework of the second device obtains second role information from the short distance service of the second device.

[0163] The short-distance service is a service provided by the distributed framework for short-distance communication, and can record the role information of the first device.

[0164] S904: The distributed framework of the first device sends a Neg_Req to the second device based on the Bluetooth connection, where the Neg_Req carries the first role information and / or the first capability information.

[0165] The Neg_Req is used to transmit relevant information for negotiating a session key, as well as information such as the MAC address, status, supported channel list, and operating channel attributes of the first device.

[0166] Optionally, the Neg_Req may also include information for negotiating the GO / GC roles of both ends.

[0167] S905: The distributed framework of the second device sends a Neg_Rsp to the first device based on the Bluetooth connection, where the Neg_Rsp carries the second role information and / or the second capability information.

[0168] When the second device receives the Neg_Req from the first device, the distributed framework of the second device can send a response message Neg_Rsp to the first device. The Neg_Rsp is used to transmit relevant information for negotiating the session key, as well as information such as the MAC address, status, supported channel list, and operating channel attributes of the second device.

[0169] Optionally, if the Neg_Req from the first device includes information for negotiating the GO / GC roles of both ends, the Neg_Rsp may also include information for negotiating the GO / GC roles of both ends. Optionally, if both ends have roles negotiated, S912 may be executed. In this example, the negotiation assumes that the first device is the GO device and the second device is the GC device.

[0170] S906: The distributed framework of the first device and the distributed framework of the second device determine a transmission strategy for the first distributed service based on the first role information and / or first capability information, and the second role information and / or second capability information of the second device.

[0171] The manner in which the distributed framework of the first device and the distributed framework of the second device determine the transmission strategy can refer to the manner in which the first device determines the transmission strategy for the first distributed service in S503 , and will not be described in detail here.

[0172] Optionally, if the transmission strategy is strategy 2 or strategy 4, that is, it is necessary to disconnect the existing WiFi point-to-point connection of the first device, then S907 can be executed. If the transmission strategy is strategy 1, the first distributed service is transmitted through the existing WiFi point-to-point connection between the first device and the second device, that is, there is no need to execute the following steps S907 to S913. If the transmission strategy is strategy 5, and strategy 5 requires that the newly created WiFi point-to-point connection is a P2P connection, then S912 can be executed. If the transmission strategy is strategy 5, and strategy 5 requires that the newly created WiFi point-to-point connection is not a P2P connection, then S913 can be executed.

[0173] S907: The distributed framework of the first device sends the first information to the distributed business application, and the distributed business application displays the first information in a pop-up window.

[0174] For the relevant description of this step, please refer to the relevant description of S807, which will not be repeated here.

[0175] S908: The distributed framework of the first device disconnects the existing WiFi point-to-point connection.

[0176] S909: The distributed framework of the first device sends second information to the second device.

[0177] S910: The distributed framework of the second device sends first information to the distributed service application, and the distributed service application displays the first information in a pop-up window.

[0178] For the relevant description of this step, please refer to the relevant description of S811, which will not be repeated here.

[0179] S911: The distributed framework of the second device disconnects the existing WiFi point-to-point connection and sends a response message to the first device.

[0180] The response information is used to indicate that the existing WiFi point-to-point connection has been disconnected.

[0181] S912: The distributed framework of the first device creates a group.

[0182] S913: The distributed framework of the first device and the distributed framework of the second device establish a WiFi point-to-point connection.

[0183] In the above technical solution, the first device and the second device have established a Bluetooth connection and can carry their respective role information and / or capability information in the signaling message used to negotiate the session key, and can complete the negotiation of the dual-end roles in the existing signaling message, which can reduce signaling overhead.

[0184] The following is a structural diagram of an electronic device provided in an embodiment of the present application, as shown in Figure 10. The electronic device 1000 may be the first device and the second device mentioned above. The electronic device 1000 may include: one or more processors 1001; one or more memories 1002; a communication interface 1003, and one or more computer programs 1004, and the above-mentioned devices may be connected via one or more communication buses 1005. The one or more computer programs 1004 are stored in the above-mentioned memory 1002 and are configured to be executed by the one or more processors 1001, and the one or more computer programs 1004 include instructions. For example, the above-mentioned instructions can be used to execute the relevant steps of the mobile phone in the corresponding embodiment above. The communication interface 1003 is used to realize communication between the mobile phone and other devices (for example, a drone), for example, the communication interface may be a transceiver.

[0185] An embodiment of the present application further provides a computer program product, including a computer program. When the computer program is run on a computer, the computer is caused to execute the method as described in the above embodiment.

[0186] An embodiment of the present application also provides a graphical user interface on an electronic device, wherein the electronic device has a display screen, a memory, and a processor, wherein the processor is used to execute one or more computer programs stored in the memory, and the graphical user interface includes a graphical user interface displayed when the electronic device executes the method in the above embodiment.

[0187] An embodiment of the present application also provides a chip system, including a processor and an interface, wherein the processor is used to call and execute instructions from the interface so that the chip system implements the method in the above embodiment.

[0188] To implement the various functions of the methods provided in the embodiments of the present application, the electronic device may include hardware structures and / or software modules, and the aforementioned functions may be implemented in the form of hardware structures, software modules, or a combination of hardware structures and software modules. Whether a particular one of the aforementioned functions is implemented in the form of hardware structures, software modules, or a combination of hardware structures and software modules depends on the specific application and design constraints of the technical solution.

[0189] As used in the above embodiments, the term “when” may be interpreted to mean “if” or “after”, depending on the context. Similarly, the phrases “upon determining that” or “if (the stated condition or event) is detected” may be interpreted to mean “if determining that” or “in response to determining that” or “upon detecting (the stated condition or event)” or “in response to detecting (the stated condition or event)”, depending on the context.

[0190] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk).

[0191] For the purpose of explanation, the foregoing description is described with reference to specific embodiments. However, the above exemplary discussion is not intended to be exhaustive, nor is it intended to limit the present application to the precise forms disclosed. In light of the above teachings, many modifications and variations are possible. The embodiments are selected and described in order to fully illustrate the principles of the present application and its practical application, so that others skilled in the art can take full advantage of the present application and various embodiments with various modifications suitable for the specific purposes contemplated.

Claims

1. A distributed service transmission method, characterized in that: Applied to a first device, the method includes: In response to a first operation of a first user, the first operation is used to instruct to transmit a first distributed service through a wireless fidelity WiFi point-to-point connection; Sending first role information and / or first capability information, and receiving second role information and / or second capability information from a second device, wherein the capability information is used to indicate whether connection with at least two devices is supported, and the role information is used to indicate a group manager GO or a group client GC; A transmission strategy for transmitting the first distributed service between the first device and the second device via the WiFi point-to-point connection is determined based on the first role information and / or the first capability information, and the second role information and / or the second capability information.

2. The method according to claim 1, characterized in that The transmission strategy of the first distributed service includes one of the following items: transmitting the first distributed service via an existing WiFi point-to-point connection between the first device and the second device; Disconnecting the existing WiFi point-to-point connection of the first device, and establishing a WiFi point-to-point connection between the first device and the second device to transmit the first distributed service; Disconnecting the existing WiFi point-to-point connection of the second device, and establishing a WiFi point-to-point connection between the first device and the second device to transmit the first distributed service; disconnecting the existing WiFi point-to-point connection between the first device and the second device, and establishing a WiFi point-to-point connection between the first device and the second device to transmit the first distributed service; or The first device establishes a WiFi point-to-point connection with the second device to transmit the first distributed service.

3. The method according to claim 1 or 2, characterized in that The method further comprises: If the transmission strategy includes disconnecting an existing WiFi point-to-point connection of the first device and displaying first information, the first information is used to indicate whether to disconnect the existing WiFi point-to-point connection of the first device; In response to a second operation of the first user to disconnect the existing WiFi point-to-point connection, the existing WiFi point-to-point connection of the first device is disconnected.

4. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: If the transmission strategy includes disconnecting an existing WiFi point-to-point connection of the second device, sending second information to the second device, where the second information is used to instruct the second device to disconnect the existing WiFi point-to-point connection; Receive response information from the second device, where the response information is used to indicate that the second device has disconnected the existing WiFi point-to-point connection.

5. The method according to claim 4, characterized in that The second information is carried in a signaling connection established between the first device and the second device.

6. The method according to any one of claims 1 to 5, characterized in that: The first role information and / or the first capability information is carried in a broadcast message of the first device, where the broadcast message is used to discover a device for establishing a signaling connection; or, The first role information and / or the first capability information is carried in a signaling connection established between the first device and the second device.

7. A distributed service transmission method, characterized in that: Applied to the second device, the method includes: Receiving first role information and / or first capability information from a first device, where the first role information and / or first capability information is sent by the first device in response to a first operation of a first user, where the first operation is used to indicate transmission of a first distributed service through a wireless fidelity WiFi point-to-point connection, the capability information is used to indicate whether connection with at least two devices is supported, and the role information is used to indicate a group manager GO or a group client GC; Sending second role information and / or second capability information; A transmission strategy for transmitting the first distributed service between the second device and the first device via a WiFi point-to-point connection is determined based on the first role information and / or the first capability information, and the second role information and / or the second capability information.

8. The method according to claim 7, characterized in that The transmission strategy of the first distributed service includes one of the following items: transmitting the first distributed service via an existing WiFi point-to-point connection between the first device and the second device; Disconnecting the existing WiFi point-to-point connection of the first device, and establishing a WiFi point-to-point connection between the first device and the second device to transmit the first distributed service; Disconnecting the existing WiFi point-to-point connection of the second device, and establishing a WiFi point-to-point connection between the first device and the second device to transmit the first distributed service; disconnecting the existing WiFi point-to-point connection between the first device and the second device, and establishing a WiFi point-to-point connection between the first device and the second device to transmit the first distributed service; or The first device establishes a WiFi point-to-point connection with the second device to transmit the first distributed service.

9. The method according to claim 7 or 8, characterized in that The method further comprises: receiving second information from the first device, where the second information is used to instruct the second device to disconnect an existing WiFi point-to-point connection; Displaying first information, where the first information is used to indicate whether to disconnect the existing WiFi point-to-point connection; In response to a second operation of the second user disconnecting the existing WiFi point-to-point connection of the first device, disconnecting the existing WiFi point-to-point connection of the second device; Sending a response message to the first device, where the response message is used to indicate that the second device has disconnected the existing WiFi point-to-point connection.

10. The method according to claim 9, characterized in that The second information is carried in a signaling connection established between the first device and the second device.

11. The method according to any one of claims 7 to 10, characterized in that: The second role information and / or the second capability information is carried in a broadcast message of the second device, where the broadcast message is used to discover a device for establishing a signaling connection; or, The second role information and / or second capability information is carried in a signaling connection established between the first device and the second device.

12. A communication device, characterized in that: include: a processor, a memory, and one or more programs; The one or more programs are stored in the memory, and the one or more programs include instructions. When the instructions are executed by the processor, the communication device executes the method steps as described in any one of claims 1 to 6 and 7 to 11.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store a computer program. When the computer program is executed on a computer, the computer is enabled to execute the method according to any one of claims 1 to 6 and 7 to 11.

14. A chip system, characterized in that: It comprises a processor and an interface, wherein the processor is used to call and execute instructions from the interface so that the chip system implements the method as claimed in any one of claims 1 to 6 and 7 to 11.

Citation Information

Patent Citations

  • WiFi direct connection establishment method and device, and equipment

    CN113873685A

  • Data transmission method under Wi-Fi direct connection and electronic equipment

    CN114679732A

  • Method and device for establishing connection between multiple devices

    CN115278611A

  • Method for establishing Wi-Fi P2P connection and electronic equipment

    CN115348563A

  • Electronic device performing reconnection of short-range communication and method for operating the same

    US20190089686A1