WO2016029854A1 - 一种无线网络连接方法、设备及系统 - Google Patents

一种无线网络连接方法、设备及系统 Download PDF

Info

Publication number
WO2016029854A1
WO2016029854A1 PCT/CN2015/088139 CN2015088139W WO2016029854A1 WO 2016029854 A1 WO2016029854 A1 WO 2016029854A1 CN 2015088139 W CN2015088139 W CN 2015088139W WO 2016029854 A1 WO2016029854 A1 WO 2016029854A1
Authority
WO
WIPO (PCT)
Prior art keywords
information
connection
authentication information
authentication
sent
Prior art date
Application number
PCT/CN2015/088139
Other languages
English (en)
French (fr)
Inventor
陈济
方平
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2016029854A1 publication Critical patent/WO2016029854A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols

Definitions

  • the present invention relates to the field of communications, and in particular, to a wireless network connection method, device, and system.
  • Wi-Fi Wireless Fidelity
  • each STA Station
  • AP Access Point, access point
  • the video on the mobile phone should be transmitted to the TV for playback.
  • the mobile phone and the TV should establish a connection with the AP.
  • the video on the mobile phone is first sent from the mobile phone to the mobile phone.
  • the AP is then sent by the AP to the TV for playback. This causes the two network devices to transmit data through the access device when performing data transmission in the wireless network, which is equivalent to transmitting the data twice, consuming too much network resources, and causing waste of network resources.
  • the embodiments of the present invention provide a wireless network connection method, device, and system, which are used to solve the problem that a network device occupies excessive network resources and causes network resources to be wasted when transmitting data in a wireless network.
  • the present invention provides a wireless network connection method, including:
  • the first device sends a first negotiation message to the second device by using the access device, where the first negotiation message includes end-to-end network P2P connection capability information of the first device;
  • the first device establishes a P2P connection with the second device according to the P2P connection capability information of the second device.
  • the P2P connection capability information of the first device includes P2P address information of the first device
  • the P2P connection capability information of the second device includes P2P address information of the second device.
  • the method further includes:
  • the first device sends the first monitoring rule information to the second device, where the first monitoring rule information includes at least one of preset time period information and preset channel information, where the preset time period information is used. Instructing the first device to receive the first measurement message, where the preset channel information is used to indicate that the first device receives the channel occupied by the first measurement message, where the first monitoring rule information is Transmitting, by the access device, the second device;
  • the first device Receiving, by the first device, the first measurement message sent by the second device according to the first monitoring rule information, where the first measurement message is used to indicate that when the first device receives the first measurement In the message, the first device is located in the coverage of the second device, and the first measurement message is directly sent by the second device to the first device.
  • the method further includes:
  • the first device receives the second monitoring rule information that is sent by the second device, where the second monitoring rule information includes at least one of preset time period information and preset channel information, where the preset time period information is used.
  • the preset channel information is used to instruct the second device to receive the second measurement period, where the second device receives the second measurement message. a channel occupied by the message, where the second monitoring rule information is forwarded by the access device to the first device;
  • the first device sends a second measurement message to the second device according to the second monitoring rule information, where the second measurement message is used to indicate that when the second device receives the second measurement message,
  • the second device is located within the coverage of the first device, and the second measurement message is directly sent by the first device to the second device.
  • the method further includes:
  • the first device sends first authentication information to the second device, where the first authentication information is forwarded by the access device to the second device; the first authentication information is used in the first The device performs authentication during the process of establishing a P2P connection with the second device;
  • the first device receives the second authentication information sent by the second device, where the second authentication information is forwarded by the access device to the first device, and the second authentication information is used in the The first device and the second device perform authentication during the establishment of a P2P connection.
  • the method further includes:
  • the method further includes:
  • the first device sends fourth authentication information to the second device, where the fourth authentication information is forwarded by the access device to the second device, or the fourth authentication information is used by the first device.
  • the device is directly sent to the second device, and the fourth authentication information is used for performing authentication in the process of establishing a P2P connection between the first device and the second device.
  • the method further includes:
  • the first device receives a connection command sent by the access device, where the connection command is used to indicate that the first device establishes a P2P connection with the second device.
  • the present invention provides a wireless network connection method, including:
  • the second device sends a second negotiation message to the first device, where the second negotiation message includes P2P connection capability information of the second device.
  • the P2P connection capability information of the first device includes P2P address information of the first device
  • the P2P connection capability information of the second device includes P2P address information of the second device.
  • the method further includes:
  • the second device receives the first monitoring rule information that is sent by the first device, where the first monitoring rule information includes at least one of preset time period information and preset channel information, where the preset time period information is used.
  • the preset channel information is used to indicate that the first device receives the channel occupied by the first measurement message, where the first device receives the first measurement message, the first monitoring rule information. Forwarded by the access device to the second device;
  • the second device sends the first measurement message to the first device according to the first monitoring rule information, where the first measurement message is used to indicate that when the first device receives the first measurement message
  • the first device is located within the coverage of the second device, and the first measurement message is directly sent by the second device to the first device.
  • the method further includes:
  • the second device sends the second monitoring rule information to the first device, where the second monitoring rule information includes at least one of preset time period information and preset channel information, where the preset time period information is used. And a period of time for the second device to receive the second measurement message, where the preset channel information is used to indicate that the second device receives the channel occupied by the second measurement message, where the second monitoring rule information is Transmitting, by the access device, the first device;
  • the second device Receiving, by the second device, the second measurement message sent by the first device according to the second monitoring rule information, where the second measurement message is used to indicate when the second device receives the second measurement message
  • the second device is located within the coverage of the first device, and the second measurement message is directly sent by the first device to the second device.
  • the method further includes:
  • the second device sends second authentication information to the first device, where the second authentication information is forwarded by the access device to the first device, and the second authentication information is used in the The first device performs authentication during the P2P connection with the second device.
  • the method further includes:
  • the second device sends third authentication information to the first device, where the third authentication information is forwarded by the access device to the first device, or the third authentication information is used by the second device
  • the device is directly sent to the first device, and the third authentication information is used to perform authentication in the process of establishing a P2P connection between the first device and the second device;
  • the method further includes:
  • the second device receives the fourth device to send fourth authentication information, where the fourth authentication information is forwarded by the access device to the second device, or the fourth authentication information is used by the first device.
  • the device is directly sent to the second device, and the fourth authentication information is used for performing authentication in the process of establishing a P2P connection between the first device and the second device.
  • the present invention provides a first device, which is applied to a wireless network, where the first device includes:
  • a sending unit configured to send, by using an access device, a first negotiation message to the second device, where the first negotiation message includes end-to-end network P2P connection capability information of the first device;
  • a receiving unit configured to receive a second negotiation message sent by the second device, where the second negotiation message includes P2P connection capability information of the second device;
  • a connecting unit configured to establish a P2P connection with the second device according to the P2P connection capability information of the second device received by the receiving unit.
  • the P2P connection capability information of the first device includes P2P address information of the first device
  • the P2P connection capability information of the second device includes P2P address information of the second device.
  • the sending unit is further configured to send the first monitoring rule information to the second device, where the first monitoring rule information includes preset time period information and preset channel information to One of the preset time period information is used to indicate that the first device receives the first measurement message, and the preset channel information is used to indicate that the first device receives the first measurement message.
  • the occupied channel, the first monitoring rule information is forwarded by the access device to the second device;
  • the receiving unit is further configured to receive, according to the first monitoring rule information, the first measurement message that is sent by the second device, where the first measurement message is used to indicate that when the first device receives the When the first measurement message is received, the first device is located within the coverage of the second device, and the first measurement message is directly sent by the second device to the first device.
  • the receiving unit is further configured to receive the second monitoring rule information that is sent by the second device, where the second monitoring rule information includes at least one of preset time period information and preset channel information, where the preset time is The segment information is used to indicate a time period in which the second device receives the second measurement message, where the preset channel information is used to indicate that the second device receives the channel occupied by the second measurement message, and the second The monitoring rule information is forwarded by the access device to the first device;
  • the sending unit is further configured to send the second measurement message to the second device according to the second monitoring rule information, where the second measurement message is used to indicate that when the second device receives the When the message is measured, the second device is located within the coverage of the first device, and the second measurement message is directly sent by the first device to the second device.
  • the sending unit is further configured to send first authentication information to the second device, where the first authentication information is forwarded by the access device to the second device; the first authentication information is used in the Performing authentication during the process of establishing a P2P connection between the first device and the second device;
  • the receiving unit is further configured to receive second authentication information that is sent by the second device, where the second authentication information is forwarded by the access device to the first device,
  • the second authentication information is used for performing authentication in the process of establishing a P2P connection between the first device and the second device.
  • the receiving unit is further configured to: after sending the first authentication information to the second device, receive third authentication information that is sent by the second device, where the third authentication information is forwarded by the access device to The first device, or the third authentication information is directly sent by the second device to the first device, where the third authentication information is used to establish the first device and the second device. Authentication during P2P connection;
  • the sending unit is further configured to: after receiving the third authentication information sent by the second device, send fourth authentication information to the second device, where the fourth authentication information is used by the access device Forwarding to the second device, or the fourth authentication information is directly sent by the first device to the second device, and the fourth authentication information is used in the first device and the second device
  • the device performs authentication during the establishment of a P2P connection.
  • the receiving unit is further configured to receive a connection command sent by the access device, where the connection command is used to instruct the first device to establish a P2P connection with the second device.
  • the present invention provides a second device, which is applied to a wireless network, where the second device includes:
  • a receiving unit configured to receive a first negotiation message sent by the first device, where the first negotiation message includes P2P connection capability information of the first device;
  • a connecting unit configured to confirm, according to the P2P connection capability information of the first device, that the first device is capable of establishing a P2P connection;
  • a sending unit configured to send a second negotiation message to the first device, where the second negotiation message includes P2P connection capability information of the second device.
  • the P2P connection capability information of the first device includes P2P address information of the first device
  • the P2P connection capability information of the second device includes P2P address information of the second device.
  • the receiving unit is further configured to receive the first monitoring rule information that is sent by the first device, where the first monitoring rule information includes at least one of preset time period information and preset channel information, where the preset time is The segment information is used to indicate a time period in which the first device receives the first measurement message, where the preset channel information is used to indicate that the first device receives the channel occupied by the first measurement message, where the first The monitoring rule information is forwarded by the access device to the second device;
  • the sending unit is configured to send, according to the first monitoring rule information, a first measurement message to the first device, where the first measurement message is used to indicate that when the first device receives the first measurement message
  • the first device is located within the coverage of the second device, and the first measurement message is directly sent by the second device to the first device.
  • the sending unit is further configured to send the second monitoring rule information to the first device, where the second monitoring rule information includes at least one of preset time period information and preset channel information, where the preset time period is The information is used to indicate a time period in which the second device receives the second measurement message, where the preset channel information is used to indicate that the second device receives the channel occupied by the second measurement message, and the second monitoring rule Information is forwarded by the access device to the first device;
  • the receiving unit is further configured to receive, according to the second monitoring rule information, the first device to send the second measurement message, where the second measurement message is used to indicate that when the second device receives the When the message is measured, the second device is located within the coverage of the first device, and the second measurement message is directly sent by the first device to the second device.
  • the receiving unit is further configured to receive first authentication information sent by the first device, where The first authentication information is forwarded by the access device to the second device; the first authentication information is used to perform authentication in a process of establishing a P2P connection between the first device and the second device;
  • the sending unit is further configured to send, to the first device, second authentication information, where the second authentication information is forwarded by the access device to the first device, where the second authentication information is used. Performing authentication in the process of establishing a P2P connection between the first device and the second device.
  • the sending unit is further configured to: after receiving the first authentication information sent by the first device, send third authentication information to the first device, where the third authentication information is forwarded by the access device to The first device, or the third authentication information is directly sent by the second device to the first device, where the third authentication information is used to establish the first device and the second device. Authentication during P2P connection;
  • the receiving unit is further configured to: after sending the third authentication information to the first device, receive the first device to send fourth authentication information, where the fourth authentication information is forwarded by the access device To the second device, or the fourth authentication information is directly sent by the first device to the second device, and the fourth authentication information is used by the first device and the second device Authentication is established during the establishment of a P2P connection.
  • the present invention provides a wireless network system, including a first device, a second device, and an access device, where the first device and the second device are connected by using the access device;
  • the first device is the first device described in the third aspect or any one of the possible implementation manners of the third aspect;
  • the second device is the second device described in the fourth aspect or any one of the possible implementation manners of the fourth aspect.
  • the first device sends a first negotiation message to the second device, so that the second device confirms that the first device can establish a P2P connection, and then the first device receives the second device.
  • the first device and the second device negotiate through the access device, thereby establishing a P2P connection, so that the first device and the second device can directly perform data transmission through the P2P network, thereby solving the problem of transmitting data in the wireless network.
  • a network device occupies too many network resources, causing a problem of wasted network resources.
  • FIG. 1 is a schematic flowchart of a method for connecting a wireless network according to an embodiment of the present invention
  • FIG. 2 is a schematic flowchart of another wireless network connection method according to an embodiment of the present invention.
  • FIG. 3 is a schematic diagram of a capability negotiation process according to an embodiment of the present invention.
  • FIG. 5 is a schematic flowchart of an authentication preparation process according to an embodiment of the present invention.
  • FIG. 6 is a schematic structural diagram of a first device according to an embodiment of the present invention.
  • FIG. 7 is a schematic structural diagram of a second device according to an embodiment of the present invention.
  • FIG. 8 is a schematic structural diagram of a first device according to another embodiment of the present invention.
  • FIG. 9 is a schematic structural diagram of a second device according to another embodiment of the present invention.
  • FIG. 10 is a schematic structural diagram of a wireless network system according to an embodiment of the present invention.
  • An embodiment of the present invention provides a wireless network connection method, which is optionally applied to a first device, as shown in FIG. 1, and includes the following steps:
  • the first device sends a first negotiation message to the second device by using the access device.
  • the first negotiation message includes the P2P connection capability information of the first device, so that the second device confirms that the first device can establish a peer-to-peer network P2P (Peer to Peer) connection and establish a P2P connection with the first device, where The P2P connection capability information of the first device is forwarded to the second device by using the access device, and the P2P connection capability information of the first device is used to indicate that the first device can establish a P2P connection.
  • the device establishes a connection.
  • the first device and the second device may be electronic devices that support wireless network functions, such as mobile phones, televisions, and computers.
  • the P2P connection capability information of the first device may include P2P address information of the first device.
  • the P2P connection capability information may include the P2P identifier. If the P2P connection capability information of the first device includes the P2P identifier, the first device has the P2P connection capability, and the P2P connection capability information of the first device does not include.
  • the P2P identifier indicates that the first device does not have the P2P connection capability, so that the second device can confirm that the first device can establish a P2P connection by confirming the P2P identifier in the P2P connection capability information of the first device.
  • P2P refers to a network that shares computer resources and services through direct exchange.
  • Network devices in a P2P network are in a peer-to-peer position.
  • Each computer can act as a requester for network services and respond to requests from other computers to provide resources and services.
  • these resources and services include: information sharing and exchange, computing resources (such as CPU sharing), storage sharing (such as the use of cache and disk space).
  • the network device may be a Wi-Fi enabled terminal device, and the access device may be a Wi-Fi enabled access point.
  • the first device can be a Wi-Fi enabled terminal device
  • the second device can also be a Wi-Fi enabled terminal device.
  • the first device is a Wi-Fi enabled mobile phone
  • the second device is a Wi-Fi enabled TV
  • the access device is a Wi-Fi enabled home gateway.
  • the first device is sent to the second device by using the access device, which means that the first device and the second device are both connected to the access device. Messages that they communicate directly can be forwarded through the access device.
  • the second device communicates with the second device, and in addition to being able to forward through the access point, they can also directly communicate.
  • This type of communication structure It can be called a peer-to-peer network, that is, a P2P network.
  • the P2P network of this embodiment may be a network that communicates in accordance with the Wi-Fi Direct protocol.
  • the address used is different, including the MAC (Media Access Control) address.
  • the address of the first device or the second device connected to the access device is an infrastructure network address, and the address used by the first device or the second device in the P2P network is a P2P address. Even if the first device and the second device acquire the infrastructure network address of the other party and communicate through the access device, if the P2P address message is not sent to each other, the first device and the second device cannot acquire the P2P address of the other party.
  • the first negotiation message sent by the first device to the second device may be a frame defined in the Wi-Fi protocol, such as a management frame, a control frame, or a data frame.
  • the P2P connection capability information carried in the first negotiation message may be carried by a specific field in the management frame, the control frame, or the data frame, or may be a specific information element in the management frame, the control frame, or the data frame. (Information Element) to carry.
  • the P2P connection capability information of the first device may include the address information of the first device in the P2P network, and the address information may be the MAC address of the device, or may be another address identifier, such as the identifier information after the MAC address is processed, such as Short address or hashed value.
  • the P2P connection capability information may further include other information, for example, the P2P connection capability information of the first device directly indicates whether the first device can establish a P2P connection indication, and when the first device is instructed to establish a P2P connection, the P2P of the first device
  • the connection capability information may also indicate what role the first device can be, such as a group Owner (GO) role, a group client role, and the like.
  • the first device receives the second negotiation message sent by the second device.
  • the second negotiation message is forwarded to the first device by the access device, or the second negotiation message is directly sent by the second device to the first device, where the second negotiation message includes the address information of the second device and the P2P of the second device.
  • the connection capability information, the P2P connection capability information of the second device is used to indicate that the second device can establish a P2P connection.
  • the P2P connection capability information of the second device may include P2P address information of the second device.
  • the P2P connection capability information includes a P2P identifier, and if the P2P connection capability information of the second device includes the P2P identifier, the second device has a P2P connection capability, and if the P2P connection capability information of the second device does not include the P2P Identifier, It indicates that the second device does not have the P2P connection capability, so that the first device can confirm that the second device can establish a P2P connection by confirming the P2P identifier in the P2P connection capability information of the second device.
  • the second negotiation message may be a management frame, a control frame, or a data frame defined in the Wi-Fi protocol, and may be, after the second device receives the first negotiation message, specifically to the first device.
  • the frame sent in the broadcast mode may also be a frame that is searched for by the first device in a broadcast form after the first negotiation message is used to know the identifier information carried in the address information of the first device, such as a probe request.
  • the second device P2P connection capability information may include the address information of the second device in the P2P network, and the address information may be the MAC address of the second device, or may be another address identifier, such as the processed information of the MAC address, such as Short address or hashed value.
  • the P2P connection capability information of the second device may further include other information, for example, an indication information indicating whether the second device can establish a P2P connection, and when the second device is instructed to establish a P2P connection, the P2P connection capability information of the second device is further It can indicate what role the second device can be, such as a group owner (GO) role, a group client role, and the like.
  • the first device establishes a P2P connection with the second device according to the P2P connection capability information of the second device.
  • the first device and the second device may further determine the device type, that is, determine which device is the GO (Group Owner) device, which A device acts as a client (group client) device. Compared to the client device, the GO device also needs to support group management functions.
  • the P2P connection cannot be established because the device type cannot be determined; The device can only function as a GO device.
  • the second device can only function as a client device. The first device functions as a client device. The second device can only function as a client device.
  • the first device functions as a client device
  • the second device functions as a GO device; if both the first device and the second device can function as a GO device and a client device, the device type is randomly determined.
  • the device can be configured as a GO device or a client device, or can be set according to specific conditions, and the present invention is not limited.
  • the first device sends a first negotiation message to the second device by using the access device, so that the second device confirms that the first device can establish a P2P connection, and then the first device receives the second device.
  • the P2P connection is finally established, so that the first device and the second device can directly perform data transmission through the P2P network, thereby solving the problem in the wireless network.
  • the network device occupies too many network resources, causing a problem of wasted network resources.
  • the embodiment of the present invention provides another wireless network connection method, which is applied to the second device. As shown in FIG. 2, the method includes the following steps:
  • the second device receives the first negotiation message sent by the first device.
  • the first negotiation message includes P2P connection capability information of the first device, so that the second device confirms that the first device can establish an end-to-end network P2P connection and establish a P2P connection with the first device, where the P2P connection capability information of the first device passes
  • the access device forwards to the second device, where the P2P connection capability information of the first device is used to indicate that the first device can establish a P2P connection.
  • the second device establishes a connection with the first device through the access device.
  • the P2P connection capability information of the first device may include P2P address information of the first device.
  • the P2P connection capability information may include the P2P identifier. If the P2P connection capability information of the first device includes the P2P identifier, the first device has the P2P connection capability, and the P2P connection capability information of the first device does not include.
  • the P2P identifier indicates that the first device does not have the P2P connection capability, so that the second device can confirm that the first device can establish a P2P connection by confirming the P2P identifier in the P2P connection capability information of the first device.
  • the network device may be a Wi-Fi enabled terminal device, and the access device may be a Wi-Fi enabled access point.
  • the first device can be a Wi-Fi enabled terminal device
  • the second device can also be a Wi-Fi enabled terminal device.
  • the first device is a Wi-Fi enabled mobile phone
  • the second device is a Wi-Fi enabled TV
  • the access device is a Wi-Fi enabled home gateway.
  • the second device receives the message of the first device, which may be received by the access device, where they are all connected to the access device, and the second device may receive the first device by using the access device.
  • the message to be forwarded may be forwarded.
  • the second device communicates with the second device. In addition to forwarding through the access point, they can also directly communicate.
  • This type of communication structure can be called a peer-to-peer network, that is, a P2P network.
  • the P2P network of this embodiment may be a network that communicates in accordance with the Wi-Fi Direct protocol.
  • the addresses used are different, including the MAC address.
  • the address of the first device or the second device connected to the access device is an infrastructure network address
  • the address used by the first device or the second device in the P2P network is a P2P address. Even if the first device and the second device acquire the infrastructure network address of the other party and communicate through the access device, if the P2P address message is not sent to each other, the first device and the second device cannot acquire the P2P address of the other party.
  • the first negotiation message sent by the first device received by the second device may be a frame defined in the Wi-Fi protocol, such as a management frame, a control frame, or a data frame.
  • the P2P connection capability information carried in the first negotiation message may be carried by a specific field in the management frame, the control frame, or the data frame, or may be a specific information element in the management frame, the control frame, or the data frame. (Information Element) to carry.
  • the P2P connection capability information of the first device may include the address information of the first device in the P2P network, and the address information may be the MAC address of the device, or may be another address identifier, such as the identifier information after the MAC address is processed, such as Short address or hashed value.
  • the P2P connection capability information may further include other information, for example, the P2P connection capability information of the first device directly indicates whether the first device can establish a P2P connection indication, and when the first device is instructed to establish a P2P connection, the P2P of the first device
  • the connection capability information may also indicate what role the first device can be, such as a group Owner (GO) role, a group client role, and the like.
  • the second device confirms that the first device can establish a P2P connection according to the P2P connection capability information of the first device.
  • the first device and the second device may further determine the device type, that is, determine which device is the GO (Group Owner) device, which A device acts as a client (group client) device. Compared to the client device, the GO device also needs to support group management functions.
  • the P2P connection cannot be established because the device type cannot be determined; The device can only function as a GO device.
  • the second device can only function as a client device. The first device functions as a client device. The second device can only function as a client device.
  • the first device functions as a client device
  • the second device functions as a GO device; if both the first device and the second device can function as a GO device and a client device, the device type is randomly determined.
  • the device can be configured as a GO device or a client device, or can be set according to specific conditions, and the present invention is not limited.
  • the second device sends a second negotiation message to the first device.
  • the second device sends a second negotiation message to the first device, so that the first device confirms that the second device can establish a P2P connection and establish a P2P connection with the second device, where the second negotiation message is forwarded to the first device by using the access device.
  • the second negotiation message is directly sent by the second device to the first device, where the second negotiation message includes the address information of the second device and the P2P connection capability information of the second device, where the P2P connection capability information of the second device is used. Instructing the second device to establish a P2P connection.
  • the second negotiation message may be a management frame, a control frame, or a data frame defined in the Wi-Fi protocol, and may be, after the second device receives the first negotiation message, specifically to the first device.
  • the frame sent in the broadcast mode may also be a frame that is searched for by the first device in a broadcast form after the first negotiation message is used to know the identifier information carried in the address information of the first device, such as a probe request.
  • the second device P2P connection capability information may include the address information of the second device in the P2P network, and the address information may be the MAC address of the second device, or may be another address identifier, such as the processed information of the MAC address, such as Short address or hashed value.
  • the P2P connection capability information of the second device may further include other information, for example, an indication information indicating whether the second device can establish a P2P connection, and when the second device is instructed to establish a P2P connection, the P2P connection capability information of the second device is further It can indicate what role the second device can be, such as a group owner (GO) role, a group client role, and the like.
  • the wireless network connection method receives the first negotiation message sent by the first device by using the second device, so as to confirm that the first device can establish a P2P connection. Then, the second device confirms that the first device can establish a P2P connection according to the P2P connection capability information of the first device, and the second device sends a second negotiation message to the first device, so as to confirm that the second device can establish a P2P connection.
  • the first device and the second device negotiate through the access device, thereby establishing a P2P connection, so that the first device and the second device can directly perform data transmission through the P2P network, and the transmission in the wireless network is solved.
  • the network device occupies too much network resources, causing a problem of wasted network resources.
  • another embodiment of the present invention provides a wireless network connection method, which is applied to a first device and a second device.
  • the wireless network connection method provided in this embodiment includes Capacity negotiation process, scope confirmation process and certification preparation process.
  • the capability negotiation process includes the following steps:
  • the first device sends a first negotiation message to the second device by using the access device.
  • the first negotiation message includes the P2P connection capability information of the first device, so that the second device confirms that the first device can establish a peer-to-peer network P2P (Peer to Peer) connection and establish a P2P connection with the first device, where The P2P connection capability information of the first device is forwarded to the second device by using the access device, and the P2P connection capability information of the first device is used to indicate that the first device can establish a P2P connection.
  • the device establishes a connection.
  • the first device and the second device may be electronic devices that support wireless network functions, such as mobile phones, televisions, and computers.
  • the P2P connection capability information of the first device may include P2P address information of the first device.
  • the P2P connection capability information includes a P2P identifier, and if the P2P connection capability information of the first device includes a P2P identifier, the first device is configured to have a P2P connection capability, and if the P2P connection capability information of the first device does not include the P2P The identifier indicates that the first device does not have the P2P connection capability, so that the second device confirms that the first device can establish an end-to-end network P2P connection, where the P2P connection capability information of the first device is forwarded to the second device by the access device.
  • P2P refers to a network that shares computer resources and services through direct exchange.
  • Network devices in a P2P network are in a peer-to-peer position, and each computer can charge When the requester of the network service responds to requests from other computers, resources and services are provided.
  • resources and services include: information sharing and exchange, computing resources (such as CPU sharing), storage sharing (such as the use of cache and disk space).
  • the network device may be a Wi-Fi enabled terminal device, and the access device may be a Wi-Fi enabled access point.
  • the first device can be a Wi-Fi enabled terminal device
  • the second device can also be a Wi-Fi enabled terminal device.
  • the first device is a Wi-Fi enabled mobile phone
  • the second device is a Wi-Fi enabled TV
  • the access device is a Wi-Fi enabled home gateway.
  • the second device receives the message of the first device, which may be received by the access device, where they are all connected to the access device, and the second device may receive the message that the first device forwards through the access device.
  • the second device communicates with the second device. In addition to forwarding through the access point, they can also directly communicate.
  • This type of communication structure can be called a peer-to-peer network, that is, a P2P network.
  • the P2P network of this embodiment may be a network that communicates in accordance with the Wi-Fi Direct protocol.
  • the addresses used are different, including the MAC address.
  • the address of the first device or the second device connected to the access device is an infrastructure network address
  • the address used by the first device or the second device in the P2P network is a P2P address. Even if the first device and the second device acquire the infrastructure network address of the other party and communicate through the access device, if the P2P address message is not sent to each other, the first device and the second device cannot acquire the P2P address of the other party.
  • the first negotiation message sent by the first device received by the second device may be a frame defined in the Wi-Fi protocol, such as a management frame, a control frame, or a data frame.
  • the P2P connection capability information carried in the first negotiation message may be carried by a specific field in the management frame, the control frame, or the data frame, or may be a specific information element in the management frame, the control frame, or the data frame. (Information Element) to carry.
  • the P2P connection capability information of the first device may include the address information of the first device in the P2P network, and the address information may be the MAC address of the device, or may be another address identifier, such as the identifier information after the MAC address is processed, such as Short address or hashed value.
  • the P2P connection capability information may also include other information, for example, the first The device's P2P connection capability information directly indicates whether the first device can establish a P2P connection.
  • the P2P connection capability information of the first device can also indicate the role of the first device. Such as Group Owner (GO) role, group client (Client) role, and so on.
  • the second device sends a second negotiation message to the first device.
  • the second device may send the second negotiation message to the first device by using the access device, or may directly send the second negotiation message to the first device.
  • the second device sends a second negotiation message to the first device, so that the first device confirms that the second device can establish a P2P connection and establish a P2P connection with the second device, where the second negotiation message is forwarded to the first device by using the access device.
  • the second negotiation message is directly sent by the second device to the first device, and the P2P connection capability information of the second device is used to indicate that the second device can establish a P2P connection.
  • the second negotiation message may be a management frame, a control frame, or a data frame defined in the Wi-Fi protocol, and may be, after the second device receives the first negotiation message, specifically to the first device.
  • the frame sent in the broadcast mode may also be a frame that is searched for by the first device in a broadcast form after the first negotiation message is used to know the identifier information carried in the address information of the first device, such as a probe request.
  • the second device P2P connection capability information may include the address information of the second device in the P2P network, and the address information may be the MAC address of the second device, or may be another address identifier, such as the processed information of the MAC address, such as Short address or hashed value.
  • the P2P connection capability information of the second device may further include other information, for example, an indication information indicating whether the second device can establish a P2P connection, and when the second device is instructed to establish a P2P connection, the P2P connection capability information of the second device is further It can indicate what role the second device can be, such as a group owner (GO) role, a group client role, and the like.
  • the first negotiation message further includes first listening rule information, or the second negotiation message further includes second monitoring rule information.
  • the first negotiation message further includes first monitoring rule information
  • the second negotiation message further includes second monitoring rule information
  • the first negotiation message further includes first authentication information, and the second negotiation message is further included.
  • the second authentication information is included; or the first negotiation message further includes fourth authentication information, and the second negotiation message further includes third authentication information.
  • the range confirmation process includes the following steps:
  • S401 Send monitoring rule information by using an access device.
  • the first device sends the first monitoring rule information to the second device by using the access device.
  • the second device is connected.
  • the ingress device sends the second monitoring rule information to the first device.
  • the first monitoring rule information includes at least one of preset time period information and preset channel information, where the preset time period information is used to indicate a time period during which the first device receives the first measurement message, and preset channel information is used for Instructing the first device to receive the channel occupied by the first measurement message, where the second monitoring rule information includes at least one of a time when the second device receives the measurement message and a channel where the second device receives the measurement message, where the first monitoring rule information is accessed by The device forwards to the second device.
  • the first device receives the first measurement message sent by the second device according to the first monitoring rule information, where the first measurement message is directly sent by the second device to the first device, where the first measurement message is used to indicate that the first device is Receiving the first measurement message, the first device is located in the coverage of the second device; the first device sends the second measurement message to the second device according to the second monitoring rule information, where the second measurement message is directly sent by the first device To the second device, the second measurement message is used to indicate that when the second device receives the second measurement message, the second device is located within the coverage of the first device.
  • the first monitoring rule information is forwarded by the access device to the second device, and the second device sends the second monitoring rule information to the first device by using the access device.
  • the first monitoring rule information may be included in the first negotiation message and forwarded to the first device by using the access device.
  • the second monitoring rule information may be included in the second negotiation message and forwarded to the first device by using the access device.
  • S402. Send a first measurement message or a second measurement message.
  • the second device if the second device receives the first monitoring rule information sent by the first device by using the access device, the second device sends the first measurement message to the first device according to the first monitoring rule information, if When the first device receives the first measurement message, it is proved that the first device is located within the signal coverage of the second device.
  • the signal coverage of the first device and the second device are similar, first.
  • the device receiving the first measurement message may also prove that the second device is located within the signal coverage of the first device.
  • the first monitoring rule information includes at least one of preset time period information and preset channel information, and the first monitoring rule information is forwarded by the access device to the second device.
  • the first device receives the second monitoring rule information sent by the second device by using the access device, the first device sends the second measurement message to the second device according to the second monitoring rule information, if the second device receives the second measurement
  • the message indicates that the second device is located within the signal coverage of the first device.
  • the signal coverage of the first device and the second device are similar, and the second device receives the second measurement message. It can also be demonstrated that the first device is within the signal coverage of the second device.
  • the second monitoring rule information includes at least one of preset time period information and preset channel information, where the preset time period information is used to indicate a time period during which the second device receives the second measurement message, and the preset channel information is used to indicate The second device receives the channel occupied by the second measurement message, and the second monitoring rule information is forwarded by the access device to the first device.
  • the second negotiation message may be directly sent to the first device by being carried on the first measurement message.
  • the second device when the second device sends the first measurement message to the first device according to the first monitoring rule information, the second device may continuously send the message until the first device feedback is received.
  • the first device sends a second measurement message to the second device according to the second monitoring rule, or may continuously send until the second device feedback that has received the second measurement message is received. As of the news.
  • the authentication preparation process includes the following steps:
  • the first device sends the first authentication information to the second device by using the access device
  • the second device is first to the first device.
  • the device sends the second authentication information.
  • the first authentication information and the second authentication information are used to perform authentication in the process of establishing a P2P connection between the first device and the second device.
  • the first authentication information when the first device sends the first authentication information to the second device by using the access device, the first authentication information may be included in the first negotiation message and forwarded by the access device.
  • the second authentication information may be included in the second negotiation message and forwarded to the first device by the access device, or second The authentication information may be included in the second negotiation message and sent directly by the second device to the first device.
  • the first authentication information may be generated by the first device itself, and may be a string, for example, “1234”.
  • the second authentication information may be generated by the second device itself, and may be a string, such as an “ABCD” string.
  • step S501 in the first application scenario, after the second device receives the first authentication information sent by the first device, the second device sends the third authentication information back to the first device, so that In a second application scenario, after the first device receives the second authentication information sent by the second device, the first device sends the fourth authentication information back to the second device, so that The second device authenticates during the process of establishing a P2P connection with the first device.
  • the third authentication information may be included in the second negotiation message by using the access device. Forwarding to the first device, or the third authentication information may be included in the second negotiation message and sent by the second device to the first device.
  • the first device after the first device receives the second authentication information sent by the second device, the first device sends the fourth authentication information to the second device, where the fourth authentication information is forwarded by the access device to The second device, or the fourth authentication information is directly sent by the first device to the second device.
  • the fourth authentication information is used to build on the first device and the second device. Certification is performed during the P2P connection process.
  • the authentication mentioned here means that when the first device and the second device establish a P2P connection, it is determined that the other party is the device connected to the network connected by the access device.
  • S503 Perform authentication in the process of establishing a P2P connection between the first device and the second device.
  • the first device after receiving the third authentication information sent by the second device, the first device performs authentication on the second device during the establishment of the P2P connection, and if the second device passes the verification,
  • the second device is a device that needs to establish a connection with the first device during the capability negotiation process.
  • the second device after receiving the fourth authentication information sent by the first device, the second device authenticates the first device in the process of establishing a P2P connection, and if the first device passes the verification, the first device is capable. A device that needs to establish a connection with the second device during the negotiation process.
  • the first device and the second device exchange information through the access device to confirm a shared information, and based on the shared information, perform identity authentication during the P2P connection establishment process.
  • the first device sends the first authentication information to the second device by using the access device, where the first authentication information is the shared information of the first device and the second device.
  • the first device sends the first authentication information to the second device by using the access device, and the second device sends the third authentication information to the first device through the access device or through the P2P network.
  • the third authentication information is shared information of the first device and the second device.
  • the second device sends the second authentication information to the first device by using the access device, where the second authentication information is the shared information of the first device and the second device.
  • the second device sends the second authentication information to the first device by using the access device, and the first device sends the fourth authentication information to the second device.
  • the second authentication information and the fourth authentication information are first.
  • the first device and the second device may have multiple authentication methods in the P2P establishment process based on the shared information:
  • the first device and the second device use the shared information as a PMK (Pairwise Master Key) in a four-step handshake in the Wi-Fi protocol, and perform a four-step handshake process. Based on the shared information PMK, both parties The first device and the second device can authenticate the identity of the other party and negotiate a key for communication between the two parties.
  • PMK Packetwise Master Key
  • the first device may directly send the information processed by the shared information to the second device, and the second device confirms that the first device has the shared information according to the processed information, thereby authenticating the first The identity of a device; or, in the process of establishing a P2P connection, the second device may directly send the information processed by the shared information to the first device, and the first device confirms that the second device has the shared information according to the processed information. Authenticate the identity of the second device.
  • the data structure may be the frame structure shown in Table 1.
  • the first column indicates the header portion of the MAC
  • the second column indicates the header portion of the data link control layer
  • the third column is the protocol identifier
  • the fourth column indicates the message type. For indicating whether the first message or the second message, the fifth column refers to the specific content carried by the message.
  • the access device may send a connection command to the first device.
  • This connection command can be issued by the access device based on the current network conditions. For example, the access device determines that the current network is relatively congested, and the data transmitted between the first device and the second device is transited through the access device, resulting in waste of channel resources. At this time, the access device sends a connection to the first device. The command instructs the first device to establish a P2P connection with the second device.
  • the first device sends a first negotiation message to the second device, so that the second device confirms that the first device can establish a P2P connection, and then the first device receives the second device.
  • the first device and the second device negotiate through the access device, thereby establishing a P2P connection, so that the first device and the second device can directly perform data transmission through the P2P network, and the transmission in the wireless network is solved.
  • the network device occupies too much network resources, causing a problem of wasted network resources.
  • the embodiment of the present invention provides a first device 60, which is applied to a wireless network.
  • the first device 60 includes a sending unit 601, a receiving unit 602, and a connecting unit 603.
  • the sending unit 601 is configured to send, by using an access device, a first negotiation message to the second device, where the first negotiation message includes end-to-end network P2P connection capability information of the first device.
  • the receiving unit 602 is configured to receive a second negotiation message sent by the second device, where the second negotiation message includes P2P connection capability information of the second device.
  • the connecting unit 603 is configured to establish a P2P connection with the second device according to the P2P connection capability information of the second device received by the receiving unit 602.
  • the P2P connection capability information of the first device 60 includes P2P address information of the first device 60.
  • the P2P connection capability information of the second device includes P2P address information of the second device.
  • the sending unit 601 sends the first monitoring rule information to the second device, where the first monitoring rule information includes at least one of preset time period information and preset channel information, where the preset time period information is used to indicate the first device.
  • the time period of receiving the first measurement message is 60.
  • the preset channel information is used to indicate that the first device 60 receives the channel occupied by the first measurement message, and the first monitoring rule information is forwarded by the access device to the second device.
  • the receiving unit 602 is further configured to receive, according to the first monitoring rule information, the first measurement message sent by the second device, where the first measurement message is used to indicate that when the first device 60 receives the first measurement message, the first device 60 is located in the second Within the coverage of the device, the first measurement message is sent directly by the second device to the first device 60.
  • the receiving unit 602 is further configured to receive the second monitoring rule information that is sent by the second device, where the second monitoring rule information includes the preset time period information and the preset channel information.
  • the first time period is used to indicate that the second device receives the second measurement message
  • the preset channel information is used to indicate that the second device receives the channel occupied by the second measurement message, and the second monitoring rule information is connected.
  • the incoming device is forwarded to the first device 60.
  • the sending unit 601 is further configured to send, according to the second monitoring rule information, a second measurement message to the second device, where the second measurement message is used to indicate that when the second device receives the second measurement message, the second device is located at the first device 60. Within the coverage, the second measurement message is sent directly by the first device 60 to the second device.
  • the sending unit 601 is further configured to send the first authentication information to the second device, where the first authentication information is forwarded by the access device to the second device, where the first authentication information is used to establish the first device 60 and the second device. Authentication is performed during the P2P connection process.
  • the receiving unit 602 is further configured to receive the second authentication information that is sent by the second device, where the second authentication information is forwarded by the access device to the first device 60, where the second authentication information is used to establish the first device 60 and the second device. Authentication is performed during the P2P connection process.
  • the receiving unit 602 is further configured to: after sending the first authentication information to the second device, receive the third authentication information that is sent by the second device, where the third authentication information is forwarded by the access device to the first device 60, or The third authentication information is directly sent by the second device to the first device 60, and the third authentication information is used for performing authentication in the process of establishing the P2P connection between the first device 60 and the second device.
  • the sending unit 601 is further configured to: after receiving the third authentication information sent by the second device, send the fourth authentication information to the second device, where the fourth authentication information is forwarded by the access device to the second device, or the fourth authentication information
  • the first device 60 is directly sent to the second device, and the fourth authentication information is used to perform authentication in the process of establishing the P2P connection between the first device 60 and the second device.
  • the receiving unit 602 is further configured to receive a connection command sent by the access device, where the connection command is used to instruct the first device 60 to establish a P2P connection with the second device.
  • the first device provided by the embodiment of the present invention sends a first negotiation message to the second device, so that the second device confirms that the first device can establish a P2P connection, and then the first device receives the second negotiation message sent by the second device. And confirming that the second device can establish a P2P connection according to the P2P connection capability information of the second device.
  • the first device and the second device negotiate through the access device, thereby establishing a P2P connection.
  • the first device and the second device can directly perform data transmission through the P2P network, which solves the problem that the network device occupies excessive network resources when the data is transmitted in the wireless network, thereby causing waste of network resources.
  • the embodiment of the present invention provides a second device 70, which is applied to a wireless network.
  • the method includes a sending unit 701, a receiving unit 702, and a connecting unit 703.
  • the receiving unit 702 is configured to receive a first negotiation message sent by the first device, where the first negotiation message includes P2P connection capability information of the first device.
  • the connecting unit 703 is configured to confirm, according to the P2P connection capability information of the first device, that the first device can establish a P2P connection.
  • the sending unit 701 is configured to send a second negotiation message to the first device, where the second negotiation message includes P2P connection capability information of the second device 70.
  • the P2P connection capability information of the first device includes P2P address information of the first device.
  • the P2P connection capability information of the second device 70 includes P2P address information of the second device 70.
  • the receiving unit 702 is further configured to receive the first monitoring rule information that is sent by the first device, where the first monitoring rule information includes at least one of preset time period information and preset channel information, where the preset time period information is used. And the preset channel information is used to indicate that the first device receives the channel occupied by the first measurement message, and the first monitoring rule information is forwarded by the access device to the second device 70, where the first device receives the first measurement message. .
  • the sending unit 701 is further configured to send, by using the first monitoring rule information, a first measurement message to the first device, where the first measurement message is used to indicate that when the first device receives the first measurement message, the first device is located at the second device. Within the coverage, the first measurement message is sent directly by the second device 70 to the first device.
  • the sending unit 701 is further configured to send the second monitoring rule information to the first device, where the second monitoring rule information includes at least one of preset time period information and preset channel information, where the preset time period information is used. And indicating that the second device 70 receives the second measurement message, the preset channel information is used to indicate that the second device 70 receives the channel occupied by the second measurement message, and the second monitoring rule information is forwarded by the access device to the first device.
  • the receiving unit 702 is further configured to: receive, according to the second monitoring rule information, the first device to send a second measurement message, where the second measurement message is used to indicate that when the second device 70 receives the second measurement message, the second device 70 is located at the first Within the coverage of the device, the second measurement message is sent directly by the first device to the second device 70.
  • the receiving unit 702 is further configured to receive the first authentication information sent by the first device, where the first authentication information is forwarded by the access device to the second device 70, where the first authentication information is used in the first device and the second device.
  • the device 70 performs authentication during the establishment of the P2P connection.
  • the sending unit 701 is further configured to send the second authentication information to the first device, where the second authentication information is forwarded by the access device to the first device, where the second authentication information is used to establish a P2P between the first device and the second device 70. Authenticate during the connection process.
  • the sending unit 701 is further configured to: after receiving the first authentication information sent by the first device, send the third authentication information to the first device, where the third authentication information is forwarded by the access device to the first device, or The third authentication information is directly sent by the second device 70 to the first device, and the third authentication information is used for performing authentication during the P2P connection between the first device and the second device 70.
  • the receiving unit 702 is further configured to: after the third authentication information is sent to the first device, the first device sends the fourth authentication information, where the fourth authentication information is forwarded by the access device to the second device 70, or the fourth authentication The information is directly sent by the first device to the second device 70, and the fourth authentication information is used for authentication during the P2P connection between the first device and the second device 70.
  • the second device receives the first negotiation message sent by the first device, so as to confirm that the first device can establish a P2P connection, and then the second device confirms the first device according to the P2P connection capability information of the first device.
  • a P2P connection can be established, and the second device sends a second negotiation message to the first device to confirm that the first device confirms that the second device can establish a P2P connection.
  • the first device and the second device negotiate through the access device, thereby establishing a P2P connection, so that the first device and the second device can directly perform data transmission through the P2P network, and the transmission in the wireless network is solved.
  • the network device occupies too much network resources, causing a problem of wasted network resources.
  • the device may be embedded or itself a computer, such as a general-purpose computer, a mobile terminal, or A portable device such as a tablet
  • the first device 8001 includes: at least one processor 8011, a memory 8012, a bus 8013, a transmitter 8014, and a receiver 8015, the at least one processor 8011, a memory 8012, a transmitter 8014, and a receiver 8015.
  • the bus 8013 is connected and completes communication with each other.
  • the bus 8013 may be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component) bus, or an EISA (Extended Industry Standard Architecture) bus.
  • the bus 8013 can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in Figure 8, but it does not mean that there is only one bus or one type of bus. among them:
  • the memory 8012 is for storing application code of the inventive scheme, and the application code for executing the inventive scheme is stored in a memory and controlled by the processor 8011 for execution.
  • the memory can be a read only memory ROM or other type of static storage device that can store static information and instructions, a random access memory RAM or other type of dynamic storage device that can store information and instructions, or can be electrically erasable or programmable.
  • These memories are connected to the processor via a bus.
  • the processor 8011 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more configured to implement the embodiments of the present invention. integrated circuit.
  • CPU central processing unit
  • ASIC application specific integrated circuit
  • the transmitter 8014 is configured to send, by using the access device, a first negotiation message to the second device, where the first negotiation message includes end-to-end network P2P connection capability information of the first device.
  • the receiver 8015 is configured to receive a second negotiation message sent by the second device, where the second negotiation message includes P2P connection capability information of the second device.
  • a processor 8011 configured to receive a P2P connection of the second device according to the receiver 8015
  • the capability information establishes a P2P connection with the second device.
  • the P2P connection capability information of the first device includes P2P address information of the first device.
  • the P2P connection capability information of the second device includes P2P address information of the second device.
  • the transmitter 8014 is further configured to send the first monitoring rule information to the second device, where the first monitoring rule information includes at least one of preset time period information and preset channel information, where the preset time period information is used.
  • the time period in which the first device receives the first measurement message, the preset channel information is used to indicate that the first device receives the channel occupied by the first measurement message, and the first monitoring rule information is forwarded by the access device to the second device.
  • the receiver 8015 is further configured to receive, according to the first monitoring rule information, a first measurement message sent by the second device, where the first measurement message is used to indicate that when the first device receives the first measurement message, the first device is located in the second device. Within the coverage, the first measurement message is sent directly by the second device to the first device.
  • the receiver 8015 is further configured to receive the second monitoring rule information that is sent by the second device, where the second monitoring rule information includes at least one of the preset time period information and the preset channel information, where the preset time period information is used.
  • the preset channel information is used to indicate that the second device receives the channel occupied by the second measurement message, and the second monitoring rule information is forwarded by the access device to the first device.
  • the transmitter 8014 is further configured to send, according to the second monitoring rule information, a second measurement message to the second device, where the second measurement message is used to indicate that when the second device receives the second measurement message, the second device is located at the first device. Within the coverage, the second measurement message is sent directly by the first device to the second device.
  • the transmitter 8014 is further configured to send the first authentication information to the second device, where the first authentication information is forwarded by the access device to the second device, where the first authentication information is used to establish the first device and the second device. Authentication is performed during the P2P connection process.
  • the receiver 8015 is further configured to receive the second authentication information sent by the second device, where the second authentication information is forwarded by the access device to the first device, where the second authentication information is used to establish a P2P between the first device and the second device. Authenticate during the connection process.
  • the receiver 8015 is further configured to: after sending the first authentication information to the second device, receive the third authentication information sent by the second device, where the third authentication information is transferred by the access device. Sending to the first device, or the third authentication information is directly sent by the second device to the first device, and the third authentication information is used for performing authentication during the P2P connection between the first device and the second device.
  • the transmitter 8014 is further configured to: after receiving the third authentication information sent by the second device, send the fourth authentication information to the second device, where the fourth authentication information is forwarded by the access device to the second device, or the fourth authentication The information is directly sent by the first device to the second device, and the fourth authentication information is used for performing authentication in the process of establishing a P2P connection between the first device and the second device.
  • the receiver 8015 is further configured to receive a connection command sent by the access device, where the connection command is used to instruct the first device to establish a P2P connection with the second device.
  • the first device provided by the embodiment of the present invention sends a first negotiation message to the second device, so that the second device can confirm that the first device can establish a P2P connection, and then the first device receives the second negotiation message sent by the second device. And confirming, according to the P2P connection capability information of the second device, that the second device can establish a P2P connection.
  • the first device and the second device negotiate through the access device, thereby establishing a P2P connection, so that the first device and the second device can directly perform data transmission through the P2P network, and the transmission in the wireless network is solved.
  • the network device occupies too much network resources, causing a problem of wasted network resources.
  • the present invention provides a second device 9001.
  • the device may be embedded or itself a computer, such as a general-purpose computer, a mobile phone terminal, or a tablet device.
  • the second device 9001 includes At least one processor 9011, a memory 9012, a bus 9013, a transmitter 9014, and a receiver 9015.
  • the at least one processor 9011, the memory 9012, the transmitter 9014, and the receiver 9015 are connected by a bus 9013 and complete communication with each other.
  • the bus 9013 may be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component) bus, or an EISA (Extended Industry Standard Architecture) bus.
  • the bus 9013 can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in Figure 9, but it does not mean that there is only one bus or one type of bus. among them:
  • the memory 9012 is for storing application code of the inventive scheme, and the application code for executing the inventive scheme is stored in a memory and controlled by the processor 9011 for execution.
  • the memory can be a read only memory ROM or other type of static storage device that can store static information and instructions, a random access memory RAM or other type of dynamic storage device that can store information and instructions, or can be electrically erasable or programmable.
  • These memories are connected to the processor via a bus.
  • the processor 9011 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more configured to implement the embodiments of the present invention. Integrated circuits.
  • CPU central processing unit
  • ASIC application specific integrated circuit
  • the receiver 9015 is configured to receive a first negotiation message sent by the first device, where the first negotiation message includes P2P connection capability information of the first device.
  • the processor 9011 is configured to confirm, according to the P2P connection capability information of the first device, that the first device can establish a P2P connection.
  • the transmitter 9014 is configured to send a second negotiation message to the first device, where the second negotiation message includes P2P connection capability information of the second device.
  • the P2P connection capability information of the first device includes P2P address information of the first device.
  • the P2P connection capability information of the second device includes P2P address information of the second device.
  • the receiver 9015 is further configured to receive the first monitoring rule information that is sent by the first device, where the first monitoring rule information includes at least one of the preset time period information and the preset channel information, where the preset time period information is used. And the preset channel information is used to indicate that the first device receives the channel occupied by the first measurement message, and the first monitoring rule information is forwarded by the access device to the second device.
  • the transmitter 9014 is configured to send, by using the first monitoring rule information, a first measurement message to the first device, where the first measurement message is used to indicate that the first device receives the first measurement message.
  • the first device is located within the coverage of the second device, and the first measurement message is directly sent by the second device to the first device.
  • the transmitter 9014 is further configured to send the second monitoring rule information to the first device, where the second monitoring rule information includes at least one of preset time period information and preset channel information, where the preset time period information is used. And indicating that the second device receives the second measurement message, the preset channel information is used to indicate that the second device receives the channel occupied by the second measurement message, and the second monitoring rule information is forwarded by the access device to the first device.
  • the receiver 9015 is further configured to: receive, by the first device, the second measurement message according to the second monitoring rule information, where the second measurement message is used to indicate that when the second device receives the second measurement message, the second device is located at the first device. Within the coverage, the second measurement message is sent directly by the first device to the second device.
  • the receiver 9015 is further configured to receive the first authentication information sent by the first device, where the first authentication information is forwarded by the access device to the second device, where the first authentication information is used by the first device and the second device. Authentication is established during the establishment of a P2P connection.
  • the transmitter 9014 is further configured to send the second authentication information to the first device, where the second authentication information is forwarded by the access device to the first device, where the second authentication information is used to establish a P2P connection between the first device and the second device. Certification during the process.
  • the transmitter 9014 is further configured to: after receiving the first authentication information sent by the first device, send the third authentication information to the first device, where the third authentication information is forwarded by the access device to the first device, or The third authentication information is directly sent by the second device to the first device, and the third authentication information is used for performing authentication during the P2P connection between the first device and the second device.
  • the receiver 9015 is further configured to: after the third authentication information is sent to the first device, the first device sends the fourth authentication information, where the fourth authentication information is forwarded by the access device to the second device, or the fourth authentication information.
  • the first device is directly sent to the second device, and the fourth authentication information is used for performing authentication in the process of establishing a P2P connection between the first device and the second device.
  • the second device receives the first negotiation message sent by the first device, so as to confirm that the first device can establish a P2P connection, and then the second device confirms the first device according to the P2P connection capability information of the first device.
  • a P2P connection can be established, and the second device sends a second negotiation message to the first device, so as to confirm that the first device confirms the second
  • the device is able to establish a P2P connection.
  • the first device and the second device negotiate through the access device, thereby establishing a P2P connection, so that the first device and the second device can directly perform data transmission through the P2P network, and the transmission in the wireless network is solved.
  • the network device occupies too much network resources, causing a problem of wasted network resources.
  • the embodiment of the present invention provides a wireless network system 100, including: a first device 1001, a second device 1002, and an access device 1003.
  • the first device 1001 and the second device 1002 are connected by the access device 1003.
  • the first device is the first device described in the embodiment corresponding to FIG. 6 or FIG. 8.
  • the second device is the second device described in the embodiment corresponding to FIG. 7 or FIG. 9.
  • the wireless network system sends a first negotiation message to the second device by using the first device, so that the second device confirms that the first device can establish a P2P connection, and then the first device receives the second message sent by the second device.
  • the first device and the second device negotiate through the access device, thereby establishing a P2P connection, so that the first device and the second device can directly perform data transmission through the P2P network, and the transmission in the wireless network is solved.
  • the network device occupies too much network resources, causing a problem of wasted network resources.
  • 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 is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or 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, and the components displayed as units 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 various embodiments of the present invention can be integrated into one process In the unit, each unit may be physically included 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 hardware plus software functional units.
  • the above-described integrated unit implemented in the form of a software functional unit can be stored in a computer readable storage medium.
  • the software functional unit described above is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, server, tablet or smartphone, etc.) to perform some of the steps of the method 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, and the program code can be stored. Medium.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本发明实施例提供一种无线网络连接方法、设备及系统。涉及通信领域,用以解决在无线网络中传输数据时,网络设备占用过多网络资源,造成网络资源浪费的问题。具体方案为:第一设备通过接入设备向第二设备发送第一协商消息,第一协商消息包括第一设备的端对端网络P2P连接能力信息,第一设备接收第二设备发送的第二协商消息,第二协商消息包括第二设备的P2P连接能力信息,第一设备根据第二设备的P2P连接能力信息与第二设备建立P2P连接。本发明用于无线网络连接。

Description

一种无线网络连接方法、设备及系统 技术领域
本发明涉及通信领域,尤其涉及一种无线网络连接方法、设备及系统。
背景技术
随着无线网络传输技术的快速发展,人们对无线网络的需求日益提高。Wi-Fi(Wireless Fidelity,无线保真)技术因为能够使得无线网络部署便捷、传输速率高而被广泛应用。
现有技术中,例如在支持Wi-Fi技术的无线网络中,两个网络设备进行数据传输时,均是通过接入设备进行数据传输。以基础设施网络为例,在基础设施网络中,各STA(Station,站点)与AP(Access Point,接入点)连接,并通过AP进行数据传输。以手机与电视为例,在基础设施网络中,要将手机上的视频传输到电视上进行播放,首先,手机和电视都应与AP建立连接,然后,手机上的视频先从手机上发送到AP,之后由AP发送到电视上进行播放。这就导致在无线网络中,两个网络设备在进行数据传输时,是通过接入设备进行数据传输,相当于将数据进行了两次传输,占用了过多的网络资源,造成网络资源浪费。
发明内容
本发明实施例提供一种无线网络连接方法、设备及系统,用以解决在无线网络中传输数据时,网络设备占用过多网络资源,造成网络资源浪费的问题。
为达到上述目的,本发明的实施例采用如下技术方案:
第一方面,本发明提供了一种无线网络连接方法,包括:
所述第一设备通过接入设备向第二设备发送第一协商消息,所述第一协商消息包括所述第一设备的端对端网络P2P连接能力信息;
所述第一设备接收所述第二设备发送的第二协商消息,所述第二协商消息包括所述第二设备的P2P连接能力信息;
所述第一设备根据所述第二设备的P2P连接能力信息与所述第二设备建立P2P连接。
结合第一方面,在第一种可能的实现方式中,
所述第一设备的P2P连接能力信息包括所述第一设备的P2P地址信息;
所述第二设备的P2P连接能力信息包括所述第二设备的P2P地址信息。
结合第一方面或第一方面的第一种可能的实现方式,在第二种可能的实现方式中,
所述第一设备根据所述第二设备的P2P连接能力信息与所述第二设备建立P2P连接之前,还包括:
所述第一设备向所述第二设备发送第一监听规律信息,所述第一监听规律信息包括预设时间段信息和预设信道信息中的至少一个,所述预设时间段信息用于指示所述第一设备接收第一测量消息的时间段,所述预设信道信息用于指示所述第一设备接收所述第一测量消息所占用的信道,所述第一监听规律信息由所述接入设备转发至所述第二设备;
所述第一设备根据所述第一监听规律信息接收所述第二设备发送的所述第一测量消息,所述第一测量消息用于指示当所述第一设备接收到所述第一测量消息时,所述第一设备位于所述第二设备的覆盖范围之内,所述第一测量消息由所述第二设备直接发送至所述第一设备。
结合第一方面或第一方面的第一种可能的实现方式,在第三种可能的实现方式中,
所述第一设备根据所述第二设备的P2P连接能力信息与所述第二设备建立P2P连接之前,还包括:
所述第一设备接收所述第二设备发送的第二监听规律信息,所述第二监听规律信息包括预设时间段信息和预设信道信息中的至少一个,所述预设时间段信息用于指示所述第二设备接收第二测量消息的时间段,所述预设信道信息用于指示所述第二设备接收所述第二测量 消息所占用的信道,所述第二监听规律信息由所述接入设备转发至所述第一设备;
所述第一设备根据所述第二监听规律信息向所述第二设备发送第二测量消息,所述第二测量消息用于指示当所述第二设备接收到所述第二测量消息时,所述第二设备位于所述第一设备的覆盖范围之内,所述第二测量消息由所述第一设备直接发送至所述第二设备。
结合第一方面至第一方面的第三种可能的实现方式,在第四种可能的实现方式中,
所述第一设备根据所述第二设备的P2P连接能力信息与所述第二设备建立P2P连接之前,还包括:
所述第一设备向所述第二设备发送第一认证信息,所述第一认证信息由所述接入设备转发至所述第二设备;所述第一认证信息用于在所述第一设备与所述第二设备建立P2P连接过程中进行认证;
或者,所述第一设备接收所述第二设备发送的第二认证信息,所述第二认证信息由所述接入设备转发至所述第一设备,所述第二认证信息用于在所述第一设备与第二设备建立P2P连接过程中进行认证。
结合第一方面的第四种可能的实现方式,在第五种可能的实现方式中,
所述第一设备向所述第二设备发送第一认证信息之后,还包括:
所述第一设备接收所述第二设备发送的第三认证信息,所述第三认证信息由所述接入设备转发至所述第一设备,或者,所述第三认证信息由所述第二设备直接发送至所述第一设备,所述第三认证信息用于在所述第一设备与所述第二设备建立P2P连接过程中进行认证;
或者,所述第一设备接收所述第二设备发送的第二认证信息之后,还包括:
所述第一设备向所述第二设备发送第四认证信息,所述第四认证信息由所述接入设备转发至所述第二设备,或者,所述第四认证信息由所述第一设备直接发送至所述第二设备,所述第四认证信息用于在所述第一设备与所述第二设备建立P2P连接过程中进行认证。
结合第一方面至第一方面的第五种可能的实现方式中任意一种实现方式,在第六种可能的实现方式中,
所述第一设备通过接入设备向第二设备发送第一协商消息之前,还包括:
所述第一设备接收所述接入设备发送的连接命令,所述连接命令用于指示所述第一设备与所述第二设备建立P2P连接。
第二方面,本发明提供了一种无线网络连接方法,包括:
所述第二设备接收第一设备发送的第一协商消息,所述第一协商消息包括所述第一设备的端对端网络P2P连接能力信息;
所述第二设备根据所述第一设备的P2P连接能力信息确认所述第一设备能够建立P2P连接;
所述第二设备向所述第一设备发送第二协商消息,所述第二协商消息包括所述第二设备的P2P连接能力信息。
结合第二方面,在第一种可能的实现方式中,
所述第一设备的P2P连接能力信息包括所述第一设备的P2P地址信息;
所述第二设备的P2P连接能力信息包括所述第二设备的P2P地址信息。
结合第二方面或第二方面的第一种可能的实现方式,在第二种可能的实现方式中,
所述第二设备根据所述第一设备的P2P连接能力信息与所述第一设备建立P2P连接之前,还包括:
所述第二设备接收所述第一设备发送的第一监听规律信息,所述第一监听规律信息包括预设时间段信息和预设信道信息中的至少一个,所述预设时间段信息用于指示所述第一设备接收第一测量消息的时间段,所述预设信道信息用于指示所述的第一设备接收所述第一测量消息所占用的信道,所述第一监听规律信息由所述接入设备转发至所述第二设备;
所述第二设备根据所述第一监听规律信息向所述第一设备发送所述第一测量消息,所述第一测量消息用于指示当所述第一设备接收到所述第一测量消息时,所述第一设备位于所述第二设备的覆盖范围之内,所述第一测量消息由所述第二设备直接发送至所述第一设备。
结合第二方面或第二方面的第一种可能的实现方式,在第三种可能的实现方式中,
所述第二设备根据所述第一设备的P2P连接能力信息与所述第一设备建立P2P连接之前,还包括:
所述第二设备向所述第一设备发送第二监听规律信息,所述第二监听规律信息包括预设时间段信息和预设信道信息中的至少一个,所述预设时间段信息用于指示所述第二设备接收第二测量消息的时间段,所述预设信道信息用于指示所述第二设备接收所述第二测量消息所占用的信道,所述第二监听规律信息由所述接入设备转发至所述第一设备;
所述第二设备根据所述第二监听规律信息接收所述第一设备发送的第二测量消息,所述第二测量消息用于指示当所述第二设备接收到所述第二测量消息时,所述第二设备位于所述第一设备的覆盖范围之内,所述第二测量消息由所述第一设备直接发送至所述第二设备。
结合第二方面至第二方面的第三种可能的实现方式中的任意一种可能的实现方式,在第四种可能的实现方式中,
所述第二设备根据所述第一设备的P2P连接能力信息与所述第一设备建立P2P连接之前,还包括:
所述第二设备接收所述第一设备发送的第一认证信息,所述第一认证信息由所述接入设备转发至所述第二设备;所述第一认证信息用于在所述第一设备与所述第二设备建立P2P连接过程中进行认证;
或者,所述第二设备向所述第一设备发送第二认证信息,所述第二认证信息由所述接入设备转发至所述第一设备,所述第二认证信息用于在所述第一设备与所述第二设备建立P2P连接过程中进行认证。
结合第二方面的第四种可能的实现方式,在第五种可能的实现方式中,
所述第二设备接收所述第一设备发送的第一认证信息之后,还包括:
所述第二设备向所述第一设备发送第三认证信息,所述第三认证信息由所述接入设备转发至所述第一设备,或者,所述第三认证信息由所述第二设备直接发送至所述第一设备,所述第三认证信息用于在所述第一设备与所述第二设备建立P2P连接过程中进行认证;
或者,所述第二设备向所述第一设备发送的第二认证信息之后,还包括:
所述第二设备接收所述第一设备发送第四认证信息,所述第四认证信息由所述接入设备转发至所述第二设备,或者,所述第四认证信息由所述第一设备直接发送至所述第二设备,所述第四认证信息用于在所述第一设备与所述第二设备建立P2P连接过程中进行认证。
第三方面,本发明提供了一种第一设备,应用于无线网络,在所述无线网络中,所述第一设备包括:
发送单元,用于通过接入设备向第二设备发送第一协商消息,所述第一协商消息包括所述第一设备的端对端网络P2P连接能力信息;
接收单元,用于接收所述第二设备发送的第二协商消息,所述第二协商消息包括所述第二设备的P2P连接能力信息;
连接单元,用于根据所述接收单元接收的所述第二设备的P2P连接能力信息与所述第二设备建立P2P连接。
结合第三方面,在第一种可能的实现方式中,
所述第一设备的P2P连接能力信息包括所述第一设备的P2P地址信息;
所述第二设备的P2P连接能力信息包括所述第二设备的P2P地址信息。
结合第三方面或第三方面的第一种可能的实现方式,在第二种可能的实现方式中,
所述发送单元,还用于向所述第二设备发送第一监听规律信息,所述第一监听规律信息包括预设时间段信息和预设信道信息中的至 少一个,所述预设时间段信息用于指示所述第一设备接收第一测量消息的时间段,所述预设信道信息用于指示所述的第一设备接收所述第一测量消息所占用的信道,所述第一监听规律信息由所述接入设备转发至所述第二设备;
所述接收单元,还用于根据所述第一监听规律信息接收所述第二设备发送的所述第一测量消息,所述第一测量消息用于指示当所述第一设备接收到所述第一测量消息时,所述第一设备位于所述第二设备的覆盖范围之内,所述第一测量消息由所述第二设备直接发送至所述第一设备。
结合第三方面或第三方面的第一种可能的实现方式,在第三种可能的实现方式中,
所述接收单元,还用于接收所述第二设备发送的第二监听规律信息,所述第二监听规律信息包括预设时间段信息和预设信道信息中的至少一个,所述预设时间段信息用于指示所述第二设备接收第二测量消息的时间段,所述预设信道信息用于指示所述的第二设备接收所述第二测量消息所占用的信道,所述第二监听规律信息由所述接入设备转发至所述第一设备;
所述发送单元,还用于根据所述第二监听规律信息向所述第二设备发送所述第二测量消息,所述第二测量消息用于指示当所述第二设备接收到所述第二测量消息时,所述第二设备位于所述第一设备的覆盖范围之内,所述第二测量消息由所述第一设备直接发送至所述第二设备。
结合第三方面至第三方面的第三种可能的实现方式中的任意一种实现方式,在第四种可能的实现方式中,
所述发送单元,还用于向所述第二设备发送第一认证信息,所述第一认证信息由所述接入设备转发至所述第二设备;所述第一认证信息用于在所述第一设备与所述第二设备建立P2P连接过程中进行认证;
或者,所述接收单元,还用于接收所述第二设备发送的第二认证信息,所述第二认证信息由所述接入设备转发至所述第一设备,所述 第二认证信息用于在所述第一设备与所述第二设备建立P2P连接过程中进行认证。
结合第三方面的第四种可能的实现方式,在第五种可能的实现方式中,
所述接收单元,还用于向所述第二设备发送所述第一认证信息之后,接收所述第二设备发送的第三认证信息,所述第三认证信息由所述接入设备转发至所述第一设备,或者,所述第三认证信息由所述第二设备直接发送至所述第一设备,所述第三认证信息用于在所述第一设备与所述第二设备建立P2P连接过程中进行认证;
或者,所述发送单元,还用于接收所述第二设备发送的所述第三认证信息之后,向所述第二设备发送第四认证信息,所述第四认证信息由所述接入设备转发至所述第二设备,或者,所述第四认证信息由所述第一设备直接发送至所述第二设备,所述第四认证信息用于在所述第一设备与所述第二设备建立P2P连接过程中进行认证。
结合第三方面至第一方面的第五种可能的实现方式中任意一种实现方式,在第六种可能的实现方式中,
所述接收单元,还用于接收所述接入设备发送的连接命令,所述连接命令用于指示所述第一设备与所述第二设备建立P2P连接。
第四方面,本发明提供了一种第二设备,应用于无线网络,在所述的无线网络中,所述第二设备包括:
接收单元,用于接收第一设备发送的第一协商消息,所述第一协商消息包括所述第一设备的P2P连接能力信息;
连接单元,用于根据所述第一设备的P2P连接能力信息确认所述第一设备能够建立P2P连接;
发送单元,用于向所述第一设备发送第二协商消息,所述第二协商消息包括所述第二设备的P2P连接能力信息。
结合第四方面,在第一种可能的实现方式中,
所述第一设备的P2P连接能力信息包括所述第一设备的P2P地址信息;
所述第二设备的P2P连接能力信息包括所述第二设备的P2P地址信息。
结合第四方面或第四方面的第一种可能的实现方式,在第二种可能的实现方式中,
所述接收单元,还用于接收所述第一设备发送的第一监听规律信息,所述第一监听规律信息包括预设时间段信息和预设信道信息中的至少一个,所述预设时间段信息用于指示所述第一设备接收第一测量消息的时间段,所述预设信道信息用于指示所述的第一设备接收所述第一测量消息所占用的信道,所述第一监听规律信息由所述接入设备转发至所述第二设备;
所述发送单元,用于根据所述第一监听规律信息向所述第一设备发送第一测量消息,所述第一测量消息用于指示当所述第一设备接收到所述第一测量消息时,所述第一设备位于所述第二设备的覆盖范围之内,所述第一测量消息由所述第二设备直接发送至所述第一设备。
结合第四方面或第四方面的第一种可能的实现方式,在第三种可能的实现方式中,
所述发送单元,还用于向所述第一设备发送第二监听规律信息,所述第二监听规律信息包括预设时间段信息和预设信道信息中的至少一个,所述预设时间段信息用于指示所述第二设备接收第二测量消息的时间段,所述预设信道信息用于指示所述第二设备接收所述第二测量消息所占用的信道,所述第二监听规律信息由所述接入设备转发至所述第一设备;
所述接收单元,还用于根据所述第二监听规律信息接收所述第一设备发送所述第二测量消息,所述第二测量消息用于指示当所述第二设备接收到所述第二测量消息时,所述第二设备位于所述第一设备的覆盖范围之内,所述第二测量消息由所述第一设备直接发送至所述第二设备。
结合第四方面至第四方面的第三种可能的实现方式中的任意一种实现方式,在第四种可能的实现方式中,
所述接收单元,还用于接收所述第一设备发送的第一认证信息, 所述第一认证信息由所述接入设备转发至所述第二设备;所述第一认证信息用于在所述第一设备与所述第二设备建立P2P连接过程中进行认证;
或者,所述发送单元,还用于向所述第一设备发送第二认证信息,所述第二认证信息由所述接入设备转发至所述第一设备,所述第二认证信息用于在所述第一设备与所述第二设备建立P2P连接过程中进行认证。
结合第四方面的第四种可能的实现方式,在第五种可能的实现方式中,
所述发送单元,还用于接收所述第一设备发送的所述第一认证信息之后,向所述第一设备发送第三认证信息,所述第三认证信息由所述接入设备转发至所述第一设备,或者,所述第三认证信息由所述第二设备直接发送至所述第一设备,所述第三认证信息用于在所述第一设备与所述第二设备建立P2P连接过程中进行认证;
或者,所述接收单元,还用于向所述第一设备发送所述第三认证信息之后,接收所述第一设备发送第四认证信息,所述第四认证信息由所述接入设备转发至所述第二设备,或者,所述第四认证信息由所述第一设备直接发送至所述第二设备,所述第四认证信息用于在所述第一设备与所述第二设备建立P2P连接过程中进行认证。
第五方面,本发明提供了一种无线网络系统,包括第一设备、第二设备及接入设备,所述第一设备与所述第二设备通过所述接入设备连接;
其中,所述第一设备为第三方面或第三方面的任意一种可能的实现方式中所述的第一设备;
所述第二设备为第四方面或第四方面的任意一种可能的实现方式中所述的第二设备。
本发明实施例提供的无线网络连接方法,通过第一设备向第二设备发送第一协商消息,以便第二设备确认第一设备能够建立P2P连接,之后,第一设备接收第二设备发送的第二协商消息,并根据第二设备的连接能力信息确认第二设备能够建立P2P连接。这样,在无 线网络中,第一设备及第二设备通过接入设备进行协商,从而建立P2P接连,使得第一设备及第二设备能够通过P2P网络直接进行数据传输,解决了在无线网络中传输数据时,网络设备占用过多网络资源,造成网络资源浪费的问题。
附图说明
为了更清楚地说明本发明实施例的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本发明实施例提供的一种无线网络连接方法流程示意图;
图2为本发明实施例提供的另一种无线网络连接方法流程示意图;
图3为本发明实施例提供一种能力协商流程示意图;
图4为本发明实施例提供的一种范围确认流程示意图;
图5为本发明实施例提供的一种认证准备流程示意图;
图6为本发明实施例提供一种第一设备结构示意图;
图7为本发明实施例提供一种第二设备结构示意图;
图8为本发明另一实施例提供一种第一设备结构示意图;
图9为本发明另一实施例提供一种第二设备结构示意图;
图10为本发明实施例提供一种无线网络系统结构示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
本发明实施例提供一种无线网络连接方法,可选的,应用于第一设备,如图1所示,包括以下步骤:
S101、第一设备通过接入设备向第二设备发送第一协商消息。
第一协商消息包括第一设备的P2P连接能力信息,以便第二设备确认第一设备能够建立端对端网络P2P(Peer to Peer,对等网络)连接并与第一设备建立P2P连接,其中,第一设备的P2P连接能力信息通过接入设备转发至第二设备,第一设备的P2P连接能力信息用于指示第一设备能够建立P2P连接,此时,第一设备与第二设备通过接入设备建立连接。
可选的,第一设备和第二设备可以是手机、电视,电脑等具有支持无线网络功能的电子设备。
可选的,第一设备的P2P连接能力信息可以包括第一设备的P2P地址信息。具体可选的,P2P连接能力信息可以包括P2P标识符,如果第一设备的P2P连接能力信息包括P2P标识符,则表示第一设备具有P2P连接能力,如果第一设备的P2P连接能力信息不包括P2P标识符,则表示第一设备不具有P2P连接能力,这样,第二设备就可以通过确认第一设备的P2P连接能力信息中的P2P标识符确认第一设备能够建立P2P连接。
具体的,P2P是指通过直接交换来共享计算机资源和服务的网络。P2P网络中的网络设备都处于对等的地位,每一台计算机既能充当网络服务的请求者,又对其它计算机的请求作出响应,提供资源和服务。通常这些资源和服务包括:信息的共享和交换、计算资源(如CPU的共享)、存储共享(如缓存和磁盘空间的使用)等。
以Wi-Fi网络环境中的一个实施例来说,网络设备可以是支持Wi-Fi的终端设备,接入设备可以是一个支持Wi-Fi的接入点。那么第一设备可以是一个支持Wi-Fi的终端设备,第二设备也可以是一个支持Wi-Fi的终端设备。比如第一设备是支持Wi-Fi的手机,第二设备是支持Wi-Fi的电视机,接入设备是支持Wi-Fi的家庭网关。
第一设备通过接入设备向第二设备发送,是指第一设备和第二设备都连接在这个接入设备上。他们直接通信的消息,都可以通过接入设备进行转发。
Wi-Fi网络环境中,第二设备跟第二设备进行通信,除了可以通过接入点进行转发外,它们还可以直接进行通信,这种通信结构类型 可以叫做端对端网络,即P2P网络。这个实施例的P2P网络可以是按照Wi-Fi Direct(直连)协议进行通信的网络。
第一设备和第二设备在通过接入设备进行通信时跟通过P2P网络进行通信时,使用的地址是不一样的,包括MAC(Media Access Control,媒体接入控制)地址也不同。第一设备或第二设备跟接入设备连接的地址为基础设施网络地址,第一设备或第二设备在P2P网络使用的地址为P2P地址。即使第一设备和第二设备获取到对方的基础设施网络地址且通过接入设备进行通信,如果没有相互发送P2P地址消息,第一设备和第二设备无法获取对方的P2P地址。
第一设备向第二设备发送的第一协商消息,可以是Wi-Fi协议中定义的帧,比如可以是管理帧、控制帧或者数据帧。第一协商消息中携带的P2P连接能力信息,可以通过这些管理帧、控制帧或者数据帧中的特定的字段(Field)携带,也可以通过这些管理帧、控制帧或者数据帧中特定的信息元素(Information Element)携带。第一设备的P2P连接能力信息可以包括第一设备在P2P网络中的地址信息,这个地址信息可以是该设备的MAC地址,也可以是其他地址标识,如MAC地址经过处理后的标识信息,比如短地址或经过哈希运算后的值。P2P连接能力信息还可以包括其他信息,比如,第一设备的P2P连接能力信息直接指示第一设备能否建立P2P连接的指示信息,当指示第一设备能够建立P2P连接时,第一设备的P2P连接能力信息还可以指示第一设备可以是什么角色,如组所有者(Group Owner,GO)角色,组客户端(Client)角色等。
S102、第一设备接收第二设备发送的第二协商消息。
第二协商消息通过接入设备转发至第一设备,或者,第二协商消息由第二设备直接发送至第一设备,其中,第二协商消息包括第二设备的地址信息及第二设备的P2P连接能力信息,第二设备的P2P连接能力信息用于指示第二设备能够建立P2P连接。
可选的,第二设备的P2P连接能力信息可以包括第二设备的P2P地址信息。具体可选的,P2P连接能力信息包括P2P标识符,如果第二设备的P2P连接能力信息包括P2P标识符,则表示第二设备具有P2P连接能力,如果第二设备的P2P连接能力信息不包括P2P标识符, 则表示第二设备不具有P2P连接能力,这样,第一设备就可以通过确认第二设备的P2P连接能力信息中的P2P标识符确认第二设备能够建立P2P连接。
在Wi-Fi网络环境中,第二协商消息可以是Wi-Fi协议中定义的管理帧、控制帧或者数据帧,可以是第二设备收到第一协商消息后,专门向第一设备以单播形式发送的帧,也可以是通过第一协商消息知道第一设备的地址信息中携带的标识信息后,以广播形式对第一设备进行查找的帧,比如探测请求帧(probe request)。
第二设备P2P连接能力信息可以包括第二设备在P2P网络中的地址信息,这个地址信息可以是第二设备的MAC地址,也可以是其他地址标识,如MAC地址经过处理后的标识信息,比如短地址或经过哈希运算后的值。第二设备的P2P连接能力信息还可以包括其他信息,比如,直接指示第二设备能否建立P2P连接的指示信息,当指示第二设备能够建立P2P连接时,第二设备的P2P连接能力信息还可以指示第二设备可以是什么角色,如组所有者(Group Owner,GO)角色,组客户端(Client)角色等。
S103、第一设备根据第二设备的P2P连接能力信息与第二设备建立P2P连接。
可选的,如果第一设备及第二设备能够建立P2P连接,则第一设备及第二设备可以进一步确定其设备类型,即确定哪一个设备作为GO(Group Owner,组所有者)设备,哪一个设备作为Client(组客户端)设备,相比于Client设备,GO设备还需要支持组管理功能。可选的,如果第一设备及第二设备都只能作为Client设备或第一设备及第二设备都只能作GO设备时,则由于无法确定其设备类型而不能建立P2P连接;如果第一设备只能作为GO设备,第二设备只能作为Client设备,则第一设备作为GO设备,第二设备作为Client设备;如果第一设备只能作为Client设备,第二设备只能作为GO设备,则第一设备作为Client设备,第二设备作为GO设备;如果第一设备及第二设备都能作为GO设备和Client设备,则随机确定其设备类型。进一步可选的,一个设备是否能够作为GO设备或者client设备,或者都可以,可以根据具体情况自行设定,本发明不做限制。
本发明实施例提供的无线网络连接方法,第一设备通过接入设备向第二设备发送第一协商消息,以便第二设备确认第一设备能够建立P2P连接,之后,第一设备接收第二设备发送的第二协商消息,并根据第二设备的P2P连接能力信息与第二设备建立P2P连接。这样,在无线网络中,第一设备及第二设备通过接入设备进行协商后,最终建立P2P接连,使得第一设备及第二设备能够通过P2P网络直接进行数据传输,解决了在无线网络中传输数据时,网络设备占用过多网络资源,造成网络资源浪费的问题。
对应图1所对应的实施例,本发明实施例提供另一种无线网络连接方法,应用于第二设备,如图2所示,包括以下步骤:
S201、第二设备接收第一设备发送的第一协商消息。
第一协商消息包括第一设备的P2P连接能力信息,以便第二设备确认第一设备能够建立端对端网络P2P连接并与第一设备建立P2P连接,其中,第一设备的P2P连接能力信息通过接入设备转发至第二设备,第一设备的P2P连接能力信息用于指示第一设备能够建立P2P连接,此时,第二设备与第一设备通过接入设备建立连接。
可选的,第一设备的P2P连接能力信息可以包括第一设备的P2P地址信息。具体可选的,P2P连接能力信息可以包括P2P标识符,如果第一设备的P2P连接能力信息包括P2P标识符,则表示第一设备具有P2P连接能力,如果第一设备的P2P连接能力信息不包括P2P标识符,则表示第一设备不具有P2P连接能力,这样,第二设备就可以通过确认第一设备的P2P连接能力信息中的P2P标识符确认第一设备能够建立P2P连接。
以Wi-Fi网络环境中的一个实施例来说,网络设备可以是支持Wi-Fi的终端设备,接入设备可以是一个支持Wi-Fi的接入点。那么第一设备可以是一个支持Wi-Fi的终端设备,第二设备也可以是一个支持Wi-Fi的终端设备。比如第一设备是支持Wi-Fi的手机,第二设备是支持Wi-Fi的电视机,接入设备是支持Wi-Fi的家庭网关。
第二设备接收第一设备的消息,可以是通过接入设备接收的,这时他们都连接在接入设备上,第二设备可以接收第一设备通过接入设 备转发的消息。
Wi-Fi网络环境中,第二设备跟第二设备进行通信,除了可以通过接入点进行转发外,它们还可以直接进行通信,这种通信结构类型可以叫做端对端网络,即P2P网络。这个实施例的P2P网络可以是按照Wi-Fi Direct协议进行通信的网络。
第一设备和第二设备在通过接入设备进行通信时跟通过P2P网络进行通信时,使用的地址是不一样的,包括MAC地址也不同。第一设备或第二设备跟接入设备连接的地址为基础设施网络地址,第一设备或第二设备在P2P网络使用的地址为P2P地址。即使第一设备和第二设备获取到对方的基础设施网络地址且通过接入设备进行通信,如果没有相互发送P2P地址消息,第一设备和第二设备无法获取对方的P2P地址。
第二设备接收的第一设备发送的第一协商消息,可以是Wi-Fi协议中定义的帧,比如可以是管理帧、控制帧或者数据帧。第一协商消息中携带的P2P连接能力信息,可以通过这些管理帧、控制帧或者数据帧中的特定的字段(Field)携带,也可以通过这些管理帧、控制帧或者数据帧中特定的信息元素(Information Element)携带。第一设备的P2P连接能力信息可以包括第一设备在P2P网络中的地址信息,这个地址信息可以是该设备的MAC地址,也可以是其他地址标识,如MAC地址经过处理后的标识信息,比如短地址或经过哈希运算后的值。P2P连接能力信息还可以包括其他信息,比如,第一设备的P2P连接能力信息直接指示第一设备能否建立P2P连接的指示信息,当指示第一设备能够建立P2P连接时,第一设备的P2P连接能力信息还可以指示第一设备可以是什么角色,如组所有者(Group Owner,GO)角色,组客户端(Client)角色等。
S202、第二设备根据第一设备的P2P连接能力信息确认第一设备能够建立P2P连接。
可选的,如果第一设备及第二设备能够建立P2P连接,则第一设备及第二设备可以进一步确定其设备类型,即确定哪一个设备作为GO(Group Owner,组所有者)设备,哪一个设备作为Client(组客户端)设备,相比于Client设备,GO设备还需要支持组管理功能。 可选的,如果第一设备及第二设备都只能作为Client设备或第一设备及第二设备都只能作GO设备时,则由于无法确定其设备类型而不能建立P2P连接;如果第一设备只能作为GO设备,第二设备只能作为Client设备,则第一设备作为GO设备,第二设备作为Client设备;如果第一设备只能作为Client设备,第二设备只能作为GO设备,则第一设备作为Client设备,第二设备作为GO设备;如果第一设备及第二设备都能作为GO设备和Client设备,则随机确定其设备类型。进一步可选的,一个设备是否能够作为GO设备或者client设备,或者都可以,可以根据具体情况自行设定,本发明不做限制。
S203、第二设备向第一设备发送第二协商消息。
第二设备向第一设备发送第二协商消息,以便第一设备确认第二设备能够建立P2P连接并与第二设备建立P2P连接,其中,第二协商消息通过接入设备转发至第一设备,或者,第二协商消息由第二设备直接发送至第一设备,其中,第二协商消息包括第二设备的地址信息及第二设备的P2P连接能力信息,第二设备的P2P连接能力信息用于指示第二设备能够建立P2P连接。
在Wi-Fi网络环境中,第二协商消息可以是Wi-Fi协议中定义的管理帧、控制帧或者数据帧,可以是第二设备收到第一协商消息后,专门向第一设备以单播形式发送的帧,也可以是通过第一协商消息知道第一设备的地址信息中携带的标识信息后,以广播形式对第一设备进行查找的帧,比如探测请求帧(probe request)。
第二设备P2P连接能力信息可以包括第二设备在P2P网络中的地址信息,这个地址信息可以是第二设备的MAC地址,也可以是其他地址标识,如MAC地址经过处理后的标识信息,比如短地址或经过哈希运算后的值。第二设备的P2P连接能力信息还可以包括其他信息,比如,直接指示第二设备能否建立P2P连接的指示信息,当指示第二设备能够建立P2P连接时,第二设备的P2P连接能力信息还可以指示第二设备可以是什么角色,如组所有者(Group Owner,GO)角色,组客户端(Client)角色等。
本发明实施例提供的无线网络连接方法,通过第二设备接收第一设备发送的第一协商消息,以便确认第一设备能够建立P2P连接, 之后,第二设备根据第一设备的P2P连接能力信息确认第一设备能够建立P2P连接,第二设备向第一设备发送第二协商消息,以便确认第一设备确认第二设备能够建立P2P连接。这样,在无线网络中,第一设备及第二设备通过接入设备进行协商,从而建立P2P接连,使得第一设备及第二设备能够通过P2P网络直接进行数据传输,解决了在无线网络中传输数据时,网络设备占用过多网络资源,造成网络资源浪费的问题。
基于图1、图2对应的实施例,本发明另一实施例提供一种无线网络连接方法,应用于第一设备及第二设备,具体可选的,本实施例提供的无线网络连接方法包括能力协商过程、范围确认过程及认证准备过程。
其中,参照图3所示,能力协商过程包括以下步骤:
S301、第一设备通过接入设备向第二设备发送第一协商消息。
第一协商消息包括第一设备的P2P连接能力信息,以便第二设备确认第一设备能够建立端对端网络P2P(Peer to Peer,对等网络)连接并与第一设备建立P2P连接,其中,第一设备的P2P连接能力信息通过接入设备转发至第二设备,第一设备的P2P连接能力信息用于指示第一设备能够建立P2P连接,此时,第一设备与第二设备通过接入设备建立连接。
可选的,第一设备和第二设备可以是手机,电视,电脑等具有支持无线网络功能的电子设备。
可选的,第一设备的P2P连接能力信息可以包括第一设备的P2P地址信息。具体可选的,P2P连接能力信息包括P2P标识符,如果第一设备的P2P连接能力信息包括P2P标识符,则指示第一设备具有P2P连接能力,如果第一设备的P2P连接能力信息不包括P2P标识符,则指示第一设备不具有P2P连接能力,以便第二设备确认第一设备能够建立端对端网络P2P连接,其中第一设备的P2P连接能力信息通过接入设备转发至第二设备。
具体的,P2P是指通过直接交换来共享计算机资源和服务的网络。P2P网络中的网络设备都处于对等的地位,每一台计算机既能充 当网络服务的请求者,又对其它计算机的请求作出响应,提供资源和服务。通常这些资源和服务包括:信息的共享和交换、计算资源(如CPU的共享)、存储共享(如缓存和磁盘空间的使用)等。
以Wi-Fi网络环境中的一个实施例来说,网络设备可以是支持Wi-Fi的终端设备,接入设备可以是一个支持Wi-Fi的接入点。那么第一设备可以是一个支持Wi-Fi的终端设备,第二设备也可以是一个支持Wi-Fi的终端设备。比如第一设备是支持Wi-Fi的手机,第二设备是支持Wi-Fi的电视机,接入设备是支持Wi-Fi的家庭网关。
第二设备接收第一设备的消息,可以是通过接入设备接收的,这时他们都连接在接入设备上,第二设备可以接收第一设备通过接入设备转发的消息。
Wi-Fi网络环境中,第二设备跟第二设备进行通信,除了可以通过接入点进行转发外,它们还可以直接进行通信,这种通信结构类型可以叫做端对端网络,即P2P网络。这个实施例的P2P网络可以是按照Wi-Fi Direct协议进行通信的网络。
第一设备和第二设备在通过接入设备进行通信时跟通过P2P网络进行通信时,使用的地址是不一样的,包括MAC地址也不同。第一设备或第二设备跟接入设备连接的地址为基础设施网络地址,第一设备或第二设备在P2P网络使用的地址为P2P地址。即使第一设备和第二设备获取到对方的基础设施网络地址且通过接入设备进行通信,如果没有相互发送P2P地址消息,第一设备和第二设备无法获取对方的P2P地址。
第二设备接收的第一设备发送的第一协商消息,可以是Wi-Fi协议中定义的帧,比如可以是管理帧、控制帧或者数据帧。第一协商消息中携带的P2P连接能力信息,可以通过这些管理帧、控制帧或者数据帧中的特定的字段(Field)携带,也可以通过这些管理帧、控制帧或者数据帧中特定的信息元素(Information Element)携带。第一设备的P2P连接能力信息可以包括第一设备在P2P网络中的地址信息,这个地址信息可以是该设备的MAC地址,也可以是其他地址标识,如MAC地址经过处理后的标识信息,比如短地址或经过哈希运算后的值。P2P连接能力信息还可以包括其他信息,比如,第一 设备的P2P连接能力信息直接指示第一设备能否建立P2P连接的指示信息,当指示第一设备能够建立P2P连接时,第一设备的P2P连接能力信息还可以指示第一设备可以是什么角色,如组所有者(Group Owner,GO)角色,组客户端(Client)角色等。
S302、第二设备向第一设备发送第二协商消息。
具体的,第二设备可以通过接入设备向第一设备发送第二协商消息,也可以直接向第一设备发送第二协商消息。
第二设备向第一设备发送第二协商消息,以便第一设备确认第二设备能够建立P2P连接并与第二设备建立P2P连接,其中,第二协商消息通过接入设备转发至第一设备,或者,第二协商消息由第二设备直接发送至第一设备,第二设备的P2P连接能力信息用于指示第二设备能够建立P2P连接。
在Wi-Fi网络环境中,第二协商消息可以是Wi-Fi协议中定义的管理帧、控制帧或者数据帧,可以是第二设备收到第一协商消息后,专门向第一设备以单播形式发送的帧,也可以是通过第一协商消息知道第一设备的地址信息中携带的标识信息后,以广播形式对第一设备进行查找的帧,比如探测请求帧(probe request)。
第二设备P2P连接能力信息可以包括第二设备在P2P网络中的地址信息,这个地址信息可以是第二设备的MAC地址,也可以是其他地址标识,如MAC地址经过处理后的标识信息,比如短地址或经过哈希运算后的值。第二设备的P2P连接能力信息还可以包括其他信息,比如,直接指示第二设备能否建立P2P连接的指示信息,当指示第二设备能够建立P2P连接时,第二设备的P2P连接能力信息还可以指示第二设备可以是什么角色,如组所有者(Group Owner,GO)角色,组客户端(Client)角色等。
可选的,第一协商消息还包括第一监听规律信息,或者,第二协商消息还包括第二监听规律信息。
可选的,第一协商消息还包括第一监听规律信息,并且,第二协商消息还包括第二监听规律信息。
可选的,第一协商消息还包括第一认证信息,第二协商消息还包 括第二认证信息;或者,第一协商消息还包括第四认证信息,第二协商消息还包括第三认证信息。
可选的,参照图4所示,第一设备根据第二设备的地址信息与第二设备建立P2P连接之前,范围确认过程包括以下步骤:
S401、通过接入设备发送监听规律信息。
具体可选的,有两种应用场景,在第一种应用场景中,第一设备通过接入设备向第二设备发送第一监听规律信息;在第二种应用场景中,第二设备通过接入设备向第一设备发送第二监听规律信息。
具体的,第一监听规律信息包括预设时间段信息和预设信道信息中的至少一个,预设时间段信息用于指示第一设备接收第一测量消息的时间段,预设信道信息用于指示第一设备接收第一测量消息所占用的信道,第二监听规律信息包括第二设备接收测量消息的时间和第二设备接收测量消息的信道中的至少一个,第一监听规律信息由接入设备转发至第二设备。
可选的,第一设备根据第一监听规律信息接收第二设备发送的第一测量消息,第一测量消息由第二设备直接发送至第一设备,第一测量消息用于指示当第一设备接收到第一测量消息时,第一设备位于第二设备的覆盖范围之内;第一设备根据第二监听规律信息向第二设备发送第二测量消息,第二测量消息由第一设备直接发送至第二设备,第二测量消息用于指示当第二设备接收到第二测量消息时,第二设备位于第一设备的覆盖范围之内。
结合步骤S301及步骤S302中的描述,第一监听规律信息由接入设备转发至第二设备,第二设备通过接入设备向第一设备发送第二监听规律信息。
结合步骤S301及步骤S302中的描述,当第一设备通过接入设备向第二设备发送第一监听规律信息时,第一监听规律信息可以包含在第一协商消息中通过接入设备转发至第二设备;
当第二设备通过接入设备向第一设备发送第二监听规律信息时,第二监听规律信息可以包含在第二协商消息中通过接入设备转发至第一设备。
S402、发送第一测量消息或第二测量消息。
具体的,对应步骤S401,如果是第二设备通过接入设备接收第一设备发送的第一监听规律信息,那么第二设备根据第一监听规律信息向第一设备发送第一测量消息,如果第一设备接收到第一测量消息,则证明第一设备位于第二设备的信号覆盖范围之内,可选的,在实际应用场景中,第一设备与第二设备的信号覆盖范围相近,第一设备接收到第一测量消息也可以证明第二设备位于第一设备的信号覆盖范围之内。其中,第一监听规律信息包括预设时间段信息和预设信道信息中的至少一个,第一监听规律信息由接入设备转发至第二设备。如果是第一设备通过接入设备接收第二设备发送的第二监听规律信息,那么第一设备根据第二监听规律信息向第二设备发送第二测量消息,如果第二设备接收到第二测量消息,则证明第二设备位于第一设备的信号覆盖范围之内,可选的,在实际应用场景中,第一设备与第二设备的信号覆盖范围相近,第二设备接收到第二测量消息也可以证明第一设备位于第二设备的信号覆盖范围之内。其中,第二监听规律信息包括预设时间段信息和预设信道信息中的至少一个,预设时间段信息用于指示第二设备接收第二测量消息的时间段,预设信道信息用于指示第二设备接收第二测量消息所占用的信道,第二监听规律信息由接入设备转发至第一设备。
可选的,结合步骤S302中的描述,当第二设备向第一设备发送第一测量消息时,第二协商消息可以承载在第一测量消息上直接发送至第一设备。
在Wi-Fi网络环境中,实际应用时,第二设备根据第一监听规律信息向第一设备发送第一测量消息时,可以是持续地发送,直到接收到第一设备反馈的已经接收到第一测量消息的确认消息为止;第一设备根据第二监听规律向第二设备发送第二测量消息,也可以是持续地发送,直到接收到第二设备反馈的已经接收到第二测量消息的确认消息为止。
可选的,参照图5所示,第一设备根据第二设备P2P连接能力信息与第二设备建立P2P连接时,认证准备过程包括以下步骤:
S501、发送认证信息。
具体的,有两种应用场景,在第一种应用场景中,第一设备通过接入设备先向第二设备发送第一认证信息,在第二种应用场景中,第二设备先向第一设备发送第二认证信息。
其中,第一认证信息及第二认证信息用于在第一设备与第二设备建立P2P连接过程中进行认证。
可选的,结合步骤S301及步骤S302中的描述,第一设备通过接入设备先向第二设备发送第一认证信息时,第一认证信息可以包含在第一协商消息中通过接入设备转发至第二设备;第二设备通过接入设备先向第一设备发送第二认证信息时,第二认证信息可以包含在第二协商消息中通过接入设备转发至第一设备,或者,第二认证信息可以包含在第二协商消息中由第二设备直接发送至第一设备。
可选的,第一认证信息可以是第一设备自己生成的,可以是一个字符串,例如“1234”。
可选的,第二认证信息可以是第二设备自己生成的,可以是一个字符串,例如“ABCD”字符串。
S502、反馈认证信息。
具体的,结合步骤S501的描述,在第一种应用场景中,第二设备通过接入设备接收第一设备发送的第一认证信息后,将第三认证信息发回至第一设备,以便第一设备与第二设备建立P2P连接过程中进行认证;在第二种应用场景中,第一设备接收第二设备发送的第二认证信息后,将第四认证信息发回至第二设备,以便第二设备与第一设备建立P2P连接过程中进行认证。
可选的,结合步骤S302的描述,在第一种应用场景中,第二设备将第三认证信息发回至第一设备时,第三认证信息可以包含在第二协商消息中通过接入设备转发至第一设备,或者,第三认证信息可以包含在第二协商消息中由第二设备直接发送至第一设备。
可选的,在第二种应用场景中,第一设备接收第二设备发送的第二认证信息后,第一设备向第二设备发送第四认证信息,第四认证信息由接入设备转发至第二设备,或者,第四认证信息由第一设备直接发送至第二设备。其中,第四认证信息用于在第一设备与第二设备建 立P2P连接过程中进行认证。
这里说的认证,是指第一设备与第二设备在建立P2P连接的时候,确定对方就是自己在通过接入设备连接的网络中所连接的设备。
S503、第一设备与第二设备建立P2P连接过程中进行认证。
具体的,对应步骤S502,在第一种应用场景中,第一设备接收第二设备发送的第三认证信息之后,在建立P2P连接过程中对第二设备进行认证,如果第二设备通过验证,则代表第二设备是能力协商过程中与第一设备需要建立连接的设备。在第二种应用场景中,第二设备接收第一设备发送的第四认证信息之后,在建立P2P连接过程中对第一设备进行认证,如果第一设备通过验证,则代表第一设备是能力协商过程中与第二设备需要建立连接的设备。
在Wi-Fi网络的具体应用中,第一设备与第二设备进行认证的方法有很多。可以是在建立P2P连接前,第一设备与第二设备通过接入设备进行信息交互,确认一个共享信息,基于这个共享信息,在P2P连接建立的过程当中,进行身份的认证。
第一设备或第二设备获取共享信息有多种方式:
第一种方式,第一设备通过接入设备向第二设备发送第一认证信息,第一认证信息即为第一设备和第二设备的共享信息。
第二种方式,第一设备通过接入设备向第二设备发送第一认证信息,第二设备通过接入设备或者通过P2P网络向第一设备发送第三认证信息,此时,第一认证信息和第三认证信息为第一设备和第二设备的共享信息。
第三种方式,第二设备通过接入设备向第一设备发送第二认证信息,第二认证信息即为第一设备和第二设备的共享信息。
第四种方式,第二设备通过接入设备向第一设备发送第二认证信息,第一设备向第二设备发送第四认证信息,此时,第二认证信息和第四认证信息为第一设备和第二设备的共享信息。
当然,还可以有其他的各种方法方式,本发明只是列举四种方式进行说明,并不代表本发明局限于此。
第一设备和第二设备基于共享信息,在P2P建立过程中的认证方式可以有多种:
第一种方式,第一设备与第二设备将共享信息作为Wi-Fi协议中四步握手的PMK(Pairwise Master Key,对称主密钥),执行四步握手流程,基于这个共享信息PMK,双方第一设备和第二设备可以就认证对方的身份,并且协商出双方通信的密钥。
第二种方式,在建立P2P连接过程中,第一设备可以直接向第二设备发送共享信息处理后的信息,第二设备根据处理后的信息,确认第一设备拥有共享信息,以此认证第一设备的身份;或者,在建立P2P连接过程中,第二设备可以直接向第一设备发送共享信息处理后的信息,第一设备根据处理后的信息,确认第二设备拥有共享信息,以此认证第二设备的身份。
当然,还可以有其他的各种方法方式,本发明只是列举两种方式进行说明,并不代表本发明局限于此。
在图3、图4及图5所示的步骤中,第一设备及第二设备进行数据传输的过程中,数据结构可以是表1所示的帧结构。
表一
Figure PCTCN2015088139-appb-000001
在上述表1中,第一列表示的是MAC的帧头部分,第二列表示的是数据链路控制层的帧头部分,第三列是协议标识符,第四列是指消息类型,用于指示是第一消息还是第二消息,第五列是指消息携带的具体内容。
本发明实施例提供的方法,在第一设备向第二设备发送第一协商消息之前,接入设备可以向第一设备发送连接命令。这个连接命令可以是接入设备根据当前的网络情况而发出的。比如接入设备判断当前网络比较拥挤,第一设备和第二设备之间传输的数据都要经过接入设备中转,导致了信道资源的浪费,此时,接入设备通过向第一设备发送连接命令指示第一设备与第二设备建立P2P连接。
本发明实施例提供的无线网络连接方法,通过第一设备向第二设备发送第一协商消息,以便第二设备确认第一设备能够建立P2P连接,之后,第一设备接收第二设备发送的第二协商消息,并根据第二设备的P2P连接能力信息确认第二设备能够建立P2P连接。这样,在无线网络中,第一设备及第二设备通过接入设备进行协商,从而建立P2P接连,使得第一设备及第二设备能够通过P2P网络直接进行数据传输,解决了在无线网络中传输数据时,网络设备占用过多网络资源,造成网络资源浪费的问题。
本发明实施例提供一种第一设备60,应用于无线网络,参照图6所示,包括发送单元601,接收单元602以及连接单元603。
其中,发送单元601用于通过接入设备向第二设备发送第一协商消息,第一协商消息包括第一设备的端对端网络P2P连接能力信息。
接收单元602用于接收第二设备发送的第二协商消息,第二协商消息包括第二设备的P2P连接能力信息。
连接单元603用于根据接收单元602接收的第二设备的P2P连接能力信息与第二设备能够建立P2P连接。
可选的,第一设备60的P2P连接能力信息包括第一设备60的P2P地址信息。
第二设备的P2P连接能力信息包括第二设备的P2P地址信息。
可选的,发送单元601向第二设备发送第一监听规律信息,第一监听规律信息包括预设时间段信息和预设信道信息中的至少一个,预设时间段信息用于指示第一设备60接收第一测量消息的时间段,预设信道信息用于指示第一设备60接收第一测量消息所占用的信道,第一监听规律信息由接入设备转发至第二设备。
接收单元602还用于根据第一监听规律信息接收第二设备发送的第一测量消息,第一测量消息用于指示当第一设备60接收到第一测量消息时,第一设备60位于第二设备的覆盖范围之内,第一测量消息由第二设备直接发送至第一设备60。
可选的,接收单元602还用于接收第二设备发送的第二监听规律信息,第二监听规律信息包括预设时间段信息和预设信道信息中的至 少一个,预设时间段信息用于指示第二设备接收第二测量消息的时间段,预设信道信息用于指示第二设备接收第二测量消息所占用的信道,第二监听规律信息由接入设备转发至第一设备60。
发送单元601还用于根据第二监听规律信息向第二设备发送第二测量消息,第二测量消息用于指示当第二设备接收到第二测量消息时,第二设备位于第一设备60的覆盖范围之内,第二测量消息由第一设备60直接发送至第二设备。
可选的,发送单元601还用于向第二设备发送第一认证信息,第一认证信息由接入设备转发至第二设备;第一认证信息用于在第一设备60与第二设备建立P2P连接过程中进行认证。
或者,接收单元602还用于接收第二设备发送的第二认证信息,第二认证信息由接入设备转发至第一设备60,第二认证信息用于在第一设备60与第二设备建立P2P连接过程中进行认证。
可选的,接收单元602还用于向第二设备发送第一认证信息之后,接收第二设备发送的第三认证信息,第三认证信息由接入设备转发至第一设备60,或者,第三认证信息由第二设备直接发送至第一设备60,第三认证信息用于在第一设备60与第二设备建立P2P连接过程中进行认证。
或者,发送单元601还用于接收第二设备发送的第三认证信息之后,向第二设备发送第四认证信息,第四认证信息由接入设备转发至第二设备,或者,第四认证信息由第一设备60直接发送至第二设备,第四认证信息用于在第一设备60与第二设备建立P2P连接过程中进行认证。
可选的,接收单元602还用于接收接入设备发送的连接命令,连接命令用于指示第一设备60与第二设备建立P2P连接。
本发明的实施例提供的第一设备,通过向第二设备发送第一协商消息,以便第二设备确认第一设备能够建立P2P连接,之后,第一设备接收第二设备发送的第二协商消息,并根据第二设备的P2P连接能力信息确认第二设备能够建立P2P连接。这样,在无线网络中,第一设备及第二设备通过接入设备进行协商,从而建立P2P接连, 使得第一设备及第二设备能够通过P2P网络直接进行数据传输,解决了在无线网络中传输数据时,网络设备占用过多网络资源,造成网络资源浪费的问题。
本发明实施例提供一种第二设备70,应用于无线网络,参照图7所示,包括发送单元701,接收单元702以及连接单元703。
接收单元702,用于接收第一设备发送的第一协商消息,第一协商消息包括第一设备的P2P连接能力信息。
连接单元703,用于根据第一设备的P2P连接能力信息确认第一设备能够建立P2P连接。
发送单元701,用于向第一设备发送第二协商消息,第二协商消息包括第二设备70的P2P连接能力信息。
可选的,第一设备的P2P连接能力信息包括第一设备的P2P地址信息。
第二设备70的P2P连接能力信息包括第二设备70的P2P地址信息。
可选的,接收单元702,还用于接收第一设备发送的第一监听规律信息,第一监听规律信息包括预设时间段信息和预设信道信息中的至少一个,预设时间段信息用于指示第一设备接收第一测量消息的时间段,预设信道信息用于指示的第一设备接收第一测量消息所占用的信道,第一监听规律信息由接入设备转发至第二设备70。
发送单元701,还用于根据第一监听规律信息向第一设备发送第一测量消息,第一测量消息用于指示当第一设备接收到第一测量消息时,第一设备位于第二设备的覆盖范围之内,第一测量消息由第二设备70直接发送至第一设备。
可选的,发送单元701,还用于向第一设备发送第二监听规律信息,第二监听规律信息包括预设时间段信息和预设信道信息中的至少一个,预设时间段信息用于指示第二设备70接收第二测量消息的时间段,预设信道信息用于指示第二设备70接收第二测量消息所占用的信道,第二监听规律信息由接入设备转发至第一设备。
接收单元702,还用于根据第二监听规律信息接收第一设备发送第二测量消息,第二测量消息用于指示当第二设备70接收到第二测量消息时,第二设备70位于第一设备的覆盖范围之内,第二测量消息由第一设备直接发送至第二设备70。
可选的,接收单元702,还用于接收第一设备发送的第一认证信息,第一认证信息由接入设备转发至第二设备70,第一认证信息用于在第一设备与第二设备70建立P2P连接过程中进行认证。
或者,发送单元701,还用于向第一设备发送第二认证信息,第二认证信息由接入设备转发至第一设备,第二认证信息用于在第一设备与第二设备70建立P2P连接过程中进行认证。
可选的,发送单元701,还用于接收第一设备发送的第一认证信息之后,向第一设备发送的第三认证信息,第三认证信息由接入设备转发至第一设备,或者,第三认证信息由第二设备70直接发送至第一设备,第三认证信息用于在第一设备与第二设备70建立P2P连接过程中进行认证。
或者,接收单元702,还用于向第一设备发送第三认证信息之后,接收第一设备发送第四认证信息,第四认证信息由接入设备转发至第二设备70,或者,第四认证信息由第一设备直接发送至第二设备70,第四认证信息用于在第一设备与第二设备70建立P2P连接过程中进行认证。
本发明实施例提供的第二设备,通过接收第一设备发送的第一协商消息,以便确认第一设备能够建立P2P连接,之后,第二设备根据第一设备的P2P连接能力信息确认第一设备能够建立P2P连接,第二设备向第一设备发送第二协商消息,以便确认第一设备确认第二设备能够建立P2P连接。这样,在无线网络中,第一设备及第二设备通过接入设备进行协商,从而建立P2P接连,使得第一设备及第二设备能够通过P2P网络直接进行数据传输,解决了在无线网络中传输数据时,网络设备占用过多网络资源,造成网络资源浪费的问题。
本发明的另一实施例提供一种第一设备8001,参照图8所示,该设备可以嵌入或本身就是计算机,比如:通用计算机、手机终端或 平板机等便携设备,该第一设备8001包括:至少一个处理器8011、存储器8012、总线8013、发射器8014和接收器8015,该至少一个处理器8011、存储器8012、发射器8014和接收器8015通过总线8013连接并完成相互间的通信。
该总线8013可以是ISA(Industry Standard Architecture,工业标准体系结构)总线、PCI(Peripheral Component,外部设备互连)总线或EISA(Extended Industry Standard Architecture,扩展工业标准体系结构)总线等。该总线8013可以分为地址总线、数据总线、控制总线等。为便于表示,图8中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。其中:
存储器8012用于存储本发明方案的应用程序代码,执行本发明方案的应用程序代码保存在存储器中,并由处理器8011来控制执行。
该存储器可以是只读存储器ROM或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器RAM或者可存储信息和指令的其他类型的动态存储设备,也可以是电可擦可编程只读存储器EEPROM、只读光盘CD-ROM或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。这些存储器通过总线与处理器相连接。
处理器8011可能是一个中央处理器(Central Processing Unit,简称为CPU),或者是特定集成电路(Application Specific Integrated Circuit,简称为ASIC),或者是被配置成实施本发明实施例的一个或多个集成电路。
具体的,发射器8014,用于通过接入设备向第二设备发送第一协商消息,第一协商消息包括第一设备的端对端网络P2P连接能力信息。
接收器8015,用于接收第二设备发送的第二协商消息,第二协商消息包括第二设备的P2P连接能力信息。
处理器8011,用于根据接收器8015接收的第二设备的P2P连接 能力信息与第二设备建立P2P连接。
可选的,第一设备的P2P连接能力信息包括第一设备的P2P地址信息。
第二设备的P2P连接能力信息包括第二设备的P2P地址信息。
可选的,发射器8014,还用于向第二设备发送第一监听规律信息,第一监听规律信息包括预设时间段信息和预设信道信息中的至少一个,预设时间段信息用于指示第一设备接收第一测量消息的时间段,预设信道信息用于指示的第一设备接收第一测量消息所占用的信道,第一监听规律信息由接入设备转发至第二设备。
接收器8015,还用于根据第一监听规律信息接收第二设备发送的第一测量消息,第一测量消息用于指示当第一设备接收到第一测量消息时,第一设备位于第二设备的覆盖范围之内,第一测量消息由第二设备直接发送至第一设备。
可选的,接收器8015,还用于接收第二设备发送的第二监听规律信息,第二监听规律信息包括预设时间段信息和预设信道信息中的至少一个,预设时间段信息用于指示第二设备接收第二测量消息的时间段,预设信道信息用于指示第二设备接收第二测量消息所占用的信道,第二监听规律信息由接入设备转发至第一设备。
发射器8014,还用于根据第二监听规律信息向第二设备发送第二测量消息,第二测量消息用于指示当第二设备接收到第二测量消息时,第二设备位于第一设备的覆盖范围之内,第二测量消息由第一设备直接发送至第二设备。
可选的,发射器8014,还用于向第二设备发送第一认证信息,第一认证信息由接入设备转发至第二设备,第一认证信息用于在第一设备与第二设备建立P2P连接过程中进行认证。
或者,接收器8015,还用于接收第二设备发送的第二认证信息,第二认证信息由接入设备转发至第一设备,第二认证信息用于在第一设备与第二设备建立P2P连接过程中进行认证。
可选的,接收器8015,还用于向第二设备发送第一认证信息之后,接收第二设备发送的第三认证信息,第三认证信息由接入设备转 发至第一设备,或者,第三认证信息由第二设备直接发送至第一设备,第三认证信息用于在第一设备与第二设备建立P2P连接过程中进行认证。
或者,发射器8014,还用于接收第二设备发送的第三认证信息之后,向第二设备发送第四认证信息,第四认证信息由接入设备转发至第二设备,或者,第四认证信息由第一设备直接发送至第二设备,第四认证信息用于在第一设备与第二设备建立P2P连接过程中进行认证。
可选的,接收器8015,还用于接收接入设备发送的连接命令,连接命令用于指示第一设备与第二设备建立P2P连接。
本发明实施例提供的第一设备,通过向第二设备发送第一协商消息,以便第二设备确认第一设备能够建立P2P连接,之后,第一设备接收第二设备发送的第二协商消息,并根据第二设备的P2P连接能力信息确认第二设备能够建立P2P连接。这样,在无线网络中,第一设备及第二设备通过接入设备进行协商,从而建立P2P接连,使得第一设备及第二设备能够通过P2P网络直接进行数据传输,解决了在无线网络中传输数据时,网络设备占用过多网络资源,造成网络资源浪费的问题。
本发明的另一实施例提供一种第二设备9001,参照图9所示,该设备可以嵌入或本身就是计算机,比如:通用计算机、手机终端或平板机等便携设备,该第二设备9001包括:至少一个处理器9011、存储器9012、总线9013、发射器9014和接收器9015,该至少一个处理器9011、存储器9012、发射器9014和接收器9015通过总线9013连接并完成相互间的通信。
该总线9013可以是ISA(Industry Standard Architecture,工业标准体系结构)总线、PCI(Peripheral Component,外部设备互连)总线或EISA(Extended Industry Standard Architecture,扩展工业标准体系结构)总线等。该总线9013可以分为地址总线、数据总线、控制总线等。为便于表示,图9中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。其中:
存储器9012用于存储本发明方案的应用程序代码,执行本发明方案的应用程序代码保存在存储器中,并由处理器9011来控制执行。
该存储器可以是只读存储器ROM或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器RAM或者可存储信息和指令的其他类型的动态存储设备,也可以是电可擦可编程只读存储器EEPROM、只读光盘CD-ROM或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。这些存储器通过总线与处理器相连接。
处理器9011可能是一个中央处理器9011(Central Processing Unit,简称为CPU),或者是特定集成电路(Application Specific Integrated Circuit,简称为ASIC),或者是被配置成实施本发明实施例的一个或多个集成电路。
具体的,接收器9015,用于接收第一设备发送的第一协商消息,第一协商消息包括第一设备的P2P连接能力信息。
处理器9011,用于根据第一设备的P2P连接能力信息确认第一设备能够建立P2P连接。
发射器9014,用于向第一设备发送第二协商消息,第二协商消息包括第二设备的P2P连接能力信息。
可选的,第一设备的P2P连接能力信息包括第一设备的P2P地址信息。
第二设备的P2P连接能力信息包括第二设备的P2P地址信息。
可选的,接收器9015,还用于接收第一设备发送的第一监听规律信息,第一监听规律信息包括预设时间段信息和预设信道信息中的至少一个,预设时间段信息用于指示第一设备接收第一测量消息的时间段,预设信道信息用于指示的第一设备接收第一测量消息所占用的信道,第一监听规律信息由接入设备转发至第二设备。
发射器9014,用于根据第一监听规律信息向第一设备发送第一测量消息,第一测量消息用于指示当第一设备接收到第一测量消息 时,第一设备位于第二设备的覆盖范围之内,第一测量消息由第二设备直接发送至第一设备。
可选的,发射器9014,还用于向第一设备发送第二监听规律信息,第二监听规律信息包括预设时间段信息和预设信道信息中的至少一个,预设时间段信息用于指示第二设备接收第二测量消息的时间段,预设信道信息用于指示第二设备接收第二测量消息所占用的信道,第二监听规律信息由接入设备转发至第一设备。
接收器9015,还用于根据第二监听规律信息接收第一设备发送第二测量消息,第二测量消息用于指示当第二设备接收到第二测量消息时,第二设备位于第一设备的覆盖范围之内,第二测量消息由第一设备直接发送至第二设备。
可选的,接收器9015,还用于接收第一设备发送的第一认证信息,第一认证信息由接入设备转发至第二设备,第一认证信息用于在第一设备与第二设备建立P2P连接过程中进行认证。
或者,发射器9014,还用于向第一设备发送第二认证信息,第二认证信息由接入设备转发至第一设备,第二认证信息用于在第一设备与第二设备建立P2P连接过程中进行认证。
可选的,发射器9014,还用于接收第一设备发送的第一认证信息之后,向第一设备发送第三认证信息,第三认证信息由接入设备转发至第一设备,或者,第三认证信息由第二设备直接发送至第一设备,第三认证信息用于在第一设备与第二设备建立P2P连接过程中进行认证。
或者,接收器9015,还用于向第一设备发送第三认证信息之后,接收第一设备发送第四认证信息,第四认证信息由接入设备转发至第二设备,或者,第四认证信息由第一设备直接发送至第二设备,第四认证信息用于在第一设备与第二设备建立P2P连接过程中进行认证。
本发明实施例提供的第二设备,通过接收第一设备发送的第一协商消息,以便确认第一设备能够建立P2P连接,之后,第二设备根据第一设备的P2P连接能力信息确认第一设备能够建立P2P连接,第二设备向第一设备发送第二协商消息,以便确认第一设备确认第二 设备能够建立P2P连接。这样,在无线网络中,第一设备及第二设备通过接入设备进行协商,从而建立P2P接连,使得第一设备及第二设备能够通过P2P网络直接进行数据传输,解决了在无线网络中传输数据时,网络设备占用过多网络资源,造成网络资源浪费的问题。
本发明实施例提供一种无线网络系统100,包括:第一设备1001、第二设备1002及接入设备1003,第一设备1001与第二设备1002通过接入设备1003连接。
其中,第一设备为图6或图8对应的实施例中所描述的第一设备。
第二设备为图7或图9对应的实施例中所描述的第二设备。
本发明实施例提供的无线网络系统,通过第一设备向第二设备发送第一协商消息,以便第二设备确认第一设备能够建立P2P连接,之后,第一设备接收第二设备发送的第二协商消息,并根据第二设备的P2P连接能力信息确认第二设备能够建立P2P连接。这样,在无线网络中,第一设备及第二设备通过接入设备进行协商,从而建立P2P接连,使得第一设备及第二设备能够通过P2P网络直接进行数据传输,解决了在无线网络中传输数据时,网络设备占用过多网络资源,造成网络资源浪费的问题。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本发明各个实施例中的各功能单元可以集成在一个处理 单元中,也可以是各个单元单独物理包括,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。
上述以软件功能单元的形式实现的集成的单元,可以存储在一个计算机可读取存储介质中。上述软件功能单元存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机、服务器、平板电脑或者智能手机等)执行本发明各个实施例所述方法的部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,简称ROM)、随机存取存储器(Random Access Memory,简称RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。

Claims (27)

  1. 一种无线网络连接方法,其特征在于,包括:
    所述第一设备通过接入设备向第二设备发送第一协商消息,所述第一协商消息包括所述第一设备的端对端网络P2P连接能力信息;
    所述第一设备接收所述第二设备发送的第二协商消息,所述第二协商消息包括所述第二设备的P2P连接能力信息;
    所述第一设备根据所述第二设备的P2P连接能力信息与所述第二设备建立P2P连接。
  2. 根据权利要求1所述的方法,其特征在于,
    所述第一设备的P2P连接能力信息包括所述第一设备的P2P地址信息;
    所述第二设备的P2P连接能力信息包括所述第二设备的P2P地址信息。
  3. 根据权利要求1或2所述的方法,其特征在于,所述第一设备根据所述第二设备的P2P连接能力信息与所述第二设备建立P2P连接之前,还包括:
    所述第一设备向所述第二设备发送第一监听规律信息,所述第一监听规律信息包括预设时间段信息和预设信道信息中的至少一个,所述预设时间段信息用于指示所述第一设备接收第一测量消息的时间段,所述预设信道信息用于指示所述第一设备接收所述第一测量消息所占用的信道,所述第一监听规律信息由所述接入设备转发至所述第二设备;
    所述第一设备根据所述第一监听规律信息接收所述第二设备发送的所述第一测量消息,所述第一测量消息用于指示当所述第一设备接收到所述第一测量消息时,所述第一设备位于所述第二设备的覆盖范围之内,所述第一测量消息由所述第二设备直接发送至所述第一设备。
  4. 根据权利要求1或2所述的方法,其特征在于,所述第一设备根据所述第二设备的P2P连接能力信息与所述第二设备建立P2P 连接之前,还包括:
    所述第一设备接收所述第二设备发送的第二监听规律信息,所述第二监听规律信息包括预设时间段信息和预设信道信息中的至少一个,所述预设时间段信息用于指示所述第二设备接收第二测量消息的时间段,所述预设信道信息用于指示所述第二设备接收所述第二测量消息所占用的信道,所述第二监听规律信息由所述接入设备转发至所述第一设备;
    所述第一设备根据所述第二监听规律信息向所述第二设备发送第二测量消息,所述第二测量消息用于指示当所述第二设备接收到所述第二测量消息时,所述第二设备位于所述第一设备的覆盖范围之内,所述第二测量消息由所述第一设备直接发送至所述第二设备。
  5. 根据权利要求1-4任一项所述的方法,其特征在于,所述第一设备根据所述第二设备的P2P连接能力信息与所述第二设备建立P2P连接之前,还包括:
    所述第一设备向所述第二设备发送第一认证信息,所述第一认证信息由所述接入设备转发至所述第二设备,所述第一认证信息用于在所述第一设备与所述第二设备建立P2P连接过程中进行认证;
    或者,所述第一设备接收所述第二设备发送的第二认证信息,所述第二认证信息由所述接入设备转发至所述第一设备,所述第二认证信息用于在所述第一设备与第二设备建立P2P连接过程中进行认证。
  6. 根据权利要求5所述的方法,其特征在于,所述第一设备向所述第二设备发送第一认证信息之后,还包括:
    所述第一设备接收所述第二设备发送的第三认证信息,所述第三认证信息由所述接入设备转发至所述第一设备,或者,所述第三认证信息由所述第二设备直接发送至所述第一设备,所述第三认证信息用于在所述第一设备与所述第二设备建立P2P连接过程中进行认证;
    或者,所述第一设备接收所述第二设备发送的第二认证信息之后,还包括:
    所述第一设备向所述第二设备发送第四认证信息,所述第四认证信息由所述接入设备转发至所述第二设备,或者,所述第四认证信息 由所述第一设备直接发送至所述第二设备,所述第四认证信息用于在所述第一设备与所述第二设备建立P2P连接过程中进行认证。
  7. 根据权利要求1-6任一项所述的方法,其特征在于,所述第一设备通过接入设备向第二设备发送第一协商消息之前,还包括:
    所述第一设备接收所述接入设备发送的连接命令,所述连接命令用于指示所述第一设备与所述第二设备建立P2P连接。
  8. 一种无线网络连接方法,其特征在于,包括:
    所述第二设备接收第一设备发送的第一协商消息,所述第一协商消息包括所述第一设备的端对端网络P2P连接能力信息;
    所述第二设备根据所述第一设备的P2P连接能力信息确认所述第一设备能够建立P2P连接;
    所述第二设备向所述第一设备发送第二协商消息,所述第二协商消息包括所述第二设备的P2P连接能力信息。
  9. 根据权利要求8所述的方法,其特征在于,
    所述第一设备的P2P连接能力信息包括所述第一设备的P2P地址信息;
    所述第二设备的P2P连接能力信息包括所述第二设备的P2P地址信息。
  10. 根据权利要求8或9所述的方法,其特征在于,所述第二设备根据所述第一设备的P2P连接能力信息与所述第一设备建立P2P连接之前,还包括:
    所述第二设备接收所述第一设备发送的第一监听规律信息,所述第一监听规律信息包括预设时间段信息和预设信道信息中的至少一个,所述预设时间段信息用于指示所述第一设备接收第一测量消息的时间段,所述预设信道信息用于指示所述第一设备接收所述第一测量消息所占用的信道,所述第一监听规律信息由所述接入设备转发至所述第二设备;
    所述第二设备根据所述第一监听规律信息向所述第一设备发送所述第一测量消息,所述第一测量消息用于指示当所述第一设备接收 到所述第一测量消息时,所述第一设备位于所述第二设备的覆盖范围之内,所述第一测量消息由所述第二设备直接发送至所述第一设备。
  11. 根据权利要求8或9所述的方法,其特征在于,所述第二设备根据所述第一设备的P2P连接能力信息与所述第一设备建立P2P连接之前,还包括:
    所述第二设备向所述第一设备发送第二监听规律信息,所述第二监听规律信息包括预设时间段信息和预设信道信息中的至少一个,所述预设时间段信息用于指示所述第二设备接收第二测量消息的时间段,所述预设信道信息用于指示所述第二设备接收所述第二测量消息所占用的信道,所述第二监听规律信息由所述接入设备转发至所述第一设备;
    所述第二设备根据所述第二监听规律信息接收所述第一设备发送的第二测量消息,所述第二测量消息用于指示当所述第二设备接收到所述第二测量消息时,所述第二设备位于所述第一设备的覆盖范围之内,所述第二测量消息由所述第一设备直接发送至所述第二设备。
  12. 根据权利要求8-11任一项所述的方法,其特征在于,所述第二设备根据所述第一设备的P2P连接能力信息与所述第一设备建立P2P连接之前,还包括:
    所述第二设备接收所述第一设备发送的第一认证信息,所述第一认证信息由所述接入设备转发至所述第二设备,所述第一认证信息用于在所述第一设备与所述第二设备建立P2P连接过程中进行认证;
    或者,所述第二设备向所述第一设备发送第二认证信息,所述第二认证信息由所述接入设备转发至所述第一设备,所述第二认证信息用于在所述第一设备与所述第二设备建立P2P连接过程中进行认证。
  13. 根据权利要求12所述的方法,其特征在于,
    所述第二设备接收所述第一设备发送的第一认证信息之后,还包括:
    所述第二设备向所述第一设备发送第三认证信息,所述第三认证信息由所述接入设备转发至所述第一设备,或者,所述第三认证信息由所述第二设备直接发送至所述第一设备,所述第三认证信息用于在 所述第一设备与所述第二设备建立P2P连接过程中进行认证;
    或者,所述第二设备向所述第一设备发送的第二认证信息之后,还包括:
    所述第二设备接收所述第一设备发送第四认证信息,所述第四认证信息由所述接入设备转发至所述第二设备,或者,所述第四认证信息由所述第一设备直接发送至所述第二设备,所述第四认证信息用于在所述第一设备与所述第二设备建立P2P连接过程中进行认证。
  14. 一种第一设备,其特征在于,应用于无线网络,在所述无线网络中,所述第一设备包括:
    发送单元,用于通过接入设备向第二设备发送第一协商消息,所述第一协商消息包括所述第一设备的端对端网络P2P连接能力信息;
    接收单元,用于接收所述第二设备发送的第二协商消息,所述第二协商消息包括所述第二设备的P2P连接能力信息;
    连接单元,用于根据所述接收单元接收的所述第二设备的P2P连接能力信息与所述第二设备建立P2P连接。
  15. 根据权利要求14所述的第一设备,其特征在于,
    所述第一设备的P2P连接能力信息包括所述第一设备的P2P地址信息;
    所述第二设备的P2P连接能力信息包括所述第二设备的P2P地址信息。
  16. 根据权利要求14或15所述的第一设备,其特征在于,
    所述发送单元,还用于向所述第二设备发送第一监听规律信息,所述第一监听规律信息包括预设时间段信息和预设信道信息中的至少一个,所述预设时间段信息用于指示所述第一设备接收第一测量消息的时间段,所述预设信道信息用于指示所述的第一设备接收所述第一测量消息所占用的信道,所述第一监听规律信息由所述接入设备转发至所述第二设备;
    所述接收单元,还用于根据所述第一监听规律信息接收所述第二设备发送的所述第一测量消息,所述第一测量消息用于指示当所述第 一设备接收到所述第一测量消息时,所述第一设备位于所述第二设备的覆盖范围之内,所述第一测量消息由所述第二设备直接发送至所述第一设备。
  17. 根据权利要求14或15所述的第一设备,其特征在于,
    所述接收单元,还用于接收所述第二设备发送的第二监听规律信息,所述第二监听规律信息包括预设时间段信息和预设信道信息中的至少一个,所述预设时间段信息用于指示所述第二设备接收第二测量消息的时间段,所述预设信道信息用于指示所述第二设备接收所述第二测量消息所占用的信道,所述第二监听规律信息由所述接入设备转发至所述第一设备;
    所述发送单元,还用于根据所述第二监听规律信息向所述第二设备发送所述第二测量消息,所述第二测量消息用于指示当所述第二设备接收到所述第二测量消息时,所述第二设备位于所述第一设备的覆盖范围之内,所述第二测量消息由所述第一设备直接发送至所述第二设备。
  18. 根据权利要求14-17任一项所述的第一设备,其特征在于,
    所述发送单元,还用于向所述第二设备发送第一认证信息,所述第一认证信息由所述接入设备转发至所述第二设备,所述第一认证信息用于在所述第一设备与所述第二设备建立P2P连接过程中进行认证;
    或者,所述接收单元,还用于接收所述第二设备发送的第二认证信息,所述第二认证信息由所述接入设备转发至所述第一设备,所述第二认证信息用于在所述第一设备与所述第二设备建立P2P连接过程中进行认证。
  19. 根据权利要求18所述的第一设备,其特征在于,
    所述接收单元,还用于向所述第二设备发送所述第一认证信息之后,接收所述第二设备发送的第三认证信息,所述第三认证信息由所述接入设备转发至所述第一设备,或者,所述第三认证信息由所述第二设备直接发送至所述第一设备,所述第三认证信息用于在所述第一设备与所述第二设备建立P2P连接过程中进行认证;
    或者,所述发送单元,还用于接收所述第二设备发送的所述第三认证信息之后,向所述第二设备发送第四认证信息,所述第四认证信息由所述接入设备转发至所述第二设备,或者,所述第四认证信息由所述第一设备直接发送至所述第二设备,所述第四认证信息用于在所述第一设备与所述第二设备建立P2P连接过程中进行认证。
  20. 根据权利要求14-19任一项所述的第一设备,其特征在于,
    所述接收单元,还用于接收所述接入设备发送的连接命令,所述连接命令用于指示所述第一设备与所述第二设备建立P2P连接。
  21. 一种第二设备,其特征在于,应用于无线网络,在所述的无线网络中,所述第二设备包括:
    接收单元,用于接收第一设备发送的第一协商消息,所述第一协商消息包括所述第一设备的P2P连接能力信息;
    连接单元,用于根据所述第一设备的P2P连接能力信息确认所述第一设备能够建立P2P连接;
    发送单元,用于向所述第一设备发送第二协商消息,所述第二协商消息包括所述第二设备的P2P连接能力信息。
  22. 根据权利要求21所述的第二设备,其特征在于,
    所述第一设备的P2P连接能力信息包括所述第一设备的P2P地址信息;
    所述第二设备的P2P连接能力信息包括所述第二设备的P2P地址信息。
  23. 根据权利要求21或22所述的第二设备,其特征在于,
    所述接收单元,还用于接收所述第一设备发送的第一监听规律信息,所述第一监听规律信息包括预设时间段信息和预设信道信息中的至少一个,所述预设时间段信息用于指示所述第一设备接收第一测量消息的时间段,所述预设信道信息用于指示所述的第一设备接收所述第一测量消息所占用的信道,所述第一监听规律信息由所述接入设备转发至所述第二设备;
    所述发送单元,用于根据所述第一监听规律信息向所述第一设备 发送第一测量消息,所述第一测量消息用于指示当所述第一设备接收到所述第一测量消息时,所述第一设备位于所述第二设备的覆盖范围之内,所述第一测量消息由所述第二设备直接发送至所述第一设备。
  24. 根据权利要求21或22所述的第二设备,其特征在于,
    所述发送单元,还用于向所述第一设备发送第二监听规律信息,所述第二监听规律信息包括预设时间段信息和预设信道信息中的至少一个,所述预设时间段信息用于指示所述第二设备接收第二测量消息的时间段,所述预设信道信息用于指示所述第二设备接收所述第二测量消息所占用的信道,所述第二监听规律信息由所述接入设备转发至所述第一设备;
    所述接收单元,还用于根据所述第二监听规律信息接收所述第一设备发送所述第二测量消息,所述第二测量消息用于指示当所述第二设备接收到所述第二测量消息时,所述第二设备位于所述第一设备的覆盖范围之内,所述第二测量消息由所述第一设备直接发送至所述第二设备。
  25. 根据权利要求21-24任一项所述的第二设备,其特征在于,
    所述接收单元,还用于接收所述第一设备发送的第一认证信息,所述第一认证信息由所述接入设备转发至所述第二设备,所述第一认证信息用于在所述第一设备与所述第二设备建立P2P连接过程中进行认证;
    或者,所述发送单元,还用于向所述第一设备发送第二认证信息,所述第二认证信息由所述接入设备转发至所述第一设备,所述第二认证信息用于在所述第一设备与所述第二设备建立P2P连接过程中进行认证。
  26. 根据权利要求25所述的第二设备,其特征在于,
    所述发送单元,还用于接收所述第一设备发送的所述第一认证信息之后,向所述第一设备发送第三认证信息,所述第三认证信息由所述接入设备转发至所述第一设备,或者,所述第三认证信息由所述第二设备直接发送至所述第一设备,所述第三认证信息用于在所述第一设备与所述第二设备建立P2P连接过程中进行认证;
    或者,所述接收单元,还用于向所述第一设备发送所述第三认证信息之后,接收所述第一设备发送第四认证信息,所述第四认证信息由所述接入设备转发至所述第二设备,或者,所述第四认证信息由所述第一设备直接发送至所述第二设备,所述第四认证信息用于在所述第一设备与所述第二设备建立P2P连接过程中进行认证。
  27. 一种无线网络系统,其特征在于,包括第一设备、第二设备及接入设备,所述第一设备与所述第二设备通过所述接入设备连接;
    其中,所述第一设备为权利要求14-20任一项所述的第一设备;
    所述第二设备为权利要求21-26任一项所述的第二设备。
PCT/CN2015/088139 2014-08-27 2015-08-26 一种无线网络连接方法、设备及系统 WO2016029854A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410427684.3 2014-08-27
CN201410427684.3A CN105451367A (zh) 2014-08-27 2014-08-27 一种无线网络连接方法、设备及系统

Publications (1)

Publication Number Publication Date
WO2016029854A1 true WO2016029854A1 (zh) 2016-03-03

Family

ID=55398763

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/088139 WO2016029854A1 (zh) 2014-08-27 2015-08-26 一种无线网络连接方法、设备及系统

Country Status (2)

Country Link
CN (1) CN105451367A (zh)
WO (1) WO2016029854A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109587667A (zh) * 2018-11-23 2019-04-05 Oppo广东移动通信有限公司 一种连接建立方法及装置、设备、存储介质
WO2021027727A1 (zh) * 2019-08-09 2021-02-18 华为技术有限公司 信息传输的方法和电子设备

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106455128B (zh) * 2016-11-14 2020-07-28 上海龙旗科技股份有限公司 一种wifi点对点数据传输的方法及设备
CN112448964B (zh) * 2019-08-10 2022-04-05 荣耀终端有限公司 一种设备发现方法及p2p设备

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1527621A (zh) * 2003-03-07 2004-09-08 皇家飞利浦电子股份有限公司 无线通信网络中建立点到点对等通信的方法和装置
CN101496430A (zh) * 2005-01-25 2009-07-29 美商内数位科技公司 点对点无线通信系统
US20140004796A1 (en) * 2012-06-27 2014-01-02 Alcatel-Lucent Usa Inc. Discovering proximity devices in broadband networks

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1527621A (zh) * 2003-03-07 2004-09-08 皇家飞利浦电子股份有限公司 无线通信网络中建立点到点对等通信的方法和装置
CN101496430A (zh) * 2005-01-25 2009-07-29 美商内数位科技公司 点对点无线通信系统
US20140004796A1 (en) * 2012-06-27 2014-01-02 Alcatel-Lucent Usa Inc. Discovering proximity devices in broadband networks

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109587667A (zh) * 2018-11-23 2019-04-05 Oppo广东移动通信有限公司 一种连接建立方法及装置、设备、存储介质
WO2021027727A1 (zh) * 2019-08-09 2021-02-18 华为技术有限公司 信息传输的方法和电子设备

Also Published As

Publication number Publication date
CN105451367A (zh) 2016-03-30

Similar Documents

Publication Publication Date Title
US11432347B2 (en) Peer to peer networking and sharing systems and methods
US9654907B2 (en) System, method and apparatus for wireless network connection using near field communication
US9628585B2 (en) Systems and methods for cross-layer secure connection set up
KR101697414B1 (ko) 피어 투 피어 링크를 통한 공유 네트워크 액세스
WO2020143095A1 (zh) 一种通信连接的建立方法及代理服务器
US9781579B2 (en) Method and device for realizing terminal WIFI talkback
US20140089431A1 (en) Instant messaging method, terminal, server, and system
WO2012078379A1 (en) Direct data communication for p2p networks
WO2014071564A1 (en) Proxy connection method and apparatus
JP2015528249A (ja) 無線通信システムにおけるトポロジ処理方法及び装置
WO2018127046A1 (zh) 一种业务请求处理方法及装置
US20150120943A1 (en) Secure mobile access to resources within a private network
US20190297119A1 (en) Establishing direct secure connection between collaboration devices in a room or space
US10419543B2 (en) Method and system for establishing a connection between a seeker device and a target device
WO2016029854A1 (zh) 一种无线网络连接方法、设备及系统
CN105451368B (zh) 一种通信方法及设备
TW201737753A (zh) 一種網路接入方法、相關設備和系統
JPWO2016098275A1 (ja) 通信方法
US20150043421A1 (en) Wireless relay apparatus, communication system, and communication method
CN116746179A (zh) Wlan多链路tdls密钥导出
WO2011000168A1 (zh) 一种获取本地域名的方法、装置及系统
RU2707741C1 (ru) Системы и способы регистрации пользовательского устройства (ue)
CN108076469B (zh) 用于无线接入点桥接的方法与路由器
CA2980952A1 (en) Ip address allocation method in d2d communication and user equipment
JP2016004492A (ja) 通信装置、制御方法、及びプログラム

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: 15835450

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15835450

Country of ref document: EP

Kind code of ref document: A1