WO2016029772A1 - 一种通信方法及设备 - Google Patents
一种通信方法及设备 Download PDFInfo
- Publication number
- WO2016029772A1 WO2016029772A1 PCT/CN2015/085439 CN2015085439W WO2016029772A1 WO 2016029772 A1 WO2016029772 A1 WO 2016029772A1 CN 2015085439 W CN2015085439 W CN 2015085439W WO 2016029772 A1 WO2016029772 A1 WO 2016029772A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- wireless access
- network
- infrastructure network
- information
- access device
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W76/00—Connection management
- H04W76/10—Connection setup
- H04W76/11—Allocation or use of connection identifiers
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/104—Peer-to-peer [P2P] networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/51—Discovery or management thereof, e.g. service location protocol [SLP] or web services
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W12/00—Security arrangements; Authentication; Protecting privacy or anonymity
- H04W12/06—Authentication
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W76/00—Connection management
- H04W76/10—Connection setup
- H04W76/14—Direct-mode setup
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W76/00—Connection management
- H04W76/20—Manipulation of established connections
- H04W76/23—Manipulation of direct-mode connections
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L2101/00—Indexing scheme associated with group H04L61/00
- H04L2101/60—Types of network addresses
- H04L2101/618—Details of network addresses
- H04L2101/622—Layer-2 addresses, e.g. medium access control [MAC] addresses
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W84/00—Network topologies
- H04W84/02—Hierarchically pre-organised networks, e.g. paging networks, cellular networks, WLAN [Wireless Local Area Network] or WLL [Wireless Local Loop]
- H04W84/10—Small scale networks; Flat hierarchical networks
- H04W84/12—WLAN [Wireless Local Area Networks]
Definitions
- the present invention relates to the field of communications technologies, and in particular, to a communication method and device.
- Wi-Fi Wireless Fidelity
- WFA Wi-Fi Alliance
- a network structure of Wi-Fi has a wireless access device, and other devices can communicate with each other through a wireless access device.
- This wireless access device can be called an infrastructure, and the network can also be called an infrastructure network. It can be a terminal device, such as a mobile phone, a television, etc., and the infrastructure can be a home gateway or the like.
- the device can be a terminal device, such as a mobile phone or a television. .
- the network connection has different network structure networks due to different network usage: one is based on the basic 802.11 protocol infrastructure network structure, and the other is P2P protocol based P2P network structure, this P2P
- the possible conditions of the protocol may be WFA's Wi-Fi Direct protocol or NAN (Neighbor Awareness Networking) protocol.
- the two network structures are independent of each other.
- one of the network structures may be used according to specific conditions.
- the network signal changes. If the network is fixed in a network structure, the network quality will rise and fall. The change in volts, the user experience is not good.
- the embodiment of the invention provides a communication method and device, which effectively alleviates the fluctuation of the network quality when using the P2P network, and ensures the communication quality and the user experience is good.
- a first aspect of the embodiments of the present invention provides a communication method, including:
- the wireless access device connected to the first device and the wireless access device connected to the second device in the infrastructure network are the same wireless access device, the first device according to the address information Communicating with the second device by the same wireless access device.
- the wireless access device connected to the first device and the second device are When the wireless access devices connected to the infrastructure network are the same wireless access device, specifically:
- the first device determines that the identity information of the wireless access device that is connected to the first device matches the identifier information of the wireless access device that is connected to the second device in the infrastructure network.
- the wireless access device connected to the first device and the second device are When the wireless access devices connected to the infrastructure network are the same wireless access device, specifically:
- the first device determines that the identification information of the wireless access device that is connected to it does not match the identification information of the wireless access device that is connected to the second device in the infrastructure network, the first device is connected When the second device is connected to the wireless access device in the infrastructure network.
- the The device communicates with the second device by using the same wireless access device according to the address information, including:
- the first device sends information to the second device by using the same wireless access device according to the address information of the second device in the infrastructure network, where the information includes the first device in the Address information in the infrastructure network.
- the first device by using the same wireless information, according to the address information
- the access device communicates with the second device, and further includes:
- the first device Before the first device communicates with the second device by using the same wireless access device, the first device further includes:
- the first device sends a second message to the second device by using the P2P network or the infrastructure network, where the second message includes address information of the first device in the infrastructure network;
- the communicating, by the first device, with the second device by using the same wireless access device according to the address information includes:
- the first device sends information to the second device by using the same wireless access device according to the address information of the second device in the infrastructure network.
- the first device receives information that the second device sends through the same wireless access device according to address information of the first device in an infrastructure network.
- the first message further includes first authentication data, where the first authentication data is used by the first Authentication between a device and the second device.
- the P2P network is a Wi-Fi P2P network
- the infrastructure network is a Wi-Fi infrastructure network.
- a second aspect of the embodiments of the present invention provides a communication method, including:
- the second device sends a first message to the first device by using the P2P network, where the first message includes Address information of the second device in the infrastructure network and identification information of the wireless access device connected by the second device in the infrastructure network;
- the second device passes the same A wireless access device is in communication with the first device.
- the second device by using the same wireless access device, to communicate with the first device, includes:
- the second device receives information sent by the first device by using the same wireless access device, where the information includes address information of the first device in the infrastructure network.
- the second device is configured by the same wireless access device and the first Device communication also includes:
- the second device sends information to the first device by using the same wireless access device according to the address information of the first device in the infrastructure network.
- ,Also includes:
- the communicating, by the second device, with the first device by using the same wireless access device includes:
- the second device sends information to the first device by using the same wireless access device according to the address information of the first device in the infrastructure network.
- the second device receives information that the first device sends through the same wireless access device according to address information of the second device in the infrastructure network.
- the first message further includes first authentication data, where the first authentication data is used Authentication between the second device and the first device.
- the P2P network is a Wi-Fi P2P network
- the infrastructure network is a Wi-Fi infrastructure network.
- a third aspect of the embodiments of the present invention provides an apparatus, including:
- a receiving unit configured to receive a first message sent by the target device by using a P2P network, where the first message includes address information of the target device in an infrastructure network, and the target device is connected in the infrastructure network. Identification information of the wireless access device;
- a communication unit configured to: when the wireless access device connected to the device and the wireless access device connected to the target device in the infrastructure network are the same wireless access device, according to the address information, The same wireless access device communicates with the target device.
- the communications unit is specifically configured to: when the device determines the identity information of the wireless access device that is connected to the device, And when the identifier information of the wireless access device connected in the infrastructure network is matched, the target device communicates with the target device by using the same wireless access device according to the address information.
- the communications unit is specifically configured to: when the device determines the identity information of the wireless access device that is connected to the device, After the target device does not match the identification information of the wireless access device connected in the infrastructure network, and accesses the wireless access device connected to the target device in the infrastructure network, according to the address information Communicating with the target device through the same wireless access device.
- the communication unit include:
- a first sending module configured to send information to the target device by using the same wireless access device according to the address information of the target device in the infrastructure network, where the information includes the device in the Address information in the infrastructure network.
- the communications unit further includes:
- a first receiving module configured to receive, by the target device, information sent by the same wireless access device according to address information of the device in the infrastructure network.
- the device is further include:
- a sending unit configured to send, by the P2P network or the infrastructure network, to the target device, before the communication unit communicates with the target device by using the same wireless access device, according to the address information Sending a second message, where the second message includes address information of the device in the infrastructure network;
- the communication unit includes:
- a second sending module configured to send information to the target device by using the same wireless access device according to address information of the target device in the infrastructure network;
- a second receiving module configured to receive, by the target device, information sent by the same wireless access device according to address information of the device in an infrastructure network.
- a fourth aspect of the embodiments of the present invention provides a device, including: a sending unit, configured to send, by using a P2P network, a first message to a target device, where the first message includes address information and location information of the device in an infrastructure network. Defining information of the wireless access device connected by the device in the infrastructure network;
- a communication unit configured to: when the wireless access device connected by the target device and the wireless access device connected to the device in the infrastructure network are the same wireless access device, pass the same wireless access The device communicates with the target device.
- the communications unit includes:
- a first receiving module configured to receive information that is sent by the target device by using the same wireless access device, where the information includes address information of the target device in the infrastructure network.
- the communications unit further includes:
- the first sending module is configured to send information to the target device by using the same wireless access device according to the address information of the target device in the infrastructure network.
- a third implementation method of the fourth aspect of the embodiments of the present invention wherein the device further comprises:
- a receiving unit configured to receive, after the communication unit communicates with the target device by using the same wireless access device, a second message sent by the target device by using the P2P network or the infrastructure network, The second message includes address information of the target device in the infrastructure network;
- the communication unit includes:
- a second sending module configured to send information to the target device by using the same wireless access device according to address information of the target device in the infrastructure network, and/or
- a second receiving module configured to receive, by the target device, information sent by the same wireless access device according to address information of the device in an infrastructure network.
- the first device may receive the message sent by the second device through the P2P network, where the wireless access device connected to the first device is connected to the second device in the infrastructure network.
- the wireless access device can be used to communicate with the second device in the infrastructure network. Because the first device uses the P2P network to communicate, the infrastructure network can be used. Communication effectively alleviates the fluctuations in network quality when using P2P networks, ensuring communication quality and user experience.
- FIG. 1 is a schematic diagram of an embodiment of a communication method according to an embodiment of the present invention.
- FIG. 2 is a schematic diagram of another embodiment of a communication method according to an embodiment of the present invention.
- FIG. 3 is a schematic diagram of another embodiment of a communication method according to an embodiment of the present invention.
- FIG. 4 is a schematic diagram of another embodiment of a communication method according to an embodiment of the present invention.
- FIG. 5 is a schematic diagram of another embodiment of a communication method according to an embodiment of the present invention.
- FIG. 6 is a schematic diagram of another embodiment of a communication method according to an embodiment of the present invention.
- FIG. 7 is a schematic diagram of another embodiment of a communication method according to an embodiment of the present invention.
- FIG. 8 is a schematic diagram of another embodiment of a communication method according to an embodiment of the present invention.
- FIG. 9 is a schematic diagram of another embodiment of a communication method according to an embodiment of the present invention.
- FIG. 10 is a schematic diagram of another embodiment of a communication method in an embodiment of the present invention.
- FIG. 11 is a schematic diagram of another embodiment of a communication method in an embodiment of the present invention.
- FIG. 12 is a schematic diagram of an embodiment of a first device according to an embodiment of the present disclosure.
- FIG. 13 is a schematic diagram of another embodiment of a first device according to an embodiment of the present disclosure.
- FIG. 14 is a schematic diagram of another embodiment of a first device according to an embodiment of the present invention.
- FIG. 15 is a schematic diagram of another embodiment of a first device according to an embodiment of the present disclosure.
- FIG. 16 is a schematic diagram of an embodiment of a second device according to an embodiment of the present disclosure.
- FIG. 17 is a schematic diagram of another embodiment of a second device according to an embodiment of the present invention.
- FIG. 18 is a schematic diagram of another embodiment of a second device according to an embodiment of the present invention.
- FIG. 19 is a schematic diagram of another embodiment of a second device according to an embodiment of the present invention.
- FIG. 20 is a schematic diagram of another embodiment of a first device according to an embodiment of the present invention.
- FIG. 21 is a schematic diagram of another embodiment of a second device according to an embodiment of the present invention.
- FIG. 22 is a schematic diagram of another embodiment of a first device according to an embodiment of the present invention.
- the embodiment of the invention provides a communication method and device for ensuring communication quality and improving user experience.
- an embodiment of a communication method in an embodiment of the present invention includes:
- the first device receives a first message sent by the second device by using a P2P network.
- this step is performed when the first device and the second device have transmitted services through the P2P network, and both the first device and the second device have the capability of accessing the infrastructure network through the wireless access device.
- the second device accesses the infrastructure network through a connection with the wireless access device.
- the first device may be connected to a wireless access device, and is capable of knowing the identification information of the wireless access device to which it is connected.
- the second device sends a first message to the first device, where the first message includes address information of the second device in the infrastructure network, and the second device is based on Identification information of the wireless access device connected in the facility network.
- a network structure of an infrastructure network has wireless access devices, and other devices can communicate with each other through wireless access devices.
- This wireless access device can be called an infrastructure.
- Such a network can also be called an infrastructure network.
- the protocol used by the facility network may be the IEEE 802.11 protocol.
- Another network structure of the infrastructure network is that the devices directly communicate with each other.
- This network structure is called a peer-to-peer network, that is, a P2P network, and the P2P network is a network established based on the P2P protocol.
- the device establishes a connection with the wireless access device, that is, connects to the infrastructure network, and the device can also establish a P2P connection with other devices, that is, connect to the P2P network.
- Connecting to a P2P network can be either establishing a Wi-Fi Direct connection or joining a NAN network.
- the wireless access device connected by the first device and the wireless access device connected to the second device in the infrastructure network are the same wireless access device
- the first device is in the infrastructure network according to the second device.
- the address information communicates with the second device by using the same wireless access device.
- the first device may determine that the wireless access device connected to the first device is connected to the second device in the infrastructure network. Whether the wireless access device is the same wireless access device, when the wireless access device connected by the first device and the wireless access device connected to the second device in the infrastructure network are the same wireless access device, the first The device can communicate with the second device through the same wireless access device that is connected to the second device according to the address information of the second device in the infrastructure network.
- the device when the first device communicates with the second device through the P2P network, the device may receive the message sent by the second device through the P2P network, where the wireless access device connected to the first device and the second device are in the basic
- the wireless access device connected to the facility network is the same wireless access device
- the wireless access device can be used to communicate with the second device in the infrastructure network, because the first device can communicate with the P2P network.
- the use of the infrastructure network for communication effectively alleviates the fluctuations in network quality when using P2P networks, ensuring communication quality and user experience.
- the wireless access device connected to the first device and the wireless access device connected to the second device in the infrastructure network are the same wireless access device, specifically: when the first device determines that the wireless connection is connected The identification information of the incoming device and the wireless access device of the second device connected in the infrastructure network When the identification information matches;
- another embodiment of the communication method in the embodiment of the present invention includes:
- the first device receives a first message sent by the second device by using a P2P network.
- this step is performed when the first device and the second device have transmitted services through the P2P network, and both the first device and the second device have the capability of accessing the infrastructure network through the wireless access device.
- the second device accesses the infrastructure network through a connection with the wireless access device.
- the first device may be connected to a wireless access device, and is capable of knowing the identification information of the wireless access device to which it is connected.
- the second device sends a first message to the first device, where the first message includes address information of the second device in the infrastructure network, and the second device is in the infrastructure network. Identification information of the connected wireless access device.
- a network structure of an infrastructure network has wireless access devices, and other devices can communicate with each other through wireless access devices.
- This wireless access device can be called an infrastructure.
- Such a network can also be called an infrastructure network.
- the protocol used by the facility network may be the IEEE 802.11 protocol.
- Another network structure of the infrastructure network is that the devices directly communicate with each other.
- This network structure is called a peer-to-peer network, that is, a P2P network, and the P2P network is a network established based on the P2P protocol.
- the device establishes a connection with the wireless access device, that is, connects to the infrastructure network, and the device can also establish a P2P connection with other devices, that is, connect to the P2P network.
- the address information of the second device in the infrastructure network may be the MAC address of the second device, or the IP address of the second device, or other device identifiers of the second device, such as the device name, etc., in actual applications. It may be a MAC address, or an IP address, or other information that has been converted by other device identifiers, as long as the address information can be utilized for communication in the infrastructure network, which is not limited herein.
- the identifier information of the wireless access device that is connected to the second device in the infrastructure network may be the MAC address of the wireless access device. In actual use, other identifier information, such as the service set identifier of the wireless access device, may also be used. SSID, Service Set Identifier), etc., are not limited herein.
- the wireless access device may be a wireless access point AP, such as a wireless router. It may be understood that, in actual applications, other wireless access devices, such as a base station, may be used.
- the first device and the second device may be mobile terminals such as mobile phones and tablet computers, or devices capable of connecting wireless access devices, such as notebook computers, and can be connected as long as they can connect to the wireless access device.
- the P2P network can be used, and is not limited herein.
- the P2P network may be a Wi-Fi P2P network (such as a Wi-Fi Direct network or a NAN network), and the corresponding infrastructure network is a Wi-Fi infrastructure network. It can be understood that the infrastructure network It can also be other types of infrastructure networks. The P2P network can also be other types of P2P networks, except for the need for correspondence between them.
- the infrastructure network is a Wi-Fi infrastructure network
- the P2P network is a Wi-Fi P2P network (such as a Wi-Fi Direct network or a NAN network) in a Wi-Fi network environment.
- the first device and the second device may both be Wi-Fi-enabled terminal devices.
- the first device may be a Wi-Fi-enabled terminal device, such as a Wi-Fi-enabled mobile phone; the second device may be a support device.
- Wi-Fi terminal devices such as TVs that support Wi-Fi.
- sending a message through a Wi-Fi P2P network means that the first device and the second device have established Wi-Fi P2P communication based on the P2P protocol, for example, based on Wi-Fi Direct, negotiating a message.
- the group master device (GO, Group Owner), a group member device (Client), the group member device is associated with the group master device, negotiates the key, etc., and finally establishes a Wi-Fi P2P connection, and then based on the Wi-Fi P2P connection,
- One device sends a message to another device; or both the first device and the second device join the NAN network, and communicate according to the mechanism of the NAN protocol, such as sending and receiving NAN synchronization beacon frames, discovering beacon frames or service discovery frames, and the like.
- the first message sent by the second device may be a Wi-Fi frame, or may be a data packet of an upper layer protocol carried by Wi-Fi.
- the first message includes the address information of the second device in the infrastructure network and the identifier information of the wireless access device connected by the second device in the infrastructure network, and may include the information through a field of the frame, or
- the information element (IE, Information Element) of the frame includes the information, and may also be carried by the upper layer data packet carried by the Wi-Fi, such as a field or an information element having an infrastructure network address information in the frame, which carries The address information of the device in the infrastructure network, where the address information may be a MAC address of the device, such as a field or an information element of the wireless access device identification information in the frame, and the identifier information may be a MAC address of the wireless access device. It may also be a Service Set Identifier (SSID) of the wireless access device, and may be other types of identifiers, which are not limited herein.
- the first device may be connected to a wireless access device, and is capable of knowing the identity information of the wireless access device to which it is connected, such as the MAC address or SSID of the wireless access device.
- the first device determines that the identifier information of the wireless access device that is connected to the first device is based on the second device. Whether the identification information of the connected wireless access device in the infrastructure network matches, if yes, step 203 is performed, and if not, the process ends;
- the first device determines whether the identification information of the wireless access device that is connected to the first device matches the identification information of the wireless access device that is connected to the second device in the infrastructure network, and when the two identifier information is determined to be the same, the device can be considered as a match. In an actual application, it is also determined that one of the two identification information is the same, and they can be considered as matching, as long as they can be determined by the identification information that they refer to the same wireless access device, then they are considered to be Matching, specifically not limited here.
- the first device may determine, according to the identifier information of the wireless access device included in the first message, whether the representation of the wireless access device that is connected to the received information is Matching, when the first device determines that the identification information of the wireless access device that is connected to the first device matches the identification information of the wireless access device that is connected to the second device in the infrastructure network, it may be determined that the first device itself is connected to the foregoing
- the wireless access device in the infrastructure network that is, the first device and the second device are connected to the same wireless access device in the infrastructure network. Matching can refer to the same situation.
- the MAC address of the wireless access device connected to the first device is 12345678, and the identifier information in the message it receives is also 12345678 (assuming that the MAC address is included), the two identifiers are the same. It is matching. It is also possible to agree that the message includes an SSID or other identification information. If the matching is performed, the first device may consider that the wireless access device to which it is connected is the wireless access device to which the second device is connected, and the first device and the second device are connected to the same wireless access device.
- the first device communicates with the second device by using the same wireless access device that is connected to the second device according to the address information of the second device in the infrastructure network.
- the information sent by the foregoing device may include the address information of the first device in the infrastructure network, where the address information may be the MAC address of the first device, the IP address of the first device, or other devices of the first device. Identification, such as the name of the device;
- the first device sends information to the second network through the same wireless access device connected to the second device in the basic network, and both parties can use their addresses in the infrastructure network.
- the addresses used by the two parties in the infrastructure network may be their MAC addresses, their IP addresses, or their other device identifiers, such as device names.
- the first device determines in step 202 that the identification information of the wireless access device that is connected to the first device matches the identification information of the wireless access device that is connected to the second device in the infrastructure network
- the first device That is, the information may be sent to the second device by using the foregoing wireless access device according to the address information of the second device in the infrastructure network.
- the sending information may be the first device according to the second device in the infrastructure network.
- the address information in the network device directly sends data to the second device through the wireless access device in the infrastructure network. For example, when the first device and the second device communicate in the P2P network, the first device sends the data to the second device.
- Video data at this time, when the first device determines that the identification information of the wireless access device that is connected to itself matches the identification information of the wireless access device that is connected to the second device in the infrastructure network, the second device may be in the infrastructure according to the second device.
- the address information in the network continues to send video data to the second device through the wireless access device that is connected to itself.
- the first device when the first device communicates with the second device through the P2P network, the first device may receive the message sent by the second device through the P2P network, when the first device determines that the wireless access device in the infrastructure network is connected to the first device.
- the wireless access device can be used to communicate with the second device in the infrastructure network. Since the first device can communicate using the infrastructure network during the process of using the P2P network, the network quality is effectively alleviated when the P2P network is used. The situation of fluctuations and changes ensures the quality of communication and the user experience is good.
- wireless access device connected to the first device and the wireless access device connected to the second device in the infrastructure network are the same wireless access device, specifically:
- the first device After the first device determines that the identification information of the wireless access device that is connected to itself does not match the identification information of the wireless access device that is connected to the second device in the infrastructure network, the first device accesses the second device in the infrastructure network. When a wireless access device is connected.
- another embodiment of the communication method in the embodiment of the present invention includes:
- the first device receives a first message sent by the second device by using a P2P network.
- this step is performed when the first device and the second device have transmitted services through the P2P network, and both the first device and the second device have the capability of accessing the infrastructure network through the wireless access device.
- the second device accesses the infrastructure network through a connection with the wireless access device.
- the first device may be connected to a wireless access device, and is capable of knowing the identification information of the wireless access device to which it is connected.
- the second device sends a first message to the first device, where the first message includes address information of the second device in the infrastructure network, and the second device is in the infrastructure network. Identification information of the connected wireless access device.
- a network structure of an infrastructure network has wireless access devices, and other devices can pass The wireless access devices communicate with each other.
- This wireless access device may be referred to as an infrastructure.
- Such a network may also be referred to as an infrastructure network.
- the protocol used by the infrastructure network may be the IEEE 802.11 protocol.
- Another network structure of the infrastructure network is that the devices directly communicate with each other.
- This network structure is called a peer-to-peer network, that is, a P2P network, and the P2P network is a network established based on the P2P protocol.
- the device establishes a connection with the wireless access device, that is, connects to the infrastructure network, and the device can also establish a P2P connection with other devices, that is, connect to the P2P network.
- the address information of the second device in the infrastructure network may be the MAC address of the second device. In actual applications, it may also be other information after the MAC address is converted, as long as the address information can be utilized in the infrastructure network. Communication is sufficient, and is not limited herein.
- the identifier information of the wireless access device that is connected to the second device in the infrastructure network may be the MAC address of the wireless access device. In actual use, other identifier information, such as the service set identifier of the wireless access device, may also be used. SSID, Service Set Identifier), etc., are not limited herein.
- the wireless access device may be a wireless access point AP, such as a wireless router. It may be understood that, in actual applications, other wireless access devices, such as a base station, may be used.
- the first device and the second device may be mobile terminals such as mobile phones and tablet computers, or devices capable of connecting wireless access devices, such as notebook computers, as long as they can connect to the wireless access device and can connect to the P2P network, specifically here. Not limited.
- the P2P network may be a Wi-Fi P2P network
- the corresponding infrastructure network is a Wi-Fi infrastructure network.
- the infrastructure network may also be other types of infrastructure networks, and the P2P network may also be Other types of P2P networks are not specifically limited herein except for the correspondence between them.
- the infrastructure network is a Wi-Fi infrastructure network
- the P2P network is a Wi-Fi P2P network.
- the first device and the second device can be Wi-Fi-enabled terminal devices, such as the first device can be a Wi-Fi-enabled terminal device, such as a Wi-Fi-enabled mobile phone; the second device can be a Wi-Fi-enabled terminal device, such as Wi-Fi enabled. TV set.
- sending a message through a Wi-Fi P2P network means that the first device and the second device have established Wi-Fi P2P communication based on the P2P protocol, for example, based on Wi-Fi Direct, negotiating a message.
- the group master device GO, Group Owner
- a group member device Client
- the group member device is associated with the group master device, negotiates the key, etc., and finally establishes a Wi-Fi P2P connection, and then based on this Wi-Fi P2P connection, one device sends a message to another device; or both the first device and the second device join the NAN network, and communicate based on the mechanism of the NAN protocol, such as sending and receiving NAN synchronization beacon frames, and discovering beacon frames. Or service discovery frames, etc.
- the first message sent by the second device may be a Wi-Fi frame, or may be a data packet of an upper layer protocol carried by Wi-Fi.
- the first message includes the address information of the second device in the infrastructure network and the identifier information of the wireless access device connected by the second device in the infrastructure network, and may include the information through a field of the frame, or
- the information element (IE, Information Element) of the frame includes the information, and may also be carried by the upper layer data packet carried by the Wi-Fi, such as a field or an information element having an infrastructure network address information in the frame, which carries The address information of the device in the infrastructure network, where the address information may be a MAC address of the device, such as a field or an information element of the wireless access device identification information in the frame, and the identifier information may be a MAC address of the wireless access device. It may also be a Service Set Identifier (SSID) of the wireless access device, and may be other types of identifiers, which are not limited herein.
- the first device may be connected to a wireless access device, and is capable of knowing the identity information of the wireless access device to which it is connected, such as the MAC address or SSID of the wireless access device.
- the first device determines whether the identifier information of the wireless access device that is connected to the first device matches the identifier information of the wireless access device that is connected to the second device in the infrastructure network. If yes, step 304 is performed, and if not, execution is performed. Step 303;
- the first device determines whether the identification information of the wireless access device that is connected to the first device matches the identification information of the wireless access device that is connected to the second device in the infrastructure network, and when the two identifier information is determined to be the same, the device can be considered as a match. In an actual application, it is also determined that one of the two identification information is the same, and they can be considered as matching, as long as they can be determined by the identification information that they refer to the same wireless access device, then they are considered to be Matching, specifically not limited here.
- the first device may determine, according to the identifier information of the wireless access device included in the first message, whether the representation of the wireless access device that is connected to the received information is Matching, when the first device determines that the identification information of the wireless access device that is connected to the first device matches the identification information of the wireless access device that is connected to the second device in the infrastructure network, it may be determined that the first device itself is connected to the foregoing
- the wireless access device in the infrastructure network that is, the first device and the second device are connected to the same wireless access device in the infrastructure network. Matching can refer to the same situation.
- the MAC address of the wireless access device connected to the first device is 12345678, which The identification information in the received message is also 12345678 (assuming that the MAC address is included), the two identification information are the same, and this is the match. It is also possible to agree that the message includes an SSID or other identification information. If the matching, the first device can be considered that the wireless access device to which it is connected is the wireless access device to which the second device is connected, and the first device and the second device access the same wireless access device, then the first device can Communicating with the second device through the same wireless access device.
- the first device determines that the identity information of the wireless access device that is connected to the device does not match the identifier information of the wireless access device that is connected to the second device in the infrastructure network, the first device and the second device may be considered to be connected. Not the same wireless access device.
- the first device accesses the wireless access device that is connected to the second device in the infrastructure network.
- the first device when the first device determines that the identifier information of the wireless access device that is connected to the first device does not match the identifier information of the wireless access device that is connected to the second device in the infrastructure network, the first device may The identification information of the wireless access device connected in the infrastructure network of the second device is connected to the wireless access device connected to the second device in the infrastructure network. At this time, the first device and the second device have the same connection A wireless access device.
- the wireless access device connected to the first device after the first device accesses the wireless access device of the second device in the infrastructure network, the first device may disconnect the previous connection, or may maintain multiple connections, where Not limited.
- the first device communicates with the second device by using the same wireless access device that is connected to the second device according to the address information of the second device in the infrastructure network.
- the information sent by the foregoing may include address information of the first device in the infrastructure network
- the first device transmits information to the second network through the wireless access device, and both parties can use their addresses in the infrastructure network.
- the first device may be configured according to the second device.
- the address information in the infrastructure network is sent to the second device by using the wireless access device.
- the sending information may be that the first device passes the address information of the second device in the infrastructure network.
- the wireless access device in the infrastructure network directly sends data to the second device. For example, when the first device and the second device communicate in the P2P network, the first device sends video data to the second device.
- the first device determines the identification information of the wireless access device that is connected to the first device and the identification information of the wireless access device that is connected to the second device in the infrastructure network
- the video data may continue to be sent to the second device by the wireless access device that is connected to the second device according to the address information in the infrastructure network.
- the first device when the first device communicates with the second device through the P2P network, the first device may receive the message sent by the second device through the P2P network, when the first device determines that the wireless access device in the infrastructure network is connected to the first device.
- the wireless access device can be used to communicate with the second device in the infrastructure network. Since the first device can communicate using the infrastructure network during the process of using the P2P network, the network quality is effectively alleviated when the P2P network is used. The situation of fluctuations and changes ensures the quality of communication and the user experience is good.
- the first device determines that the identification information of the wireless access device that is connected to it does not match the identification information of the wireless access device that is connected to the second device in the infrastructure network, the first device accesses the second device in the basic
- the wireless access device connected in the facility network can still enable the first device and the second device to communicate in the infrastructure network, thereby ensuring communication quality and improving user experience.
- the first device communicates with the second device through the same wireless access device connected to the second device according to the address information of the second device in the infrastructure network.
- the implementation is as follows:
- the first device communicates with the second device by using the connected wireless access device according to the address information of the second device in the infrastructure network.
- the first device may be included in the infrastructure network according to the second device.
- the address information is sent to the second device by using the same wireless access device that is connected to the second device, where the information includes address information of the first device in the infrastructure network.
- another embodiment of the communication method in the embodiment of the present invention includes:
- the first device receives a first message sent by the second device by using a P2P network.
- this step is performed when the first device and the second device have transmitted services through the P2P network, and both the first device and the second device have the capability of accessing the infrastructure network through the wireless access device.
- the second device accesses the infrastructure network through a connection with the wireless access device;
- the second device sends a first message to the first device, where the first message includes address information of the second device in the infrastructure network, and the second device is in the infrastructure network. Identification information of the connected wireless access device;
- the address information of the second device in the infrastructure network may be the MAC address of the second device, or the IP address of the second device, or other device identifiers of the second device, such as the device name.
- the MAC address, the IP address, or other information that the other device identifiers are converted may be used, as long as the address information can be utilized for communication in the infrastructure network, which is not limited herein.
- the identifier information of the wireless access device that is connected to the second device in the infrastructure network may be the MAC address of the wireless access device. In actual use, other identifier information, such as the service set identifier of the wireless access device, may also be used. SSID, Service Set Identifier), etc., are not limited herein.
- the wireless access device may be a wireless access point AP, such as a wireless router. It may be understood that, in actual applications, other wireless access devices, such as a base station, may be used.
- the first device and the second device may be mobile terminals such as mobile phones and tablet computers, or devices capable of connecting wireless access devices, such as notebook computers, as long as they can connect to the wireless access device and can connect to the P2P network, specifically here. Not limited.
- the P2P network may be a Wi-Fi P2P network
- the corresponding infrastructure network is a Wi-Fi infrastructure network.
- the infrastructure network may also be other types of infrastructure networks, and the P2P network may also be Other types of P2P networks are not specifically limited herein except for the correspondence between them.
- the infrastructure network is a Wi-Fi infrastructure network
- the P2P network is a Wi-Fi P2P network.
- the first device and the second device can be Wi-Fi-enabled terminal devices, such as the first device can be a Wi-Fi-enabled terminal device, such as a Wi-Fi-enabled mobile phone; the second device can be a Wi-Fi-enabled terminal device, such as Wi-Fi enabled. TV set.
- sending a message through a Wi-Fi P2P network means that the first device and the second device have established Wi-Fi P2P communication based on the P2P protocol, for example, based on Wi-Fi Direct, negotiating a message.
- the group master device (GO, Group Owner), a group member device (Client), the group member device is associated with the group master device, negotiates the key, etc., and finally establishes a Wi-Fi P2P connection, and then based on the Wi-Fi P2P connection,
- One device sends a message to another device; or both the first device and the second device join the NAN network, and communicate according to the mechanism of the NAN protocol, such as sending and receiving NAN synchronization beacon frames, discovering beacon frames or service discovery frames, and the like.
- the first message sent by the second device may be a Wi-Fi frame, or may be a data packet of an upper layer protocol carried by Wi-Fi.
- the first message includes address information of the second device in the infrastructure network and identification information of the wireless access device connected by the second device in the infrastructure network, which may be through the frame.
- the field includes the information, or the information element (IE, Information Element) of the frame includes the information, and may be carried by the upper layer data packet carried by the Wi-Fi, such as an infrastructure network address in the frame.
- IE Information Element
- the field or information element of the information which carries the address information of the device in the infrastructure network, and the address information may be the MAC address of the device, such as a field or information element having a wireless access device identification information in the frame, the identifier
- the information may be a MAC address of the wireless access device, or may be a Service Set Identifier (SSID) of the wireless access device, and may be other types of identifiers, which are not limited herein.
- SSID Service Set Identifier
- the first device may be connected to a wireless access device, and is capable of knowing the identity information of the wireless access device to which it is connected, such as the MAC address or SSID of the wireless access device.
- the first device determines whether the identifier information of the wireless access device that is connected to the first device matches the identifier information of the wireless access device that is connected to the second device in the infrastructure network. If yes, step 403 is performed, and if not, the process ends. Process;
- the first device determines whether the identification information of the wireless access device that is connected to the first device matches the identification information of the wireless access device that is connected to the second device in the infrastructure network, and when the two identifier information is determined to be the same, the device can be considered as a match. In an actual application, it is also determined that one of the two identification information is the same, and they can be considered as matching, as long as they can be determined by the identification information that they refer to the same wireless access device, then they are considered to be Matching, specifically not limited here.
- the first device may determine, according to the identifier information of the wireless access device included in the first message, whether the representation of the wireless access device that is connected to the received information is Matching, when the first device determines that the identification information of the wireless access device that is connected to the first device matches the identification information of the wireless access device that is connected to the second device in the infrastructure network, it may be determined that the first device itself is connected to the foregoing
- the wireless access device in the infrastructure network that is, the first device and the second device are connected to the same wireless access device in the infrastructure network. Matching can refer to the same situation.
- the MAC address of the wireless access device connected to the first device is 12345678, and the identifier information in the message it receives is also 12345678 (assuming that the MAC address is included), the two identifiers are the same. It is matching. It is also possible to agree that the message includes an SSID or other identification information. If it matches, the first device can think that the wireless access device to which it is connected is the wireless access device to which the second device is connected, and then the first device can pass the same wireless access device and the second device connected to the second device. The device communicates.
- the first device determines the identity information of the wireless access device that is connected to it, When the identifier information of the wireless access device connected in the infrastructure network does not match, the first device may access the wireless access device connected to the second device in the infrastructure network, and access the The communication between the first device and the second device in the basic network is implemented by the same wireless access device, which is not limited herein.
- the first device sends information to the second device by using the same wireless access device that is connected to the second device according to the address information of the second device in the infrastructure network.
- the information sent by the foregoing may include address information of the first device in the infrastructure network
- the first device transmits information to the second network through the wireless access device, and both parties can use their addresses in the infrastructure network.
- the first device may be in accordance with the second device.
- the address information in the infrastructure network is sent to the second device by using the wireless access device.
- the sending information may be based on the address information of the second device in the infrastructure network.
- the wireless access device in the facility network directly sends data to the second device. For example, when the first device and the second device communicate in the P2P network, the first device sends video data to the second device.
- the device may pass the address information of the second device in the infrastructure network.
- the wireless access device that is connected to itself continues to send video data to the second device.
- the first device communicates with the second device through the same wireless access device connected to the second device according to the address information of the second device in the infrastructure network.
- the first device receives information sent by the second device through the same wireless access device that is connected to the first device according to the address information of the first device in the infrastructure network.
- another embodiment of the communication method in the embodiment of the present invention includes:
- the first device receives a first message sent by the second device by using a P2P network.
- this step is performed when the first device and the second device have transmitted services through the P2P network, and both the first device and the second device have the capability of accessing the infrastructure network through the wireless access device.
- the second device accesses the infrastructure network through a connection with the wireless access device;
- the second device sends a first message to the first device.
- the first message includes address information of the second device in the infrastructure network and identification information of the wireless access device connected by the second device in the infrastructure network;
- the address information of the second device in the infrastructure network may be the MAC address of the second device.
- other information after the MAC address is converted may be used as long as the address information can be utilized in the infrastructure network. Communication is sufficient, and is not limited herein.
- the identifier information of the wireless access device that is connected to the second device in the infrastructure network may be the MAC address of the wireless access device. In actual use, other identifier information, such as the service set identifier of the wireless access device, may also be used. SSID, Service Set Identifier), which is not limited here.
- the wireless access device may be a wireless access point AP, such as a wireless router. It may be understood that, in actual applications, other wireless access devices, such as a base station, may be used.
- the first device and the second device may be mobile terminals such as mobile phones and tablet computers, or devices capable of connecting wireless access devices, such as notebook computers, as long as they can connect to the wireless access device and can connect to the P2P network, specifically here. Not limited.
- the P2P network may be a Wi-Fi P2P network
- the corresponding infrastructure network is a Wi-Fi infrastructure network.
- the infrastructure network may also be other types of infrastructure networks, and the P2P network may also be Other types of P2P networks are not specifically limited herein except for the correspondence between them.
- the infrastructure network is a Wi-Fi infrastructure network
- the P2P network is a Wi-Fi P2P network.
- the first device and the second device can be Wi-Fi-enabled terminal devices, such as the first device can be a Wi-Fi-enabled terminal device, such as a Wi-Fi-enabled mobile phone; the second device can be a Wi-Fi-enabled terminal device, such as Wi-Fi enabled. TV set.
- sending a message through a Wi-Fi P2P network means that the first device and the second device have established Wi-Fi P2P communication based on the P2P protocol, for example, based on Wi-Fi Direct, negotiating a message.
- the group master device (GO, Group Owner), a group member device (Client), the group member device is associated with the group master device, negotiates the key, etc., and finally establishes a Wi-Fi P2P connection, and then based on the Wi-Fi P2P connection,
- One device sends a message to another device; or both the first device and the second device join the NAN network, and communicate according to the mechanism of the NAN protocol, such as sending and receiving NAN synchronization beacon frames, discovering beacon frames or service discovery frames, and the like.
- the first message sent may be a Wi-Fi frame or an upper layer protocol carried over Wi-Fi. Packet.
- the first message includes the address information of the second device in the infrastructure network and the identifier information of the wireless access device connected by the second device in the infrastructure network, and may include the information through a field of the frame, or
- the information element (IE, Information Element) of the frame includes the information, and may also be carried by the upper layer data packet carried by the Wi-Fi, such as a field or an information element having an infrastructure network address information in the frame, which carries The address information of the device in the infrastructure network, where the address information may be a MAC address of the device, such as a field or an information element of the wireless access device identification information in the frame, and the identifier information may be a MAC address of the wireless access device. It can also be the SSID of the wireless access device, and can also be other types of identifiers, which are not limited herein.
- the first device may be connected to a wireless access device, and it can know the identification information of the wireless access device, for example, it knows the MAC address of the wireless access device, or it knows the SSID of the wireless access device. What is it.
- the first device determines whether the identifier information of the wireless access device that is connected to the first device matches the identifier information of the wireless access device that is connected to the second device in the infrastructure network. If yes, step 503 is performed, and if not, the process ends. Process;
- the first device determines whether the identification information of the wireless access device that is connected to the first device matches the identification information of the wireless access device that is connected to the second device in the infrastructure network, and when the two identifier information is determined to be the same, the device can be considered as a match. In an actual application, it is also determined that one of the two identification information is the same, and they can be considered to be matched. As long as they can determine that they refer to the same wireless access device according to the identification information, they are considered to be Matching, specifically not limited here.
- the first device may determine, according to the identifier information of the wireless access device included in the first message, whether the representation of the wireless access device that is connected to the received information is Matching, when the first device determines that the identification information of the wireless access device that is connected to the first device matches the identification information of the wireless access device that is connected to the second device in the infrastructure network, the first device determines that the first device determines that it is connected.
- Matching can refer to the same situation.
- the MAC address of the wireless access device connected to the first device is 12345678, and the identifier information in the message it receives is also 12345678 (assuming that the MAC address is included), the two identifiers are the same. It is matching. It is also possible to agree that the message includes an SSID or other identification information. If it matches, the first device can think that the wireless access device to which it is connected is the wireless access device to which the second device is connected, and the first device can be connected to the second device. The same wireless access device is in communication with the second device.
- the first device determines that the identifier information of the wireless access device that is connected to the first device does not match the identifier information of the wireless access device that is connected to the second device in the infrastructure network, as shown in FIG. 5
- the process of ending the process is optional, and may not end the process.
- the first device may access the wireless access device connected to the second device in the infrastructure network, and implement the first access device by using the same wireless access device.
- the communication between a device and the second device in the basic network is not limited herein.
- the first device sends information to the second device by using the same wireless access device that is connected to the second device according to the address information of the second device in the infrastructure network.
- the first device may be based on the address information of the second device in the infrastructure network.
- the information is sent to the second device by using the wireless access device, where the transmitted information includes address information of the first device in the infrastructure network.
- the first device receives, by the second device, information sent by the same wireless access device that is connected to the first device according to the address information of the first device in the infrastructure network.
- the second device may send the information through the connected wireless access device according to the address information of the first device in the infrastructure network.
- the first device may receive, by the second device, information sent by the same wireless access device connected to the first device according to the address information of the first device in the infrastructure network, where the information may be sent by the second device. Data to the first device.
- the first device After the first device determines that the identification information of the connected wireless access device matches the identification information of the wireless access device, the first device uses the same wireless access that is connected to the second device according to the address information. Before the device communicates with the second device, the following steps are also included:
- the first device sends a second message to the second device by using the P2P network or the infrastructure network, where the second message includes address information of the first device in the infrastructure network;
- the first device may communicate with the second device by using the wireless access device according to the address information of the second device in the infrastructure network, where the first device may: the first device passes the address information of the second device in the infrastructure network.
- the wireless access device transmits information to the second device and/or the first device receives information transmitted by the second device through the wireless access device according to the address information of the first device in the infrastructure network.
- FIG. 6 another embodiment of the communication method in the embodiment of the present invention includes:
- the first device receives a first message sent by the second device by using a P2P network.
- this step is performed when the first device and the second device have transmitted services through the P2P network, and both the first device and the second device have the capability of accessing the infrastructure network through the wireless access device.
- the second device accesses the infrastructure network through a connection with the wireless access device;
- the second device sends a first message to the first device, where the first message includes address information of the second device in the infrastructure network, and the second device is in the infrastructure. Identification information of the wireless access device connected in the network;
- the address information of the second device in the infrastructure network may be the MAC address of the second device.
- other information after the MAC address is converted may be used as long as the address information can be utilized in the infrastructure network. Communication is sufficient, and is not limited herein.
- the identifier information of the wireless access device that is connected to the second device in the infrastructure network may be the MAC address of the wireless access device. In actual use, other identifier information, such as the service set identifier of the wireless access device, may also be used. SSID, Service Set Identifier), which is not limited here.
- the wireless access device may be a wireless access point AP, such as a wireless router. It may be understood that, in actual applications, other wireless access devices, such as a base station, may be used.
- the first device and the second device may be mobile terminals such as mobile phones and tablet computers, or devices capable of connecting wireless access devices, such as notebook computers, as long as they can connect to the wireless access device and can connect to the P2P network, specifically here. Not limited.
- the P2P network may be a Wi-Fi P2P network
- the corresponding infrastructure network is a Wi-Fi infrastructure network.
- the infrastructure network may also be other types of infrastructure networks, and the P2P network may also be Other types of P2P networks are not specifically limited herein except for the correspondence between them.
- the infrastructure network is a Wi-Fi infrastructure network
- the P2P network is a Wi-Fi P2P network.
- the first device and the second device can be Wi-Fi-enabled terminal devices, such as the first device can be a Wi-Fi-enabled terminal device, such as a Wi-Fi-enabled mobile phone; the second device can be a Wi-Fi-enabled terminal device, such as Wi-Fi enabled. TV set.
- sending a message through a Wi-Fi P2P network means that the first device and the second device have established Wi-Fi P2P communication based on the P2P protocol, for example, based on Wi-Fi Direct, negotiating a message.
- Group master GO, Group Owner
- group member device Client
- group member set The device is associated with the group master device, negotiates the key, etc., and finally establishes a Wi-Fi P2P connection, and then based on the Wi-Fi P2P connection, one device sends a message to another device; or the first device and the second device are joined.
- the NAN network communicates based on a mechanism of the NAN protocol, such as a synchronous beacon frame for transmitting and receiving a NAN, a discovery beacon frame, or a service discovery frame.
- the first message sent by the second device may be a Wi-Fi frame, or may be a data packet of an upper layer protocol carried by Wi-Fi.
- the first message includes the address information of the second device in the infrastructure network and the identifier information of the wireless access device connected by the second device in the infrastructure network, and may include the information through a field of the frame, or
- the information element (IE, Information Element) of the frame includes the information, and may also be carried by the upper layer data packet carried by the Wi-Fi, such as a field or an information element having an infrastructure network address information in the frame, which carries The address information of the device in the infrastructure network, where the address information may be a MAC address of the device, such as a field or an information element of the wireless access device identification information in the frame, and the identifier information may be a MAC address of the wireless access device. It can also be the SSID of the wireless access device, and can also be other types of identifiers, which are not limited herein.
- the first device may be connected to a wireless access device, and it can know the identification information of the wireless access device, for example, it knows the MAC address of the wireless access device, or it knows the SSID of the wireless access device. What is it.
- the first device determines whether the identifier information of the wireless access device that is connected to the first device matches the identifier information of the wireless access device that is connected to the second device in the infrastructure network. If yes, step 603 is performed, and if not, the process ends. Process;
- the first device determines whether the identification information of the wireless access device that is connected to the first device matches the identification information of the wireless access device that is connected to the second device in the infrastructure network, and when the two identifier information is determined to be the same, the device can be considered as a match. In an actual application, it may also be determined that one of the two identification information is the same, and the pair of characteristic information may be considered to be matched, and if they can identify that the information can be determined to be the same wireless access device, they are considered to be Matching, specifically not limited here.
- the first device may determine, according to the identifier information of the wireless access device included in the first message, whether the representation of the wireless access device that is connected to the received information is Matching, when the first device determines that the identification information of the wireless access device that is connected to it matches the identification information of the wireless access device, the first device determines that the first device determines that the wireless access device in the infrastructure network is connected , that is, the first device and the second device are in the infrastructure network Connected to a wireless access device.
- the matching may refer to the same situation.
- the MAC address of the wireless access device connected to the first device is 12345678
- the identifier information in the received message is also 12345678 (assuming that the MAC address is included)
- the two The identification information is the same and it is matched at this time.
- the SSID or other identification information may also be included in the message. If the information is matched, the first device may consider that the wireless access device to which it is connected is the wireless access device to which the second device is connected, and then the first device may pass the The same wireless access device connected to the second device communicates with the second device.
- the A device can access the wireless access device that is connected to the second device in the infrastructure network, and the communication between the first device and the second device in the basic network is implemented by using the same wireless access device.
- the first device sends a second message to the second device by using a P2P network or an infrastructure network.
- the first device sending the second message to the second device may be sent through the P2P network or the infrastructure network, and when the second message is sent through the P2P network, the channel that can communicate through the P2P network may be used.
- the sending, when the second message is sent through the infrastructure network may be sent by using the determined wireless access device according to the address information of the second device in the infrastructure network, where the second message includes the first device in the infrastructure network. Address information.
- the first device sends information to the second device by using the same wireless access device that is connected to the second device according to the address information of the second device in the infrastructure network.
- the first device receives, by the second device, information sent by the same wireless access device that is connected to the first device according to the address information of the first device in the infrastructure network.
- the second device may send information to the first device by using the same wireless access device that is connected to the first device according to the address information of the first device in the infrastructure network, and the first device receives the second device according to the receiving device.
- the “first device sends information to the second device by using the wireless access device according to the address information of the second device in the infrastructure network” and the step 605 are described in step 604.
- FIG. 4 to FIG. 6 describes a specific implementation manner in which the first device communicates with the second device by using the connected wireless access device according to the address information of the second device in the infrastructure network, so that the implementation manner is implemented. More flexible.
- the first device may perform the connection between the connected wireless access device and the second device according to the address information of the second device in the infrastructure network. Before the communication, the first device and the second device are authenticated.
- the first device that receives the second message sent by the second device through the P2P network may further include an authentication data, where the authentication data is used for the first device and the first device. Authentication between the two devices.
- the role of authentication is to make the first device and the second device communicate in the infrastructure network, and determine that the other party communicating is their counterpart in the P2P network, thus avoiding possible security problems and improving security.
- the specific certification process can be as follows:
- the first message further includes first authentication data; the first authentication data becomes a shared information that both the first device and the second device know, and they determine in the infrastructure network that the other party does hold the shared information.
- the certifiable partner is the other party communicating on the P2P network.
- the first device uses the address information in the infrastructure network according to the second device to Before the second device sends the message:
- the first device sends the first authentication execution data to the second device by using the wireless access device, where the first authentication execution data is data processed by the first device according to the first authentication data, and the second device is configured according to the first
- the authentication data and the first authentication execution data are used to authenticate the first device, that is, whether the received first authentication execution data matches the first authentication data, and the authentication succeeds when the matching is performed, that is, the authentication first device is indeed the second device.
- the second device sends the second authentication execution data to the first device by using the wireless access device, where the second authentication execution data is data processed by the second device according to the first authentication data, and the first device is configured according to the first authentication data.
- the other device communicating in the P2P network.
- the first device is STA1
- the second device is STA2
- the wireless access device is an AP
- STA1 receives PreShareInfo1 sent by STA2 in the P2P network
- STA1 sends PreShareInfo1 processed information to STA2 through the AP (ie, PreShareInfo11).
- STA2 can authenticate STA1 according to whether PreShareInfo1 and PreShareInfo11 match, or vice versa.
- STA2 sends PreShareInfo1 processed information (ie, PreShareInfo12) to STA1 through AP, and STA1 can authenticate STA2 according to whether PreShareInfo1 and PreShareInfo12 match.
- the first message further includes second authentication data
- the first device uses the address information in the infrastructure network according to the second device to Before the second device sends the message:
- the first device sends the third authentication data to the second device through the P2P network or through the wireless access device, and the second authentication data and the third authentication data become shared information that both the first device and the second device know, and they are based on In the facility network, it is determined that the other party does hold the shared information, and the other party can be authenticated by the other party in the P2P network.
- the first device sends the third authentication execution data to the second device by using the wireless access device, where the third authentication execution data is processed according to the shared second authentication data and the third authentication data (ie, shared information).
- the second device may perform authentication on the first device according to the third authentication execution data and the shared second authentication data and the third authentication data, that is, determine the received third authentication execution data and the shared second authentication data, Whether the third authentication data is matched, and the authentication succeeds when the matching is performed; or vice versa, the second device sends the fourth authentication execution data to the first device by using the wireless access device, and the fourth authentication execution data is based on the shared
- the processed data of the second authentication data and the third authentication data ie, the shared information
- the first device may perform authentication on the second device according to the fourth authentication execution data, the shared second authentication data, and the third authentication data, that is, It is determined whether the received fourth authentication execution data matches the shared second authentication data and the third authentication data, and the authentication succeeds when matching.
- STA1 receives the PreShareInfo1 sent by STA2 in the P2P network, and STA1 PreShareInfo2 can be sent to STA2 through the P2P network or through the AP. Then, STA1 sends the PreShareInfo1+PreShareInfo2 processed information (ie, PreShareInfo11) to STA2 through the AP. STA2 can authenticate STA1 according to whether PreShareInfo11 and PreShareInfo1+PreShareInfo2 match, or The reverse is also the same. STA2 sends the PreShareInfo1+PreShareInfo2 processed information (ie, PreShareInfo12) to STA1 through the AP. STA1 can authenticate STA2 according to whether PreShareInfo12 matches PreShareInfo1+PreShareInfo2.
- the processing method for processing the shared information into the authentication execution data described in the above examples is an algorithm known to both the first device and the second device, and the algorithm can be specified in the communication protocol.
- the judging method for judging whether the authentication data matches between the above examples is also an algorithm known to both the first device and the second device, and the algorithm can be specified in the communication protocol. If it is judged whether or not the match is made, it is possible to process the shared authentication data held by the user to be processed into the authentication execution data, and to see whether the processed data is identical to the received authentication execution data, and if the same, the authentication is successful.
- the second device processes the shared information held by itself, that is, the first authentication data into one data (assumed to be data A), after receiving the first authentication execution data sent by the first device, the data A obtained by the processing is received and received.
- the first authentication execution data to be compared is compared, and if they are the same, the authentication is successful.
- the first device determines that the identifier information of the wireless access device that is connected to the first device matches the identifier information of the wireless access device
- the first device is configured according to the second device.
- the address information of the device in the infrastructure network, before the wireless access device sends the information to the second device, the authentication process between the first device and the second device may be another authentication process in the actual application process. There is no specific limit.
- Another embodiment of the communication method in the embodiment of the present invention includes:
- the second device sends the first message to the first device by using the P2P network.
- the first message includes address information of the second device in the infrastructure network and identifier information of the wireless access device connected by the second device in the infrastructure network;
- this step is performed when the first device and the second device have transmitted services through the P2P network, and both the first device and the second device have the capability of accessing the infrastructure network through the wireless access device.
- the second device accesses the infrastructure network through a connection with the wireless access device;
- a network structure of an infrastructure network has wireless access devices, and other devices can pass The wireless access devices communicate with each other.
- This wireless access device may be referred to as an infrastructure.
- Such a network may also be referred to as an infrastructure network.
- the protocol used by the infrastructure network may be the IEEE 802.11 protocol.
- Another network structure of the infrastructure network is that the devices directly communicate with each other.
- This network structure is called a peer-to-peer network, that is, a P2P network, and the P2P network is a network established based on the P2P protocol.
- the device can establish a connection with the wireless access device, that is, connect to the infrastructure network, and the device can also establish a P2P connection with other devices, that is, connect to the P2P network.
- the first device may determine whether the identification information of the wireless access device that is connected to the wireless device and the identification information of the wireless access device that is connected to the second device in the infrastructure network are matched, and when the second device determines that the wireless connection is connected When the identification information of the ingress device matches the identification information of the wireless access device, the second device determines that the second device determines that the wireless access device in the infrastructure network is connected, that is, the second device and the first device are in the infrastructure network. Connected to is a wireless access device, in which case the first device can communicate with the second device through the connected wireless access device according to the address information of the second device in the infrastructure network.
- the second device passes the same wireless access device and the second device.
- a device communicates.
- the first device communicates with the second device by using the wireless access device, In another direction, the second device communicates with the first device.
- the second device when the second device communicates with the first device through the P2P network, the second device may send a message to the first device through the P2P network, where the wireless access device connected to the first device and the second device are in the infrastructure network.
- the connected wireless access device is the same wireless access device, the connected second wireless access device can communicate with the second device in the infrastructure network, because the second device is in communication with the P2P network.
- the infrastructure network can be used for communication, which effectively alleviates the fluctuation of the network quality when using the P2P network, and ensures the communication quality and the user experience is good.
- the second device can communicate with the first device by using the wireless access device connected in the infrastructure network.
- the second device communicates with the first device by using the wireless access device connected in the infrastructure network, where the second device receives the information sent by the second device, where the information includes the first device in the infrastructure network. Address information.
- another embodiment of the communication method in the embodiment of the present invention includes:
- the second device sends the first message to the first device by using the P2P network.
- the first message includes address information of the second device in the infrastructure network and identifier information of the wireless access device connected by the second device in the infrastructure network;
- this step is performed when the second device and the first device have transmitted services through the P2P network, and both the second device and the first device have the capability of accessing the infrastructure network through the wireless access device.
- the first device accesses the infrastructure network through a connection with the wireless access device;
- the first device may determine whether the identification information of the wireless access device that is connected to the wireless device and the identification information of the wireless access device that is connected to the second device in the infrastructure network are matched, and when the first device determines that the wireless connection is connected When the identification information of the incoming device matches the identification information of the wireless access device, the first device may communicate with the second device by using the connected wireless access device according to the address information of the second device in the infrastructure network. .
- the address information of the first device in the infrastructure network may be the MAC address of the first device. In actual applications, other information after the MAC address is converted may be used as long as the address information can be utilized in the infrastructure network. Communication is sufficient, and is not limited herein.
- the identifier information of the wireless access device that is connected to the first device in the infrastructure network may be the MAC address of the wireless access device. In actual use, other identifier information, such as the service set identifier of the wireless access device, may also be used. SSID, Service Set Identifier), which is not limited here.
- the wireless access device may be a wireless access point AP, such as a wireless router. It may be understood that, in actual applications, other wireless access devices, such as a base station, may be used.
- the second device and the first device may be mobile terminals such as mobile phones and tablet computers, and may also be devices capable of connecting wireless access devices, such as notebook computers and televisions. As long as the wireless access device can be connected, the P2P network can be connected. This is not a limitation.
- the first device may be connected to a wireless access device, and it can know the identification information of the wireless access device, for example, it knows the MAC address of the wireless access device, or it knows the SSID of the wireless access device. What is it.
- the P2P network may be a Wi-Fi P2P network
- the corresponding infrastructure network is a Wi-Fi infrastructure network.
- the infrastructure network may also be other types of infrastructure networks
- the P2P network may also be Other types of P2P networks, except for the need to correspond between them, not here Specifically limited.
- the infrastructure network is a Wi-Fi infrastructure network
- the P2P network is a Wi-Fi P2P network.
- the first device and the second device can be Wi-Fi-enabled terminal devices, such as the first device can be a Wi-Fi-enabled terminal device, such as a Wi-Fi-enabled mobile phone; the second device can be a Wi-Fi-enabled terminal device, such as Wi-Fi enabled. TV set.
- sending a message through a Wi-Fi P2P network means that the first device and the second device have established Wi-Fi P2P communication based on the P2P protocol, for example, based on Wi-Fi Direct, a group is negotiated.
- the master device (GO, Group Owner), a group member device (Client), the group member device is associated with the group master device, negotiates the key, etc., and finally establishes a Wi-Fi P2P connection, and then based on the Wi-Fi P2P connection, one
- the device sends a message to another device; or the first device and the second device join the NAN network, and communicate according to the mechanism of the NAN protocol, such as sending and receiving NAN synchronization beacon frames, discovering beacon frames or service discovery frames, and the like.
- the first message sent by the second device may be a Wi-Fi frame, or may be a data packet of an upper layer protocol carried by Wi-Fi.
- the first message includes the address information of the second device in the infrastructure network and the identifier information of the wireless access device connected by the second device in the infrastructure network, and may include the information through a field of the frame, or
- the information element (IE, Information Element) of the frame includes the information, and may also be carried by the upper layer data packet carried by the Wi-Fi, such as a field or an information element having an infrastructure network address information in the frame, which carries The address information of the device in the infrastructure network, where the address information may be a MAC address of the device, such as a field or an information element of the wireless access device identification information in the frame, and the identifier information may be a MAC address of the wireless access device. It can also be the SSID of the wireless access device, and can also be other types of identifiers, which are not limited herein.
- the second device receives information sent by the first device by using the same wireless access device.
- the second device receives, by the first device, the address information of the first device in the infrastructure network by using the information sent by the same wireless access device;
- the second device communicates with the first device, in another direction, that is, the first device communicates with the first network.
- the second device can communicate with the first device by using the wireless access device connected in the infrastructure network, and the second device can be based on the first device.
- the address information in the facility network sends information to the first device by using the same wireless access device.
- another embodiment of a communication method in an embodiment of the present invention includes:
- the second device sends the first message to the first device by using the P2P network.
- the first message includes address information of the second device in the infrastructure network and identifier information of the wireless access device connected by the second device in the infrastructure network;
- this step is performed when the second device and the first device have transmitted services through the P2P network, and both the second device and the first device have the capability of accessing the infrastructure network through the wireless access device.
- the first device accesses the infrastructure network through a connection with the wireless access device;
- the first device may determine whether the identification information of the wireless access device that is connected to the wireless device and the identification information of the wireless access device that is connected to the second device in the infrastructure network are matched, and when the first device determines that the wireless connection is connected When the identification information of the incoming device matches the identification information of the wireless access device, the first device may communicate with the second device by using the connected wireless access device according to the address information of the second device in the infrastructure network. .
- the address information of the first device in the infrastructure network may be the MAC address of the first device. In actual applications, other information after the MAC address is converted may be used as long as the address information can be utilized in the infrastructure network. Communication is sufficient, and is not limited herein.
- the identifier information of the wireless access device that is connected to the first device in the infrastructure network may be the MAC address of the wireless access device. In actual use, other identifier information, such as the service set identifier of the wireless access device, may also be used. SSID, Service Set Identifier), which is not limited here.
- the wireless access device may be a wireless access point AP, such as a wireless router. It may be understood that, in actual applications, other wireless access devices, such as a base station, may be used.
- the second device and the first device may be mobile terminals such as mobile phones and tablet computers, or devices capable of connecting wireless access devices, such as notebook computers, as long as they can connect to the wireless access device, and can connect to the P2P network, specifically here. Not limited.
- the first device may be connected to a wireless access device, and it can know the identification information of the wireless access device, for example, it knows the MAC address of the wireless access device, or it knows the SSID of the wireless access device. What is it.
- the P2P network may be a Wi-Fi P2P network, and the corresponding infrastructure network is a Wi-Fi infrastructure network. It can be understood that the infrastructure network may also be other types of infrastructure networks. The P2P network may also be other types of P2P networks, except that they need to be corresponding to each other, and are not specifically limited herein.
- the infrastructure network is a Wi-Fi infrastructure network
- the P2P network is a Wi-Fi P2P network.
- the first device and the second device can be Wi-Fi-enabled terminal devices, such as the first device can be a Wi-Fi-enabled terminal device, such as a Wi-Fi-enabled mobile phone; the second device can be a Wi-Fi-enabled terminal device, such as Wi-Fi enabled. TV set.
- sending a message through a Wi-Fi P2P network means that the first device and the second device have established Wi-Fi P2P communication based on the P2P protocol, for example, based on Wi-Fi Direct, a group is negotiated.
- the master device (GO, Group Owner), a group member device (Client), the group member device is associated with the group master device, negotiates the key, etc., and finally establishes a Wi-Fi P2P connection, and then based on the Wi-Fi P2P connection, one
- the device sends a message to another device; or the first device and the second device join the NAN network, and communicate according to the mechanism of the NAN protocol, such as sending and receiving NAN synchronization beacon frames, discovering beacon frames or service discovery frames, and the like.
- the first message sent by the second device may be a Wi-Fi frame, or may be a data packet of an upper layer protocol carried by Wi-Fi.
- the first message includes the address information of the second device in the infrastructure network and the identifier information of the wireless access device connected by the second device in the infrastructure network, and may include the information through a field of the frame, or
- the information element (IE, Information Element) of the frame includes the information, and may also be carried by the upper layer data packet carried by the Wi-Fi, such as a field or an information element having an infrastructure network address information in the frame, which carries The address information of the device in the infrastructure network, where the address information may be a MAC address of the device, such as a field or an information element of the wireless access device identification information in the frame, and the identifier information may be a MAC address of the wireless access device. It can also be the SSID of the wireless access device, and can also be other types of identifiers, which are not limited herein.
- the second device receives information sent by the first device by using the same wireless access device.
- the information that the second device receives, by the first device, the information sent by the same wireless access device includes address information of the first device in the infrastructure network;
- the second device communicates with the first device, in another direction, that is, the first device communicates with the first network.
- the second device passes the same identity according to address information of the first device in the infrastructure network.
- the wireless access devices send information to the first device.
- the second device may send the information through the connected wireless access device according to the address information of the first device in the infrastructure network.
- the information may be data sent by the first device to the second device.
- the second device further includes the following steps before the communication between the same wireless access device and the first device: the second device receives the second device sent by the first device through the P2P network or the infrastructure network. a message, where the second message includes address information of the first device in the infrastructure network;
- the second device may communicate with the first device by using the same wireless access device, and the second device may use the same wireless access device according to the address information of the first device in the infrastructure network.
- the first device transmits information, and/or the second device receives information that the first device transmits through the same wireless access device according to the address information of the second device in the infrastructure network.
- another embodiment of the communication method in the embodiment of the present invention includes:
- the second device sends the first message to the first device by using the P2P network.
- the first message includes address information of the second device in the infrastructure network and identifier information of the wireless access device connected by the second device in the infrastructure network;
- this step is performed when the second device and the first device have transmitted services through the P2P network, and both the second device and the first device have the capability of accessing the infrastructure network through the wireless access device.
- the first device accesses the infrastructure network through a connection with the wireless access device;
- the first device may determine whether the identification information of the wireless access device that is connected to the wireless device and the identification information of the wireless access device that is connected to the second device in the infrastructure network are matched, and when the first device determines that the wireless connection is connected When the identification information of the incoming device matches the identification information of the wireless access device, the first device may send the second wireless device to the second device according to the address information of the second device in the infrastructure network. Message.
- the address information of the first device in the infrastructure network may be the MAC address of the first device. In actual applications, other information after the MAC address is converted may be used as long as the address information can be utilized in the infrastructure network. Communication is sufficient, and is not limited herein.
- the identifier information of the wireless access device that is connected to the first device in the infrastructure network may be the MAC address of the wireless access device. In actual use, other identifier information, such as the service set identifier of the wireless access device, may also be used. SSID, Service Set Identifier), which is not limited here.
- the wireless access device may be a wireless access point AP, such as a wireless router. It may be understood that, in actual applications, other wireless access devices, such as a base station, may be used.
- the second device and the first device may be mobile terminals such as mobile phones and tablet computers, or devices capable of connecting wireless access devices, such as notebook computers, as long as they can connect to the wireless access device, and can connect to the P2P network, specifically here. Not limited.
- the first device may be connected to a wireless access device, and it can know the identification information of the wireless access device, for example, it knows the MAC address of the wireless access device, or it knows the SSID of the wireless access device. What is it.
- the P2P network may be a Wi-Fi P2P network
- the corresponding infrastructure network is a Wi-Fi infrastructure network.
- the infrastructure network may also be other types of infrastructure networks, and the P2P network may also be Other types of P2P networks are not specifically limited herein except for the correspondence between them.
- the infrastructure network is a Wi-Fi infrastructure network
- the P2P network is a Wi-Fi P2P network.
- the first device and the second device can be Wi-Fi-enabled terminal devices, such as the first device can be a Wi-Fi-enabled terminal device, such as a Wi-Fi-enabled mobile phone; the second device can be a Wi-Fi-enabled terminal device, such as Wi-Fi enabled. TV set.
- sending a message through a Wi-Fi P2P network means that the first device and the second device have established Wi-Fi P2P communication based on the P2P protocol, for example, based on Wi-Fi Direct, a group is negotiated.
- the master device (GO, Group Owner), a group member device (Client), the group member device is associated with the group master device, negotiates the key, etc., and finally establishes a Wi-Fi P2P connection, and then based on the Wi-Fi P2P connection, one
- the device sends a message to another device; or the first device and the second device join the NAN network, and communicate according to the mechanism of the NAN protocol, such as sending and receiving NAN synchronization beacon frames, discovering beacon frames or service discovery frames, and the like.
- the first message sent by the second device may be a Wi-Fi frame, or may be a data packet of an upper layer protocol carried by Wi-Fi.
- the first message includes the address information of the second device in the infrastructure network and the identifier information of the wireless access device connected by the second device in the infrastructure network, and may include the information through a field of the frame, or
- the information element (IE, Information Element) of the frame includes the information, and may also be carried by the upper layer data packet carried by the Wi-Fi, such as a field or an information element having an infrastructure network address information in the frame, which carries Equipment at the base
- the address information in the infrastructure network where the address information may be a MAC address of the device, such as a field or an information element of the wireless access device identification information in the frame, and the identifier information may be a MAC address of the wireless access device, or It is the SSID of the wireless access device, and may be other types of identifiers, which are not limited herein.
- the second device receives a second message sent by the first device by using a P2P network or an infrastructure network.
- the second message sent by the first device to the second device may be sent through the P2P network or the infrastructure network.
- the second message may be sent through the P2P network.
- the second message of the infrastructure network may be sent by using the determined wireless access device according to the address information of the second device in the infrastructure network, where the second message includes the address information of the first device in the infrastructure network. ;
- the second device sends information to the first device by using the same wireless access device according to the address information of the first device in the infrastructure network.
- the second device receives, by the first device, information sent by the same wireless access device according to address information of the second device in the infrastructure network.
- the “second device sends information to the first device by using the wireless access device according to the address information of the first device in the infrastructure network” described in step 1003.
- the second device receives the information that the first device transmits through the wireless access device according to the address information of the second device in the infrastructure network.”
- the content described in step 1003 is in step 1004. Described, in some embodiments, only the content described in one of the steps may occur. In other embodiments, the content described in the two steps occurs, but the sequence of occurrence thereof is also in this embodiment. It may be different, and therefore, it is not specifically limited herein.
- the P2P network may be a Wi-Fi P2P network
- the corresponding infrastructure network is a Wi-Fi infrastructure network.
- the infrastructure network may also be other types of infrastructure networks, and the P2P network may also be Other types of P2P networks are not specifically limited herein except for the correspondence between them.
- the second device specifically describes how to communicate with the first device by using the wireless access device connected in the infrastructure network. It can be understood that the actual application is in practical application. There may be other implementation manners, which are not specifically limited herein.
- the embodiment shown in Figures 8 to 10 describes the second device on the basis of the embodiment shown in Figure 7
- the implementation manner is more flexible by the specific implementation manner in which the wireless access device connected in the infrastructure network communicates with the first device.
- the second device can communicate with the first device through the wireless access device connected in the infrastructure network.
- the first device and the first device are authenticated.
- the first message sent by the second device to the first device through the P2P network may further include an authentication data, where the authentication data is used by the second device and the first device.
- the authentication process between devices is the same as the authentication process described above, and is not mentioned here.
- another embodiment of a communication method in an embodiment of the present invention includes:
- STA1 receives message1 sent by STA2 through a Wi-Fi P2P network;
- this step is performed in the case that the STA1 and the STA2 have transmitted the service through the P2P network.
- the STA2 accesses the Wi-Fi infrastructure network through the connection with the AP2.
- STA2 sends a message1 to STA1, which includes the address information of STA2 in the infrastructure network and the MAC address of AP2 that STA2 connects in the Wi-Fi infrastructure network;
- the P2P network is only a Wi-Fi P2P network, and the corresponding infrastructure network is a Wi-Fi infrastructure network as an example. It can be understood that the infrastructure network can also be other types of infrastructure networks. The P2P network may also be other types of P2P networks, except that they need to be corresponding to each other, and are not specifically limited herein.
- the address information of the STA2 in the Wi-Fi infrastructure network may be the MAC address of the STA2 in the Wi-Fi infrastructure network. This step is only described by taking the MAC address as an example. In actual applications, the MAC address may also be converted. The other information is not limited as long as the address information can be utilized for communication in the Wi-Fi infrastructure network.
- the wireless access device may be a wireless access point AP (Wireless Access Point), such as a wireless router. It can be understood that, in practical applications, other wireless access devices may also be used.
- the wireless access device is an AP as an example, and is not limited herein.
- the identification information of the AP2 connected to the STA2 in the Wi-Fi infrastructure network may be the MAC address of the wireless access device. In actual use, it may also be other identification information, such as the service set identifier (SSID, of the wireless access device). Service Set Identifier), which is not limited here.
- SSID service set identifier
- the STA1 and the STA2 may be mobile terminals such as mobile phones and tablet computers, and may be devices that can be connected to the wireless access device, such as a notebook computer, and can be connected to the P2P network as long as the wireless access device can be connected, which is not limited herein.
- the first device may be connected to a wireless access device, and it can know the identification information of the wireless access device, for example, it knows the MAC address of the wireless access device, or it knows the SSID of the wireless access device. What is it.
- the P2P network may be a Wi-Fi P2P network
- the corresponding infrastructure network is a Wi-Fi infrastructure network.
- the infrastructure network may also be other types of infrastructure networks, and the P2P network may also be Other types of P2P networks are not specifically limited herein except for the correspondence between them.
- the message1 sent by the STA2 may be a Wi-Fi frame, or may be a packet of an upper layer protocol carried by Wi-Fi.
- the message1 includes the address information of the STA2 in the Wi-Fi infrastructure network and the MAC address of the AP2 that the STA2 connects in the Wi-Fi infrastructure network, and may include the information through the field of the frame, or may be a frame.
- the information element includes the information, and may also be carried by an upper layer data packet carried by the Wi-Fi, such as a field or an information element having a Wi-Fi infrastructure network address information in the frame, which carries The address information of the device in the Wi-Fi infrastructure network, where the address information may be a MAC address of the device, such as a field or an information element of the AP2 identification information in the frame, and the identifier information may be a MAC address of the wireless access device. It can also be the SSID of the AP2, and can also be other types of identifiers, which are not limited herein.
- STA1 determines whether the MAC address of the connected AP1 matches the MAC address of the AP2, and if so, proceeds to step 1104, and if not, proceeds to step 1103;
- STA1 determines whether the MAC address of AP1 that is connected to itself matches the MAC address of AP2 that STA2 connects to in the Wi-Fi infrastructure network. When it is determined that the two MAC addresses are the same, they can be considered as matching, in actual applications. , it can also be determined that one of the two MAC addresses has the same feature information and can be considered as matching, as long as the MAC address can determine that they are referring to the same APs are considered to be matched, and are not limited herein.
- STA1 determines that the MAC address of the AP1 to which it is connected matches the MAC address of the AP2, it may be determined that STA1 determines that it has connected to AP2 in the above Wi-Fi infrastructure network, that is, STA1 and STA2 are in the Wi-Fi infrastructure network. Connected in is an AP.
- STA1 accesses AP2 that STA2 is connected to in the WiFi network.
- the STA1 determines that the MAC address of the connected AP1 does not match the MAC address of the AP2, the STA1 accesses the AP2 that the STA2 is connected to in the WiFi network.
- the step 1103 may be, when the STA1 determines that the AP1 is connected to the AP1.
- the process ends.
- STA1 sends message2 to STA2 through a Wi-Fi P2P network or a Wi-Fi infrastructure network;
- STA1 sends message2 to STA1 to be sent through the Wi-Fi P2P network or the Wi-Fi infrastructure network.
- the Wi-Fi P2P network can be used.
- the channel for communication is sent.
- the same AP AP2 in this embodiment
- Message2 includes the MAC address of STA1 in the Wi-Fi infrastructure network.
- the STA1 sends information to the STA2 through the AP2 according to the MAC address of the STA2 in the Wi-Fi infrastructure network.
- the STA1 receives information that the STA2 sends through the AP2 according to the MAC address of the STA1 in the Wi-Fi infrastructure network.
- STA2 may send information to STA1 through AP2 according to the MAC address of STA1 in the Wi-Fi infrastructure network.
- STA1 receives the information that STA2 transmits through AP2 according to the MAC address of STA1 in the Wi-Fi infrastructure network.
- STA1 sends information to STA2 through AP2 according to the MAC address of STA2 in the Wi-Fi infrastructure network according to STA2” and “STA1 receives STA2” described in step 1105.
- the content described in step 1104 and the content described in step 1105 in some embodiments, Only the content described in one of the steps may occur, in other embodiments, the content described in both steps occurs, but it occurs The order of the steps is different from that in this embodiment, and therefore, it is not specifically limited herein.
- An embodiment of the first device provided by the embodiment of the present invention includes:
- the receiving unit 1201 is configured to receive a first message sent by the target device by using the P2P network, where the first message includes address information of the target device in the infrastructure network and identifier information of the wireless access device that the target device is connected in the infrastructure network. ;
- the communication unit 1202 is configured to: when the wireless access device connected by the first device and the wireless access device connected to the target device in the infrastructure network are the same wireless access device, according to the target device in the infrastructure network The address information communicates with the target device through the same wireless access device.
- the receiving unit 1201 may receive the message sent by the target device through the P2P network, where the wireless access device connected to the first device and the target device are in the infrastructure.
- the communication unit 1202 can communicate with the target device in the infrastructure network by using the wireless access device, because the first device is in the process of using the P2P network to communicate,
- the infrastructure network can be used for communication, which effectively alleviates the fluctuation of the network quality when using the P2P network, ensuring the communication quality and the user experience is good.
- another embodiment of the first device provided by the embodiment of the present invention includes:
- the receiving unit 1301 is configured to receive a first message sent by the target device by using the P2P network, where the first message includes address information of the target device in the infrastructure network and identifier information of the wireless access device that the target device is connected in the infrastructure network. ;
- the communication unit 1302 is configured to: when the wireless access device connected by the first device and the wireless access device connected to the target device in the infrastructure network are the same wireless access device, according to the target device in the infrastructure network The address information communicates with the target device through the same wireless access device.
- the communication unit 1302 may be specifically configured to: when the first device determines that the identifier information of the wireless access device that is connected to the first device matches the identifier information of the wireless access device that is connected to the target device in the infrastructure network, according to The address information, by the same wireless access device and the target The device communicates.
- the communication unit 1302 may be further configured to: when the first device determines that the identifier information of the wireless access device that is connected to the first device does not match the identifier information of the wireless access device that is connected to the target device in the infrastructure network, And accessing, by the target device, the wireless access device connected to the infrastructure network, according to the address information, communicating with the target device by using the same wireless access device.
- the communication unit 1302 may further include:
- the first sending module 13021 is configured to send information to the target device by using the same wireless access device according to the address information of the target device in the infrastructure network, where the information includes the first The address information of the device in the infrastructure network.
- the first sending module is set as an example. It can be understood that, in some embodiments, the first sending module 13021 can cancel the setting, which is not limited herein.
- another embodiment of the first device in the embodiment of the present invention includes:
- the receiving unit 1401 is configured to receive a first message that is sent by the target device by using the P2P network, where the first message includes address information of the target device in the infrastructure network and identifier information of the wireless access device that the target device is connected in the infrastructure network. ;
- the communication unit 1402 is configured to: when the wireless access device connected by the first device and the wireless access device connected to the target device in the infrastructure network are the same wireless access device, according to the target device in the infrastructure network The address information communicates with the target device through the same wireless access device.
- the communication unit 1402 may be specifically configured to: when the first device determines that the identifier information of the wireless access device that is connected to the first device matches the identifier information of the wireless access device that is connected to the target device in the infrastructure network, according to The address information is communicated with the target device by the same wireless access device.
- the communication unit 1402 is specifically configured to: when the first device determines the identifier information of the wireless access device that is connected to the first device, and the identifier information of the wireless access device that is connected to the target device in the infrastructure network. After the mismatch, when the target device accesses the wireless access device connected to the infrastructure network, the same wireless access device communicates with the target device according to the address information.
- the communication unit 1402 may further include:
- the first sending module 14021 is configured to send information to the target device by using the same wireless access device according to the address information of the target device in the infrastructure network, where the information includes the first device in the infrastructure Address information in the network.
- the first receiving module 14022 is configured to receive, by the target device, information sent by the same wireless access device according to the address information of the first device in the infrastructure network.
- the first device in the first embodiment is divided into a first sending module 14021 and a first receiving module 14022. It can be understood that, in some embodiments, the first sending module 14021 and the first receiving module 14022 can be integrated into one. Module, not limited here.
- another embodiment of the first device in the embodiment of the present invention includes:
- the receiving unit 1501 is configured to receive a first message sent by the target device by using the P2P network, where the first message includes address information of the target device in the infrastructure network and identifier information of the wireless access device that the target device is connected in the infrastructure network. ;
- the communication unit 1502 is configured to: when the wireless access device connected by the first device and the wireless access device connected to the target device in the infrastructure network are the same wireless access device, according to the target device in the infrastructure network The address information communicates with the target device through the same wireless access device.
- the communication unit 1502 may be specifically configured to: when the first device determines that the identifier information of the wireless access device that is connected to the first device matches the identifier information of the wireless access device that is connected to the target device in the infrastructure network, according to The address information is communicated with the target device by the same wireless access device.
- the communication unit 1502 may be further configured to: when the first device determines that the identifier information of the wireless access device that is connected to the first device does not match the identifier information of the wireless access device that is connected to the target device in the infrastructure network, And accessing, by the target device, the wireless access device connected to the infrastructure network, according to the address information, communicating with the target device by using the same wireless access device.
- the sending unit 1503 is configured to send, by the communication unit, the second message to the target device by using the P2P network or the infrastructure network, by using the P2P network or the infrastructure network, before the communication unit communicates with the target device according to the address information, where the second message is sent to the target device by using the P2P network or the infrastructure network.
- the message includes address information of the first device in an infrastructure network
- the communication unit 1502 may further include:
- the second sending module 15021 is configured to send information to the target device by using the same wireless access device according to the address information of the target device in the infrastructure network; and/or,
- the second receiving module 15022 is configured to receive, by the target device, information that is sent by the same wireless access device according to the address information of the first device in the infrastructure network.
- the setting sending unit 1503, the second sending module 15021, and the second receiving module 15022 are taken as an example. It can be understood that, in some embodiments, the sending unit 1503, the second sending module 15021, and the second The receiving module 15022 can cancel the setting, which is not limited herein.
- an embodiment of the second device in the embodiment of the present invention includes:
- the sending unit 1601 is configured to send, by using a P2P network, a first message to the target device, where the first message includes address information of the second device in the infrastructure network and a wireless connection of the second device connected in the infrastructure network. Identification information of the incoming device;
- the communication unit 1602 is configured to: when the wireless access device connected by the target device and the wireless access device connected to the second device in the infrastructure network are the same wireless access device, pass the same wireless connection The incoming device communicates with the target device.
- another embodiment of the second device in the embodiment of the present invention includes:
- the sending unit 1701 is configured to send, by using a P2P network, a first message to the target device, where the first message includes address information of the second device in the infrastructure network and a wireless connection of the second device connected in the infrastructure network. Identification information of the incoming device;
- the communication unit 1702 is configured to: when the wireless access device connected by the target device and the wireless access device connected to the second device in the infrastructure network are the same wireless access device, pass the same wireless connection The incoming device communicates with the target device.
- the communication unit 1702 may further include:
- the first receiving module 17021 is configured to receive information that is sent by the target device by using the same wireless access device, where the information includes address information of the target device in the infrastructure network.
- the first receiving module 17021 is set as an example. It can be understood that In some embodiments, the first receiving module 17021 can cancel the setting, which is not limited herein.
- another embodiment of the second device in the embodiment of the present invention includes:
- the sending unit 1801 is configured to send, by using the P2P network, a first message to the target device, where the first message includes address information of the second device in the infrastructure network and a wireless connection of the second device connected in the infrastructure network. Identification information of the incoming device;
- the communication unit 1802 is configured to: when the wireless access device connected by the target device and the wireless access device connected to the second device in the infrastructure network are the same wireless access device, pass the same wireless connection The incoming device communicates with the target device.
- the communication unit 1802 may further include:
- the first receiving module 18021 is configured to receive information that is sent by the target device by using the same wireless access device, where the information includes address information of the target device in the infrastructure network.
- the first sending module 18022 is configured to send information to the target device by using the same wireless access device according to the address information of the target device in the infrastructure network.
- the first receiving module 18021 and the first sending module 18022 are set as an example. It can be understood that, in some embodiments, the first receiving module 18021 and the first sending module 18022 can cancel the setting. This is not a limitation.
- another embodiment of the second device in the embodiment of the present invention includes:
- the sending unit 1901 is configured to send, by using a P2P network, a first message to the target device, where the first message includes address information of the second device in the infrastructure network and a wireless connection of the second device connected in the infrastructure network. Identification information of the incoming device;
- the communication unit 1902 is configured to: when the wireless access device connected by the target device and the wireless access device connected to the second device in the infrastructure network are the same wireless access device, pass the same wireless connection The incoming device communicates with the target device.
- the method further includes:
- the receiving unit 1903 is configured to receive, after the communication unit 1902 communicates with the target device by using the same wireless access device, a second message that is sent by the target device by using a P2P network or an infrastructure network, where the second message includes a target. Address information of the device in the infrastructure network;
- the communication unit 1902 may further include:
- the second sending module 19021 is configured to send information to the target device by using the same wireless access device according to the address information of the target device in the infrastructure network, and/or
- the second receiving module 19022 is configured to receive information that the target device sends through the same wireless access device according to the address information of the second device in the infrastructure network.
- the setting receiving unit 1903, the second sending module 19021, and the second receiving module 19022 are taken as an example. It can be understood that, in some embodiments, the receiving unit 1903, the second sending module 19021, and the The two receiving modules 19022 can cancel the setting, which is not limited herein.
- the address information of the second device in the infrastructure network may be the MAC address of the second device.
- the MAC address may be converted.
- the information is not limited as long as the address information can be utilized for communication in the infrastructure network.
- the operations implemented by the second device may refer to the method performed by the second device in the foregoing method embodiments, and the operations implemented by the target device may be referred to.
- the identifier information of the wireless access device connected to the device in the infrastructure network may be the MAC address of the wireless access device. In actual use, other identifier information, such as the service set identifier (SSID, of the wireless access device), may also be used. Service Set Identifier), which is not limited here.
- the wireless access device may be a wireless access point AP, such as a wireless router. It may be understood that, in actual applications, other wireless access devices, such as a base station, may be used.
- the first device provided by the embodiment of the present invention is described in the following with reference to the embodiment of FIG. 6.
- the first device includes: a receiver 2001, a transmitter 2002, and a processor 2003 (there may be one or more )).
- the first device may have more or less components than those shown in FIG. 20, may combine two or more components, or may have different component configurations or settings, and each component may be Hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
- the receiver 2001 is configured to perform the following operations:
- the P2P network Receiving, by the P2P network, the first message sent by the target device, where the first message includes address information of the target device in the infrastructure network and identifier information of the wireless access device that is connected to the target device in the infrastructure network;
- the address information of the target device in the infrastructure network may be the MAC address of the target device.
- it may be other information after the MAC address is converted, as long as the address information can be utilized for communication in the infrastructure network, which is not limited herein.
- the identifier information of the wireless access device connected to the target device in the infrastructure network may be the MAC address of the wireless access device. In actual use, other identifier information may also be used, such as the service set identifier (SSID) of the wireless access device. , Service Set Identifier), not limited here.
- SSID service set identifier
- Service Set Identifier not limited here.
- the wireless access device may be a wireless access point AP, such as a wireless router. It may be understood that, in actual applications, other wireless access devices, such as a base station, may be used.
- the processor 2003 is configured to perform the following operations:
- the receiver 2001 After receiving the first message sent by the target device through the P2P network, the receiver 2001 determines the identification information of the wireless access device that the first device itself is connected with the identification information of the wireless access device that is connected to the target device in the infrastructure network. Whether it matches;
- the transmitter 2002 is configured to perform the following operations:
- the processor 2003 determines that the identification information of the wireless access device to which the first device itself is connected matches the identification information of the wireless access device that the target device connects in the infrastructure network, through the P2P network or the infrastructure network. Sending a second message to the target device, where the second message includes address information of the device (the first device) in the infrastructure network;
- the receiver 2001 is further configured to perform the following operations:
- the receiving target device transmits information according to the same wireless access device connected to the first device according to the address information of the first device in the infrastructure network.
- the operations performed by the first device in the embodiments of the first device provided by the embodiment of the present invention may refer to the method performed by the first device in the foregoing method embodiments, and the operations implemented by the target device may refer to the foregoing methods.
- the method performed by the second device in the embodiment when the first device in the embodiment of the present invention communicates with the target device through the P2P network, the receiver 2001 can receive the message sent by the target device through the P2P network, and when the processor 2003 determines the connection.
- Wireless access device and target device at the base When the wireless access device connected to the infrastructure network is the same wireless access device, the first device in the embodiment of the present invention can communicate with the target device in the infrastructure network by using the wireless access device through the receiver 2001 and the transmitter 2003. Since the first device can communicate using the P2P network, the infrastructure network can be used for communication, which effectively alleviates the fluctuation of the network quality when the P2P network is used, and ensures the communication quality and the user experience is good.
- the second device includes: a receiver 2101, a transmitter 2102, and a processor. 2103 (can have one or more).
- the second device may have more or less components than those shown in FIG. 21, two or more components may be combined, or may have different component configurations or settings, and the respective components may be Hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
- the transmitter 2102 is configured to perform the following operations:
- the target device may send a message to the second device provided by the embodiment of the present invention by using the connected wireless access device according to the address information of the second device in the infrastructure network.
- the receiver 2101 is configured to perform the following operations:
- the address information of the target device in the infrastructure network may be the MAC address of the target device. In actual applications, it may also be other information after the MAC address is converted, as long as the address information can be utilized to communicate in the infrastructure network. Yes, it is not limited here.
- the identification information of the wireless access device connected to the infrastructure network in the second embodiment of the present invention may be the MAC address of the wireless access device. In actual use, other identifier information may also be used, such as the wireless access device. Service Set Identifier (SSID), which is not limited here.
- SSID Service Set Identifier
- the wireless access device may be a wireless access point AP, such as a wireless router, etc., it can be understood that In a practical application, other wireless access devices, such as a base station, may be used, which is not limited herein.
- the transmitter 2102 is further configured to perform the following operations:
- the information is transmitted to the target device through the same wireless access device connected to the second device according to the address information of the target device in the infrastructure network.
- the receiver 2101 is further configured to perform the following operations:
- the processor 2103 can be configured to perform the following operations:
- the operations performed by the second device in the embodiments of the second device provided by the embodiment of the present invention may refer to the method performed by the second device in the foregoing method embodiments, and the operations implemented by the target device may refer to the foregoing methods.
- the method performed by the first device in the embodiment may refer to the method performed by the second device in the foregoing method embodiments, and the operations implemented by the target device may refer to the foregoing methods.
- the receiver 2101 can receive the message sent by the target device through the P2P network, and the target device determines the connected wireless access device and the second device according to the message.
- the second device can communicate with the target device in the infrastructure network by using the wireless access device through the receiver 2101 and the transmitter 2103.
- the two devices can use the infrastructure network to communicate, which effectively alleviates the fluctuation of the network quality when using the P2P network, and ensures the communication quality and user experience.
- a first device provided by an embodiment of the present invention is specifically described by using a mobile phone as an example.
- the illustrated mobile phone 2200 is merely an example of the first device in the embodiment of the present invention, and the mobile phone 2200 may have more or fewer components than those shown in the drawings, and may combine two or more. Many components, or can have different component configurations.
- the various components shown in the figures can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
- the mobile phone includes a memory 2201, a central processing unit (CPU) 2203, a peripheral interface 2004, an RF circuit 2205, an audio circuit 2206, a speaker 2207, a power management chip 2208, and an input/output. (I/O) subsystem 2209, other input/control devices 2010, and external port 2204 are communicated via one or more communication buses or signal lines 2212.
- a memory 2201 a central processing unit (CPU) 2203, a peripheral interface 2004, an RF circuit 2205, an audio circuit 2206, a speaker 2207, a power management chip 2208, and an input/output. (I/O) subsystem 2209, other input/control devices 2010, and external port 2204 are communicated via one or more communication buses or signal lines 2212.
- CPU central processing unit
- peripheral interface 2004, an RF circuit 2205, an audio circuit 2206, a speaker 2207, a power management chip 2208, and an input/output. (I/O) subsystem 2209, other input/control devices 2010, and external port 2
- the mobile phone provided in this embodiment is only an example of a mobile terminal, and the mobile terminal according to the embodiment of the present invention may have more or less components than those shown in FIG. 22, and may combine two or more. Multiple components, or different component configurations or arrangements, may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
- the mobile phone provided in this embodiment for performing communication in the method of the embodiment of the present invention is described in detail below.
- the memory 2201 can be accessed by the CPU 2203, the peripheral interface 2204, etc., and the memory 2201 can include a high-speed random access memory, and can also include a non-volatile memory, such as one or more magnetic disk storage devices, flash memory devices. Or other volatile solid-state storage devices.
- a non-volatile memory such as one or more magnetic disk storage devices, flash memory devices. Or other volatile solid-state storage devices.
- a peripheral interface 2204 that can connect the input and output peripherals of the first device to the CPU 2203 and the memory 2201.
- the I/O subsystem 2209 can connect input and output peripherals on the first device, such as touch screen 2213 (equivalent to the display in the above embodiments) and other input/control devices 2210, to Peripheral interface 2204.
- the I/O subsystem 2209 can include a display controller 22091 and one or more input controllers 22092 for controlling other input/control devices 2010.
- one or more input controllers 22092 receive electrical signals from other input/control devices 2210 or transmit electrical signals to other input/control devices 2210, and other input/control devices 2210 may include physical buttons (press buttons, rocker buttons, etc.) ), dial, slide switch, joystick, click wheel.
- the input controller 22092 can be connected to any of the following: a keyboard, an infrared port, a USB interface, and a pointing device such as a mouse.
- the touch screen 2213 is an input interface and an output interface between the mobile terminal and the user, and displays the visual output to the user, and the visual output may include graphics, text, icons, videos, and the like.
- Display controller 22091 in I/O subsystem 2209 receives electrical signals from touch screen 2213 or transmits electrical signals to touch screen 2213.
- the touch screen 2213 detects the contact on the touch screen, and the display controller 22091 The detected contact is converted into interaction with a user interface object displayed on the touch screen 2213, ie, human-computer interaction is achieved, and the user interface object displayed on the touch screen 2213 may be an icon that runs the game, an icon that is networked to the corresponding network, and the like.
- the first device may also include a light mouse, which is a touch sensitive surface that does not display a visual output, or an extension of a touch sensitive surface formed by the touch screen.
- the RF circuit 2205 is mainly used for establishing communication between the mobile phone and the wireless network (ie, the network side), and realizing data reception and transmission between the mobile phone and the wireless network. For example, sending and receiving short messages, emails, and the like. Specifically, the RF circuit 2205 receives and transmits an RF signal, which is also referred to as an electromagnetic signal, and the RF circuit 2205 converts the electrical signal into an electromagnetic signal or converts the electromagnetic signal into an electrical signal, and through the electromagnetic signal and communication network and other devices Communicate.
- an RF signal which is also referred to as an electromagnetic signal
- the RF circuit 2205 may include known circuitry for performing these functions including, but not limited to, an antenna system, an RF transceiver, one or more amplifiers, a tuner, one or more oscillators, a digital signal processor, a CODEC chip Group, Subscriber Identity Module (SIM), etc.
- an antenna system an RF transceiver, one or more amplifiers, a tuner, one or more oscillators, a digital signal processor, a CODEC chip Group, Subscriber Identity Module (SIM), etc.
- SIM Subscriber Identity Module
- the audio circuit 2206 is mainly used to receive audio data from the peripheral interface 2204, convert the audio data into an electrical signal, and transmit the electrical signal to the speaker 2007.
- the speaker 2207 is configured to restore the voice signal received by the mobile phone from the wireless network through the RF circuit 2205 to sound and play the sound to the user.
- the power management chip 2208 is used for power supply and power management of the hardware connected to the CPU 2203, the I/O subsystem, and the peripheral interface.
- the CPU 2203 is a control center of the mobile phone, and connects various parts of the entire mobile phone by using various interfaces and lines, and executes the mobile phone by running or executing software programs and/or modules stored in the memory 2201 and calling data stored in the memory 2201.
- the CPU 2203 may include one or more processing units; preferably, the CPU 2203 may integrate an application processor and a modem processor, where the application processor mainly processes an operating system, a user interface, an application, etc., and performs modulation and demodulation.
- the processor primarily handles wireless communications. It can be understood that the above modem processor may not be integrated into the processor CPU2003.
- the mobile phone 2200 also includes a power source (such as a battery) for supplying power to various components.
- a power source such as a battery
- the power source can be logically connected to the CPU 2203 through a power management system to manage functions such as charging, discharging, and power management through the power management system.
- the mobile phone 2200 may further include a camera, a Bluetooth module, and the like, and details are not described herein again.
- the RF circuit 2205 can receive a message sent by another device through the P2P network, and the message can be specifically
- the first message in Embodiment 10 to Embodiment 13 includes the address information of the target device in the infrastructure network and the identification information of the wireless access device connected to the target device in the infrastructure network, which can be understood.
- the RF circuit 2205 can receive the message one or more times, which is not specifically limited herein. It should be noted that the received first message can also carry data of multiple data types. Yes; data with only one data type, such as authentication data, can also have data of two or more data types.
- the central processing unit 2203 included in the mobile phone further has the following functions:
- the central processing unit 2203 identifies the data type of the data in the first message received by the RF circuit 2205, and determines whether the identification information of the wireless access device that is connected to it and the identification information of the wireless access device received by the RF circuit 2205 match.
- the central processing unit 2203 determines that the identification information of the wireless access device to which the mobile phone itself is connected matches the identification information of the wireless access device received by the RF circuit 2205, and connects to the target device according to the address information of the target device in the infrastructure network. The same wireless access device communicates with the target device. It can be understood that, in the embodiment of the present invention, the manner in which the central processing unit 2203 can identify the data in various formats may be performed in the manner of the previous embodiment, and details are not described herein again.
- the disclosed system, apparatus, and method may be implemented in other manners.
- the device embodiments described above are merely illustrative.
- the division of the unit or module is only a logical function division.
- there may be another division manner for example, multiple units or components may be used. Combinations can be integrated into another system, or some features can be ignored or not executed.
- the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
- the units described as separate components may or may not be physically separated as The components displayed by the unit may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
- each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
- the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
- the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
- the technical solution of the present invention which is essential or contributes to the prior art, or all or part of the technical solution, may be embodied in the form of a software product stored in a storage medium.
- a number of instructions are included to cause a computer device (which may be a personal computer, server, or device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.
- the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
本发明实施例公开了一种通信方法及设备,本发明实施例方法包括:第一设备接收第二设备通过P2P网络发送的第一消息,第一消息中包括第二设备在基础设施网络中的地址信息以及第二设备在所述基础设施网络中连接的无线接入设备的标识信息;当第一设备连接的无线接入设备与第二设备在基础设施网络中连接的无线接入设备为同一个无线接入设备时,第一设备根据所述地址信息,通过已连接的无线接入设备与第二设备进行通信。本发明实施例有效缓解了使用P2P网络时网络质量高低起伏变化的情况,保障了通信质量,用户体验佳。
Description
本申请要求于2014年08月27日提交中国专利局、申请号为201410429195.1、发明名称为“一种通信方法及设备”的中国专利申请,和于2014年09月01日提交中国专利局、申请号为201410440017.9、发明名称为“一种通信方法及设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本发明涉及通信技术领域,尤其涉及一种通信方法及设备。
无线保真(Wi-Fi,Wireless Fidelity),从1997年无线局域网标准IEEE802.11发布以来,在拥有众多在业界领先的公司组成的Wi-Fi联盟(Wi-Fi Alliance,WFA)的大力推动下,以其具有的部署快速、使用便利和传输速率高等优势,发展迅猛,由于现在的笔记本电脑、平板电脑和手机及许多电子终端设备等都支持Wi-Fi技术,因而Wi-Fi技术被广泛应用于各个行业。
Wi-Fi的一种网络结构为,具有无线接入设备,其他设备可以通过无线接入设备相互通信,这个无线接入设备可以称为基础设施,这种网络也可以称为基础设施网络,设备可以为终端设备,如手机,电视等,基础设施可以为家庭网关等。
Wi-Fi的另一种网络结构为,设备间直接进行通信,这种网络结构就叫做端到端网络,即点对点(Peer to Peer,P2P)网络,设备可以为终端设备,如手机,电视等。
综上可知,网络的连接由于使用网络的不同,存在以下不同网络结构的网络:一种是基于基本的802.11协议的基础设施的网络结构,另一种是基于P2P协议的P2P网络结构,这个P2P协议的可能情况可以为WFA的Wi-Fi Direct协议或NAN(Neighbor Awareness Networking,临近感知网络)协议等。
现有技术中,这两种网络结构是相互独立的,设备在进行业务的时候,根据具体情况,可以使用其中的一种网络结构。由于设备位置的变化会导致网络信号的变化,此时若固定在一种网络结构中进行业务,网络质量会出现高低起
伏的变化,用户体验不佳。
发明内容
本发明实施例提供了一种通信方法及设备,有效缓解了使用P2P网络时网络质量高低起伏变化的情况,保障了通信质量,用户体验佳。
本发明实施例第一方面提供了一种通信方法,包括:
第一设备接收第二设备通过P2P网络发送的第一消息,所述第一消息中包括所述第二设备在基础设施网络中的地址信息以及所述第二设备在所述基础设施网络中连接的无线接入设备的标识信息;
当所述第一设备连接的无线接入设备与所述第二设备在所述基础设施网络中连接的无线接入设备为同一个无线接入设备时,所述第一设备根据所述地址信息,通过所述同一个无线接入设备与所述第二设备进行通信。
结合本发明实施例的第一方面,在本发明实施例的第一方面的第一种实现方式中,所述当所述第一设备连接的无线接入设备与所述第二设备在所述基础设施网络中连接的无线接入设备为同一个无线接入设备时,具体为:
当所述第一设备确定自身已连接的无线接入设备的标识信息与所述第二设备在所述基础设施网络中连接的无线接入设备的标识信息匹配时。
结合本发明实施例的第一方面,在本发明实施例的第一方面的第二种实现方式中,所述当所述第一设备连接的无线接入设备与所述第二设备在所述基础设施网络中连接的无线接入设备为同一个无线接入设备时,具体为:
当所述第一设备确定自身已连接的无线接入设备的标识信息与所述第二设备在所述基础设施网络中连接的无线接入设备的标识信息不匹配后,所述第一设备接入所述第二设备在所述基础设施网络中连接的无线接入设备时。
结合本发明实施例的第一方面或第一方面的第一种实现方式或第一方面的第二种实现方式,在本发明实施例的第一方面的第三种实现方式中,所述第一设备根据所述地址信息,通过所述同一个无线接入设备与所述第二设备进行通信包括:
所述第一设备根据所述第二设备在所述基础设施网络中的地址信息,通过所述同一个无线接入设备向所述第二设备发送信息,所述信息中包括第一设备在所述基础设施网络中的地址信息。
结合本发明实施例的第一方面的第三种实现方式,在本发明实施例的第一方面的第四种实现方式中,所述第一设备根据所述地址信息,通过所述同一个无线接入设备与所述第二设备进行通信,还包括:
所述第一设备接收所述第二设备根据所述第一设备在所述基础设施网络中的地址信息,通过所述同一个无线接入设备发送的信息。
结合本发明实施例的第一方面或第一方面的第一种实现方式或第一方面的第二种实现方式,在本发明实施例的第一方面的第五种实现方式中,在所述第一设备根据所述地址信息,通过所述同一个无线接入设备与所述第二设备进行通信之前,还包括:
第一设备通过所述P2P网络或所述基础设施网络向所述第二设备发送第二消息,所述第二消息中包括所述第一设备在所述基础设施网络中的地址信息;
所述第一设备根据所述地址信息,通过所述同一个无线接入设备与所述第二设备进行通信包括:
所述第一设备根据所述第二设备在所述基础设施网络中的地址信息,通过所述同一个无线接入设备向所述第二设备发送信息,
和/或,
所述第一设备接收所述第二设备根据所述第一设备在基础设施网络中的地址信息通过所述同一个无线接入设备发送的信息。
结合本发明实施例的第一方面或第一方面的第一种实现方式或第一方面的第二种实现方式或第一方面的第三种实现方式或第一方面的第四种实现方式或第一方面的第五种实现方式,在本发明实施例的第一方面的第六种实现方式中,所述第一消息还包括第一认证数据,所述第一认证数据用于所述第一设备与所述第二设备之间的认证。
结合本发明实施例的第一方面或第一方面的第一种实现方式或第一方面的第二种实现方式或第一方面的第三种实现方式或第一方面的第四种实现方式或第一方面的第五种实现方式或第一方面的第六种实现方式,在本发明实施例的第一方面的第七种实现方式中,所述P2P网络为Wi-Fi P2P网络,所述基础设施网络为Wi-Fi基础设施网络。
本发明实施例的第二方面提供了一种通信方法,包括:
第二设备通过P2P网络向第一设备发送第一消息,所述第一消息中包括所
述第二设备在基础设施网络中的地址信息以及所述第二设备在所述基础设施网络中连接的无线接入设备的标识信息;
当所述第一设备连接的无线接入设备与所述第二设备在所述基础设施网络中连接的无线接入设备为同一个无线接入设备时,所述第二设备通过所述同一个无线接入设备与所述第一设备进行通信。
结合本发明实施例的第二方面,在本发明实施例第二方面的第一种实现方式中,所述第二设备通过所述同一个无线接入设备与所述第一设备进行通信包括:
所述第二设备接收所述第一设备通过所述同一个无线接入设备发送的信息,所述信息中包括所述第一设备在所述基础设施网络中的地址信息。
结合本发明实施例的第二方面第一种实现方式,在本发明实施例第二方面的第二种实现方式中,所述第二设备通过所述同一个无线接入设备与所述第一设备进行通信还包括:
所述第二设备根据所述第一设备在所述基础设施网络中的地址信息,通过所述同一个无线接入设备向所述第一设备发送信息。
结合本发明实施例的第二方面,在本发明实施例第二方面的第三种实现方式中,在所述第二设备通过所述同一个无线接入设备与所述第一设备进行通信之前,还包括:
所述第二设备接收所述第一设备通过所述P2P网络或所述基础设施网络发送的第二消息,所述第二消息中包括所述第一设备在所述基础设施网络中的地址信息;
所述第二设备通过所述同一个无线接入设备与所述第一设备进行通信包括:
所述第二设备根据所述第一设备在所述基础设施网络中的地址信息,通过所述同一个无线接入设备向所述第一设备发送信息,
和/或,
所述第二设备接收所述第一设备根据所述第二设备在基础设施网络中的地址信息通过所述同一个无线接入设备发送的信息。
结合本发明实施例的第二方面或第二方面的第一种实现方式或第二方面的第二种实现方式或第二方面的第三种实现方式,在本发明实施例第二方面的第四种实现方式中,所述第一消息还包括第一认证数据,所述第一认证数据用于
所述第二设备与所述第一设备之间的认证。
结合本发明实施例的第二方面或第二方面的第一种实现方式或第二方面的第二种实现方式或第二方面的第三种实现方式或第二方面的第四种实现方式,在本发明实施例第二方面的第五种实现方式中,所述P2P网络为Wi-Fi P2P网络,所述基础设施网络为Wi-Fi基础设施网络。
本发明实施例第三方面提供一种设备,包括:
接收单元,用于接收目标设备通过P2P网络发送的第一消息,所述第一消息中包括所述目标设备在基础设施网络中的地址信息以及所述目标设备在所述基础设施网络中连接的无线接入设备的标识信息;
通信单元,用于当所述设备连接的无线接入设备与所述目标设备在所述基础设施网络中连接的无线接入设备为同一个无线接入设备时,根据所述地址信息,通过所述同一个无线接入设备与所述目标设备进行通信。
结合本发明实施例的第三方面,在本发明实施例第三方面的第一种实现方式中,所述通信单元具体用于当所述设备确定自身已连接的无线接入设备的标识信息与所述目标设备在所述基础设施网络中连接的无线接入设备的标识信息匹配时,根据所述地址信息,通过所述同一个无线接入设备与所述目标设备进行通信。
结合本发明实施例的第三方面,在本发明实施例第三方面的第二种实现方式中,所述通信单元具体用于当所述设备确定自身已连接的无线接入设备的标识信息与所述目标设备在所述基础设施网络中连接的无线接入设备的标识信息不匹配后,接入所述目标设备在所述基础设施网络中连接的无线接入设备时,根据所述地址信息,通过所述同一个无线接入设备与所述目标设备进行通信。
结合本发明实施例的第三方面或第三方面的第一种实现方式或第三方面的第二种实现方式,在本发明实施例第三方面的第三种实现方式中,所述通信单元包括:
第一发送模块,用于根据所述目标设备在所述基础设施网络中的地址信息,通过所述同一个无线接入设备向所述目标设备发送信息,所述信息中包括所述设备在所述基础设施网络中的地址信息。
结合本发明实施例的第三方面的第三种实现方式,在本发明实施例第三方面的第四种实现方式中,所述通信单元还包括:
第一接收模块,用于接收所述目标设备根据所述设备在所述基础设施网络中的地址信息,通过所述同一个无线接入设备发送的信息。
结合本发明实施例的第三方面或第三方面的第一种实现方式或第三方面的第二种实现方式,在本发明实施例第三方面的第五种实现方式中,所述设备还包括:
发送单元,用于在所述通信单元根据所述地址信息,通过所述同一个无线接入设备与所述目标设备进行通信之前,通过所述P2P网络或所述基础设施网络向所述目标设备发送第二消息,所述第二消息中包括所述设备在所述基础设施网络中的地址信息;
所述通信单元包括:
第二发送模块,用于根据所述目标设备在所述基础设施网络中的地址信息,通过所述同一个无线接入设备向所述目标设备发送信息;和/或,
第二接收模块,用于接收所述目标设备根据所述设备在基础设施网络中的地址信息通过所述同一个无线接入设备发送的信息。
本发明实施例第四方面提供一种设备,包括:发送单元,用于通过P2P网络向目标设备发送第一消息,所述第一消息中包括所述设备在基础设施网络中的地址信息以及所述设备在所述基础设施网络中连接的无线接入设备的标识信息;
通信单元,用于当所述目标设备连接的无线接入设备与所述设备在所述基础设施网络中连接的无线接入设备为同一个无线接入设备时,通过所述同一个无线接入设备与所述目标设备进行通信。
结合本发明实施例的第四方面,在本发明实施例第四方面的第一种实现方式中,所述通信单元包括:
第一接收模块,用于接收所述目标设备通过所述同一个无线接入设备发送的信息,所述信息中包括所述目标设备在所述基础设施网络中的地址信息。
结合本发明实施例的第四方面的第一种实现方式,本发明实施例第四方面的第二种实现方式中,所述通信单元还包括:
第一发送模块,用于根据所述目标设备在所述基础设施网络中的地址信息,通过所述同一个无线接入设备向所述目标设备发送信息。
结合本发明实施例的第四方面,在本发明实施例第四方面的第三种实现方
式中,所述设备还包括:
接收单元,用于在所述通信单元通过所述同一个无线接入设备与所述目标设备进行通信之前,接收所述目标设备通过所述P2P网络或所述基础设施网络发送的第二消息,所述第二消息中包括所述目标设备在所述基础设施网络中的地址信息;
所述通信单元包括:
第二发送模块,用于根据所述目标设备在所述基础设施网络中的地址信息,通过所述同一个无线接入设备向所述目标设备发送信息,和/或,
第二接收模块,用于接收所述目标设备根据所述设备在基础设施网络中的地址信息通过所述同一个无线接入设备发送的信息。
从以上技术方案可以看出,本发明实施例具有以下优点:
第一设备在与第二设备通过P2P网络进行通信时,可以接收第二设备通过P2P网络发送的消息,当第一设备连接的无线接入设备与第二设备在所述基础设施网络中连接的无线接入设备为同一个无线接入设备时,可以使用无线接入设备在基础设施网络中与第二设备进行通信,由于第一设备在使用P2P网络通信的过程中,可以使用基础设施网络进行通信,有效缓解了使用P2P网络时网络质量高低起伏变化的情况,保障了通信质量,用户体验佳。
图1为本发明实施例中通信方法的一个实施例示意图;
图2为本发明实施例中通信方法的另一个实施例示意图;
图3为本发明实施例中通信方法的另一个实施例示意图;
图4为本发明实施例中通信方法的另一个实施例示意图;
图5为本发明实施例中通信方法的另一个实施例示意图;
图6为本发明实施例中通信方法的另一个实施例示意图;
图7为本发明实施例中通信方法的另一个实施例示意图;
图8为本发明实施例中通信方法的另一个实施例示意图;
图9为本发明实施例中通信方法的另一个实施例示意图;
图10本发明实施例中通信方法的另一个实施例示意图;
图11本发明实施例中通信方法的另一个实施例示意图;
图12为本发明实施例中的第一设备的一个实施例示意图;
图13为本发明实施例中的第一设备的另一个实施例示意图;
图14为本发明实施例中的第一设备的另一个实施例示意图;
图15为本发明实施例中的第一设备的另一个实施例示意图;
图16为本发明实施例中的第二设备的一个实施例示意图;
图17为本发明实施例中的第二设备的另一个实施例示意图;
图18为本发明实施例中的第二设备的另一个实施例示意图;
图19为本发明实施例中的第二设备的另一个实施例示意图;
图20为本发明实施例中的第一设备的另一个实施例示意图;
图21为本发明实施例中的第二设备的另一个实施例示意图;
图22为本发明实施例中的第一设备的另一个实施例示意图。
本发明实施例提供了一种通信方法及设备,用于保证通信质量,提高用户体验。
为了使本技术领域的人员更好地理解本发明方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分的实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本发明保护的范围。
请参阅图1,本发明实施例中通信方法的一个实施例包括:
101、第一设备接收第二设备通过P2P网络发送的第一消息;
可以理解的是,本步骤在第一设备和第二设备已经通过P2P网络传输业务的情况下进行,第一设备和第二设备均具有通过无线接入设备接入基础设施网络的能力,在本实施例中,第二设备通过与无线接入设备的连接接入基础设施网络。第一设备可以是连接在一个无线接入设备的,它能够知道自身已连接的无线接入设备的标识信息。
需要说明的是,在流程开始时,第二设备会向第一设备发送一个第一消息,该第一消息中包括第二设备在基础设施网络中的地址信息以及第二设备在基础
设施网络中连接的无线接入设备的标识信息。
基础设施网络的一种网络结构为,具有无线接入设备,其他设备可以通过无线接入设备相互通信,这个无线接入设备可以称为基础设施,这种网络也可以称为基础设施网络,基础设施网络使用的协议可以是IEEE802.11协议。
基础设施网络的另一种网络结构为,设备间直接进行通信,这种网络结构就叫做点对点网络,即P2P网络,P2P网络是基于P2P协议建立起来的网络。
设备跟无线接入设备建立连接,即连接到基础设施网络,设备也可以跟其他设备建立P2P连接,即连接到P2P网络。连接到P2P网络可以是建立Wi-Fi Direct连接,也可以是加入NAN网络。
102、当第一设备连接的无线接入设备与第二设备在所述基础设施网络中连接的无线接入设备为同一个无线接入设备时,第一设备根据第二设备在基础设施网络中的地址信息,通过与所述同一个无线接入设备与第二设备进行通信。
需要说明的是,第一设备根据第二设备在基础设施网络中连接的无线接入设备的标识信息,可以确定第一设备连接的无线接入设备与第二设备在所述基础设施网络中连接的无线接入设备是否为同一个无线接入设备,当第一设备连接的无线接入设备与第二设备在基础设施网络中连接的无线接入设备为同一个无线接入设备时,第一设备可以根据第二设备在基础设施网络中的地址信息,通过与第二设备所连接的同一个无线接入设备与第二设备进行通信。
本发明实施例中第一设备在与第二设备通过P2P网络进行通信时,可以接收第二设备通过P2P网络发送的消息,当第一设备连接的无线接入设备与第二设备在所述基础设施网络中连接的无线接入设备为同一个无线接入设备时,可以使用无线接入设备在基础设施网络中与第二设备进行通信,由于第一设备在使用P2P网络通信的过程中,可以使用基础设施网络进行通信,有效缓解了使用P2P网络时网络质量高低起伏变化的情况,保障了通信质量,用户体验佳。
图1所示的实施例中,当第一设备连接的无线接入设备与第二设备在所述基础设施网络中连接的无线接入设备为同一个无线接入设备时,具体可以为多种方式,具体如下:
一、当第一设备连接的无线接入设备与第二设备在基础设施网络中连接的无线接入设备为同一个无线接入设备时,具体为:当第一设备确定自身已连接的无线接入设备的标识信息与第二设备在基础设施网络中连接的无线接入设备
的标识信息匹配时;
请参阅图2,本发明实施例中通信方法的另一个实施例包括:
201、第一设备接收第二设备通过P2P网络发送的第一消息;
可以理解的是,本步骤在第一设备和第二设备已经通过P2P网络传输业务的情况下进行,第一设备和第二设备均具有通过无线接入设备接入基础设施网络的能力,在本实施例中,第二设备通过与无线接入设备的连接接入基础设施网络。第一设备可以是连接在一个无线接入设备的,它能够知道自身已连接的无线接入设备的标识信息。
需要说明的是,在流程开始时,第二设备会向第一设备发送一个第一消息,该第一消息中包括第二设备在基础设施网络中的地址信息以及第二设备在基础设施网络中连接的无线接入设备的标识信息。
基础设施网络的一种网络结构为,具有无线接入设备,其他设备可以通过无线接入设备相互通信,这个无线接入设备可以称为基础设施,这种网络也可以称为基础设施网络,基础设施网络使用的协议可以是IEEE802.11协议。
基础设施网络的另一种网络结构为,设备间直接进行通信,这种网络结构就叫做点对点网络,即P2P网络,P2P网络是基于P2P协议建立起来的网络。
设备跟无线接入设备建立连接,即连接到基础设施网络,设备也可以跟其他设备建立P2P连接,即连接到P2P网络。
第二设备在基础设施网络中的地址信息可以是第二设备的MAC地址,也可以是第二设备的IP地址,还可以是第二设备的其他设备标识,如设备名称等,在实际应用中,也可以是MAC地址、或IP地址、或其他设备标识经过转化后的其他信息等,只要该地址信息能够利用来在基础设施网络中进行通信即可,具体此处不作限定。
第二设备在基础设施网络中连接的无线接入设备的标识信息可以为无线接入设备的MAC地址,在实际使用中,也可以是其他的标识信息,如无线接入设备的服务集标识(SSID,Service Set Identifier)等,此处不作限定。
无线接入设备可以是无线访问接入点AP,如无线路由器等,可以理解的是,在实际应用中,也可以是其他无线接入设备,如基站等,具体此处不作限定。
第一设备、第二设备可以是手机、平板电脑等移动终端,也可以是笔记本电脑等能够连接无线接入设备的设备,只要能够连接无线接入设备,能够连接
P2P网络即可,具体此处不作限定。
本发明各实施例中,P2P网络可以为Wi-Fi P2P网络(如Wi-Fi Direct网络,或者NAN网络),对应的基础设施网络为Wi-Fi基础设施网络,可以理解的是,基础设施网络也可以为其他类型基础设施网络,P2P网络也可以为其他类型的P2P网络,除了它们之间需要对应外,此处不作具体限定。
以Wi-Fi网络环境下为例,即基础设施网络为Wi-Fi基础设施网络,P2P网络为Wi-Fi P2P网络(如Wi-Fi Direct网络,或者NAN网络),在Wi-Fi的网络环境下,第一设备、第二设备均可以为支持Wi-Fi的终端设备,如第一设备可以为一个支持Wi-Fi的终端设备,比如支持Wi-Fi的手机;第二设备可以为一个支持Wi-Fi的终端设备,比如支持Wi-Fi的电视机。
在Wi-Fi的网络环境下,通过Wi-Fi P2P网络发送消息,是指第一设备和第二设备已经基于P2P协议建立起了Wi-Fi P2P通信,比如基于Wi-Fi Direct,协商出一个群主设备(GO,Group Owner),一个群成员设备(Client),群成员设备跟群主设备关联,协商密钥等,最终建立了Wi-Fi P2P连接,然后基于这个Wi-Fi P2P连接,一个设备给另一个设备发送消息;或者第一设备和第二设备都加入了NAN网络,基于NAN协议的机制进行通信,如收发NAN的同步信标帧、发现信标帧或服务发现帧等。
第二设备所发送的第一消息可以为Wi-Fi的帧,也可以是通过Wi-Fi携带的上层协议的数据包。第一消息中包括第二设备在基础设施网络中的地址信息以及第二设备在基础设施网络中连接的无线接入设备的标识信息,可以是通过帧的字段(Field)包括这些信息,也可以是帧的信息元素(IE,Information Element)包括这些信息,还可以是Wi-Fi携带的上层的数据包携带的,比如帧中有一个基础设施网络地址信息的字段或者信息元素,里面携带的是设备在基础设施网络中的地址信息,该地址信息可以是设备的MAC地址,比如帧中有一个无线接入设备标识信息的字段或者信息元素,该标识信息可以是无线接入设备的MAC地址,也可以是无线接入设备的服务集标识(SSID,Service Set Identifier),还可以是其他形式的标识,具体此处不作限定。
第一设备可以是连接在一个无线接入设备的,它能够知道自身已连接的无线接入设备的标识信息,比如该无线接入设备的MAC地址或SSID。
202、第一设备判断自身已连接的无线接入设备的标识信息与第二设备在基
础设施网络中连接的无线接入设备的标识信息是否匹配,若是,则执行步骤203,若否,则结束流程;
第一设备判断自身已连接的无线接入设备的标识信息与第二设备在基础设施网络中连接的无线接入设备的标识信息是否匹配,当确定上述两个标识信息相同时可以认为它们是匹配的,在实际的应用中,也可以确定两个标识信息中某一个特征信息相同即可认为它们是匹配的,只要能够通过标识信息确定它们指的是同一个无线接入设备,则认为它们是匹配的,具体此处不作限定。
第一设备接收到第二设备发送的第一消息后,根据这个第一消息中包括的无线接入设备的标识信息,可以判断自己所连接的无线接入设备的表示跟接收到的标识信息是否匹配,当第一设备确定自身已连接的无线接入设备的标识信息与所述第二设备在基础设施网络中连接的无线接入设备的标识信息匹配时,可确定第一设备自身已连接上述基础设施网络中的无线接入设备,即第一设备和第二设备在基础设施网络中连接的是同一个无线接入设备。匹配可以是指相同的情况。比如第一设备所连接的无线接入设备的MAC地址为12345678,它收到的消息中的标识信息也是12345678(假设已约定包括的是MAC地址),这个两个标识信息是相同的,这时候就是匹配的。也可以约定消息中包括的是SSID或其他标识信息。如果匹配,第一设备可以认为,它所连接的无线接入设备就是第二设备所连接的无线接入设备,第一设备与第二设备接入在同一个无线接入设备。
203、第一设备根据第二设备在基础设施网络中的地址信息,通过与第二设备连接的同一个无线接入设备与第二设备进行通信。
上述发送的信息中可以包括第一设备在基础设施网络中的地址信息,该地址信息可以是第一设备的MAC地址,也可以是第一设备的IP地址,还可以是第一设备的其他设备标识,如设备名称等;
第一设备通过所述与第二设备在基础网络中连接的同一个无线接入设备跟第二网络发送信息,双方可以用它们在基础设施网络中的地址。双方所用的它们在基础设施网络中的地址,可以是它们的MAC地址,也可以是它们的IP地址,还可以是它们的其他设备标识,如设备名称等。
当步骤202中第一设备确定自身已连接的无线接入设备的标识信息与上述第二设备在基础设施网络中连接的无线接入设备的标识信息匹配时,第一设备
即可以根据第二设备在基础设施网络中的地址信息,通过上述无线接入设备向第二设备发送信息,在某些实施例中,发送信息可以是第一设备根据第二设备在基础设施网络中的地址信息,通过基础设施网络中的无线接入设备向所述第二设备直接发送数据,例如,第一设备、第二设备在P2P网络中通信时,是第一设备向第二设备发送视频数据,此时,第一设备确定自身已连接的无线接入设备的标识信息与第二设备在基础设施网络中连接的无线接入设备的标识信息匹配时,可以根据第二设备在基础设施网络中的地址信息,通过自身已连接的无线接入设备向第二设备继续发送视频数据。
本实施例中,第一设备在与第二设备通过P2P网络进行通信时,可以接收第二设备通过P2P网络发送的消息,当第一设备确定自身已连接基础设施网络中的无线接入设备时,可以使用无线接入设备在基础设施网络中与第二设备进行通信,由于第一设备在使用P2P网络通信的过程中,可以使用基础设施网络进行通信,有效缓解了使用P2P网络时网络质量高低起伏变化的情况,保障了通信质量,用户体验佳。
二、当第一设备连接的无线接入设备与第二设备在基础设施网络中连接的无线接入设备为同一个无线接入设备时,具体为:
当第一设备确定自身已连接的无线接入设备的标识信息与第二设备在基础设施网络中连接的无线接入设备的标识信息不匹配后,第一设备接入第二设备在基础设施网络中连接的无线接入设备时。
请参阅图3,本发明实施例中通信方法的另一个实施例包括:
301、第一设备接收第二设备通过P2P网络发送的第一消息;
可以理解的是,本步骤在第一设备和第二设备已经通过P2P网络传输业务的情况下进行,第一设备和第二设备均具有通过无线接入设备接入基础设施网络的能力,在本实施例中,第二设备通过与无线接入设备的连接接入基础设施网络。第一设备可以是连接在一个无线接入设备的,它能够知道自身已连接的无线接入设备的标识信息。
需要说明的是,在流程开始时,第二设备会向第一设备发送一个第一消息,该第一消息中包括第二设备在基础设施网络中的地址信息以及第二设备在基础设施网络中连接的无线接入设备的标识信息。
基础设施网络的一种网络结构为,具有无线接入设备,其他设备可以通过
无线接入设备相互通信,这个无线接入设备可以称为基础设施,这种网络也可以称为基础设施网络,基础设施网络使用的协议可以是IEEE802.11协议。
基础设施网络的另一种网络结构为,设备间直接进行通信,这种网络结构就叫做点对点网络,即P2P网络,P2P网络是基于P2P协议建立起来的网络。
设备跟无线接入设备建立连接,即连接到基础设施网络,设备也可以跟其他设备建立P2P连接,即连接到P2P网络。
第二设备在基础设施网络中的地址信息可以是第二设备的MAC地址,在实际应用中,也可以是MAC地址经过转化后的其他信息等,只要该地址信息能够利用来在基础设施网络中进行通信即可,具体此处不作限定。
第二设备在基础设施网络中连接的无线接入设备的标识信息可以为无线接入设备的MAC地址,在实际使用中,也可以是其他的标识信息,如无线接入设备的服务集标识(SSID,Service Set Identifier)等,此处不作限定。
无线接入设备可以是无线访问接入点AP,如无线路由器等,可以理解的是,在实际应用中,也可以是其他无线接入设备,如基站等,具体此处不作限定。
第一设备、第二设备可以是手机、平板电脑等移动终端,也可以是笔记本电脑等能够连接无线接入设备的设备,只要能够连接无线接入设备,能够连接P2P网络即可,具体此处不作限定。
本实施例中,P2P网络可以为Wi-Fi P2P网络,对应的基础设施网络为Wi-Fi基础设施网络,可以理解的是,基础设施网络也可以为其他类型基础设施网络,P2P网络也可以为其他类型的P2P网络,除了它们之间需要对应外,此处不作具体限定。
以Wi-Fi网络环境下为例,即基础设施网络为Wi-Fi基础设施网络,P2P网络为Wi-Fi P2P网络,在Wi-Fi的网络环境下,第一设备、第二设备均可以为支持Wi-Fi的终端设备,如第一设备可以为一个支持Wi-Fi的终端设备,比如支持Wi-Fi的手机;第二设备可以为一个支持Wi-Fi的终端设备,比如支持Wi-Fi的电视机。
在Wi-Fi的网络环境下,通过Wi-Fi P2P网络发送消息,是指第一设备和第二设备已经基于P2P协议建立起了Wi-Fi P2P通信,比如基于Wi-Fi Direct,协商出一个群主设备(GO,Group Owner),一个群成员设备(Client),群成员设备跟群主设备关联,协商密钥等,最终建立了Wi-Fi P2P连接,然后基于这个
Wi-Fi P2P连接,一个设备给另一个设备发送消息;或者第一设备和第二设备都加入了NAN网络,基于NAN协议的机制进行通信,如收发NAN的同步信标帧、发现信标帧或服务发现帧等。
第二设备所发送的第一消息可以为Wi-Fi的帧,也可以是通过Wi-Fi携带的上层协议的数据包。第一消息中包括第二设备在基础设施网络中的地址信息以及第二设备在基础设施网络中连接的无线接入设备的标识信息,可以是通过帧的字段(Field)包括这些信息,也可以是帧的信息元素(IE,Information Element)包括这些信息,还可以是Wi-Fi携带的上层的数据包携带的,比如帧中有一个基础设施网络地址信息的字段或者信息元素,里面携带的是设备在基础设施网络中的地址信息,该地址信息可以是设备的MAC地址,比如帧中有一个无线接入设备标识信息的字段或者信息元素,该标识信息可以是无线接入设备的MAC地址,也可以是无线接入设备的服务集标识(SSID,Service Set Identifier),还可以是其他形式的标识,具体此处不作限定。
第一设备可以是连接在一个无线接入设备的,它能够知道自身已连接的无线接入设备的标识信息,比如该无线接入设备的MAC地址或SSID。
302、第一设备判断自身已连接的无线接入设备的标识信息与第二设备在基础设施网络中连接的无线接入设备的标识信息是否匹配,若是,则执行步骤304,若否,则执行步骤303;
第一设备判断自身已连接的无线接入设备的标识信息与第二设备在基础设施网络中连接的无线接入设备的标识信息是否匹配,当确定上述两个标识信息相同时可以认为它们是匹配的,在实际的应用中,也可以确定两个标识信息中某一个特征信息相同即可认为它们是匹配的,只要能够通过标识信息确定它们指的是同一个无线接入设备,则认为它们是匹配的,具体此处不作限定。
第一设备接收到第二设备发送的第一消息后,根据这个第一消息中包括的无线接入设备的标识信息,可以判断自己所连接的无线接入设备的表示跟接收到的标识信息是否匹配,当第一设备确定自身已连接的无线接入设备的标识信息与所述第二设备在基础设施网络中连接的无线接入设备的标识信息匹配时,可确定第一设备自身已连接上述基础设施网络中的无线接入设备,即第一设备和第二设备在基础设施网络中连接的是同一个无线接入设备。匹配可以是指相同的情况。比如第一设备所连接的无线接入设备的MAC地址为12345678,它
收到的消息中的标识信息也是12345678(假设已约定包括的是MAC地址),这个两个标识信息是相同的,这时候就是匹配的。也可以约定消息中包括的是SSID或其他标识信息。如果匹配,第一设备可以认为,它所连接的无线接入设备就是第二设备所连接的无线接入设备,第一设备和第二设备接入同一个无线接入设备,那么第一设备可以通过所述同一个无线接入设备与第二设备进行通信。
当第一设备判断自身已连接的无线接入设备的标识信息与第二设备在基础设施网络中连接的无线接入设备的标识信息不匹配时,则可以认为第一设备和第二设备接入的不是同一个无线接入设备。
303、第一设备接入第二设备在基础设施网络中连接的无线接入设备;
本实施例中,当第一设备判断自身已连接的无线接入设备的标识信息与第二设备在基础设施网络中连接的无线接入设备的标识信息不匹配时,则第一设备可以根据第二设备在基础设施网络中连接的无线接入设备的标识信息,接入第二设备在基础设施网络中连接的无线接入设备,此时,第一设备和第二设备存在有共同连接的同一个无线接入设备。
第一设备之前连接的无线接入设备,在第一设备接入第二设备在基础设施网络中的无线接入设备后,第一设备可以断开之前的连接,也可以保持多连接,此处不作限定。
304、第一设备根据第二设备在基础设施网络中的地址信息,通过与第二设备连接的同一个无线接入设备与第二设备进行通信。
上述发送的信息中可以包括第一设备在基础设施网络中的地址信息;
第一设备通过所述无线接入设备跟第二网络发送信息,双方可以用它们在基础设施网络中的地址。
当步骤302中第一设备确定自身已连接的无线接入设备的标识信息与上述第二设备在基础设施网络中连接的无线接入设备的标识信息匹配时,第一设备即可以根据第二设备在基础设施网络中的地址信息,通过上述无线接入设备向第二设备发送信息,在某些实施例中,发送信息可以是第一设备根据第二设备在基础设施网络中的地址信息,通过基础设施网络中的无线接入设备向所述第二设备直接发送数据,例如,第一设备、第二设备在P2P网络中通信时,是第一设备向第二设备发送视频数据,此时,第一设备确定自身已连接的无线接入设备的标识信息与第二设备在基础设施网络中连接的无线接入设备的标识信息
匹配时,可以根据第二设备在基础设施网络中的地址信息,通过自身已连接的无线接入设备向第二设备继续发送视频数据。
本实施例中,第一设备在与第二设备通过P2P网络进行通信时,可以接收第二设备通过P2P网络发送的消息,当第一设备确定自身已连接基础设施网络中的无线接入设备时,可以使用无线接入设备在基础设施网络中与第二设备进行通信,由于第一设备在使用P2P网络通信的过程中,可以使用基础设施网络进行通信,有效缓解了使用P2P网络时网络质量高低起伏变化的情况,保障了通信质量,用户体验佳。
其次,当第一设备确定自身已连接的无线接入设备的标识信息与第二设备在基础设施网络中连接的无线接入设备的标识信息不匹配后,第一设备接入第二设备在基础设施网络中连接的无线接入设备,仍然可以使第一设备和第二设备在基础设施网络中通信,保障了通信质量,提高了用户体验。
在图1至图3所示的实施例中,第一设备根据第二设备在基础设施网络中的地址信息,通过与第二设备连接的同一个无线接入设备与第二设备进行通信有多种实现方式,具体如下:
一、第一设备根据第二设备在基础设施网络中的地址信息,通过已连接的无线接入设备与所述第二设备进行通信可以包括:第一设备根据第二设备在基础设施网络中的地址信息,通过与第二设备连接的同一个无线接入设备向第二设备发送信息,该信息中包括第一设备在基础设施网络中的地址信息。
请参阅图4,本发明实施例中通信方法的另一个实施例包括:
401、第一设备接收第二设备通过P2P网络发送的第一消息;
可以理解的是,本步骤在第一设备和第二设备已经通过P2P网络传输业务的情况下进行,第一设备和第二设备均具有通过无线接入设备接入基础设施网络的能力,在本实施例中,第二设备通过与无线接入设备的连接接入基础设施网络;
需要说明的是,在流程开始时,第二设备会向第一设备发送一个第一消息,该第一消息中包括第二设备在基础设施网络中的地址信息以及第二设备在基础设施网络中连接的无线接入设备的标识信息;
第二设备在基础设施网络中的地址信息可以是第二设备的MAC地址,也可以是第二设备的IP地址,还可以是第二设备的其他设备标识,如设备名称等,
在实际应用中,也可以是MAC地址、IP地址或其他设备标识经过转化后的其他信息等,只要该地址信息能够利用来在基础设施网络中进行通信即可,具体此处不作限定。
第二设备在基础设施网络中连接的无线接入设备的标识信息可以为无线接入设备的MAC地址,在实际使用中,也可以是其他的标识信息,如无线接入设备的服务集标识(SSID,Service Set Identifier)等,此处不作限定。
无线接入设备可以是无线访问接入点AP,如无线路由器等,可以理解的是,在实际应用中,也可以是其他无线接入设备,如基站等,具体此处不作限定。
第一设备、第二设备可以是手机、平板电脑等移动终端,也可以是笔记本电脑等能够连接无线接入设备的设备,只要能够连接无线接入设备,能够连接P2P网络即可,具体此处不作限定。
本实施例中,P2P网络可以为Wi-Fi P2P网络,对应的基础设施网络为Wi-Fi基础设施网络,可以理解的是,基础设施网络也可以为其他类型基础设施网络,P2P网络也可以为其他类型的P2P网络,除了它们之间需要对应外,此处不作具体限定。
以Wi-Fi网络环境下为例,即基础设施网络为Wi-Fi基础设施网络,P2P网络为Wi-Fi P2P网络,在Wi-Fi的网络环境下,第一设备、第二设备均可以为支持Wi-Fi的终端设备,如第一设备可以为一个支持Wi-Fi的终端设备,比如支持Wi-Fi的手机;第二设备可以为一个支持Wi-Fi的终端设备,比如支持Wi-Fi的电视机。
在Wi-Fi的网络环境下,通过Wi-Fi P2P网络发送消息,是指第一设备和第二设备已经基于P2P协议建立起了Wi-Fi P2P通信,比如基于Wi-Fi Direct,协商出一个群主设备(GO,Group Owner),一个群成员设备(Client),群成员设备跟群主设备关联,协商密钥等,最终建立了Wi-Fi P2P连接,然后基于这个Wi-Fi P2P连接,一个设备给另一个设备发送消息;或者第一设备和第二设备都加入了NAN网络,基于NAN协议的机制进行通信,如收发NAN的同步信标帧、发现信标帧或服务发现帧等。
第二设备所发送的第一消息可以为Wi-Fi的帧,也可以是通过Wi-Fi携带的上层协议的数据包。第一消息中包括第二设备在基础设施网络中的地址信息以及第二设备在基础设施网络中连接的无线接入设备的标识信息,可以是通过帧
的字段(Field)包括这些信息,也可以是帧的信息元素(IE,Information Element)包括这些信息,还可以是Wi-Fi携带的上层的数据包携带的,比如帧中有一个基础设施网络地址信息的字段或者信息元素,里面携带的是设备在基础设施网络中的地址信息,该地址信息可以是设备的MAC地址,比如帧中有一个无线接入设备标识信息的字段或者信息元素,该标识信息可以是无线接入设备的MAC地址,也可以是无线接入设备的服务集标识(SSID,Service Set Identifier),还可以是其他形式的标识,具体此处不作限定。
第一设备可以是连接在一个无线接入设备的,它能够知道自身已连接的无线接入设备的标识信息,比如该无线接入设备的MAC地址或SSID。
402、第一设备判断自身已连接的无线接入设备的标识信息与第二设备在基础设施网络中连接的无线接入设备的标识信息是否匹配,若是,则执行步骤403,若否,则结束流程;
第一设备判断自身已连接的无线接入设备的标识信息与第二设备在基础设施网络中连接的无线接入设备的标识信息是否匹配,当确定上述两个标识信息相同时可以认为它们是匹配的,在实际的应用中,也可以确定两个标识信息中某一个特征信息相同即可认为它们是匹配的,只要能够通过标识信息确定它们指的是同一个无线接入设备,则认为它们是匹配的,具体此处不作限定。
第一设备接收到第二设备发送的第一消息后,根据这个第一消息中包括的无线接入设备的标识信息,可以判断自己所连接的无线接入设备的表示跟接收到的标识信息是否匹配,当第一设备确定自身已连接的无线接入设备的标识信息与所述第二设备在基础设施网络中连接的无线接入设备的标识信息匹配时,可确定第一设备自身已连接上述基础设施网络中的无线接入设备,即第一设备和第二设备在基础设施网络中连接的是同一个无线接入设备。匹配可以是指相同的情况。比如第一设备所连接的无线接入设备的MAC地址为12345678,它收到的消息中的标识信息也是12345678(假设已约定包括的是MAC地址),这个两个标识信息是相同的,这时候就是匹配的。也可以约定消息中包括的是SSID或其他标识信息。如果匹配,第一设备可以认为,它所连接的无线接入设备就是第二设备所连接的无线接入设备,那么第一设备可以通过与第二设备连接的同一个无线接入设备与第二设备进行通信。
需要说明的是,当第一设备判断自身已连接的无线接入设备的标识信息与
第二设备在基础设施网络中连接的无线接入设备的标识信息不匹配时,可选的,第一设备可以接入第二设备在基础设施网络中连接的无线接入设备,通过接入的同一个无线接入设备实现第一设备和第二设备在基础网络中的通信,此处不作限定。
403、第一设备根据第二设备在基础设施网络中的地址信息,通过与第二设备连接的同一个无线接入设备向第二设备发送信息。
上述发送的信息中可以包括第一设备在基础设施网络中的地址信息;
第一设备通过所述无线接入设备跟第二网络发送信息,双方可以用它们在基础设施网络中的地址。
当步骤402中第一设备确定自身已连接的无线接入设备的标识信息与第二设备在基础设施网络中连接的无线接入设备的标识信息匹配时,第一设备即可以根据第二设备在基础设施网络中的地址信息,通过上述无线接入设备向第二设备发送信息,在某些实施例中,发送信息可以是第一设备根据第二设备在基础设施网络中的地址信息,通过基础设施网络中的无线接入设备向所述第二设备直接发送数据,例如,第一设备、第二设备在P2P网络中通信时,是第一设备向第二设备发送视频数据,此时,第一设备确定自身已连接的无线接入设备的标识信息与第二设备在基础设施网络中连接的无线接入设备的标识信息匹配时,可以根据第二设备在基础设施网络中的地址信息,通过自身已连接的无线接入设备向第二设备继续发送视频数据。
二、在图4所示实施例的基础上,第一设备根据第二设备在基础设施网络中的地址信息,通过与第二设备连接的同一个无线接入设备与第二设备进行通信还包括:第一设备接收第二设备根据第一设备在基础设施网络中的地址信息,通过与第一设备连接的同一个无线接入设备发送的信息。
请参阅图5,本发明实施例中通信方法的另一个实施例包括:
501、第一设备接收第二设备通过P2P网络发送的第一消息;
可以理解的是,本步骤在第一设备和第二设备已经通过P2P网络传输业务的情况下进行,第一设备和第二设备均具有通过无线接入设备接入基础设施网络的能力,在本实施例中,第二设备通过与无线接入设备的连接接入基础设施网络;
需要说明的是,在流程开始时,第二设备会向第一设备发送一个第一消息,
该第一消息中包括第二设备在基础设施网络中的地址信息以及第二设备在所述基础设施网络中连接的无线接入设备的标识信息;
第二设备在基础设施网络中的地址信息可以是第二设备的MAC地址,在实际应用中,也可以是MAC地址经过转化后的其他信息,只要该地址信息能够利用来在基础设施网络中进行通信即可,具体此处不作限定。
第二设备在基础设施网络中连接的无线接入设备的标识信息可以为无线接入设备的MAC地址,在实际使用中,也可以是其他的标识信息,如无线接入设备的服务集标识(SSID,Service Set Identifier),此处不作限定。
无线接入设备可以是无线访问接入点AP,如无线路由器等,可以理解的是,在实际应用中,也可以是其他无线接入设备,如基站等,具体此处不作限定。
第一设备、第二设备可以是手机、平板电脑等移动终端,也可以是笔记本电脑等能够连接无线接入设备的设备,只要能够连接无线接入设备,能够连接P2P网络即可,具体此处不作限定。
本实施例中,P2P网络可以为Wi-Fi P2P网络,对应的基础设施网络为Wi-Fi基础设施网络,可以理解的是,基础设施网络也可以为其他类型基础设施网络,P2P网络也可以为其他类型的P2P网络,除了它们之间需要对应外,此处不作具体限定。
以Wi-Fi网络环境下为例,即基础设施网络为Wi-Fi基础设施网络,P2P网络为Wi-Fi P2P网络,在Wi-Fi的网络环境下,第一设备、第二设备均可以为支持Wi-Fi的终端设备,如第一设备可以为一个支持Wi-Fi的终端设备,比如支持Wi-Fi的手机;第二设备可以为一个支持Wi-Fi的终端设备,比如支持Wi-Fi的电视机。
在Wi-Fi的网络环境下,通过Wi-Fi P2P网络发送消息,是指第一设备和第二设备已经基于P2P协议建立起了Wi-Fi P2P通信,比如基于Wi-Fi Direct,协商出一个群主设备(GO,Group Owner),一个群成员设备(Client),群成员设备跟群主设备关联,协商密钥等,最终建立了Wi-Fi P2P连接,然后基于这个Wi-Fi P2P连接,一个设备给另一个设备发送消息;或者第一设备和第二设备都加入了NAN网络,基于NAN协议的机制进行通信,如收发NAN的同步信标帧、发现信标帧或服务发现帧等。
所发送的第一消息可以为Wi-Fi的帧,也可以是通过Wi-Fi携带的上层协议
的数据包。第一消息中包括第二设备在基础设施网络中的地址信息以及第二设备在基础设施网络中连接的无线接入设备的标识信息,可以是通过帧的字段(Field)包括这些信息,也可以是帧的信息元素(IE,Information Element)包括这些信息,还可以是Wi-Fi携带的上层的数据包携带的,比如帧中有一个基础设施网络地址信息的字段或者信息元素,里面携带的是设备在基础设施网络中的地址信息,该地址信息可以是设备的MAC地址,比如帧中有一个无线接入设备标识信息的字段或者信息元素,该标识信息可以是无线接入设备的MAC地址,也可以是无线接入设备的SSID,还可以是其他形式的标识,具体此处不作限定。
第一设备可以是连接在一个无线接入设备的,它能够知道这个无线接入设备的标识信息,比如它知道这个无线接入设备的MAC地址是什么,或者它知道这个无线接入设备的SSID是什么。
502、第一设备判断自身已连接的无线接入设备的标识信息与第二设备在基础设施网络中连接的无线接入设备的标识信息是否匹配,若是,则执行步骤503,若否,则结束流程;
第一设备判断自身已连接的无线接入设备的标识信息与第二设备在基础设施网络中连接的无线接入设备的标识信息是否匹配,当确定上述两个标识信息相同时可以认为它们是匹配的,在实际的应用中,也可以确定两个标识信息中某一个特征信息相同即可认为它们是匹配的,只要能够根据标识信息确定它们指的是同一个无线接入设备,则认为它们是匹配的,具体此处不作限定。
第一设备接收到第二设备发送的第一消息后,根据这个第一消息中包括的无线接入设备的标识信息,可以判断自己所连接的无线接入设备的表示跟接收到的标识信息是否匹配,当第一设备确定自身已连接的无线接入设备的标识信息与所述第二设备在基础设施网络中连接的无线接入设备的标识信息匹配时,可确定第一设备确定自身已连接上述基础设施网络中的无线接入设备,即第一设备和第二设备在基础设施网络中连接的是同一个无线接入设备。匹配可以是指相同的情况。比如第一设备所连接的无线接入设备的MAC地址为12345678,它收到的消息中的标识信息也是12345678(假设已约定包括的是MAC地址),这个两个标识信息是相同的,这时候就是匹配的。也可以约定消息中包括的是SSID或其他标识信息。如果匹配,第一设备可以认为,它所连接的无线接入设备就是第二设备所连接的无线接入设备,那么第一设备可以通过与第二设备连
接的同一个无线接入设备与第二设备进行通信。
需要说明的是,当第一设备判断自身已连接的无线接入设备的标识信息与所述第二设备在基础设施网络中连接的无线接入设备的标识信息不匹配时,可以如图5中所示结束流程,可选的,也可以不结束流程,如:第一设备可以接入第二设备在基础设施网络中连接的无线接入设备,通过接入的同一个无线接入设备实现第一设备和第二设备在基础网络中的通信,此处不作限定。
503、第一设备根据第二设备在基础设施网络中的地址信息,通过与第二设备连接的同一个无线接入设备向第二设备发送信息;
当步骤502中第一设备确定自身已连接的无线接入设备的标识信息与上述无线接入设备的标识信息匹配时,第一设备即可以根据上述第二设备在基础设施网络中的地址信息,通过上述无线接入设备向第二设备发送信息,该发送的信息中包括第一设备在基础设施网络中的地址信息。
504、第一设备接收第二设备根据第一设备在基础设施网络中的地址信息,通过与第一设备连接的同一个无线接入设备发送的信息。
由于步骤503中发送的信息中包括第一设备在基础设施网络中的地址信息,因此,第二设备可以根据第一设备在基础设施网络中的地址信息,通过已连接的无线接入设备发送信息,此时,第一设备可以接收第二设备根据第一设备在基础设施网络中的地址信息,通过与第一设备连接的同一个无线接入设备发送的信息,此信息可以是第二设备发送给第一设备的数据。
三、当第一设备确定自身已连接的无线接入设备的标识信息与无线接入设备的标识信息匹配后,第一设备根据所述地址信息,通过与第二设备连接的同一个无线接入设备与第二设备进行通信之前,还包括如下步骤:
第一设备通过P2P网络或基础设施网络向第二设备发送第二消息,第二消息中包括第一设备在基础设施网络中的地址信息;
此时,第一设备根据第二设备在基础设施网络中的地址信息,通过无线接入设备与第二设备进行通信可以包括:第一设备根据第二设备在基础设施网络中的地址信息,通过无线接入设备向第二设备发送信息和/或第一设备接收第二设备根据第一设备在基础设施网络中的地址信息通过无线接入设备发送的信息。
请参阅图6,本发明实施例中通信方法的另一个实施例包括:
601、第一设备接收第二设备通过P2P网络发送的第一消息;
可以理解的是,本步骤在第一设备和第二设备已经通过P2P网络传输业务的情况下进行,第一设备和第二设备均具有通过无线接入设备接入基础设施网络的能力,在本实施例中,第二设备通过与无线接入设备的连接接入基础设施网络;
需要说明的是,在流程开始时,第二设备会向第一设备发送一个第一消息,该第一消息中包括第二设备在基础设施网络中的地址信息以及第二设备在所述基础设施网络中连接的无线接入设备的标识信息;
第二设备在基础设施网络中的地址信息可以是第二设备的MAC地址,在实际应用中,也可以是MAC地址经过转化后的其他信息,只要该地址信息能够利用来在基础设施网络中进行通信即可,具体此处不作限定。
第二设备在基础设施网络中连接的无线接入设备的标识信息可以为无线接入设备的MAC地址,在实际使用中,也可以是其他的标识信息,如无线接入设备的服务集标识(SSID,Service Set Identifier),此处不作限定。
无线接入设备可以是无线访问接入点AP,如无线路由器等,可以理解的是,在实际应用中,也可以是其他无线接入设备,如基站等,具体此处不作限定。
第一设备、第二设备可以是手机、平板电脑等移动终端,也可以是笔记本电脑等能够连接无线接入设备的设备,只要能够连接无线接入设备,能够连接P2P网络即可,具体此处不作限定。
本实施例中,P2P网络可以为Wi-Fi P2P网络,对应的基础设施网络为Wi-Fi基础设施网络,可以理解的是,基础设施网络也可以为其他类型基础设施网络,P2P网络也可以为其他类型的P2P网络,除了它们之间需要对应外,此处不作具体限定。
以Wi-Fi网络环境下为例,即基础设施网络为Wi-Fi基础设施网络,P2P网络为Wi-Fi P2P网络,在Wi-Fi的网络环境下,第一设备、第二设备均可以为支持Wi-Fi的终端设备,如第一设备可以为一个支持Wi-Fi的终端设备,比如支持Wi-Fi的手机;第二设备可以为一个支持Wi-Fi的终端设备,比如支持Wi-Fi的电视机。
在Wi-Fi的网络环境下,通过Wi-Fi P2P网络发送消息,是指第一设备和第二设备已经基于P2P协议建立起了Wi-Fi P2P通信,比如基于Wi-Fi Direct,协商出一个群主设备(GO,Group Owner),一个群成员设备(Client),群成员设
备跟群主设备关联,协商密钥等,最终建立了Wi-Fi P2P连接,然后基于这个Wi-Fi P2P连接,一个设备给另一个设备发送消息;或者第一设备和第二设备都加入了NAN网络,基于NAN协议的机制进行通信,如收发NAN的同步信标帧、发现信标帧或服务发现帧等。
第二设备所发送的第一消息可以为Wi-Fi的帧,也可以是通过Wi-Fi携带的上层协议的数据包。第一消息中包括第二设备在基础设施网络中的地址信息以及第二设备在基础设施网络中连接的无线接入设备的标识信息,可以是通过帧的字段(Field)包括这些信息,也可以是帧的信息元素(IE,Information Element)包括这些信息,还可以是Wi-Fi携带的上层的数据包携带的,比如帧中有一个基础设施网络地址信息的字段或者信息元素,里面携带的是设备在基础设施网络中的地址信息,该地址信息可以是设备的MAC地址,比如帧中有一个无线接入设备标识信息的字段或者信息元素,该标识信息可以是无线接入设备的MAC地址,也可以是无线接入设备的SSID,还可以是其他形式的标识,具体此处不作限定。
第一设备可以是连接在一个无线接入设备的,它能够知道这个无线接入设备的标识信息,比如它知道这个无线接入设备的MAC地址是什么,或者它知道这个无线接入设备的SSID是什么。
602、第一设备判断自身已连接的无线接入设备的标识信息与第二设备在基础设施网络中连接的无线接入设备的标识信息是否匹配,若是,则执行步骤603,若否,则结束流程;
第一设备判断自身已连接的无线接入设备的标识信息与第二设备在基础设施网络中连接的无线接入设备的标识信息是否匹配,当确定上述两个标识信息相同时可以认为它们是匹配的,在实际的应用中,也可以确定两个标识信息中某一个特征信息相同即可认为它们是匹配的,只要能够标识信息能够确定它们指的是同一个无线接入设备,则认为它们是匹配的,具体此处不作限定。
第一设备接收到第二设备发送的第一消息后,根据这个第一消息中包括的无线接入设备的标识信息,可以判断自己所连接的无线接入设备的表示跟接收到的标识信息是否匹配,当第一设备确定自身已连接的无线接入设备的标识信息与所述无线接入设备的标识信息匹配时,可确定第一设备确定自身已连接上述基础设施网络中的无线接入设备,即第一设备和第二设备在基础设施网络中
连接的是一个无线接入设备。匹配可以是指相同的情况,比如第一设备所连接的无线接入设备的MAC地址为12345678,它收到的消息中的标识信息也是12345678(假设已约定包括的是MAC地址),这个两个标识信息是相同的,这时候就是匹配的。也可以约定消息中包括的是SSID或其他标识信息,如果匹配,第一设备可以认为,它所连接的无线接入设备就是第二设备所连接的无线接入设备,那么第一设备可以通过与第二设备连接的同一个无线接入设备与第二设备进行通信。
需要说明的是,当第一设备判断自身已连接的无线接入设备的标识信息与所述第二设备在基础设施网络中连接的无线接入设备的标识信息不匹配时,可选的,第一设备可以接入第二设备在基础设施网络中连接的无线接入设备,通过接入的同一个无线接入设备实现第一设备和第二设备在基础网络中的通信,此处不作限定。
603、第一设备通过P2P网络或基础设施网络向第二设备发送第二消息;
可以理解的是,本步骤中,第一设备向第二设备发送第二消息可以通过P2P网络或基础设施网络发送,当通过P2P网络发送第二消息时,可以通过原先进行P2P网络进行通信的渠道发送,当通过基础设施网络发送第二消息时,可以根据第二设备在基础设施网络中的地址信息,通过上述确定的无线接入设备发送,第二消息中包括第一设备在基础设施网络中的地址信息。
604、第一设备根据第二设备在基础设施网络中的地址信息,通过与第二设备连接的同一个无线接入设备向第二设备发送信息;
605、第一设备接收第二设备根据第一设备在基础设施网络中的地址信息通过与第一设备连接的同一个无线接入设备发送的信息。
第二设备可以根据第一设备在基础设施网络中的地址信息通过与第一设备连接的同一个无线接入设备向第一设备发送信息,此时作为接收方,第一设备接收第二设备根据第一设备在基础设施网络中的地址信息通过无线接入设备发送的信息。
需要说明的是,本实施例中,步骤604中描述的“第一设备根据第二设备在所述基础设施网络中的地址信息,通过无线接入设备向第二设备发送信息”与步骤605中描述的“第一设备接收第二设备根据第一设备在基础设施网络中的地址信息通过无线接入设备发送的信息”,可以理解的是,在实际应用中,步
骤604中描述的内容与步骤605中描述的内容,在一些实施例中,可以只有其中一个步骤描述的内容发生,在另外一些实施例中,两个步骤中描述的内容都发生了,但是其发生的先后顺序与本实施例中也会不同,因此,此处不作具体限定。
图4到图6所示的实施例中,具体描述了第一设备根据第二设备在基础设施网络中的地址信息,通过已连接的无线接入设备与第二设备进行通信的多种实现方式,可以理解的是,在实际应用中,还可以有其他实现方式,此处不作具体限定。
图4到图6所示的实施例描述了第一设备根据第二设备在基础设施网络中的地址信息,通过已连接的无线接入设备与第二设备进行通信的具体实现方式,使实现方式更加灵活。
在实际应用中,在图1至图6所示实施例的基础上,可以在第一设备根据第二设备在基础设施网络中的地址信息,通过已连接的无线接入设备与第二设备进行通信之前,对第一设备和第二设备进行一下认证,此时第一设备接收第二设备通过P2P网络发送的第一消息中还可以包括一认证数据,该认证数据用于第一设备与第二设备之间的认证。认证的作用,是为了让第一设备和第二设备在基础设施网络中通信时,确定通信的对方就是它们在P2P网络中通信的对方,这样可以避免可能存在的安全问题,提高安全性。
具体认证过程,可以是如下方式:
1、第一消息中还包括第一认证数据;这个第一认证数据便成为第一设备和第二设备都知道的一个共享信息,它们在基础设施网络中确定对方确实持有这个共享信息,便可认证对方就是在P2P网络中通信的对方。
当第一设备确定自身已连接的无线接入设备的标识信息与无线接入设备的标识信息匹配后,在第一设备根据第二设备在基础设施网络中的地址信息,通过无线接入设备向第二设备发送信息之前:
具体可以为,第一设备通过无线接入设备向第二设备发送第一认证执行数据,第一认证执行数据是第一设备根据第一认证数据加工后的数据,第二设备根据所述第一认证数据和第一认证执行数据对第一设备进行认证,即判断接收到的第一认证执行数据与第一认证数据是否匹配,在匹配时即认证成功,即认证第一设备确实就是第二设备在P2P网络中通信的对方设备;或者,反过来也
一样,第二设备通过无线接入设备向第一设备发送第二认证执行数据,第二认证执行数据是第二设备根据第一认证数据加工后的数据,第一设备根据所述第一认证数据和第二认证执行数据对第二设备进行认证,即判断接收到的第二认证执行数据与第一认证数据是否匹配,在匹配时,即认证成功,即认证第二设备确实就是第一设备在P2P网络中通信的对方设备。例如:当第一设备为STA1,第二设备为STA2,无线接入设备为AP时,STA1在P2P网络中收到STA2发送的PreShareInfo1,STA1在通过AP向STA2发送PreShareInfo1加工后的信息(即PreShareInfo11),STA2可根据PreShareInfo1和PreShareInfo11是否匹配来认证STA1,或者,反过来也一样,STA2通过AP向STA1发送PreShareInfo1加工后的信息(即PreShareInfo12),STA1可根据PreShareInfo1和PreShareInfo12是否匹配来认证STA2。
2、第一消息中还包括第二认证数据;
当第一设备确定自身已连接的无线接入设备的标识信息与无线接入设备的标识信息匹配后,在第一设备根据第二设备在基础设施网络中的地址信息,通过无线接入设备向第二设备发送信息之前:
第一设备通过P2P网络或者通过无线接入设备向第二设备发送第三认证数据,这个第二认证数据和第三认证数据便成为第一设备和第二设备都知道的共享信息,它们在基础设施网络中确定对方确实持有这个共享信息,便可认证对方就是在P2P网络中通信的对方。具体可以为,第一设备通过无线接入设备向第二设备发送第三认证执行数据,该第三认证执行数据是根据共享的第二认证数据和第三认证数据(即共享信息)加工后的数据,第二设备即可根据第三认证执行数据和共享的第二认证数据、第三认证数据对第一设备进行认证,即判断接收到的第三认证执行数据与共享的第二认证数据、第三认证数据是否匹配,在匹配时即认证成功;或者,反过来也一样,第二设备通过无线接入设备向第一设备发送第四认证执行数据,该第四认证执行数据是根据共享的第二认证数据和第三认证数据(即共享信息)加工后的数据,第一设备即可根据第四认证执行数据和共享的第二认证数据、第三认证数据对第二设备进行认证,即判断接收到的第四认证执行数据与共享的第二认证数据、第三认证数据是否匹配,在匹配时即认证成功。例如:当第一设备为STA1,第二设备为STA2,无线接入设备为AP时,STA1在P2P网络中收到STA2发送的PreShareInfo1后,STA1
可以通过P2P网络或者通过AP向STA2发送PreShareInfo2,然后STA1再通过AP向STA2发送PreShareInfo1+PreShareInfo2加工后的信息(即PreShareInfo11),STA2由此可根据PreShareInfo11与PreShareInfo1+PreShareInfo2是否匹配来认证STA1的,或者,反过来也一样,STA2通过AP向STA1发送PreShareInfo1+PreShareInfo2加工后的信息(即PreShareInfo12),STA1由此可根据PreShareInfo12与PreShareInfo1+PreShareInfo2是否匹配来认证STA2的。
上面几个例子中所述的把共享信息加工成认证执行数据的加工方法,是第一设备和第二设备都知道的一个算法,该算法可以在通信协议中进行规定。上面几个例子中所述的判断认证数据之间是否匹配的判断方法,也是第一设备和第二设备都知道的一个算法,该算法可以在通信协议中进行规定。判断是否匹配,可以是把自己持有的共享认证数据进行共知的加工成认证执行数据的方法进行加工,看加工后的数据跟接收到的认证执行数据是否相同,若相同,则认证成功。如第二设备把自己持有的共享信息即第一认证数据加工成一个数据(假设为数据A),接收到第一设备发送的第一认证执行数据后,把自己加工得到的数据A跟接收到的第一认证执行数据进行比较,若相同,则认证成功。
需要说明的是,仅以上述几种认证方法为例介绍在当第一设备确定自身已连接的无线接入设备的标识信息与无线接入设备的标识信息匹配后,在第一设备根据第二设备在基础设施网络中的地址信息,通过无线接入设备向第二设备发送信息之前,第一设备和第二设备之间的认证过程,在实际应用过程中,也可能是其他认证过程,此处不作具体限定。
下面从另一侧来描述通信方法,请参阅图7,本发明实施例中通信方法的另一个实施例包括:
701、第二设备通过P2P网络向第一设备发送第一消息;
需要说明的是,该第一消息中包括第二设备在基础设施网络中的地址信息以及第二设备在基础设施网络中连接的无线接入设备的标识信息;
可以理解的是,本步骤在第一设备和第二设备已经通过P2P网络传输业务的情况下进行,第一设备和第二设备均具有通过无线接入设备接入基础设施网络的能力,在本实施例中,第二设备通过与无线接入设备的连接接入基础设施网络;
基础设施网络的一种网络结构为,具有无线接入设备,其他设备可以通过
无线接入设备相互通信,这个无线接入设备可以称为基础设施,这种网络也可以称为基础设施网络,基础设施网络使用的协议可以是IEEE802.11协议。
基础设施网络的另一种网络结构为,设备间直接进行通信,这种网络结构就叫做点对点网络,即P2P网络,P2P网络是基于P2P协议建立起来的网络。
设备可以跟无线接入设备建立连接,即连接到基础设施网络,设备也可以跟其他设备建立P2P连接,即连接到P2P网络。
第一设备可以判断自身已连接的无线接入设备的标识信息与第二设备在基础设施网络中连接的无线接入设备的标识信息是否匹配,当所述第二设备确定自身已连接的无线接入设备的标识信息与所述无线接入设备的标识信息匹配时,可确定第二设备确定自身已连接上述基础设施网络中的无线接入设备,即第二设备和第一设备在基础设施网络中连接的是一个无线接入设备,此时第一设备即可根据第二设备在基础设施网络中的地址信息,通过已连接的无线接入设备与第二设备进行通信。
702、当第一设备连接的无线接入设备与第二设备在基础设施网络中连接的无线接入设备为同一个无线接入设备时,第二设备通过所述同一个无线接入设备与第一设备进行通信。
当第一设备连接的无线接入设备与第二设备在基础设施网络中连接的无线接入设备为同一个无线接入设备时,第一设备通过该无线接入设备与第二设备进行通信,换个方向,即第二设备与第一设备进行通信。
本实施例中,第二设备在与第一设备通过P2P网络进行通信时,可以通过P2P网络向第一设备发送消息,当第一设备连接的无线接入设备与第二设备在基础设施网络中连接的无线接入设备为同一个无线接入设备时,可以使用所连接的同一个无线接入设备在基础设施网络中与第二设备进行通信,由于第二设备在使用P2P网络通信的过程中,可以使用基础设施网络进行通信,有效缓解了使用P2P网络时网络质量高低起伏变化的情况,保障了通信质量,用户体验佳。
图7所示的实施例中,第二设备通过在基础设施网络中连接的无线接入设备与第一设备进行通信有多种实现方式,具体可以如下:
一、第二设备通过在基础设施网络中连接的无线接入设备与第一设备进行通信可以包括:第二设备接收第二设备发送的信息,该信息中包括第一设备在基础设施网络中的地址信息。
请参阅图8,本发明实施例中通信方法的另一个实施例包括:
801、第二设备通过P2P网络向第一设备发送第一消息;
需要说明的是,该第一消息中包括第二设备在基础设施网络中的地址信息以及第二设备在基础设施网络中连接的无线接入设备的标识信息;
可以理解的是,本步骤在第二设备和第一设备已经通过P2P网络传输业务的情况下进行,第二设备和第一设备均具有通过无线接入设备接入基础设施网络的能力,在本实施例中,第一设备通过与无线接入设备的连接接入基础设施网络;
第一设备可以判断自身已连接的无线接入设备的标识信息与第二设备在基础设施网络中连接的无线接入设备的标识信息是否匹配,当所述第一设备确定自身已连接的无线接入设备的标识信息与所述无线接入设备的标识信息匹配时,第一设备即可根据第二设备在基础设施网络中的地址信息,通过已连接的无线接入设备与第二设备进行通信。
第一设备在基础设施网络中的地址信息可以是第一设备的MAC地址,在实际应用中,也可以是MAC地址经过转化后的其他信息,只要该地址信息能够利用来在基础设施网络中进行通信即可,具体此处不作限定。
第一设备在基础设施网络中连接的无线接入设备的标识信息可以为无线接入设备的MAC地址,在实际使用中,也可以是其他的标识信息,如无线接入设备的服务集标识(SSID,Service Set Identifier),此处不作限定。
无线接入设备可以是无线访问接入点AP,如无线路由器等,可以理解的是,在实际应用中,也可以是其他无线接入设备,如基站等,具体此处不作限定。
第二设备、第一设备可以是手机、平板电脑等移动终端,也可以是笔记本电脑、电视等能够连接无线接入设备的设备,只要能够连接无线接入设备,能够连接P2P网络即可,具体此处不作限定。
第一设备可以是连接在一个无线接入设备的,它能够知道这个无线接入设备的标识信息,比如它知道这个无线接入设备的MAC地址是什么,或者它知道这个无线接入设备的SSID是什么。
本实施例中,P2P网络可以为Wi-Fi P2P网络,对应的基础设施网络为Wi-Fi基础设施网络,可以理解的是,基础设施网络也可以为其他类型基础设施网络,P2P网络也可以为其他类型的P2P网络,除了它们之间需要对应外,此处不作
具体限定。
以Wi-Fi网络环境下为例,即基础设施网络为Wi-Fi基础设施网络,P2P网络为Wi-Fi P2P网络,在Wi-Fi的网络环境下,第一设备、第二设备均可以为支持Wi-Fi的终端设备,如第一设备可以为一个支持Wi-Fi的终端设备,比如支持Wi-Fi的手机;第二设备可以为一个支持Wi-Fi的终端设备,比如支持Wi-Fi的电视机。
在Wi-Fi的网络环境下,通过Wi-Fi P2P网络发送消息,是指第一设备和二设备已经基于P2P协议建立起了Wi-Fi P2P通信,比如基于Wi-Fi Direct,协商出一个群主设备(GO,Group Owner),一个群成员设备(Client),群成员设备跟群主设备关联,协商密钥等,最终建立了Wi-Fi P2P连接,然后基于这个Wi-Fi P2P连接,一个设备给另一个设备发送消息;或者第一设备和第二设备都加入了NAN网络,基于NAN协议的机制进行通信,如收发NAN的同步信标帧、发现信标帧或服务发现帧等。
第二设备所发送的第一消息可以为Wi-Fi的帧,也可以是通过Wi-Fi携带的上层协议的数据包。第一消息中包括第二设备在基础设施网络中的地址信息以及第二设备在基础设施网络中连接的无线接入设备的标识信息,可以是通过帧的字段(Field)包括这些信息,也可以是帧的信息元素(IE,Information Element)包括这些信息,还可以是Wi-Fi携带的上层的数据包携带的,比如帧中有一个基础设施网络地址信息的字段或者信息元素,里面携带的是设备在基础设施网络中的地址信息,该地址信息可以是设备的MAC地址,比如帧中有一个无线接入设备标识信息的字段或者信息元素,该标识信息可以是无线接入设备的MAC地址,也可以是无线接入设备的SSID,还可以是其他形式的标识,具体此处不作限定。
802、第二设备接收第一设备通过所述同一个无线接入设备发送的信息。
需要说明的是,第二设备接收第一设备通过在所述同一个无线接入设备发送的信息中包括第一设备在基础设施网络中的地址信息;
第二设备与第一设备进行通信,换个方向,即第一设备与第一网络进行通信。
二、在图8所示实施例的基础上,第二设备通过在基础设施网络中连接的无线接入设备与第一设备进行通信还可以包括:第二设备根据第一设备在基础
设施网络中的地址信息,通过所述同一个无线接入设备向第一设备发送信息。
请参阅图9,本发明实施例中通信方法的另一个实施例包括:
901、第二设备通过P2P网络向第一设备发送第一消息;
需要说明的是,该第一消息中包括第二设备在基础设施网络中的地址信息以及第二设备在基础设施网络中连接的无线接入设备的标识信息;
可以理解的是,本步骤在第二设备和第一设备已经通过P2P网络传输业务的情况下进行,第二设备和第一设备均具有通过无线接入设备接入基础设施网络的能力,在本实施例中,第一设备通过与无线接入设备的连接接入基础设施网络;
第一设备可以判断自身已连接的无线接入设备的标识信息与第二设备在基础设施网络中连接的无线接入设备的标识信息是否匹配,当所述第一设备确定自身已连接的无线接入设备的标识信息与所述无线接入设备的标识信息匹配时,第一设备即可根据第二设备在基础设施网络中的地址信息,通过已连接的无线接入设备与第二设备进行通信。
第一设备在基础设施网络中的地址信息可以是第一设备的MAC地址,在实际应用中,也可以是MAC地址经过转化后的其他信息,只要该地址信息能够利用来在基础设施网络中进行通信即可,具体此处不作限定。
第一设备在基础设施网络中连接的无线接入设备的标识信息可以为无线接入设备的MAC地址,在实际使用中,也可以是其他的标识信息,如无线接入设备的服务集标识(SSID,Service Set Identifier),此处不作限定。
无线接入设备可以是无线访问接入点AP,如无线路由器等,可以理解的是,在实际应用中,也可以是其他无线接入设备,如基站等,具体此处不作限定。
第二设备、第一设备可以是手机、平板电脑等移动终端,也可以是笔记本电脑等能够连接无线接入设备的设备,只要能够连接无线接入设备,能够连接P2P网络即可,具体此处不作限定。
第一设备可以是连接在一个无线接入设备的,它能够知道这个无线接入设备的标识信息,比如它知道这个无线接入设备的MAC地址是什么,或者它知道这个无线接入设备的SSID是什么。
本实施例中,P2P网络可以为Wi-Fi P2P网络,对应的基础设施网络为Wi-Fi基础设施网络,可以理解的是,基础设施网络也可以为其他类型基础设施网络,
P2P网络也可以为其他类型的P2P网络,除了它们之间需要对应外,此处不作具体限定。
以Wi-Fi网络环境下为例,即基础设施网络为Wi-Fi基础设施网络,P2P网络为Wi-Fi P2P网络,在Wi-Fi的网络环境下,第一设备、第二设备均可以为支持Wi-Fi的终端设备,如第一设备可以为一个支持Wi-Fi的终端设备,比如支持Wi-Fi的手机;第二设备可以为一个支持Wi-Fi的终端设备,比如支持Wi-Fi的电视机。
在Wi-Fi的网络环境下,通过Wi-Fi P2P网络发送消息,是指第一设备和二设备已经基于P2P协议建立起了Wi-Fi P2P通信,比如基于Wi-Fi Direct,协商出一个群主设备(GO,Group Owner),一个群成员设备(Client),群成员设备跟群主设备关联,协商密钥等,最终建立了Wi-Fi P2P连接,然后基于这个Wi-Fi P2P连接,一个设备给另一个设备发送消息;或者第一设备和第二设备都加入了NAN网络,基于NAN协议的机制进行通信,如收发NAN的同步信标帧、发现信标帧或服务发现帧等。
上述第二设备所发送的第一消息可以为Wi-Fi的帧,也可以是通过Wi-Fi携带的上层协议的数据包。第一消息中包括第二设备在基础设施网络中的地址信息以及第二设备在基础设施网络中连接的无线接入设备的标识信息,可以是通过帧的字段(Field)包括这些信息,也可以是帧的信息元素(IE,Information Element)包括这些信息,还可以是Wi-Fi携带的上层的数据包携带的,比如帧中有一个基础设施网络地址信息的字段或者信息元素,里面携带的是设备在基础设施网络中的地址信息,该地址信息可以是设备的MAC地址,比如帧中有一个无线接入设备标识信息的字段或者信息元素,该标识信息可以是无线接入设备的MAC地址,也可以是无线接入设备的SSID,还可以是其他形式的标识,具体此处不作限定。
902、第二设备接收第一设备通过所述同一个无线接入设备发送的信息;
需要说明的是,第二设备接收第一设备通过所述同一个无线接入设备发送的信息中包括第一设备在基础设施网络中的地址信息;
第二设备与第一设备进行通信,换个方向,即第一设备与第一网络进行通信。
903、第二设备根据第一设备在基础设施网络中的地址信息,通过所述同一
个无线接入设备向第一设备发送信息。
由于步骤902中发送的信息中包括第一设备在基础设施网络中的地址信息,因此,第二设备可以根据第一设备在基础设施网络中的地址信息,通过已连接的无线接入设备发送信息,此信息可以是第一设备发送给第二设备的数据。
三、当第二设备通过在所述同一个无线接入设备与所述第一设备进行通信之前还包括下述步骤时:第二设备接收第一设备通过P2P网络或基础设施网络发送的第二消息,第二消息中包括第一设备在基础设施网络中的地址信息;
此时,第二设备通过所述同一个无线接入设备与第一设备进行通信可以包括,第二设备根据第一设备在基础设施网络中的地址信息,通过所述同一个无线接入设备向第一设备发送信息,和/或第二设备接收第一设备根据第二设备在基础设施网络中的地址信息通过所述同一个无线接入设备发送的信息。
请参阅图10,本发明实施例中通信方法的另一个实施例包括:
1001、第二设备通过P2P网络向第一设备发送第一消息;
需要说明的是,该第一消息中包括第二设备在基础设施网络中的地址信息以及第二设备在基础设施网络中连接的无线接入设备的标识信息;
可以理解的是,本步骤在第二设备和第一设备已经通过P2P网络传输业务的情况下进行,第二设备和第一设备均具有通过无线接入设备接入基础设施网络的能力,在本实施例中,第一设备通过与无线接入设备的连接接入基础设施网络;
第一设备可以判断自身已连接的无线接入设备的标识信息与第二设备在基础设施网络中连接的无线接入设备的标识信息是否匹配,当所述第一设备确定自身已连接的无线接入设备的标识信息与所述无线接入设备的标识信息匹配时,第一设备即可根据第二设备在基础设施网络中的地址信息,通过已连接的无线接入设备向第二设备进行发送消息。
第一设备在基础设施网络中的地址信息可以是第一设备的MAC地址,在实际应用中,也可以是MAC地址经过转化后的其他信息,只要该地址信息能够利用来在基础设施网络中进行通信即可,具体此处不作限定。
第一设备在基础设施网络中连接的无线接入设备的标识信息可以为无线接入设备的MAC地址,在实际使用中,也可以是其他的标识信息,如无线接入设备的服务集标识(SSID,Service Set Identifier),此处不作限定。
无线接入设备可以是无线访问接入点AP,如无线路由器等,可以理解的是,在实际应用中,也可以是其他无线接入设备,如基站等,具体此处不作限定。
第二设备、第一设备可以是手机、平板电脑等移动终端,也可以是笔记本电脑等能够连接无线接入设备的设备,只要能够连接无线接入设备,能够连接P2P网络即可,具体此处不作限定。
第一设备可以是连接在一个无线接入设备的,它能够知道这个无线接入设备的标识信息,比如它知道这个无线接入设备的MAC地址是什么,或者它知道这个无线接入设备的SSID是什么。
本实施例中,P2P网络可以为Wi-Fi P2P网络,对应的基础设施网络为Wi-Fi基础设施网络,可以理解的是,基础设施网络也可以为其他类型基础设施网络,P2P网络也可以为其他类型的P2P网络,除了它们之间需要对应外,此处不作具体限定。
以Wi-Fi网络环境下为例,即基础设施网络为Wi-Fi基础设施网络,P2P网络为Wi-Fi P2P网络,在Wi-Fi的网络环境下,第一设备、第二设备均可以为支持Wi-Fi的终端设备,如第一设备可以为一个支持Wi-Fi的终端设备,比如支持Wi-Fi的手机;第二设备可以为一个支持Wi-Fi的终端设备,比如支持Wi-Fi的电视机。
在Wi-Fi的网络环境下,通过Wi-Fi P2P网络发送消息,是指第一设备和二设备已经基于P2P协议建立起了Wi-Fi P2P通信,比如基于Wi-Fi Direct,协商出一个群主设备(GO,Group Owner),一个群成员设备(Client),群成员设备跟群主设备关联,协商密钥等,最终建立了Wi-Fi P2P连接,然后基于这个Wi-Fi P2P连接,一个设备给另一个设备发送消息;或者第一设备和第二设备都加入了NAN网络,基于NAN协议的机制进行通信,如收发NAN的同步信标帧、发现信标帧或服务发现帧等。
上述第二设备所发送的第一消息可以为Wi-Fi的帧,也可以是通过Wi-Fi携带的上层协议的数据包。第一消息中包括第二设备在基础设施网络中的地址信息以及第二设备在基础设施网络中连接的无线接入设备的标识信息,可以是通过帧的字段(Field)包括这些信息,也可以是帧的信息元素(IE,Information Element)包括这些信息,还可以是Wi-Fi携带的上层的数据包携带的,比如帧中有一个基础设施网络地址信息的字段或者信息元素,里面携带的是设备在基
础设施网络中的地址信息,该地址信息可以是设备的MAC地址,比如帧中有一个无线接入设备标识信息的字段或者信息元素,该标识信息可以是无线接入设备的MAC地址,也可以是无线接入设备的SSID,还可以是其他形式的标识,具体此处不作限定。
1002、第二设备接收第一设备通过P2P网络或基础设施网络发送的第二消息;
可以理解的是,第一设备向第二设备发送第二消息可以通过P2P网络或基础设施网络发送,当通过P2P网络发送第二消息时,可以通过原先进行P2P网络进行通信的渠道发送,当通过基础设施网络第二消息时,可以根据第二设备在基础设施网络中的地址信息,通过上述确定的无线接入设备发送,第二消息中包括第一设备在所述基础设施网络中的地址信息;
1003、第二设备根据第一设备在基础设施网络中的地址信息,通过所述同一个无线接入设备向第一设备发送信息;
1004、第二设备接收第一设备根据第二设备在基础设施网络中的地址信息通过所述同一个无线接入设备发送的信息。
需要说明的是,本实施例中,步骤1003中描述的“第二设备根据第一设备在基础设施网络中的地址信息,通过无线接入设备向第一设备发送信息”与步骤1004中描述的“第二设备接收第一设备根据第二设备在基础设施网络中的地址信息通过无线接入设备发送的信息”,可以理解的是,在实际应用中,步骤1003中描述的内容与步骤1004中描述的内容,在一些实施例中,可以只有其中一个步骤描述的内容发生,在另外一些实施例中,两个步骤中描述的内容都发生了,但是其发生的先后顺序与本实施例中也可以不同,因此,此处不作具体限定。
本实施例中,P2P网络可以为Wi-Fi P2P网络,对应的基础设施网络为Wi-Fi基础设施网络,可以理解的是,基础设施网络也可以为其他类型基础设施网络,P2P网络也可以为其他类型的P2P网络,除了它们之间需要对应外,此处不作具体限定。
图8到图10所示的实施例中,具体描述了第二设备通过在基础设施网络中连接的无线接入设备与第一设备进行通信有多种实现方式,可以理解的是,在实际应用中,还可以有其他实现方式,此处不作具体限定。
图8到图10所示的实施例在图7所示的实施例的基础上,描述了第二设备
通过在基础设施网络中连接的无线接入设备与第一设备进行通信的具体实现方式,使实现方式更加灵活。
在实际应用中,为了避免可能存在的安全问题,在图7至图10所示实施例的基础上,可以在第二设备通过在基础设施网络中连接的无线接入设备与第一设备进行通信之前,对第二设备和第一设备进行一下认证,此时第二设备通过P2P网络向第一设备发送的第一消息中还可以包括一认证数据,该认证数据用于第二设备与第一设备之间的认证,具体认证过程与上面描述的认证过程在原理上一样,此处不再赘述。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,图5至图8所示实施例中所描述的方法的具体流程,可以参考前述图1至图4所示方法实施例中的对应过程,在此不再赘述。
为了便于更好的理解技术,下面以一具体应用场景对上述实施例中描述的通信方法进行详细描述。
请参阅图11,本发明实施例中通信方法的另一个实施例包括:
1101、STA1接收STA2通过Wi-Fi P2P网络发送的message1;
可以理解的是,本步骤在STA1和STA2已经通过P2P网络传输业务的情况下进行,在本实施例中,STA2通过与AP2的连接接入Wi-Fi基础设施网络;
需要说明的是,在流程开始时,STA2会向STA1发送一个message1,该message1中包括STA2在基础设施网络中的地址信息以及STA2在所述Wi-Fi基础设施网络中连接的AP2的MAC地址;
本实施例中,仅以P2P网络为Wi-Fi P2P网络,对应的基础设施网络为Wi-Fi基础设施网络为例作出说明,可以理解的是,基础设施网络也可以为其他类型基础设施网络,P2P网络也可以为其他类型的P2P网络,除了它们之间需要对应外,此处不作具体限定。
STA2在Wi-Fi基础设施网络中的地址信息可以是STA2在Wi-Fi基础设施网络中的MAC地址,此步骤仅以MAC地址为例作出说明,在实际应用中,也可以是MAC地址经过转化后的其他信息,只要该地址信息能够利用来在Wi-Fi基础设施网络中进行通信即可,具体此处不作限定。
无线接入设备可以是无线访问接入点AP((Wireless)Access Point),如无线路由器等,可以理解的是,在实际应用中,也可以是其他无线接入设备,如基
站等,此处仅以无线接入设备为AP为例作出说明,具体此处不作限定。
STA2在Wi-Fi基础设施网络中连接的AP2的标识信息可以为无线接入设备的MAC地址,在实际使用中,也可以是其他的标识信息,如无线接入设备的服务集标识(SSID,Service Set Identifier),此处不作限定。
STA1、STA2可以是手机、平板电脑等移动终端,也可以是笔记本电脑等能够连接无线接入设备的设备,只要能够连接无线接入设备,能够连接P2P网络即可,具体此处不作限定。
第一设备可以是连接在一个无线接入设备的,它能够知道这个无线接入设备的标识信息,比如它知道这个无线接入设备的MAC地址是什么,或者它知道这个无线接入设备的SSID是什么。
本实施例中,P2P网络可以为Wi-Fi P2P网络,对应的基础设施网络为Wi-Fi基础设施网络,可以理解的是,基础设施网络也可以为其他类型基础设施网络,P2P网络也可以为其他类型的P2P网络,除了它们之间需要对应外,此处不作具体限定。
上述STA2所发送的message1可以为Wi-Fi的帧,也可以是通过Wi-Fi携带的上层协议的数据包。message1中包括STA2在Wi-Fi基础设施网络中的地址信息以及STA2在Wi-Fi基础设施网络中连接的AP2的MAC地址,可以是通过帧的字段(Field)包括这些信息,也可以是帧的信息元素(IE,Information Element)包括这些信息,还可以是Wi-Fi携带的上层的数据包携带的,比如帧中有一个Wi-Fi基础设施网络地址信息的字段或者信息元素,里面携带的是设备在Wi-Fi基础设施网络中的地址信息,该地址信息可以是设备的MAC地址,比如帧中有一个AP2标识信息的字段或者信息元素,该标识信息可以是无线接入设备的MAC地址,也可以是AP2的SSID,还可以是其他形式的标识,具体此处不作限定。
1102、STA1判断自身已连接的AP1的MAC地址与AP2的MAC地址是否匹配,若是,则执行步骤1104,若否,则执行步骤1103;
STA1判断自身已连接的AP1的MAC地址与STA2在Wi-Fi基础设施网络中连接的AP2的MAC地址是否匹配,当确定上述两个MAC地址相同时可以认为它们是匹配的,在实际的应用中,也可以确定两个MAC地址中某一个特征信息相同即可认为它们是匹配的,只要能够MAC地址能够确定它们指的是同一个
AP,则认为它们是匹配的,具体此处不作限定。
当STA1确定自身已连接的AP1的MAC地址与所述AP2的MAC地址匹配时,可确定STA1确定自身已连接上述Wi-Fi基础设施网络中的AP2,即STA1和STA2在Wi-Fi基础设施网络中连接的是一个AP。
1103、STA1接入STA2在WiFi网络中连接的AP2。
当STA1判断自身已连接的AP1的MAC地址与AP2的MAC地址不匹配时,STA1接入STA2在WiFi网络中连接的AP2,可选的,步骤1103也可以是,当STA1判断自身已连接的AP1的MAC地址与AP2的MAC地址不匹配时,则结束流程。
1104、STA1通过Wi-Fi P2P网络或Wi-Fi基础设施网络向STA2发送message2;
可以理解的是,本步骤中,STA1向STA1发送message2可以通过Wi-Fi P2P网络或Wi-Fi基础设施网络发送,当通过Wi-Fi P2P网络发送message2时,可以通过原先进行Wi-Fi P2P网络进行通信的渠道发送,当通过Wi-Fi基础设施网络发送message2时,可以根据STA2在Wi-Fi基础设施网络中的MAC地址,通过上述确定的同一个AP(本实施例中为AP2)发送,message2中包括STA1在Wi-Fi基础设施网络中的MAC地址。
1105、STA1根据STA2在Wi-Fi基础设施网络中的MAC地址,通过AP2向STA2发送信息;
1106、STA1接收STA2根据STA1在Wi-Fi基础设施网络中的MAC地址通过AP2发送的信息;
STA2可以根据STA1在Wi-Fi基础设施网络中的MAC地址通过AP2向STA1发送信息,此时作为接收方,STA1接收STA2根据STA1在Wi-Fi基础设施网络中的MAC地址通过AP2发送的信息。
需要说明的是,本实施例中,步骤1104中描述的“STA1根据STA2在所述Wi-Fi基础设施网络中的MAC地址,通过AP2向STA2发送信息”与步骤1105中描述的“STA1接收STA2根据STA1在Wi-Fi基础设施网络中的MAC地址通过AP2发送的信息”,可以理解的是,在实际应用中,步骤1104中描述的内容与步骤1105中描述的内容,在一些实施例中,可以只有其中一个步骤描述的内容发生,在另外一些实施例中,两个步骤中描述的内容都发生了,但是其发生
的先后顺序与本实施例中也会不同,因此,此处不作具体限定。
下面介绍本发明实施例提供的第一设备的实施例(本发明实施例提供的第一设备的各实施例中,所述目标设备所实现的操作可以参考前述各方法实施例中第二设备所执行的方法),请参阅图12,本发明实施例提供的第一设备的一个实施例包括:
接收单元1201,用于接收目标设备通过P2P网络发送的第一消息,第一消息中包括目标设备在基础设施网络中的地址信息以及目标设备在基础设施网络中连接的无线接入设备的标识信息;
通信单元1202,用于当所述第一设备连接的无线接入设备与目标设备在基础设施网络中连接的无线接入设备为同一个无线接入设备时,根据目标设备在基础设施网络中的地址信息,通过所述同一个无线接入设备与目标设备进行通信。
本实施例中,第一设备在与目标设备通过P2P网络进行通信时,可以通过接收单元1201接收目标设备通过P2P网络发送的消息,当第一设备连接的无线接入设备与目标设备在基础设施网络中连接的无线接入设备为同一个无线接入设备时,通信单元1202可以使用无线接入设备在基础设施网络中与目标设备进行通信,由于第一设备在使用P2P网络通信的过程中,可以使用基础设施网络进行通信,有效缓解了使用P2P网络时网络质量高低起伏变化的情况,保障了通信质量,用户体验佳。
请参阅图13,本发明实施例提供的第一设备的另一实施例包括:
接收单元1301,用于接收目标设备通过P2P网络发送的第一消息,第一消息中包括目标设备在基础设施网络中的地址信息以及目标设备在基础设施网络中连接的无线接入设备的标识信息;
通信单元1302,用于当所述第一设备连接的无线接入设备与目标设备在基础设施网络中连接的无线接入设备为同一个无线接入设备时,根据目标设备在基础设施网络中的地址信息,通过所述同一个无线接入设备与目标设备进行通信。
通信单元1302具体可以用于当所述第一设备确定自身已连接的无线接入设备的标识信息与所述目标设备在所述基础设施网络中连接的无线接入设备的标识信息匹配时,根据所述地址信息,通过所述同一个无线接入设备与所述目标
设备进行通信。
通信单元1302具体还可以用于当所述第一设备确定自身已连接的无线接入设备的标识信息与所述目标设备在所述基础设施网络中连接的无线接入设备的标识信息不匹配后,接入所述目标设备在所述基础设施网络中连接的无线接入设备时,根据所述地址信息,通过所述同一个无线接入设备与所述目标设备进行通信。
本实施例提供的第一设备中,通信单元1302可以进一步包括:
第一发送模块13021,用于根据所述目标设备在所述基础设施网络中的地址信息,通过所述同一个无线接入设备向所述目标设备发送信息,所述信息中包括所述第一设备在所述基础设施网络中的地址信息。
本实施例第一设备中以设置第一发送模块为例,可以理解的是,在一些实施例中,第一发送模块13021可以取消设置,此处不作限定。
请参阅图14,本发明实施例中的第一设备的另一实施例包括:
接收单元1401,用于接收目标设备通过P2P网络发送的第一消息,第一消息中包括目标设备在基础设施网络中的地址信息以及目标设备在基础设施网络中连接的无线接入设备的标识信息;
通信单元1402,用于当所述第一设备连接的无线接入设备与目标设备在基础设施网络中连接的无线接入设备为同一个无线接入设备时,根据目标设备在基础设施网络中的地址信息,通过所述同一个无线接入设备与目标设备进行通信。
通信单元1402具体可以用于当所述第一设备确定自身已连接的无线接入设备的标识信息与所述目标设备在所述基础设施网络中连接的无线接入设备的标识信息匹配时,根据所述地址信息,通过所述同一个无线接入设备与所述目标设备进行通信。
可选的,通信单元1402具体可以用于当所述第一设备确定自身已连接的无线接入设备的标识信息与所述目标设备在所述基础设施网络中连接的无线接入设备的标识信息不匹配后,接入所述目标设备在所述基础设施网络中连接的无线接入设备时,根据所述地址信息,通过所述同一个无线接入设备与所述目标设备进行通信。
本实施例第一设备中,通信单元1402可以进一步包括:
第一发送模块14021,用于根据目标设备在基础设施网络中的地址信息,通过所述同一个无线接入设备向所述目标设备发送信息,所述信息中包括所述第一设备在基础设施网络中的地址信息。
第一接收模块14022,用于接收目标设备根据所述第一设备在基础设施网络中的地址信息,通过所述同一个无线接入设备发送的信息。
本实施例第一设备中以划分有第一发送模块14021、第一接收模块14022为例,可以理解的是,在一些实施例中,第一发送模块14021、第一接收模块14022可以集成在一个模块,此处不作限定。
请参阅图15,本发明实施例中的第一设备另一实施例包括:
接收单元1501,用于接收目标设备通过P2P网络发送的第一消息,第一消息中包括目标设备在基础设施网络中的地址信息以及目标设备在基础设施网络中连接的无线接入设备的标识信息;
通信单元1502,用于当所述第一设备连接的无线接入设备与目标设备在基础设施网络中连接的无线接入设备为同一个无线接入设备时,根据目标设备在基础设施网络中的地址信息,通过所述同一个无线接入设备与目标设备进行通信。
通信单元1502具体可以用于当所述第一设备确定自身已连接的无线接入设备的标识信息与所述目标设备在所述基础设施网络中连接的无线接入设备的标识信息匹配时,根据所述地址信息,通过所述同一个无线接入设备与所述目标设备进行通信。
通信单元1502具体还可以用于当所述第一设备确定自身已连接的无线接入设备的标识信息与所述目标设备在所述基础设施网络中连接的无线接入设备的标识信息不匹配后,接入所述目标设备在所述基础设施网络中连接的无线接入设备时,根据所述地址信息,通过所述同一个无线接入设备与所述目标设备进行通信。
本实施例第一设备还可以进一步包括:
发送单元1503,用于在通信单元根据所述地址信息,通过所述同一个无线接入设备与目标设备进行通信之前,通过P2P网络或基础设施网络向目标设备发送第二消息,所述第二消息中包括所述第一设备在基础设施网络中的地址信息;
本实施例第一设备中,通信单元1502还可以进一步包括:
第二发送模块15021,用于根据目标设备在基础设施网络中的地址信息,通过所述同一个无线接入设备向目标设备发送信息;和/或,
第二接收模块15022,用于接收目标设备根据所述第一设备在基础设施网络中的地址信息通过所述同一个无线接入设备发送的信息。
本实施例第一设备中以设置发送单元1503、第二发送模块15021、第二接收模块15022为例,可以理解的是,在一些实施例中,发送单元1503、第二发送模块15021、第二接收模块15022可以取消设置,此处不作限定。
上述各装置实施例中所述第一设备所实现的操作可以参考前述各方法实施例中第一设备所执行的方法,所述目标设备所实现的操作可以参考前述各方法实施例中第二设备所执行的方法。
下面介绍本发明实施例中的另一侧设备(参考前述第二设备)的实施例,请参阅图16,本发明实施例中的第二设备的一个实施例包括:
发送单元1601,用于通过P2P网络向目标设备发送第一消息,第一消息中包括所述第二设备在基础设施网络中的地址信息以及所述第二设备在基础设施网络中连接的无线接入设备的标识信息;
通信单元1602,用于当目标设备连接的无线接入设备与所述第二设备在所述基础设施网络中连接的无线接入设备为同一个无线接入设备时,通过所述同一个无线接入设备与目标设备进行通信。
请参阅图17,本发明实施例中的第二设备的另一实施例包括:
发送单元1701,用于通过P2P网络向目标设备发送第一消息,第一消息中包括所述第二设备在基础设施网络中的地址信息以及所述第二设备在基础设施网络中连接的无线接入设备的标识信息;
通信单元1702,用于当目标设备连接的无线接入设备与所述第二设备在所述基础设施网络中连接的无线接入设备为同一个无线接入设备时,通过所述同一个无线接入设备与目标设备进行通信。
本实施例提供的第二设备中,通信单元1702还可以进一步包括:
第一接收模块17021,用于接收目标设备通过所述同一个无线接入设备发送的信息,所述信息中包括目标设备在所述基础设施网络中的地址信息。
本实施例第二设备中仅以设置第一接收模块17021为例,可以理解的是,
在一些实施例中,第一接收模块17021,可以取消设置,此处不作限定。
请参阅图18,本发明实施例中的第二设备的另一实施例包括:
发送单元1801,用于通过P2P网络向目标设备发送第一消息,第一消息中包括所述第二设备在基础设施网络中的地址信息以及所述第二设备在基础设施网络中连接的无线接入设备的标识信息;
通信单元1802,用于当目标设备连接的无线接入设备与所述第二设备在所述基础设施网络中连接的无线接入设备为同一个无线接入设备时,通过所述同一个无线接入设备与目标设备进行通信。
本实施例第二设备中,通信单元1802还可以进一步包括:
第一接收模块18021,用于接收目标设备通过所述同一个无线接入设备发送的信息,所述信息中包括目标设备在所述基础设施网络中的地址信息。
第一发送模块18022,用于根据所述目标设备在所述基础设施网络中的地址信息,通过所述同一个无线接入设备向所述目标设备发送信息。
本实施例第二设备中仅以设置第一接收模块18021、第一发送模块18022为例,可以理解的是,在一些实施例中,第一接收模块18021、第一发送模块18022可以取消设置,此处不作限定。
请参阅图19,本发明实施例中的第二设备的另一实施例包括:
发送单元1901,用于通过P2P网络向目标设备发送第一消息,第一消息中包括所述第二设备在基础设施网络中的地址信息以及所述第二设备在基础设施网络中连接的无线接入设备的标识信息;
通信单元1902,用于当目标设备连接的无线接入设备与所述第二设备在所述基础设施网络中连接的无线接入设备为同一个无线接入设备时,通过所述同一个无线接入设备与目标设备进行通信。
本实施例第二设备中,还可进一步包括:
接收单元1903,用于在通信单元1902通过所述同一个无线接入设备与所述目标设备进行通信之前,接收目标设备通过P2P网络或基础设施网络发送的第二消息,第二消息中包括目标设备在基础设施网络中的地址信息;
本实施例第二设备中,通信单元1902还可以进一步包括:
第二发送模块19021,用于根据目标设备在基础设施网络中的地址信息,通过所述同一个无线接入设备向目标设备发送信息,和/或,
第二接收模块19022,用于接收目标设备根据所述第二设备在基础设施网络中的地址信息通过所述同一个无线接入设备发送的信息。
本实施例第二设备中仅以设置接收单元1903、第二发送模块19021、第二接收模块19022为例,可以理解的是,在一些实施例中,接收单元1903、第二发送模块19021、第二接收模块19022可以取消设置,此处不作限定。
本发明实施例提供的第二设备的各实施例中,第二设备在基础设施网络中的地址信息可以是第二设备的MAC地址,在实际应用中,也可以是MAC地址经过转化后的其他信息,只要该地址信息能够利用来在基础设施网络中进行通信即可,具体此处不作限定。
本发明实施例提供的第二设备的各实施例中,所述第二设备所实现的操作可以参考前述各方法实施例中第二设备所执行的方法,所述目标设备所实现的操作可以参考前述各方法实施例中第一设备所执行的方法。
设备在基础设施网络中连接的无线接入设备的标识信息可以为无线接入设备的MAC地址,在实际使用中,也可以是其他的标识信息,如无线接入设备的服务集标识(SSID,Service Set Identifier),此处不作限定。
无线接入设备可以是无线访问接入点AP,如无线路由器等,可以理解的是,在实际应用中,也可以是其他无线接入设备,如基站等,具体此处不作限定。
下面结合图6的实施例从硬件角度对本发明实施例提供的第一设备进行描述,请参照图20,该第一设备包括:接收器2001、发送器2002和处理器2003(可以有一个或多个)。
本发明实施例涉及的第一设备可以具有比图20所示出的更多或更少的部件,可以组合两个或更多个部件,或者可以具有不同的部件配置或设置,各个部件可以在包括一个或多个信号处理和/或专用集成电路在内的硬件、软件或硬件和软件的组合实现。
所述接收器2001用于执行如下操作:
接收目标设备通过P2P网络发送的第一消息,第一消息中包括目标设备在基础设施网络中的地址信息以及目标设备在基础设施网络中连接的无线接入设备的标识信息;
目标设备在基础设施网络中的地址信息可以是目标设备的MAC地址,在实
际应用中,也可以是MAC地址经过转化后的其他信息,只要该地址信息能够利用来在基础设施网络中进行通信即可,具体此处不作限定。
目标设备在基础设施网络中连接的无线接入设备的标识信息可以为无线接入设备的MAC地址,在实际使用中,也可以是其他的标识信息,如无线接入设备的服务集标识(SSID,Service Set Identifier),此处不作限定。
无线接入设备可以是无线访问接入点AP,如无线路由器等,可以理解的是,在实际应用中,也可以是其他无线接入设备,如基站等,具体此处不作限定。
所述处理器2003用于执行如下操作:
在接收器2001接收到目标设备通过P2P网络发送的第一消息后,判断第一设备自身已连接的无线接入设备的标识信息与目标设备在基础设施网络中连接的无线接入设备的标识信息是否匹配;
所述发送器2002用于执行如下操作:
在所述处理器2003判断所述第一设备自身已连接的无线接入设备的标识信息与目标设备在基础设施网络中连接的无线接入设备的标识信息匹配时,通过P2P网络或基础设施网络向目标设备发送第二消息,第二消息中包括本设备(第一设备)在基础设施网络中的地址信息;
根据目标设备在基础设施网络中的地址信息,通过与目标设备连接的同一个无线接入设备向目标设备发送信息;
所述接收器2001还用于执行如下操作:
接收目标设备根据第一设备在基础设施网络中的地址信息通过与第一设备连接的同一个无线接入设备发送的信息。
以上仅结合图6的方法实施例描述了本发明实施例提供的第一设备的一个实施例;本发明提供的第一设备的其他实施例可以参考本实施例,第一设备具体实现的操作可以参考前述各方法实施例中第一设备所执行的方法,具体不再赘述。
本发明实施例提供的第一设备的各实施例中第一设备所实现的操作可以参考前述各方法实施例中第一设备所执行的方法,所述目标设备所实现的操作可以参考前述各方法实施例中第二设备所执行的方法,本发明实施例第一设备在与目标设备通过P2P网络进行通信时,可以通过接收器2001接收目标设备通过P2P网络发送的消息,当处理器2003判断连接的无线接入设备与目标设备在基
础设施网络中连接的无线接入设备为同一个无线接入设备时,本发明实施例第一设备可以通过接收器2001和发送器2003使用无线接入设备在基础设施网络中与目标设备进行通信,由于第一设备在使用P2P网络通信的过程中,可以使用基础设施网络进行通信,有效缓解了使用P2P网络时网络质量高低起伏变化的情况,保障了通信质量,用户体验佳。
下面结合图10的实施例从硬件角度对本发明实施例中另一侧设备(参考前述第二设备)进行描述,请参照图21,该第二设备包括:接收器2101、发送器2102和处理器2103(可以有一个或多个)。
本发明实施例涉及的第二设备可以具有比图21所示出的更多或更少的部件,可以组合两个或更多个部件,或者可以具有不同的部件配置或设置,各个部件可以在包括一个或多个信号处理和/或专用集成电路在内的硬件、软件或硬件和软件的组合实现。
所述发送器2102用于执行如下操作:
通过P2P网络向目标设备发送第一消息,第一消息中包括第二设备在基础设施网络中的地址信息以及第二设备在基础设施网络中连接的无线接入设备的标识信息,以使得目标设备判断自身已连接的无线接入设备的标识信息与第二设备在基础设施网络中连接的无线接入设备的标识信息是否匹配,当所述目标设备确定自身已连接的无线接入设备的标识信息与所述无线接入设备的标识信息匹配时,目标设备即可根据第二设备在基础设施网络中的地址信息,通过已连接的无线接入设备向本发明实施例提供的第二设备发送消息。
所述接收器2101用于执行如下操作:
接收目标设备通过P2P网络或基础设施网络发送的第二消息,第二消息中包括目标设备在所述基础设施网络中的地址信息;
目标设备在基础设施网络中的地址信息可以是目标设备的MAC地址,在实际应用中,也可以是MAC地址经过转化后的其他信息,只要该地址信息能够利用来在基础设施网络中进行通信即可,具体此处不作限定。
本发明实施例第二设备在基础设施网络中连接的无线接入设备的标识信息可以为无线接入设备的MAC地址,在实际使用中,也可以是其他的标识信息,如无线接入设备的服务集标识(SSID,Service Set Identifier),此处不作限定。
无线接入设备可以是无线访问接入点AP,如无线路由器等,可以理解的是,
在实际应用中,也可以是其他无线接入设备,如基站等,具体此处不作限定。
所述发送器2102还用于执行如下操作:
根据目标设备在基础设施网络中的地址信息,通过与第二设备连接的同一个无线接入设备,向目标设备发送信息。
所述接收器2101还用于执行如下操作:
接收目标设备根据第二设备在基础设施网络中的地址信息通过与第二设备连接的同一个无线接入设备发送的信息。
所述处理器2103可以用于执行如下操作:
可以根据接收器2101接收的数据和发送器2102需要发送的数据进行处理;
以上仅结合图10的方法实施例描述了本发明实施例提供的第二设备的一个实施例;本发明提供的第二设备的其他实施例可以参考本实施例,第二设备具体实现的操作可以参考前述各方法实施例中第二设备所执行的方法,具体不再赘述。
本发明实施例提供的第二设备的各实施例中第二设备所实现的操作可以参考前述各方法实施例中第二设备所执行的方法,所述目标设备所实现的操作可以参考前述各方法实施例中第一设备所执行的方法。
本发明实施例第二设备在与目标设备通过P2P网络进行通信时,可以通过接收器2101接收目标设备通过P2P网络发送的消息,当目标设备根据该消息判断连接的无线接入设备与第二设备在基础设施网络中连接的无线接入设备为同一个无线接入设备时,第二设备可以通过接收器2101和发送器2103使用无线接入设备在基础设施网络中与目标设备进行通信,由于第二设备在使用P2P网络通信的过程中,可以使用基础设施网络进行通信,有效缓解了使用P2P网络时网络质量高低起伏变化的情况,保障了通信质量,用户体验佳。
请参阅图22,本发明实施例中以手机为例对本发明实施例提供的第一设备进行具体说明。
应该理解的是,图示手机2200仅仅是本发明实施例中第一设备的一个范例,并且手机2200可以具有比图中所示出的更多的或者更少的部件,可以组合两个或更多的部件,或者可以具有不同的部件配置。图中所示出的各种部件可以在包括一个或多个信号处理和/或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现。
现以手机为一个例子进行具体的说明。如图22所示,该手机包括存储器2201、中央处理器(Central Processing Unit,以下简称CPU)2203、外设接口2004、RF电路2205、音频电路2206、扬声器2207、电源管理芯片2208、输入/输出(I/O)子***2209、其他输入/控制设备2010以及外部端口2204,这些部件通过一个或多个通信总线或信号线2212来通信。
值得说明的是,本实施例提供的手机仅仅是移动终端的一个示例,本发明实施例涉及的移动终端可以具有比图22所示出的更多或更少的部件,可以组合两个或更多个部件,或者可以具有不同的部件配置或设置,各个部件可以在包括一个或多个信号处理和/或专用集成电路在内的硬件、软件或硬件和软件的组合实现。
下面就本实施例提供的用于进行本发明实施例方法中通信的手机进行详细的描述。
存储器2201:所述存储器2201可以被CPU2203、外设接口2204等访问,所述存储器2201可以包括高速随机存取存储器,还可以包括非易失性存储器,例如一个或多个磁盘存储器件、闪存器件、或其他易失性固态存储器件。
外设接口2204,所述外设接口可以将第一设备的输入和输出外设连接到CPU 2203和存储器2201。
I/O子***2209:所述I/O子***2209可以将第一设备上的输入输出外设,例如触摸屏2213(相当于上述实施例中的显示器)和其他输入/控制设备2210,连接到外设接口2204。I/O子***2209可以包括显示控制器22091和用于控制其他输入/控制设备2010的一个或多个输入控制器22092。其中,一个或多个输入控制器22092从其他输入/控制设备2210接收电信号或者向其他输入/控制设备2210发送电信号,其他输入/控制设备2210可以包括物理按钮(按压按钮、摇臂按钮等)、拨号盘、滑动开关、操纵杆、点击滚轮。值得说明的是,输入控制器22092可以与以下任一个连接:键盘、红外端口、USB接口以及诸如鼠标的指示设备。
触摸屏2213:所述触摸屏2213是移动终端与用户之间的输入接口和输出接口,将可视输出显示给用户,可视输出可以包括图形、文本、图标、视频等。
I/O子***2209中的显示控制器22091从触摸屏2213接收电信号或者向触摸屏2213发送电信号。触摸屏2213检测触摸屏上的接触,显示控制器22091
将检测到的接触转换为与显示在触摸屏2213上的用户界面对象的交互,即实现人机交互,显示在触摸屏2213上的用户界面对象可以是运行游戏的图标、联网到相应网络的图标等。值得说明的是,第一设备还可以包括光鼠,光鼠是不显示可视输出的触摸敏感表面,或者是由触摸屏形成的触摸敏感表面的延伸。
RF电路2205,主要用于建立手机与无线网络(即网络侧)的通信,实现手机与无线网络的数据接收和发送。例如收发短信息、电子邮件等。具体地,RF电路2205接收并发送RF信号,RF信号也称为电磁信号,RF电路2205将电信号转换为电磁信号或将电磁信号转换为电信号,并且通过该电磁信号与通信网络以及其他设备进行通信。RF电路2205可以包括用于执行这些功能的已知电路,其包括但不限于天线***、RF收发机、一个或多个放大器、调谐器、一个或多个振荡器、数字信号处理器、CODEC芯片组、用户标识模块(Subscriber Identity Module,SIM)等等。
音频电路2206,主要用于从外设接口2204接收音频数据,将该音频数据转换为电信号,并且将该电信号发送给扬声器2007。
扬声器2207,用于将手机通过RF电路2205从无线网络接收的语音信号,还原为声音并向用户播放该声音。
电源管理芯片2208,用于为CPU2203、I/O子***及外设接口所连接的硬件进行供电及电源管理。
CPU2203,是手机的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在存储器2201内的软件程序和/或模块,以及调用存储在存储器2201内的数据,执行手机的各种功能和处理数据,从而对手机进行整体监控。可选的,CPU2203可包括一个或多个处理单元;优选的,CPU2203可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作***、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器CPU2003中。
手机2200还包括给各个部件供电的电源(比如电池),优选的,电源可以通过电源管理***与CPU2203逻辑相连,从而通过电源管理***实现管理充电、放电、以及功耗管理等功能。
尽管未示出,手机2200还可以包括摄像头、蓝牙模块等,在此不再赘述。
RF电路2205可以接收另一设备通过P2P网络发送的消息,该消息具体可
以是实施例10至实施例13中的第一消息,第一消息中包括目标设备在基础设施网络中的地址信息以及目标设备在基础设施网络中连接的无线接入设备的标识信息,可以理解的是,RF电路2205接收消息可以为一次或多次,此处不作具体限定,需要说明的是,接收到的第一消息中还可以携带有多种数据类型的数据。可;以只有一种数据类型的数据,如认证数据,也可以有两种或两种以上数据类型的数据。
在本发明实施例中,该手机所包括的中央处理器2203还具有以下功能:
中央处理器2203识别RF电路2205接收到的第一消息中的数据的数据类型,判断自身已连接的无线接入设备的标识信息与RF电路2205接收的无线接入设备的标识信息是否匹配,当中央处理器2203确定手机自身已连接的无线接入设备的标识信息与RF电路2205接收的无线接入设备的标识信息匹配时,根据目标设备在基础设施网络中的地址信息,通过与目标设备连接的同一个无线接入设备与所述目标设备进行通信。可以理解的是,在本发明实施例中,中央处理器2203识别各种格式的数据的方式可以如前面实施例中的方式进行,在此不再赘述。
本领域技术人员可以理解的是,虽然本发明各实施例描述的方法包括以特定顺序出现的多个操作或步骤,但是这些方法可以包括更多或更少的操作或步骤,这些操作或步骤可以顺序执行或并行执行,并且这些顺序并不一定有严格的先后顺序。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的***,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的***,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元或模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个***,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为
单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。
Claims (24)
- 一种通信方法,其特征在于,包括:第一设备接收第二设备通过P2P网络发送的第一消息,所述第一消息中包括所述第二设备在基础设施网络中的地址信息以及所述第二设备在所述基础设施网络中连接的无线接入设备的标识信息;当所述第一设备连接的无线接入设备与所述第二设备在所述基础设施网络中连接的无线接入设备为同一个无线接入设备时,所述第一设备根据所述地址信息,通过所述同一个无线接入设备与所述第二设备进行通信。
- 根据权利要求1所述的方法,其特征在于,所述当所述第一设备连接的无线接入设备与所述第二设备在所述基础设施网络中连接的无线接入设备为同一个无线接入设备时,具体为:当所述第一设备确定自身已连接的无线接入设备的标识信息与所述第二设备在所述基础设施网络中连接的无线接入设备的标识信息匹配时。
- 根据权利要求1所述的方法,其特征在于,所述当所述第一设备连接的无线接入设备与所述第二设备在所述基础设施网络中连接的无线接入设备为同一个无线接入设备时,具体为:当所述第一设备确定自身已连接的无线接入设备的标识信息与所述第二设备在所述基础设施网络中连接的无线接入设备的标识信息不匹配后,所述第一设备接入所述第二设备在所述基础设施网络中连接的无线接入设备时。
- 根据权利要求1至3中任一所述的方法,其特征在于,所述第一设备根据所述地址信息,通过所述同一个无线接入设备与所述第二设备进行通信包括:所述第一设备根据所述第二设备在所述基础设施网络中的地址信息,通过所述同一个无线接入设备向所述第二设备发送信息,所述信息中包括第一设备在所述基础设施网络中的地址信息。
- 根据权利要求4所述的方法,其特征在于,所述第一设备根据所述地址信息,通过所述同一个无线接入设备与所述第二设备进行通信,还包括:所述第一设备接收所述第二设备根据所述第一设备在所述基础设施网络中 的地址信息,通过所述同一个无线接入设备发送的信息。
- 根据权利要求1至3中任一所述的方法,其特征在于,在所述第一设备根据所述地址信息,通过所述同一个无线接入设备与所述第二设备进行通信之前,还包括:第一设备通过所述P2P网络或所述基础设施网络向所述第二设备发送第二消息,所述第二消息中包括所述第一设备在所述基础设施网络中的地址信息;所述第一设备根据所述地址信息,通过所述同一个无线接入设备与所述第二设备进行通信包括:所述第一设备根据所述第二设备在所述基础设施网络中的地址信息,通过所述同一个无线接入设备向所述第二设备发送信息,和/或,所述第一设备接收所述第二设备根据所述第一设备在基础设施网络中的地址信息通过所述同一个无线接入设备发送的信息。
- 根据权利要求1至6中任一所述的方法,其特征在于,所述第一消息还包括第一认证数据,所述第一认证数据用于所述第一设备与所述第二设备之间的认证。
- 根据权利要求1至7中任一所述的方法,其特征在于,所述P2P网络为Wi-Fi P2P网络,所述基础设施网络为Wi-Fi基础设施网络。
- 一种通信方法,其特征在于,包括:第二设备通过P2P网络向第一设备发送第一消息,所述第一消息中包括所述第二设备在基础设施网络中的地址信息以及所述第二设备在所述基础设施网络中连接的无线接入设备的标识信息;当所述第一设备连接的无线接入设备与所述第二设备在所述基础设施网络中连接的无线接入设备为同一个无线接入设备时,所述第二设备通过所述同一个无线接入设备与所述第一设备进行通信。
- 根据权利要求9所述的方法,其特征在于,所述第二设备通过所述同一个无线接入设备与所述第一设备进行通信包括:所述第二设备接收所述第一设备通过所述同一个无线接入设备发送的信息,所述信息中包括所述第一设备在所述基础设施网络中的地址信息。
- 根据权利要求10所述的方法,其特征在于,所述第二设备通过所述同一个无线接入设备与所述第一设备进行通信还包括:所述第二设备根据所述第一设备在所述基础设施网络中的地址信息,通过所述同一个无线接入设备向所述第一设备发送信息。
- 根据权利要求9所述的方法,其特征在于,在所述第二设备通过所述同一个无线接入设备与所述第一设备进行通信之前,还包括:所述第二设备接收所述第一设备通过所述P2P网络或所述基础设施网络发送的第二消息,所述第二消息中包括所述第一设备在所述基础设施网络中的地址信息;所述第二设备通过所述同一个无线接入设备与所述第一设备进行通信包括:所述第二设备根据所述第一设备在所述基础设施网络中的地址信息,通过所述同一个无线接入设备向所述第一设备发送信息,和/或,所述第二设备接收所述第一设备根据所述第二设备在基础设施网络中的地址信息通过所述同一个无线接入设备发送的信息。
- 根据权利要求9至12中任一所述的方法,其特征在于,所述第一消息还包括第一认证数据,所述第一认证数据用于所述第二设备与所述第一设备之间的认证。
- 根据权利要求9至13中任一所述的方法,其特征在于,所述P2P网络为Wi-Fi P2P网络,所述基础设施网络为Wi-Fi基础设施网络。
- 一种设备,其特征在于,包括:接收单元,用于接收目标设备通过P2P网络发送的第一消息,所述第一消息中包括所述目标设备在基础设施网络中的地址信息以及所述目标设备在所述基础设施网络中连接的无线接入设备的标识信息;通信单元,用于当所述设备连接的无线接入设备与所述目标设备在所述基础设施网络中连接的无线接入设备为同一个无线接入设备时,根据所述地址信息,通过所述同一个无线接入设备与所述目标设备进行通信。
- 根据权利要求15所述的设备,其特征在于,所述通信单元具体用于当所述设备确定自身已连接的无线接入设备的标识信息与所述目标设备在所述基础设施网络中连接的无线接入设备的标识信息匹配时,根据所述地址信息,通过所述同一个无线接入设备与所述目标设备进行通信。
- 根据权利要求15所述的设备,其特征在于,所述通信单元具体用于当所述设备确定自身已连接的无线接入设备的标识信息与所述目标设备在所述基础设施网络中连接的无线接入设备的标识信息不匹配后,接入所述目标设备在所述基础设施网络中连接的无线接入设备时,根据所述地址信息,通过所述同一个无线接入设备与所述目标设备进行通信。
- 根据权利要求15至17中任一所述的设备,其特征在于,所述通信单元包括:第一发送模块,用于根据所述目标设备在所述基础设施网络中的地址信息,通过所述同一个无线接入设备向所述目标设备发送信息,所述信息中包括所述设备在所述基础设施网络中的地址信息。
- 根据权利要求18所述的设备,其特征在于,所述通信单元还包括:第一接收模块,用于接收所述目标设备根据所述设备在所述基础设施网络中的地址信息,通过所述同一个无线接入设备发送的信息。
- 根据权利要求15至17中任一所述的设备,其特征在于,所述设备还包括:发送单元,用于在所述通信单元根据所述地址信息,通过所述同一个无线接入设备与所述目标设备进行通信之前,通过所述P2P网络或所述基础设施网 络向所述目标设备发送第二消息,所述第二消息中包括所述设备在所述基础设施网络中的地址信息;所述通信单元包括:第二发送模块,用于根据所述目标设备在所述基础设施网络中的地址信息,通过所述同一个无线接入设备向所述目标设备发送信息;和/或,第二接收模块,用于接收所述目标设备根据所述设备在基础设施网络中的地址信息通过所述同一个无线接入设备发送的信息。
- 一种设备,其特征在于,包括:发送单元,用于通过P2P网络向目标设备发送第一消息,所述第一消息中包括所述设备在基础设施网络中的地址信息以及所述设备在所述基础设施网络中连接的无线接入设备的标识信息;通信单元,用于当所述目标设备连接的无线接入设备与所述设备在所述基础设施网络中连接的无线接入设备为同一个无线接入设备时,通过所述同一个无线接入设备与所述目标设备进行通信。
- 根据权利要求21所述的设备,其特征在于,所述通信单元包括:第一接收模块,用于接收所述目标设备通过所述同一个无线接入设备发送的信息,所述信息中包括所述目标设备在所述基础设施网络中的地址信息。
- 根据权利要求22所述的设备,其特征在于,所述通信单元还包括:第一发送模块,用于根据所述目标设备在所述基础设施网络中的地址信息,通过所述同一个无线接入设备向所述目标设备发送信息。
- 根据权利要求21所述的设备,其特征在于,所述设备还包括:接收单元,用于在所述通信单元通过所述同一个无线接入设备与所述目标设备进行通信之前,接收所述目标设备通过所述P2P网络或所述基础设施网络发送的第二消息,所述第二消息中包括所述目标设备在所述基础设施网络中的地址信息;所述通信单元包括:第二发送模块,用于根据所述目标设备在所述基础设施网络中的地址信息,通过所述同一个无线接入设备向所述目标设备发送信息,和/或,第二接收模块,用于接收所述目标设备根据所述设备在基础设施网络中的地址信息通过所述同一个无线接入设备发送的信息。
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
EP15835719.4A EP3182787B1 (en) | 2014-08-27 | 2015-07-29 | Communication method and device |
US15/506,809 US10321494B2 (en) | 2014-08-27 | 2015-07-29 | Method and apparatus for communicating in a wireless communication network |
US16/409,036 US10863559B2 (en) | 2014-08-27 | 2019-05-10 | Method and apparatus for communicating in a wireless communication network |
Applications Claiming Priority (4)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410429195 | 2014-08-27 | ||
CN201410429195.1 | 2014-08-27 | ||
CN201410440017.9A CN105451368B (zh) | 2014-08-27 | 2014-09-01 | 一种通信方法及设备 |
CN201410440017.9 | 2014-09-01 |
Related Child Applications (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US15/506,809 A-371-Of-International US10321494B2 (en) | 2014-08-27 | 2015-07-29 | Method and apparatus for communicating in a wireless communication network |
US16/409,036 Continuation US10863559B2 (en) | 2014-08-27 | 2019-05-10 | Method and apparatus for communicating in a wireless communication network |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2016029772A1 true WO2016029772A1 (zh) | 2016-03-03 |
Family
ID=55398731
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2015/085439 WO2016029772A1 (zh) | 2014-08-27 | 2015-07-29 | 一种通信方法及设备 |
Country Status (4)
Country | Link |
---|---|
US (2) | US10321494B2 (zh) |
EP (1) | EP3182787B1 (zh) |
CN (1) | CN105451368B (zh) |
WO (1) | WO2016029772A1 (zh) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10531370B2 (en) * | 2015-02-24 | 2020-01-07 | Lg Electronics Inc. | Method and apparatus for transmitting data in wireless communication system |
CN105959906B (zh) * | 2016-04-25 | 2020-03-24 | 上海海漾软件技术有限公司 | 网络设备通信、与网络设备通信的方法及装置 |
JP7133898B2 (ja) * | 2016-07-21 | 2022-09-09 | キヤノン株式会社 | 通信装置、通信装置の制御方法、およびプログラム |
CN106921972B (zh) * | 2017-03-13 | 2020-06-02 | 湖州贝格信息安全科技有限公司 | 智能终端的安全屏蔽方法及智能终端 |
CN109240281B (zh) * | 2018-08-02 | 2022-07-08 | Oppo广东移动通信有限公司 | 避让行驶方法及相关产品 |
CN114006908B (zh) * | 2020-07-13 | 2023-03-10 | 成都极米科技股份有限公司 | 一种点对点通信资源分配的方法及终端 |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101965064A (zh) * | 2009-07-23 | 2011-02-02 | 中兴通讯股份有限公司 | 分组数据聚合协议数据的传输方法与装置 |
CN103380654A (zh) * | 2010-12-22 | 2013-10-30 | 高通股份有限公司 | 用于对等通信的用户装置的配置 |
CN103857065A (zh) * | 2012-12-04 | 2014-06-11 | 三星电子株式会社 | 使用接入点的Wi-Fi直连连接方法及设备 |
Family Cites Families (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7948951B2 (en) * | 2002-06-12 | 2011-05-24 | Xocyst Transfer Ag L.L.C. | Automatic peer discovery |
US8639647B2 (en) * | 2009-07-13 | 2014-01-28 | Red Hat, Inc. | Rule analysis tool |
US9900759B2 (en) * | 2009-11-04 | 2018-02-20 | Qualcomm Incorporated | Method and apparatus for peer discovery in a wireless communication network |
US9288729B2 (en) * | 2011-08-31 | 2016-03-15 | Lg Electronics Inc. | Method for performing a change of mode in devices directly communicating with each other in a wireless connection system, and apparatus for same |
US9609676B1 (en) * | 2012-03-30 | 2017-03-28 | Marvell International Ltd. | Efficient transition from discovery to link establishment |
US8718558B2 (en) * | 2012-04-18 | 2014-05-06 | Blackberry Limited | Methods and apparatus for use in facilitating communications over first and second wireless connections of a wireless transceiver |
US9179382B2 (en) * | 2012-05-21 | 2015-11-03 | Qualcomm Incorporated | Methods and apparatus for supporting WAN and D2D communication RLC layer handover |
JP6008617B2 (ja) * | 2012-06-29 | 2016-10-19 | キヤノン株式会社 | 通信装置およびその制御方法、並びにプログラム |
US9119523B2 (en) * | 2012-07-02 | 2015-09-01 | General Electric Company | Dishwasher appliance with rack assembly projections |
CN103687048A (zh) * | 2012-08-30 | 2014-03-26 | 光宝电子(广州)有限公司 | 具有自动联机设定的无线装置、无线网络架构及连网方法 |
-
2014
- 2014-09-01 CN CN201410440017.9A patent/CN105451368B/zh active Active
-
2015
- 2015-07-29 WO PCT/CN2015/085439 patent/WO2016029772A1/zh active Application Filing
- 2015-07-29 US US15/506,809 patent/US10321494B2/en active Active
- 2015-07-29 EP EP15835719.4A patent/EP3182787B1/en active Active
-
2019
- 2019-05-10 US US16/409,036 patent/US10863559B2/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101965064A (zh) * | 2009-07-23 | 2011-02-02 | 中兴通讯股份有限公司 | 分组数据聚合协议数据的传输方法与装置 |
CN103380654A (zh) * | 2010-12-22 | 2013-10-30 | 高通股份有限公司 | 用于对等通信的用户装置的配置 |
CN103857065A (zh) * | 2012-12-04 | 2014-06-11 | 三星电子株式会社 | 使用接入点的Wi-Fi直连连接方法及设备 |
Also Published As
Publication number | Publication date |
---|---|
CN105451368B (zh) | 2020-04-28 |
EP3182787A1 (en) | 2017-06-21 |
US20190268951A1 (en) | 2019-08-29 |
EP3182787B1 (en) | 2020-02-19 |
EP3182787A4 (en) | 2017-08-23 |
US20170257897A1 (en) | 2017-09-07 |
US10321494B2 (en) | 2019-06-11 |
CN105451368A (zh) | 2016-03-30 |
US10863559B2 (en) | 2020-12-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10506420B2 (en) | Methods, systems, and devices for enabling multiple radio assisted discovery | |
US9479224B2 (en) | Apparatus and method for connecting to device in wireless terminal | |
TWI617919B (zh) | 用於促進無線對接系統中的直接配對的設備和方法 | |
US10863559B2 (en) | Method and apparatus for communicating in a wireless communication network | |
KR101697414B1 (ko) | 피어 투 피어 링크를 통한 공유 네트워크 액세스 | |
US20130311692A1 (en) | Apparatus and method for direct pairing in a wireless docking system | |
US9743225B2 (en) | Method and apparatus for forming communication link using bluetooth | |
CN106454822B (zh) | 通信设备及其控制方法 | |
US20130225161A1 (en) | SEAMLESS TRANSITION FROM CELLULAR TO Wi-Fi COMMUNICATION | |
US10419543B2 (en) | Method and system for establishing a connection between a seeker device and a target device | |
US20210243599A1 (en) | User authentication method through bluetooth device and device therefor | |
WO2015139401A1 (zh) | 无线网络的建立方法、***及无线路由装置 | |
KR20220105401A (ko) | 데이터 패스를 셋업하는 전자 장치 및 그 동작 방법 | |
CN112398943B (zh) | 信息互通方法、装置、存储介质及电子设备 | |
JP2015176536A (ja) | 通信装置、通信方法、通信プログラムおよび記憶媒体 | |
WO2023246056A1 (zh) | 设备连接方法及装置、存储介质、芯片 | |
WO2017054284A1 (zh) | 一种通信方法及相关设备 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 15835719 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
WWE | Wipo information: entry into national phase |
Ref document number: 15506809 Country of ref document: US |
|
REEP | Request for entry into the european phase |
Ref document number: 2015835719 Country of ref document: EP |
|
WWE | Wipo information: entry into national phase |
Ref document number: 2015835719 Country of ref document: EP |