WO2018120624A1 - 一种获取认证信息的方法、装置及系统 - Google Patents

一种获取认证信息的方法、装置及系统 Download PDF

Info

Publication number
WO2018120624A1
WO2018120624A1 PCT/CN2017/086163 CN2017086163W WO2018120624A1 WO 2018120624 A1 WO2018120624 A1 WO 2018120624A1 CN 2017086163 W CN2017086163 W CN 2017086163W WO 2018120624 A1 WO2018120624 A1 WO 2018120624A1
Authority
WO
WIPO (PCT)
Prior art keywords
network
authentication information
beacon packet
beacon
receive
Prior art date
Application number
PCT/CN2017/086163
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 华为技术有限公司
Priority to CN201780032665.2A priority Critical patent/CN109196916A/zh
Publication of WO2018120624A1 publication Critical patent/WO2018120624A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/08Access restriction or access information delivery, e.g. discovery data delivery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W72/00Local resource management
    • H04W72/02Selection of wireless resources by user or terminal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/02Hierarchically pre-organised networks, e.g. paging networks, cellular networks, WLAN [Wireless Local Area Network] or WLL [Wireless Local Loop]
    • H04W84/10Small scale networks; Flat hierarchical networks
    • H04W84/12WLAN [Wireless Local Area Networks]

Definitions

  • the embodiments of the present invention relate to the field of communications technologies, and in particular, to a method, an apparatus, and a system for acquiring authentication information.
  • Wi-Fi networks wireless networks formed by Wi-Fi technology according to authentication information.
  • the first device cannot input Wi- through the input device.
  • the authentication information of the Fi network In this case, the first device can receive broadcast, multicast, or unicast authentication information of other smart devices (hereinafter referred to as the second device) in the listening mode, so that the authentication is performed according to the authentication.
  • Information access to the Wi-Fi network for a smart device (hereinafter referred to as a first device) without an input device (such as a keyboard or a touch display screen), the first device cannot input Wi- through the input device.
  • the first device can receive broadcast, multicast, or unicast authentication information of other smart devices (hereinafter referred to as the second device) in the listening mode, so that the authentication is performed according to the authentication.
  • Information access to the Wi-Fi network In the process of the smart device accessing the Wi-Fi network.
  • the carrier frequency used by the authentication information of the second device broadcast, multicast, or unicast Wi-Fi network is generally greater than the carrier frequency used by the first device to receive the authentication information, the first device may not be able to The authentication information sent by the second device is received, and the success rate of the first device to obtain the authentication information may be relatively low.
  • the present application provides a method, device, and system for obtaining authentication information, which can improve the success rate of obtaining authentication information.
  • the present application provides a method for obtaining authentication information, where the method may include: receiving, by a second device, a first beacon message sent by the first device; and receiving, by the second device, the first beacon message received by the second device Transmitting, to the first device, first authentication information for the first device to access the first network; and in case the second device determines that the first device fails to receive the first authentication information, the second device creates the second network; The second device sends the first authentication information to the first device by using the second network, where the first beacon packet includes the identifier information of the first device and the network state of the first device.
  • the method for obtaining the authentication information provided by the present application in the process of the first device requesting the first authentication information, the second device may send the first authentication information to the first device by using a broadcast manner, where the first device is in the monitoring working mode.
  • the second device may create the second network, and the second device may send the first authentication information to the first device by using the second network, so that the first device can be improved.
  • the success rate of an authentication message in the process of the first device requesting the first authentication information, the second device may send the first authentication information to the first device by using a broadcast manner, where the first device is in the monitoring working mode.
  • the method for determining that the second device receives the first authentication information may include: determining, by the second device, the first device according to the second beacon packet The first authentication information fails to be received, and the second beacon packet includes the identifier information of the first device and the network status of the first device.
  • the second device receives the second message broadcast by the first device.
  • the second device may determine, according to the network status of the first device in the second packet, whether the first device obtains the first authentication information, and the network status of the first device is not obtained the first authentication.
  • the second status the second device determines that the first device fails to acquire the first authentication information.
  • the first device fails to receive the first authentication information
  • the first device broadcasts the beacon packet, and when the first device acquires the first authentication information, the first device stops broadcasting the beacon message (which may be called Situation2).
  • the second device After receiving the first beacon packet broadcast by the first device, the second device further receives the second beacon packet that is broadcast by the first device, and the second device can learn that the first device does not obtain the first authentication. information.
  • the method for the second device to create the second network may include: the second device setting the service set identifier of the second network according to the second beacon packet that is received by the second device ( Service set identifier, SSID).
  • the second device may according to the SSID of the second network of the second beacon message device that it receives.
  • the second device may be the identifier of the first device that is carried in the second beacon packet that is received by the second device, and may be a medium access control (MAC) address of the first device or a serial number of the first device.
  • MAC medium access control
  • the second device may further set a special identifier in the field specified in the SSID of the second network, the identifier is used to indicate that the second device is in a state in which the first authentication information can be provided. Therefore, the first device may determine, according to the SSID of the second network, that the second device may provide the first device with the first authentication information.
  • the second network may have no password
  • the password of the second network may also be a password set according to a security level of the network, so that when the first device acquires the SSID of the second network, the first device may be according to the second The SSID of the network and the password of the second network access the second network.
  • the present application provides a method for obtaining authentication information, where the method may include: a first device broadcasts a first beacon message for requesting first authentication information; and the first device receives the second device according to the first a first authentication information sent by a beacon packet; and in a case where the first device determines that the first device fails to acquire the first authentication information, the first device accesses the second network created by the second device; and the first device receives The second device uses the first authentication information that is sent by the second network, where the first beacon packet includes the identifier information of the first device and the network state of the first device, where the first authentication information is used by the first device. Access to the first network.
  • the method for obtaining the authentication information provided by the present application may be: when the first device fails to acquire the first authentication information sent by the second device in the listening working mode, the first device may access the second network created by the second device, thereby A device can receive the first authentication information that is sent by the second device by using the second network, so that the success rate of the first device to obtain the first authentication information can be improved.
  • the method for determining that the first device fails to acquire the first authentication information may include: when the first device does not receive the second time in the preset time period When the first authentication information is sent by the device, the first device determines that the first device acquires the first authentication information. The interest failed.
  • the first device may wait for the other device to send the first authentication information to the first device, if the first device presets a segment after the first beacon packet is broadcasted. If the first authentication information is not received, the first device may determine that the first device fails to obtain the first authentication information, so that the first device may obtain the first authentication information by using other methods to ensure that the first device can be configured according to the first device. The first authentication information is accessed to the first network.
  • the method for obtaining the authentication information provided by the application may further include: the first device broadcasting the second beacon message.
  • the acquiring the authentication information provided by the application may further include: the first device broadcasting a second beacon message, where the second beacon message includes a network status of the first device.
  • the first device determines, when the first device fails to obtain the first authentication information, the second beacon packet that the first device can broadcast (the second beacon packet is the same as the first beacon packet) That is, the network status of the first device in the second beacon packet is the second state, so that the first authentication information is requested again from other devices around the first device.
  • the first device may broadcast the second beacon packet, where the network state of the first device in the second beacon packet may be the first state. Or the second state, so that the second device may determine, according to the second beacon message, whether the first device obtains the first authentication information successfully or not.
  • the method for obtaining the authentication information provided by the application may further include: acquiring, at the first device, In the case of the SSID of the second network, the first device determines, according to the SSID of the second network, that the second device is the device that provides the first device with the first authentication information.
  • the first device may detect the SSID of the multiple network.
  • the first device may learn, according to the identifier of the first device in the SSID of the second network, that the second device can Providing the first device with the first authentication information, and the first device can learn that the second device is in a state capable of providing the first device with the first authentication information according to the special identifier in the SSID of the second network, and thus, the second device
  • the second device corresponding to the SSID of the second network is determined to be a device capable of providing the first device with the first authentication information, so that the first device can access the second network, and receive the second device to send by using the second network.
  • First authentication information is determined to be a device capable of providing the first device with the first authentication information, so that the first device can access the second network, and receive the second device to send by using the second network.
  • the application provides an apparatus for acquiring authentication information, where the apparatus includes a receiving module, a sending module, and a creating module.
  • the receiving module may be configured to receive the first beacon packet sent by the first device, where the sending module may be configured to send, according to the first beacon packet received by the receiving module, the first device to be accessed by the first device.
  • a first authentication information of the network the creating module may be configured to: when the device determines that the first device fails to receive the first authentication information, create a second network; the sending module may be further configured to send, by using the second network, the first device
  • the first authentication information includes the identifier information of the first device and the network status of the first device.
  • the apparatus for acquiring authentication information provided by the application further includes a determining module, where the determining module is configured to receive, according to the second beacon received by the receiving module The method determines that the first device fails to receive the first authentication information, where the second beacon packet includes the identifier information of the first device and the network state of the first device.
  • the creating module is specifically configured to set an SSID of the second network according to the second beacon packet received by the receiving module.
  • the application provides an apparatus for acquiring authentication information, where the apparatus may include a sending module, a receiving module, and an access module.
  • the sending module may be configured to broadcast a first beacon message for requesting the first authentication information;
  • the receiving module may be configured to receive the first authentication information sent by the second device according to the first beacon message;
  • the access module may be used to: When the device determines that the device fails to obtain the first authentication information, accesses the second network created by the second device, and the receiving module is further configured to receive, by the second device, the second network, for accessing the device.
  • the first authentication information of the network, where the first beacon packet includes the identification information of the device and the network status of the device.
  • the apparatus for obtaining authentication information provided by the application may further include a determining module.
  • the determining module may be configured to determine that the device fails to acquire the first authentication information when the receiving module does not receive the first authentication information sent by the second device within a preset time period.
  • the sending module is further configured to: after the receiving module fails to receive the first authentication information, broadcast the second beacon packet.
  • the sending module is further configured to: after the receiving module receives the first authentication information sent by the second device, broadcast the second beacon packet.
  • the determining module is further configured to determine, according to the SSID of the second network, that the second device is the device, if the device acquires the SSID of the second network.
  • an apparatus for obtaining authentication information can include a processor, a transceiver, and a memory coupled to the processor.
  • This memory can be used to store computer instructions.
  • the processor executes the computer instruction stored in the memory, and the processor is configured to control the transceiver to receive the first beacon message sent by the first device, where the first beacon message includes the first
  • the first device is configured to send the first authentication information to the first device, where the first authentication information is used by the first device to access the first network; And in the case that it is determined that the first device fails to receive the first authentication information, the second network is created; and the control transceiver sends the first authentication information to the first device by using the second network.
  • the processor is configured to determine, according to the second beacon packet, that the first device fails to receive the first authentication information, where the second beacon packet includes the first The identification information of the device and the network status of the first device.
  • the foregoing processor is specifically configured to set an SSID of the second network according to the second beacon message.
  • a computer readable storage medium comprising computer instructions.
  • the device is caused to perform the method of obtaining authentication information as described in any one of the above first aspects and various alternative implementations thereof.
  • a computer program product comprising computer instructions, when the computer program product is run on a device, causes the device to perform any of the first aspect described above and various alternative implementations thereof The method of obtaining authentication information.
  • an apparatus for obtaining authentication information can include a processor, a transceiver, and a memory coupled to the processor.
  • This memory can be used to store computer instructions.
  • the processor executes the computer instruction stored in the memory, and the processor is configured to control the transceiver to broadcast the first beacon message, where the first beacon message includes the identification information of the first device and a network status of the first device, where the first beacon message is used to request first authentication information, where the first authentication information is used by the device to access the first network; and the control transceiver receives the second device according to the first beacon Transmitting the first authentication information; and in the case of determining that the first device fails to acquire the first authentication information, accessing the second network created by the second device; and controlling the transceiver to receive the second device sending by using the second network An authentication message.
  • the processor is specifically configured to determine, when the transceiver does not receive the first authentication information sent by the second device within a preset time period, The device that authenticates the information fails to obtain the first authentication information.
  • the transceiver may be configured to broadcast the first beacon packet after receiving the failure of the first authentication information.
  • the transceiver may be further configured to: after receiving the first authentication information sent by the second device according to the first beacon packet, broadcast the second beacon packet,
  • the second beacon message includes the identification information of the device for obtaining the authentication information and the network status of the device.
  • the foregoing processor may be further configured to determine, according to the SSID of the second network, that the second device is used for acquiring, when acquiring the SSID of the second network.
  • the device that authenticates the information provides the device of the first authentication information.
  • a computer readable storage medium comprising computer instructions.
  • the device is caused to perform the method of obtaining authentication information as described in any of the second aspect above and its various alternative implementations.
  • a computer program product comprising computer instructions, when the computer program product is run on a device, causes the device to perform any one of the second aspect described above and various alternative implementations thereof The method of obtaining authentication information.
  • the first authentication information may include at least one of an SSID of the first network, a password of the first network, and an authentication certificate of the first network.
  • the first device when the first device accesses the first network, the first device may be connected according to at least one of an SSID of the first network, a password of the first network, and an authentication certificate of the first network according to actual usage requirements. Enter the first network.
  • the second network is a second network created by the second device.
  • the second device may create a hotspot network (ie, the second network), so that the second device The device may send the first authentication information to the first device by using the second network, so that the first device successfully obtains the first authentication information.
  • a hotspot network ie, the second network
  • the present application provides a communication system, which may include the apparatus of any one of the foregoing third aspects and various alternative implementations thereof, the fourth aspect, and various alternatives thereof A device as claimed in any one of the embodiments.
  • the communication system may include the device of the above fifth aspect, the device of the seventh aspect, wherein the device of any one of the third aspect and various alternative implementations thereof, and the fifth
  • the device described in the aspect is the second device, the device according to any one of the fourth aspect and the various optional implementations thereof, and the device described in the seventh aspect is the first device.
  • FIG. 1 is a schematic structural diagram of a communication system according to an embodiment of the present application.
  • FIG. 2 is a schematic hardware diagram of a smart desk lamp according to an embodiment of the present application.
  • FIG. 3 is a schematic diagram of hardware of a mobile phone according to an embodiment of the present application.
  • FIG. 4 is a first schematic diagram of a method for obtaining authentication information according to an embodiment of the present application.
  • FIG. 5 is a second schematic diagram of a method for obtaining authentication information according to an embodiment of the present disclosure
  • FIG. 6 is a third schematic diagram of a method for obtaining authentication information according to an embodiment of the present disclosure.
  • FIG. 7 is a schematic diagram 4 of a method for obtaining authentication information according to an embodiment of the present disclosure.
  • FIG. 8 is a schematic structural diagram 1 of a second device according to an embodiment of the present disclosure.
  • FIG. 9 is a second schematic structural diagram of a second device according to an embodiment of the present disclosure.
  • FIG. 10 is a schematic structural diagram 1 of a first device according to an embodiment of the present disclosure.
  • FIG. 11 is a schematic structural diagram 2 of a first device according to an embodiment of the present disclosure.
  • first and second in the specification and claims of the embodiments of the present application are used to distinguish different objects, and are not intended to describe a specific order of the objects.
  • first device and the second device, etc. are used to distinguish different devices, rather than to describe a particular order of devices.
  • the words “exemplary” or “such as” are used to mean an example, illustration, or illustration. Any embodiment or design described as “exemplary” or “for example” in the embodiments of the present application should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of the words “exemplary” or “such as” is intended to present the concepts in a particular manner.
  • Service Set Identifier can be understood as the name of the wireless network.
  • the SSID can distinguish different wireless networks. When a device accesses the wireless network, the SSID and the password of the wireless network can be used for the device to complete the authentication, and then Then access the wireless network.
  • an SSID can consist of up to 32 bytes.
  • Beacon technology is a communication technology that can implement message push. For example, if a user's smart device (such as a smart phone) is installed with an application that supports pushing messages through Beacon technology, when the smart phone enters the service range of the Beacon base station, the application on the smart phone can push the response to the user. Message. Exemplarily, when a user enters a certain shopping mall, the user's mobile phone can receive the discount information of the shopping mall, and the process is implemented by using Beacon technology.
  • a user's smart device such as a smart phone
  • the application on the smart phone can push the response to the user.
  • the user's mobile phone can receive the discount information of the shopping mall, and the process is implemented by using Beacon technology.
  • the embodiment of the present application provides a method, an apparatus, and a system for acquiring authentication information. If the first device fails to obtain the first authentication information in the listening mode, the first device may access the second network created by the second device, so that the second device may send the first authentication information to the first device by using the second network. In this way, the success rate of the first device acquiring the first authentication information can be improved.
  • FIG. 1 is a schematic structural diagram of a communication system according to an embodiment of the present disclosure.
  • the communication system may include: , the second device 11 and the router 12.
  • the second device is connected to the Wi-Fi network through the router 12, and the first device 10 is a smart device in the communication system to be accessed by the Wi-Fi network, and the first device 10 has no input device, and in the communication system,
  • the first device 10 may obtain authentication information for accessing the Wi-Fi network from the second device 11, so that the first device 10 can access the router through the router.
  • the Wi-Fi network as such, the first device 10 can communicate with other devices using the Wi-Fi network.
  • the first device is a smart device without an input device
  • the second device may be a smart device having an input device
  • the first device may be a smart desk lamp, a smart washing machine, a smart socket, and a smart refrigerator.
  • the hardware structure of the first device is introduced by using the smart desk lamp as an example.
  • the components of the smart desk lamp provided by the embodiment of the present application are specifically described below with reference to FIG. 2 .
  • the smart desk lamp provided by the embodiment of the present application may include components such as a control unit 20, a memory 21, a communication unit 22, and a power source 23.
  • the structure of the smart desk lamp shown in FIG. 2 does not constitute a limitation of the smart desk lamp, which may include more or less components such as those shown in FIG. 2, or may be combined as shown in FIG. 2. Some of the components shown may be different than the components shown in Figure 2.
  • the control unit 20 is a core component of the smart desk lamp for controlling other components of the smart.
  • the control unit can also be called a single-chip microcomputer or a single-chip microcomputer, and is a central process unit (CPU), a memory, a timer, and a counter. And a plurality of I/O interfaces integrated on one chip to form a chip-level computer, the control unit 20 of the smart desk lamp can be used to control the brightness, dark color of the smart desk lamp or to control the opening and closing time of the first device.
  • the memory 21 is used to store program codes and data of the smart desk lamp.
  • the smart desk lamp may have various memories, such as a read only memory ROM (Random Access Memory), a dynamic internal memory (DRAM), and a flash memory.
  • ROM Read Only Memory
  • DRAM dynamic internal memory
  • flash memory any type of non-volatile memory
  • the communication unit 22 is configured to complete communication between the smart desk lamp and other devices, and the communication unit may include a communication interface, which may be a transceiver, a transceiver circuit, or the like having a transceiving function, and the communication interface includes a serial communication interface and parallel communication.
  • the communication unit 22 may further include a Wi-Fi module, and the smart desk lamp can be connected to a network through the Wi-Fi module, so that the network can be used to communicate with other devices.
  • the power source 23 is used to power various components of the smart desk lamp, and the power source 23 can be a battery.
  • the power source 23 can be logically connected to the control unit 20 through the power management system, thereby implementing functions such as managing charging, discharging, and power management through the power management system.
  • the smart desk lamp shown in FIG. 2 may further include a sensor (for example, a thermometer sensor, a photosensitive line sensor, and the like), a Bluetooth module, and the like, and details are not described herein again.
  • a sensor for example, a thermometer sensor, a photosensitive line sensor, and the like
  • a Bluetooth module for example, Bluetooth Special Interest Group (SIG)
  • the second device provided by the embodiment of the present application may be a mobile phone, a tablet computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA).
  • UMPC ultra-mobile personal computer
  • PDA personal digital assistant
  • the embodiment of the present application takes the second device as a mobile phone as an example, and introduces the hardware structure of the second device.
  • the components of the mobile phone provided by the embodiment of the present application are specifically described below with reference to FIG.
  • the mobile phone provided by the embodiment of the present application includes a processor 30, a radio frequency (RF) circuit 31, a power source 32, a memory 33, an input unit 34, a display unit 35, and an audio circuit 36.
  • RF radio frequency
  • the structure of the mobile phone shown in FIG. 3 does not constitute a limitation to the mobile phone, and may include more or less components such as those shown in FIG. 3, or may be combined as shown in FIG. Some of the components may be different from the components shown in Figure 3.
  • the processor 30 is the control center of the mobile phone and connects various parts of the entire mobile phone using various interfaces and lines.
  • the mobile phone is monitored overall by running or executing software programs and/or modules stored in memory 33, as well as invoking data stored in memory 33, performing various functions and processing data of the handset.
  • processor 30 may include one or more processing units.
  • the processor 30 can integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, an application, and the like; and the modem processor mainly processes wireless communications. It can be understood that the above-mentioned modem processor can also be a processor that exists separately from the processor 30.
  • the RF circuit 31 can be used to receive and transmit signals during transmission or reception of information or calls. For example, after the downlink information of the base station is received, it is processed by the processor 30; in addition, the uplink data is transmitted to the base station.
  • RF circuits include, but are not limited to, an antenna, at least one amplifier, a transceiver, a coupler, Low noise amplifier (LNA) and duplexer.
  • the handset can also communicate wirelessly with other devices in the network via the RF circuitry 31.
  • Wireless communication can use any communication standard or protocol, including but not limited to global system of mobile communication (GSM), general packet radio service (GPRS), code division multiple Access, CDMA), wideband code division multiple access (WCDMA), LTE, e-mail, and short messaging service (SMS).
  • GSM global system of mobile communication
  • GPRS general packet radio service
  • CDMA code division multiple Access
  • WCDMA wideband code division multiple access
  • LTE long term evolution
  • e-mail e-mail
  • SMS short messaging service
  • Power source 32 can be used to power various components of the handset, and power source 32 can be a battery.
  • the power supply can be logically coupled to the processor 30 through the power management system to manage functions such as charging, discharging, and power management through the power management system.
  • the memory 33 can be used to store software programs and/or modules, and the processor 30 executes various functional applications and data processing of the mobile phone by running software programs and/or modules stored in the memory 33.
  • the memory 33 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may be stored according to Data created by the use of the mobile phone (such as audio data, image data, phone book, etc.).
  • the memory 33 may include a high speed random access memory, and may also include a nonvolatile memory such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
  • the input unit 34 can be configured to receive input numeric or character information and to generate key signal inputs related to user settings and function controls of the handset.
  • input unit 34 may include touch screen 341 as well as other input devices 342.
  • the touch screen 341 also referred to as a touch panel, can collect touch operations on or near the user (such as the operation of the user using a finger, a stylus, or the like on the touch screen 341 or near the touch screen 341), and according to The preset program drives the corresponding connection device.
  • the touch screen 341 may include two parts of a touch detection device and a touch controller.
  • the touch detection device detects the touch orientation of the user, and detects a signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts the touch information into contact coordinates, and sends the touch information.
  • the processor 30 is provided and can receive commands from the processor 30 and execute them.
  • the touch screen 341 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves.
  • Other input devices 342 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control buttons, power switch buttons, etc.), trackballs, mice, and joysticks.
  • the display unit 35 can be used to display information input by the user or information provided to the user as well as various menus of the mobile phone.
  • the display unit 35 may include a display panel 351.
  • the display panel 351 can be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
  • the touch screen 341 can cover the display panel 351, and when the touch screen 341 detects a touch operation thereon or nearby, it is transmitted to the processor 30 to determine the type of the touch event, and then the processor 30 displays the panel according to the type of the touch event. A corresponding visual output is provided on the 351.
  • the touch screen 341 and the display panel 351 function as two separate components to implement the input and output functions of the mobile phone, in some embodiments, The input and output functions of the mobile phone are realized by integrating the touch screen 341 with the display panel 351.
  • the Wi-Fi module 36 can be used to access a mobile phone to a Wi-Fi network, so that the mobile phone can communicate with other devices using a Wi-Fi network.
  • the embodiment of the present application provides a method for obtaining authentication information.
  • the method may include S101-S112:
  • the first device broadcasts the first beacon packet.
  • the first beacon packet that is broadcast by the first device includes the identifier of the first device and the network state of the first device, where the identifier of the first device can uniquely identify the first device, and the network state of the first device may include Obtaining a state of the first authentication information (hereinafter referred to as a first state) and a state of not acquiring the first authentication information (hereinafter referred to as a second state), the first state may indicate that the first device is already acquired
  • the state of the authentication information of the first network, the second state may indicate that the first device is in the state that the authentication information of the first network is not obtained, and in the first beacon packet, the network state of the first device is the second state. .
  • the first device may use the Beacon technology to broadcast a beacon packet to the other devices in the first device, where the beacon packet is used to request the Wi-Fi to be accessed by the first device.
  • the authentication information (referred to as the first authentication information) is referred to as the first network.
  • the first device may add the identifier of the first device and the network state of the first device (which may be the first state or the second state) in the reserved field of the beacon packet, and then go to the periphery of the first device.
  • the other device broadcasts the beacon message, so that other devices can learn the existence of the first device and the network status of the first device according to the beacon message.
  • Timestamp 8 Time of device that synchronously receives beacon messages Beacon interval 2 Interval for sending beacon messages Performance information 2 Used to notify other devices of network performance Service set identifier 2-34 Used to distinguish between different networks Supported rate 3-10
  • the rate supported by the device that sent the beacon message Frequency hopping parameter set 7 Using frequency hopping technology to send parameters of beacon messages
  • beacon message The content listed in the foregoing Table 1 is part of the information in the beacon message, and the beacon message may also include other types of information, which are not enumerated in the embodiments of the present application.
  • the identifier of the first device may be the product serial number of the first device, or may be the MAC address of the first device, or may be another identifier that can uniquely identify the first device. It can be selected according to the actual use requirements, and is not limited in this embodiment.
  • an identifier may be used to indicate a network status of the first device, so that the second device may learn the network status of the first device according to the identifier.
  • the identifier used to indicate the network status of the first device may be specifically represented by “0” or “1”.
  • “0” can be used to indicate the network shape of the first device.
  • the state is the first state, and the network state of the first device is the second state by using "1"; the network state of the first device is the first state, and the network of the first device is represented by "0".
  • the state is the second state.
  • the embodiment of the present application may also use other identifiers that meet the actual usage requirements to set the network state of the first device, which is not enumerated in the embodiments of the present application.
  • the second device receives the first beacon packet sent by the first device.
  • the second device sends the first authentication information to the first device according to the first beacon packet sent by the first device.
  • the second device receives the first beacon packet that is broadcasted (ie, sent) by the first device, and the second device may be configured according to the first beacon packet.
  • the identifier of the first device and the network state of the first device are used to learn whether the first device has obtained the first authentication information for accessing the first network, and if the network state of the first device is the second state, The second device determines that the first device does not obtain the first authentication information, so that the second device sends the first authentication information to the first device.
  • the second device may send the authentication information of the first network in a broadcast, multicast, or unicast manner, so that the first device may receive, broadcast, multicast, or unicast the second device.
  • the first authentication information may be sent to the second device.
  • the first authentication information may include at least one of an SSID of the first network, a password of the first network, and an authentication certificate of the first network.
  • the first device may input at least one of an SSID of the first network, a password of the first network, and an authentication certificate of the first network.
  • the first device may access the first network, and the first device may adopt the first A network communicates with other devices.
  • the first device receives the first authentication information sent by the second device.
  • the first device when the first device broadcasts the first beacon packet, the first device is in the listening mode, that is, the first device can listen to the broadcast, multicast, or unicast information of other devices around the first device.
  • the receiving, by the first device, the first authentication information that is sent by the second device may be that the first device monitors the first authentication information that is broadcast, multicast, or unicast by the second device, and then the first device may save the first authentication information to the first device.
  • the first device can access the first network according to the first authentication information.
  • the first device determines that the first device fails to acquire the first authentication information.
  • the carrier frequency which may be referred to as a second carrier frequency
  • the carrier frequency which may be referred to as the first carrier frequency
  • the first authentication information is sent, which may cause the first device to fail to obtain the first authentication information.
  • the first device may determine whether to continue to broadcast the beacon packet, and specifically, may include the following two situations ( Recorded as Situation1 and Situation2 respectively:
  • the first device continues to broadcast the beacon message (hereinafter may be referred to as a second beacon message), regardless of whether the first device acquires the first authentication information, and the second beacon report
  • the message may be used to indicate that the first device succeeds in acquiring the first authentication information (hereinafter may be referred to as the beacon message 1), or the second beacon message may be used to instruct the first device to acquire the first
  • the beacon message in which the authentication information fails hereinafter may be referred to as beacon message 2, in which case the beacon message 2 is identical to the first beacon message described above).
  • the first device may broadcast the beacon packet 1.
  • the network state of the first device is the first state
  • the other device receives the After the beacon packet 1 is obtained, the first device may obtain the first authentication information according to the first state.
  • the first device may broadcast the beacon packet 2, in the message.
  • the network state of the first device is the second state. After receiving the beacon packet 2, the other device may learn that the first device does not obtain the first authentication information according to the second state.
  • the first device fails to receive the first authentication information, the first device continues to broadcast the beacon message.
  • the first device obtains the first authentication information, the first device stops broadcasting the beacon message.
  • the first device if the first device obtains the first authentication information, the first device stops broadcasting the beacon packet to other devices in the vicinity, and if the first device fails to obtain the first authentication information, A device may continue to broadcast a beacon message (which may be referred to as a second beacon message), where the second beacon message is a beacon message for indicating that the first device fails to obtain the first authentication information, and the other device receives
  • the second beacon message broadcasted by the first device is used to learn that the first device does not obtain the first authentication information.
  • the second beacon packet may be the same beacon packet as the first beacon packet, for example, when the first device fails to acquire the first authentication information, the first device
  • the broadcasted second beacon packet is the same as the first beacon packet, and the network state of the first device in the second beacon packet and the network state of the first device in the first beacon packet are both in the second state;
  • the second beacon packet may also be a beacon packet different from the first beacon packet.
  • the second beacon packet broadcasted by the first device is The information of the first device in the second beacon packet is the first state, and the network state of the first device in the first beacon packet is the second state, so that the second device can be configured according to the The second beacon packet determines whether the first device obtains the first authentication information successfully or fails.
  • the first device may continue to perform the following steps according to the foregoing different situations: the scenario 1 and the situation 2:
  • the first device broadcasts the second beacon message.
  • the first device determines that the first device acquires the first authentication.
  • the first device can broadcast the second beacon packet (the second beacon packet is the same as the first beacon packet, that is, the network state of the first device in the second beacon packet is the first The second state) is to request the first authentication information again from other devices around the first device.
  • the first device may broadcast the second beacon packet, where the network state of the first device in the second beacon packet may be the first state. Or the second state.
  • the second device receives the second beacon packet sent by the first device.
  • the second device determines, according to the second beacon packet that it receives, that the first device fails to acquire the first authentication information.
  • the second device may determine the first state according to the second state in the second beacon packet that is received by the second device. The device failed to obtain the first authentication information.
  • the second device creates a second network.
  • the second device receives the second beacon packet sent by the first device, and the second device may create a hotspot network if the second device determines that the first device fails to receive the first authentication information. (hereinafter referred to as the second network), so that after the other device accesses the second network, the second device can transmit data with other devices, or multiple other devices access the second network, the multiple other devices Data can be transferred between.
  • the second network a hotspot network if the second device determines that the first device fails to receive the first authentication information.
  • the second device before the second device creates the second network, the second device may be in the state of accessing the first network, and the second device cannot access the two different networks at the same time (for example, The second device cannot access the Wi-Fi network of the router and the cellular network provided by the operator at the same time.
  • the second device determines that the first device fails to obtain the first authentication information
  • the second device creates the second network.
  • the second device first exits the first network to ensure that the second device can successfully create the second network.
  • the first device accesses the second network created by the second device.
  • the first device when the first device fails to acquire the first authentication information that is broadcast by the second device, the first device may access the second network that is created by the second device according to the second beacon packet that is received by the second device, The first device can transmit data between the second network and other devices.
  • the second device sends the first authentication information to the first device by using the second network.
  • the second device may provide the first authentication information for the first device to access the first network. Therefore, after the second network created by the second device, the second device may use the second network. The first device sends the first authentication information.
  • the second device since the second device has an input device, the second device can interact with the user, that is, the user can input the first authentication information through the input device of the second device, and thus the second device The device may provide the first device with the first authentication information.
  • the second device when the second device sends the first authentication information to the first device, the second device may encrypt the first authentication information and send the first authentication information to the first device, where the second device may adopt some encryption protocol.
  • the digital certificate verification protocol encrypts the first authentication information
  • the first device may decrypt by using a corresponding decryption method, thereby obtaining the first authentication information, so that the The security of the first authentication information transmission process.
  • the second device may send the first authentication information by using a user datagram protocol (UDP), a transmission control protocol (TCP), or another protocol for transmitting data, which may be based on actual
  • UDP user datagram protocol
  • TCP transmission control protocol
  • the first authentication information is sent by using an appropriate data transmission protocol, which is not limited in this embodiment.
  • the first device receives the first authentication information that is sent by the second device by using the second network.
  • the first device may access the first network according to the first authentication information, so that the first device may adopt the first device.
  • a network communicates with other devices. Specifically, after the first device receives the first authentication information sent by the second device, the first device exits the second network created by the second device, and then the first device re-accesses the first network according to the first authentication information.
  • the smart desk lamp can communicate with other smart devices (such as a mobile phone), for example, the mobile phone can send a message to the smart desk lamp to control the smart device.
  • the smart desk lamp can communicate with other smart devices (such as a mobile phone), for example, the mobile phone can send a message to the smart desk lamp to control the smart device.
  • the mobile phone can send a message to the smart desk lamp to control the smart device.
  • the first device may broadcast the first request for requesting the first authentication information.
  • a beacon packet where the first beacon packet includes the identifier information of the first device and the network state of the first device, and after the second device receives the first beacon packet sent by the first device, the second device Sending the first authentication information to the first device according to the beacon packet, where the first device fails to receive the first authentication information sent by the second device, the second device creates the second network (that is, the hotspot network created by the second device) After the first device accesses the second network created by the second device, the second device may use the second network to send the first authentication information to the first device.
  • the first device when the first device fails to acquire the first authentication information sent by the second device in the listening working mode, the first device may access the second network created by the second device, Therefore, the second device can send the first authentication information to the first device by using the second network, so that the success rate of the first device acquiring the first authentication information can be improved.
  • S105a in combination with FIG. 4, as shown in FIG. 5, the foregoing S105 may be specifically implemented by using S105a:
  • S105a The first device does not receive the first authentication information sent by the second device in the preset time period, and the first device determines that the first device fails to acquire the first authentication information.
  • the first device may wait for the other device to send the first authentication information to the first device, if the first device broadcasts the first beacon packet. If the first authentication information is not received in the preset time period, the first device may determine that the first device fails to acquire the first authentication information.
  • the duration of the preset time period is 90s, and may be a time period of other durations, which may be determined according to actual conditions, which is not limited in the embodiment of the present application.
  • S109a in combination with FIG. 4, as shown in FIG. 6, the foregoing S109 may be specifically implemented by using S109a:
  • the second device sets the second network according to the second beacon message sent by the first device. SSID.
  • the second device when the second device determines that the first device fails to obtain the first authentication information, the second device may create a second network (ie, the hotspot network described above).
  • the method for the second device to create the second network may be: the second device first starts the hotspot network of the second device, and secondly, the second device may send the second beacon report after the first device fails to receive the first authentication information. Set the SSID of the second network.
  • the method for the second device to set the SSID of the second network according to the second beacon message sent by the first device is: in the case that the format conforms to the SSID, the second device may receive the beacon packet in the received message.
  • the identifier of the carried first device (which may be the MAC address of the first device or the serial number of the first device) as part of the SSID of the second network, and the second device may also be set in the field specified in the SSID of the second network
  • a special identifier is used to indicate that the second device is in a state in which the first authentication information can be provided, that is, the SSID of the second network may be composed of the identifier of the first device and a special identifier.
  • the number of bytes of the SSID of the second network (the number of bytes of the SSID can be up to 32 bytes) is 10 bytes
  • the identifier of the first device is the MAC address
  • the number of bytes of the MAC address The number of bytes of the special identifier is set to be less than or equal to 4 bytes.
  • the second device can set the number of bytes of the special identifier according to actual requirements, which is not specifically limited in this embodiment.
  • the identifier of the first device is the serial number of the first device
  • the serial number of the first device and the number of bytes of the special identifier exceed the SSID of the second network, The maximum number of bytes (32 bytes), then a portion of the serial number of the first device can be used as part of the SSID of the second network.
  • the SSID of the second network may be set by using the foregoing method.
  • the password of the second network may be set based on the security level of the network. For example, when the security requirement for the network is low, the second network may have no password. When the requirement for the security level of the network is gradually increased, the password of the second network may be a fixed password pre-agreed by the first device and the second device. , or passwords that can be set for other methods. The following describes the password setting method of the second network (Sample1-Sample4) according to the security level of the network from low to high.
  • the first device may directly access the second network according to the SSID of the second network in the process of accessing the second network.
  • the password of the Sample2 and the second network is a fixed password pre-agreed by the first device and the second device.
  • the password of the second network may be a fixed password pre-agreed by the first device and the second device, and the first device may be in accordance with the SSID of the second network in the process of accessing the second network.
  • a fixed password is connected to the second network.
  • the password of Sample3 and the second network is a computable password.
  • the password of the second network may be a computable password set by a certain rule, and the first device and the second device pre-appoint a rule for setting a password, and the first device accesses the second network.
  • the first device may send the calculateable password to the second device, and second The device can know that the password is set according to a pre-agreed rule for setting a password (that is, the password is a password of the second network), and the second device allows the first device to access the second device.
  • a pre-agreed rule for setting a password that is, the password is a password of the second network
  • the setting rule of the computable password may be a rule that the MAC address or the serial number of the first device is arranged according to a certain regularity (for example, in reverse order), or may be a MAC address or a serial number of the first device.
  • the rules of the specified number of bytes are combined (for example, the first byte, the third byte, and the fifth byte), or may be other rules that meet the usage requirements. .
  • the passwords of Sample4 and the second network are passwords encrypted by the public-private key mechanism.
  • the password of the first network may be encrypted by using a public-private key mechanism, and the first device and the second device respectively have respective public and private keys, wherein the first device and the second device may acquire the public of the other party.
  • the key that is, the first device can obtain the public key of the first device, and the second device can obtain the public key of the first device
  • the second device can use the public key of the first device and the private key of the second device.
  • the password of the network is encrypted.
  • the first device receives the encrypted password of the first network, and the first device can decrypt the public key of the second device and the private key of the first device, thereby obtaining the password of the first network.
  • the method for obtaining authentication information provided by the embodiment of the present application may further include S110a-S110b:
  • the first device acquires an SSID of the second network.
  • the first device determines that the second device is the device that provides the first device with the first authentication information.
  • the first device may detect the SSID of the multiple network.
  • the first device may learn the second information according to the identifier of the first device in the SSID of the second network.
  • the device can provide the first device with the first authentication information, and the first device can learn, according to the special identifier in the SSID of the second network, that the second device is in a state capable of providing the first device with the first authentication information, and thus,
  • the second device may determine that the second device corresponding to the SSID of the second network is a device that can provide the first device with the first authentication information, so that the first device can access the second network, and receive the second device to use the second network.
  • the first authentication information sent.
  • each network element for example, the first device, the second device, etc., in order to implement the above functions, includes corresponding hardware structures and/or software modules for performing the respective functions.
  • each network element for example, the first device, the second device, etc.
  • the embodiments of the present application can be implemented in a combination of hardware or hardware and computer software in combination with the elements and algorithm steps of the various examples described in the embodiments disclosed herein. Whether a function is implemented in hardware or computer software to drive hardware depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods to implement the described functions for each particular application, but such implementation should not be considered to be beyond the scope of the present application.
  • the embodiment of the present application may divide the function module by using the first device, the second device, and the like according to the foregoing method example.
  • each function module may be divided according to each function, or two or more functions may be integrated into one process.
  • the above integrated modules can be hardware-based Formal implementation can also be implemented in the form of software functional modules. It should be noted that the division of the module in the embodiment of the present application is schematic, and is only a logical function division, and the actual implementation may have another division manner.
  • FIG. 8 is a schematic diagram showing a possible structure of the second device involved in the foregoing embodiment.
  • the second device may include: a receiving module. 40.
  • the receiving module 40 can be used to support the second device to perform S102 and S107 in the foregoing method embodiment;
  • the sending module 41 can be used to support the second device to perform S103 and S111 in the foregoing method embodiment;
  • the creating module 42 can be used to support the The second device executes S109 (including S109a) in the above method embodiment.
  • the second device may further include a determining module 43.
  • the determining module 43 can be configured to support the first device to perform S108 in the above method embodiment. All the related content of the steps involved in the foregoing method embodiments may be referred to the functional descriptions of the corresponding functional modules, and details are not described herein again.
  • FIG. 9 shows a possible structural diagram of the second device involved in the above embodiment.
  • the second device may include a processing module 50 and a communication module 51.
  • the processing module 50 can be used to control and control the actions of the second device.
  • the processing module 50 can be used to support the second device to perform S108 and S109 (including S109a) in the foregoing method embodiments, and/or used in the present application.
  • the communication module 51 can be used to support communication between the second device and other network entities.
  • the communication module 51 can be used to support the second device to perform S102, S107, S103, and S111 in the foregoing method embodiments.
  • the second device may further include a storage module 52, configured to store program codes and data of the second device.
  • the processing module 50 may be a processor or a controller (for example, the processor 30 shown in FIG. 3 above), and may be, for example, a central processing unit (CPU), a general-purpose processor, and a digital signal processor. (digital signal processor, DSP), application-specific integrated circuit (ASIC), field programmable gate array (FPGA) or other programmable logic device, transistor logic device, hardware component or any combination. It is possible to implement or carry out the various illustrative logical blocks, modules and circuits described in connection with the disclosure of the embodiments herein.
  • the above processors may also be a combination of computing functions, such as one or more microprocessor combinations, a combination of a DSP and a microprocessor, and the like.
  • the communication module 51 may be a transceiver, a transceiver circuit or a communication interface or the like (for example, may be the RF circuit 31 as shown in FIG. 3 described above).
  • the storage module 52 can be a memory.
  • FIG. 10 is a schematic diagram showing a possible structure of the first device involved in the foregoing embodiment.
  • the first device may include: a sending module. 60.
  • the sending module 60 can be used to support the first device to perform S101 and S106 in the foregoing method embodiment;
  • the receiving module 61 can be used to support the first device to perform S104 and S112 in the foregoing method embodiment;
  • the access module 62 can be used to support
  • the first device executes S110 in the above method embodiment.
  • the first device may further include a determining module 63 and an obtaining module 64.
  • the determining module 63 may be configured to support the first device to perform S105 (including S105a) and S110b in the foregoing method embodiment; the obtaining module 64 may The S110a in the foregoing method embodiment is used to support the first device. All the related content of the steps involved in the foregoing method embodiments may be referred to the functional descriptions of the corresponding functional modules, and details are not described herein again.
  • FIG. 11 shows a possible structural diagram of the first device involved in the above embodiment.
  • the first device may include a processing module 70 and a communication module 71.
  • the processing module 70 can be used to control and manage the actions of the first device.
  • the processing module 70 can be used to support the first device to perform S105 (including S105a), S110a, S110b, and S110 in the foregoing method embodiments, and/or Other processes for the techniques described herein.
  • the communication module 71 can be used to support communication between the first device and other network entities.
  • the communication module 71 can be used to support the first device to execute S101, S104, S106, and S112 in the foregoing method embodiments.
  • the first device may further include a storage module 72, configured to store program codes and data of the first device.
  • the processing module 70 may be a processor or a controller (for example, the control unit 20 as shown in FIG. 2 above), and may be, for example, a CPU, a general-purpose processor, a DSP, an ASIC, an FPGA, or other programmable logic device, a transistor. Logic device, hardware component, or any combination thereof. It is possible to implement or carry out the various illustrative logical blocks, modules and circuits described in connection with the disclosure of the embodiments herein.
  • the above processors may also be a combination of computing functions, such as one or more microprocessor combinations, a combination of a DSP and a microprocessor, and the like.
  • the communication module 71 may be a transceiver, a transceiver circuit or a communication interface or the like (for example, may be the communication unit 22 as shown in FIG. 2 described above).
  • the storage module 72 may be a memory (for example, may be the memory 21 as shown in FIG. 2 described above).
  • the above embodiments it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof.
  • a software program it may be implemented in whole or in part in the form of a computer program product.
  • the computer program product includes one or more computer instructions.
  • the computer instructions When the computer instructions are loaded and executed on a computer, the processes or functions in accordance with embodiments of the present application are generated in whole or in part.
  • the computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable device.
  • the computer instructions can be stored in a computer readable storage medium or transferred from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be wired from a website site, computer, server or data center (for example, coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (eg infrared, wireless, microwave, etc.) to another website, computer, server or data center.
  • the computer readable storage medium can be any available media that can be accessed by a computer or a data storage device such as a server, data center, or the like that includes one or more available media.
  • the usable medium may be a magnetic medium (for example, a floppy disk, a magnetic disk, a magnetic tape), an optical medium (for example, a digital video disc (DVD)), or a semiconductor medium (such as a solid state drives (SSD)).
  • a magnetic medium for example, a floppy disk, a magnetic disk, a magnetic tape
  • an optical medium for example, a digital video disc (DVD)
  • a semiconductor medium such as a solid state drives (SSD)
  • the disclosed system, apparatus, and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the modules or units is only a logical function division.
  • there may be another division manner for example, multiple units or components may be used. Combinations can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the units described as separate components may or may not be physically separated, 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 each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • a computer readable storage medium A number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to perform all or part of the steps of the methods described in various embodiments of the present application.
  • the foregoing storage medium includes: a flash memory, a mobile hard disk, a read only memory, a random access memory, a magnetic disk, or an optical disk, and the like, which can store program codes.

Landscapes

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

Abstract

本申请实施例提供一种获取认证信息的方法、装置及系统,涉及通信技术领域,能够提高获取认证信息的成功率。该方法包括:第二设备接收第一设备发送的包括第一设备的标识信息和第一设备的网络状态的第一信标报文;并且第二设备根据该第一信标报文向第一设备发送用于第一设备接入第一网络的第一认证信息;在第二设备确定第一设备接收第一认证信息失败的情况下,第二设备创建第二网络;并且第二设备采用该第二网络向第一设备发送第一认证信息。

Description

一种获取认证信息的方法、装置及系统
本申请要求于2016年12月30日提交中国专利局、申请号为201611265890.4、发明名称为“一种WiFi网络配置的方法和设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及通信技术领域,尤其涉及一种获取认证信息的方法、装置及系统。
背景技术
在无线通信领域,随着无线保真(wireless fidelity,Wi-Fi)技术的快速发展,智能设备可以根据认证信息接入采用Wi-Fi技术组建的无线网络(可以简称为Wi-Fi网络)。
目前,在智能设备接入Wi-Fi网络的过程中,对于没有输入装置(如键盘或触摸显示屏)的智能设备(以下简称为第一设备),该第一设备无法通过输入装置输入Wi-Fi网络的认证信息,在这种情况下,该第一设备可以在监听工作模式下接收其他的智能设备(以下简称为第二设备)广播、组播或单播的认证信息,从而根据该认证信息接入Wi-Fi网络。
然而,上述方法中,由于第二设备广播、组播或单播Wi-Fi网络的认证信息所采用的载波频率通常大于第一设备接收该认证信息所采用的载波频率,因此第一设备可能无法接收第二设备发送的认证信息,如此,可能导致该第一备获取认证信息的成功率比较低。
发明内容
本申请提供一种获取认证信息的方法、装置及系统,能够提高获取认证信息的成功率。
第一方面,本申请提供一种获取认证信息的方法,该方法可以包括:第二设备接收第一设备发送的第一信标报文;并且第二设备根据其接收的第一信标报文向第一设备发送用于该第一设备接入第一网络的第一认证信息;以及在第二设备确定第一设备接收第一认证信息失败的情况下,第二设备创建第二网络;并且第二设备采用第二网络向第一设备发送第一认证信息,其中,第一信标报文中包括第一设备的标识信息和第一设备的网络状态。
本申请提供的获取认证信息的方法,由于第一设备请求第一认证信息的过程中,第二设备可以采用广播的方式向第一设备发送第一认证信息,在第一设备在监听工作模式下获取第二设备广播的第一认证信息失败时,第二设备可以创建第二网络,并且第二设备可以采用该第二网络向第一设备发送第一认证信息,因此能够提高第一设备获取第一认证信息的成功率。
在第一方面的第一种可选的实现方式中,上述第二设备确定第二设备接收第一认证信息的方法可以包括:第二设备根据第二信标报文确定第一设备 接收第一认证信息失败,该第二信标报文中包括第一设备的标识信息和第一设备的网络状态。
本申请中,在第一设备获取第一认证信息成功或者失败,第一设备均继续广播信标报文的情况(可以称为Situation1)下,第二设备接收到第一设备广播的第二信标报文,第二设备可以根据第二该信标报文中第一设备的网络状态,确定第一设备是否获取到第一认证信息,在第一设备的网络状态为未获取到第一认证信息的状态(以下均称为第二状态)时,第二设备确定第一设备获取第一认证信息失败。在第一设备接收第一认证信息失败时,第一设备广播信标报文,第一设备获取第一认证信息成功时,第一设备停止广播信标报文的情况(可以称为Situation2)下,第二设备在接收第一设备广播的第一信标报文之后,还接收到第一设备广播的第二信标报文,则第二设备即可获知第一设备未获取到第一认证信息。
在第一方面的第二种可选的实现方式中,上述第二设备创建第二网络的方法可以包括:第二设备根据其接收的第二信标报文设置第二网络的服务集标识(service set identifier,SSID)。
本申请中,第二设备可以根据其接收的第二信标报文设备第二网络的SSID。具体的,第二设备可以将其接收的第二信标报文中携带的第一设备的标识(可以为第一设备的媒体访问控制(Medium Access Control,MAC)地址或者第一设备的序列号)作为第二网络的SSID的一部分,并且第二设备还可以在第二网络的SSID中指定的字段设置一个特殊标识,该标识用于指示该第二设备处于可以提供第一认证信息的状态,从而第一设备可以根据该第二网络的SSID确定该第二设备可以为第一设备提供第一认证信息。
本申请中,该第二网络可以无密码,该第二网络的密码也可以为基于网络的安全等级设置的密码,从而第一设备获取到第二网络的SSID时,第一设备可以根据第二网络的SSID和第二网络的密码接入第二网络。
第二方面,本申请提供一种获取认证信息的方法,该方法可以包括:第一设备广播用于请求第一认证信息的第一信标报文;并且第一设备接收第二设备根据该第一信标报文发送的第一认证信息;以及在第一设备确定第一设备获取第一认证信息失败的情况下,第一设备接入第二设备创建的第二网络;并且第一设备接收第二设备采用第二网络发送的该第一认证信息,其中,该第一信标报文中包括第一设备的标识信息和第一设备的网络状态,该第一认证信息用于第一设备接入第一网络。
本申请提供的获取认证信息的方法,由于当第一设备在监听工作模式下获取第二设备发送的第一认证信息失败时,第一设备可以接入第二设备创建的第二网络,从而第一设备可以接收第二设备采用第二网络发送的第一认证信息,因此能够提高第一设备获取第一认证信息的成功率。
在第二方面的第一种可选的实现方式中,上述第一设备确定该第一设备获取第一认证信息失败的方法可以包括:当第一设备在预设时间段内未接收到第二设备发送的第一认证信息时,第一设备确定第一设备获取第一认证信 息失败。
本申请中,第一设备广播第一信标报文之后,第一设备可以等待其他设备向第一设备发送第一认证信息,若第一设备在广播第一信标报文之后的一段预设时间段内未接收到第一认证信息,则第一设备可以确定该第一设备获取第一认证信息失败,从而第一设备可以通过其他方式获取第一认证信息,以保证该第一设备可以根据第一认证信息接入第一网络。
在第二方面的第二种可选的实现方式中,本申请提供的获取认证信息的方法还可以包括:第一设备广播第二信标报文。
在第二方面的第三种可选的实现方式中,在第一设备接收第二设备根据第一设备广播的第一信标报文发送的第一认证信息之后,本申请提供的获取认证信息的方法还可以包括:第一设备广播第二信标报文,该第二信标报文中包括第一设备的网络状态。
本申请中,对于Situation1,第一设备确定第一设备获取第一认证信息失败时,第一设备可以广播的第二信标报文(该第二信标报文与第一信标报文相同,即该第二信标报文中第一设备的网络状态为第二状态),以再次向该第一设备周围的其他设备请求第一认证信息。对于Situation2,第一设备接收第二设备发送的第一认证信息之后,第一设备可以广播的第二信标报文,该第二信标报文中第一设备的网络状态可以为第一状态或第二状态,从而第二设备可以根据第二信标报文确定第一设备获取第一认证信息成功还是失败。
在第二方面的第四种可选的实现方式中,在第一设备接入第二设备创建的第二网络之前,本申请提供的获取认证信息的方法还可以包括:在第一设备获取到第二网络的SSID的情况下,第一设备根据第二网络的SSID确定第二设备是为该第一设备提供第一认证信息的设备。
本申请中,第一设备可以检测到多个网络的SSID,当第一设备获取到第二网络的SSID时,第一设备可以根据第二网络的SSID中第一设备的标识获知第二设备能够为第一设备提供第一认证信息,并且该第一设备可以根据第二网络的SSID中的特殊标识获知该第二设备处于能够为第一设备提供第一认证信息的状态,如此,第二设备可以确定该第二网络的SSID对应的第二设备是能够为第一设备提供第一认证信息的设备,从而第一设备可以接入第二网络,并接收第二设备采用该第二网络发送的第一认证信息。
第三方面,本申请提供一种用于获取认证信息的设备,该设备包括接收模块、发送模块和创建模块。其中,接收模块可以用于接收第一设备发送的第一信标报文;发送模块可以用于根据接收模块接收的第一信标报文向第一设备发送用于该第一设备接入第一网络的第一认证信息;创建模块可以用于在该设备确定第一设备接收第一认证信息失败的情况下,创建第二网络;发送模块还可以用于采用第二网络向第一设备发送第一认证信息,其中,该第一信标报文中包括第一设备的标识信息和第一设备的网络状态。
在第三方面的第一种可选的实现方式中,本申请提供的用于获取认证信息的设备还包括确定模块,该确定模块用于根据接收模块接收的第二信标报 文确定第一设备接收第一认证信息失败,该第二信标报文中包括第一设备的标识信息和第一设备的网络状态。
在第三方面的第二种可选的实现方式中,上述创建模块具体用于根据接收模块接收的第二信标报文设置第二网络的SSID。
第三方面及其各种可选的实现方式的技术效果可以参见上述对第一方面及其各种可选的实现方式的技术效果的相关描述,此处不再赘述。
第四方面,本申请提供一种用于获取认证信息的设备,该设备可以包括发送模块、接收模块和接入模块。发送模块可以用于广播用于请求第一认证信息的第一信标报文;接收模块可以用于接收第二设备根据第一信标报文发送的第一认证信息;接入模块可以用于在该设备确定该设备获取第一认证信息失败的情况下,接入第二设备创建的第二网络;接收模块还可以用于接收第二设备采用第二网络发送的用于该设备接入第一网络的第一认证信息,其中,该第一信标报文中包括该设备的标识信息和该设备的网络状态。
在第四方面的第一种可选的实现方式中,本申请提供的用于获取认证信息的设备还可以包括确定模块。该确定模块可以用于在接收模块在预设时间段内未接收到第二设备发送的第一认证信息时,确定该设备获取第一认证信息失败。
在第四方面的第二种可选的实现方式中,上述发送模块还可以用于在接收模块接收第一认证信息失败之后,广播第二信标报文。
在第四方面的第三种可选的实现方式中,上述发送模块还可以用于在接收模块接收第二设备发送的第一认证信息之后,广播第二信标报文。
在第四方面的第四种可选的实现方式中,上述确定模块还可以用于在该设备获取到第二网络的SSID的情况下,根据第二网络的SSID确定第二设备是为该设备提供第一认证信息的设备。
第四方面及其各种可选的实现方式的技术效果可以参见上述对第二方面及其各种可选的实现方式的技术效果的相关描述,此处不再赘述。
第五方面,提供一种用于获取认证信息的设备,该设备可以包括处理器、收发器和与该处理器耦合连接的存储器。该存储器可以用于存储计算机指令。当该第二设备运行时,该处理器执行该存储器存储的该计算机指令,该处理器用于控制收发器接收第一设备发送的第一信标报文,该第一信标报文中包括第一设备的标识信息和第一设备的网络状态;并且控制收发器根据第一信标报文向第一设备发送第一认证信息,该第一认证信息用于第一设备接入第一网络;以及在确定第一设备接收第一认证信息失败的情况下,创建第二网络;并且控制收发器采用第二网络向第一设备发送第一认证信息。
在第五方面的第一种可选的实现方式中,上述处理器具体用于根据第二信标报文确定第一设备接收第一认证信息失败,该第二信标报文中包括第一设备的标识信息和第一设备的网络状态。
在第五方面的第二种可选的实现方式中,上述处理器具体用于根据第二信标报文设置第二网络的SSID。
第六方面,提供一种计算机可读存储介质,该计算机可读存储介质可以包括计算机指令。当该计算机指令在一个设备上运行时,使得该设备执行上述第一方面及其各种可选的实现方式中任意之一所述的获取认证信息的方法。
第七方面,提供一种包括计算机指令的计算机程序产品,当该计算机程序产品在一个设备上运行时,使得该设备执行上述第一方面及其各种可选的实现方式中任意之一所述的获取认证信息的方法。
第五方面至第七方面的相关内容和技术效果的描述可以参见上述对第一方面及其各种可选的实现方式的相关内容和技术效果的相关描述,此处不再赘述。
第八方面,提供一种获取认证信息的设备,该设备可以包括处理器、收发器和与该处理器耦合连接的存储器。该存储器可以用于存储计算机指令。当该第一设备运行时,该处理器执行该存储器存储的该计算机指令,处理器用于控制收发器广播第一信标报文,该第一信标报文中包括第一设备的标识信息和第一设备的网络状态,该第一信标报文用于请求第一认证信息,该第一认证信息用于设备接入第一网络;并且控制收发器接收第二设备根据第一信标报文发送的第一认证信息;以及在确定第一设备获取第一认证信息失败的情况下,接入第二设备创建的第二网络;并且控制收发器接收第二设备采用第二网络发送的第一认证信息。
在第八方面的第一种可选的实现方式中,上述处理器具体用于在上述收发器在预设时间段内未接收到第二设备发送的第一认证信息时,确定该用于获取认证信息的设备获取第一认证信息失败。
在第八方面的第二种可选的实现方式中,上述收发器可以用于接收第一认证信息失败之后,广播第一信标报文。
在第八方面的第三种可选的实现方式中,上述收发器还可以用于在接收第二设备根据第一信标报文发送的第一认证信息之后,广播第二信标报文,该第二信标报文包括该用于获取认证信息的设备的标识信息和该设备的网络状态。
在第八方面的第四种可选的实现方式中,上述处理器还可以用于在获取到第二网络的SSID的情况下,根据第二网络的SSID确定第二设备是为该用于获取认证信息的设备提供第一认证信息的设备。
第九方面,提供一种计算机可读存储介质,该计算机可读存储介质可以包括计算机指令。当该计算机指令在一个设备上运行时,使得该设备执行上述第二方面及其各种可选的实现方式中任意之一所述的获取认证信息的方法。
第十方面,提供一种包括计算机指令的计算机程序产品,当该计算机程序产品在一个设备上运行时,使得该设备执行上述第二方面及其各种可选的实现方式中任意之一所述的获取认证信息的方法。
第八方面至第十方面的相关内容和技术效果的描述可以参见上述对第二方面及其各种可选的实现方式的相关内容和技术效果的相关描述,此处不再赘述。
在第一方面至第十方面中,上述第一认证信息可以包括第一网络的SSID、第一网络的密码和第一网络的认证证书中的至少一项。
本申请中,在第一设备接入第一网络时,根据实际的使用需求,第一设备可以根据第一网络的SSID、第一网络的密码和第一网络的认证证书中的至少一项接入第一网络。
在第一方面至第十方面中,上述第二网络为第二设备创建的第二网络。
本申请中,当第一设备获取第一认证信息失败,并且在第二设备确定第一设备获取第一认证信息失败时,第二设备可以创建一个热点网络(即第二网络),从而第二设备可以采用第二网络向第一设备发送第一认证信息,如此可以保证第一设备成功获取第一认证信息。
第十一方面,本申请提供一种通信系统,该通信系统可以包括上述第三方面及其各种可选的实现方式中任意之一所述的设备,第四方面及其各种可选的实现方式中任意之一所述的设备。
或者,该通信系统可以包括上述第五方面所述的设备,第七方面所述的设备,其中,第三方面及其各种可选的实现方式中任意之一所述的设备,以及第五方面所述的设备为第二设备,第四方面及其各种可选的实现方式中任意之一所述的设备,以及第七方面所述的设备为第一设备。
第十一方面的相关内容和技术效果可以参见上述对第一方面及其各种可选的实现方式和第二方面及其各种可选的实现方式的相关内容和技术效果的相关描述,此处不再赘述。
附图说明
图1为本申请实施例提供的一种通信系统的结构示意图;
图2为本申请实施例提供的一种智能台灯的硬件示意图;
图3为本申请实施例提供的一种手机的硬件示意图;
图4为本申请实施例提供的获取认证信息的方法示意图一;
图5为本申请实施例提供的获取认证信息的方法示意图二;
图6为本申请实施例提供的获取认证信息的方法示意图三;
图7为本申请实施例提供的获取认证信息的方法示意图四;
图8为本申请实施例提供的第二设备的结构示意图一;
图9为本申请实施例提供的第二设备的结构示意图二;
图10为本申请实施例提供的第一设备的结构示意图一;
图11为本申请实施例提供的第一设备的结构示意图二。
具体实施方式
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。
本申请实施例的说明书和权利要求书中的术语“第一”和“第二”等是用于区别不同的对象,而不是用于描述对象的特定顺序。例如,第一设备和第二设备等是用于区别不同的设备,而不是用于描述设备的特定顺序。
在本申请实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。
下面对本申请实施例提供的获取认证信息的方法、装置及系统中涉及的一些概念做解释说明。
服务集标识(SSID):可以理解为无线网络的名称,SSID可以区别不同的无线网络,当某一个设备接入无线网络时,SSID和该无线网络的密码可以用于该设备完成身份验证,然后再接入该无线网络。通常,SSID最多可以由32个字节组成。
信标(Beacon)技术:Beacon技术是一种可以实现消息推送的通信技术。例如,如果用户的智能设备(例如智能手机)上安装有支持通过Beacon技术推送消息的应用程序,当该智能手机进入Beacon基站的服务范围内,该智能手机上的应用程序可以向用户推送响应的消息。示例性的,当用户进入某一个商场内,该用户的手机可以接收到该商场打折促销信息,这个过程是采用Beacon技术实现消息推送的。
为了解决背景技术中,第一设备获取认证信息的成功率较低的问题,本申请实施例提供一种获取认证信息的方法、装置及系统。第一设备在监听模式下获取第一认证信息失败的情况下,第一设备可以接入第二设备创建的第二网络,从而第二设备可以采用第二网络向第一设备发送第一认证信息,如此,能够提高第一设备获取第一认证信息的成功率。
本申请实施例提供的获取认证信息的方法可以应用于无线通信系统中,图1为本申请实施例提供的通信系统的架构示意图,如图1所示,该通信系统可以包括:第一设备10、第二设备11和路由器12。其中第二设备通过路由器12连接至Wi-Fi网络,第一设备10为该通信系统中待接入该Wi-Fi网络的智能设备,该第一设备10没有输入装置,在该通信系统中,当第一设备10需要接入Wi-Fi网络时,第一设备10可以从第二设备11处获取用于接入该Wi-Fi网络的认证信息,从而第一设备10可以通过路由器接入该Wi-Fi网络,如此,第一设备10可以采用该Wi-Fi网络与其他设备通信。
本申请实施例中,上述第一设备是没有输入装置的智能设备,第二设备可以为具有输入装置的智能设备,第一设备可以为智能台灯、智能洗衣机、智能插座以及智能冰箱等设备。
示例性的,本申请实施例以智能台灯为例,介绍第一设备的硬件结构,下面结合图2具体介绍本申请实施例提供的智能台灯的各个构成部件。如图3所示,本申请实施例提供的智能台灯可以包括:控制单元20、存储器21、通信单元22以及电源23等部件。本领域技术人员可以理解,图2中示出的智能台灯的结构并不构成对智能台灯的限定,其可以包括比如图2所示的部件更多或更少的部件,或者可以组合如图2所示的部件中的某些部件,或者可以与如图2所示的部件布置不同。
控制单元20是智能台灯的核心部件,用于控制智能的其他部件,控制单元也可称为单片微型计算机或者单片机,是把中央处理器(central process unit,CPU)、内存、定时器、计数器、和多种I/O接口集成在一个芯片上,形成芯片级的计算机,该智能台灯的控制单元20可以用于控制智能台灯的亮度、暗色或者控制第一设备的开启和关闭的时间。
存储器21用于存储智能台灯的程序代码和数据。
本申请实施例中,智能台灯中可以有多种内存,如只读内存储器(Read Only Memory ROM)随机存储器(Random Access Memory,RAM)动态内存储器(DRAM)、闪存(Flash)。
通信单元22用于完成智能台灯与其他设备之间的通信,通信单元可以包括通信接口,该通信接口可以为收发器、收发电路等具有收发功能的结构,通信接口包括串行通信接口和并行通信接口,通信单元22还可以包括Wi-Fi模块,智能台灯可以通过Wi-Fi模块接入一个网络中,从而可以采用该网络与其他设备通信。
电源23用于给智能台灯的各个部件供电,电源23可以为电池。可选的,电源23可以通过电源管理系统与控制单元20逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。
可选的,如图2所示的智能台灯还可以包括传感器(例如温度计传感器、光敏线传感器等)、蓝牙模块等,在此不再赘述。
本申请实施例提供的第二设备可以为手机、平板电脑、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本或者个人数字助理(personal digital assistant,PDA)等。
示例性的,本申请实施例以第二设备为手机为例,介绍第二设备的硬件结构。下面结合图3具体介绍本申请实施例提供的手机的各个构成部件。如图3所示,本申请实施例提供的手机包括:处理器30、射频(radio frequency,RF)电路31、电源32、存储器33、输入单元34、显示单元35以及音频电路36等部件。本领域技术人员可以理解,图3中示出的手机的结构并不构成对手机的限定,其可以包括比如图3所示的部件更多或更少的部件,或者可以组合如图3所示的部件中的某些部件,或者可以与如图3所示的部件布置不同。
处理器30是手机的控制中心,利用各种接口和线路连接整个手机的各个部分。通过运行或执行存储在存储器33内的软件程序和/或模块,以及调用存储在存储器33内的数据,执行手机的各种功能和处理数据,从而对手机进行整体监控。可选的,处理器30可包括一个或多个处理单元。可选的,处理器30可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等;调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以为与处理器30单独存在的处理器。
RF电路31可用于在收发信息或通话过程中,接收和发送信号。例如,将基站的下行信息接收后,给处理器30处理;另外,将上行的数据发送给基站。通常,RF电路包括但不限于天线、至少一个放大器、收发信机、耦合器、 低噪声放大器(low noise amplifier,LNA)以及双工器等。此外,手机还可以通过RF电路31与网络中的其他设备实现无线通信。无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统(global system of mobile communication,GSM)、通用分组无线服务(general packet radio service,GPRS)、码分多址(code division multiple access,CDMA)、宽带码分多址(wideband code division multiple access,WCDMA)、LTE、电子邮件以及短消息服务(short messaging service,SMS)等。
电源32可用于给手机的各个部件供电,电源32可以为电池。可选的,电源可以通过电源管理系统与处理器30逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。
存储器33可用于存储软件程序和/或模块,处理器30通过运行存储在存储器33的软件程序和/或模块,从而执行手机的各种功能应用以及数据处理。存储器33可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据手机的使用所创建的数据(比如音频数据、图像数据、电话本等)等。此外,存储器33可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件或其他易失性固态存储器件。
输入单元34可用于接收输入的数字或字符信息,以及产生与手机的用户设置以及功能控制有关的键信号输入。具体地,输入单元34可包括触摸屏341以及其他输入设备342。触摸屏341,也称为触摸面板,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触摸屏341上或在触摸屏341附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触摸屏341可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器30,并能接收处理器30发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触摸屏341。其他输入设备342可以包括但不限于物理键盘、功能键(比如音量控制按键、电源开关按键等)、轨迹球、鼠标以及操作杆等中的一种或多种。
显示单元35可用于显示由用户输入的信息或提供给用户的信息以及手机的各种菜单。显示单元35可包括显示面板351。可选的,可以采用液晶显示器(liquid crystal display,LCD)、有机发光二极管(organic light-emitting diode,OLED)等形式来配置显示面板351。进一步的,触摸屏341可覆盖显示面板351,当触摸屏341检测到在其上或附近的触摸操作后,传送给处理器30以确定触摸事件的类型,随后处理器30根据触摸事件的类型在显示面板351上提供相应的视觉输出。虽然在图3中,触摸屏341与显示面板351是作为两个独立的部件来实现手机的输入和输出功能,但是在某些实施例中,可 以将触摸屏341与显示面板351集成而实现手机的输入和输出功能。
Wi-Fi模块36可用于手机接入Wi-Fi网络中,从而手机可以采用Wi-Fi网络与其他设备通信。
结合上述图1所示的通信系统,本申请实施例提供一种获取认证信息的方法,如图4所示,该方法可以包括S101-S112:
S101、第一设备广播第一信标报文。
其中,第一设备广播的第一信标报文中包括第一设备的标识和第一设备的网络状态,第一设备的标识可以唯一标识该第一设备,第一设备的网络状态可以包括已获取到第一认证信息的状态(以下均称为第一状态)和未获取到第一认证信息的状态(以下均称为第二状态),第一状态可以指示该第一设备处于已经获取到第一网络的认证信息的状态,第二状态可以指示第一设备处于未获取到第一网络的认证信息的状态,在该第一信标报文中,第一设备的网络状态为第二状态。
本申请实施例中,第一设备可以采用Beacon技术向该第一设备周围的其他设备广播信标报文,该信标报文主要用于请求第一设备待接入的Wi-Fi(以下均称为第一网络)的认证信息(以下均简称为第一认证信息)。具体的,第一设备可以在信标报文的预留字段中添加第一设备的标识和第一设备的网络状态(可以为第一状态或第二状态),然后向该第一设备周围的其它设备广播该信标报文,从而其它设备可以根据该信标报文获知第一设备的存在以及该第一设备的网络状态。
示例性的,如下表1所示,为本申请实施例提供的信标报文包含的信息的部分示例。
表1
名称 长度(字节) 作用
时间戳 8 同步接收信标报文的设备的时间
信标间隔 2 发送信标报文的时间间隔
性能信息 2 用于通知其他设备,网络性能的情况
服务集标识 2-34 用于区分不同的网络
支持的速率 3-10 发送信标报文的设备所支持的速率
跳频参数集 7 采用跳频技术发送信标报文的参数
上述表1中列举的内容为信标报文中的部分信息,信标报文还可以包括其他类型的信息,本申请实施例不再一一列举。
需要说明的是,本申请实施例中,第一设备的标识可以为第一设备的产品序列号,也可以为第一设备的MAC地址,还可以为其他可以唯一标识该第一设备的标识,具体可以根据实际使用需求选择,本申请实施例不作限定。
可选的,本申请实施例中,可以采用一个标识指示第一设备的网络状态,从而第二设备可以根据这个标识获知第一设备的网络状态。
示例性的,本申请实施例中,用于指示第一设备的网络状态的标识具体可以采用“0”或“1”来表示。例如,可以采用“0”表示第一设备的网络状 态为第一状态,采用“1”表示第一设备的网络状态为第二状态;也可以采用“1”表示第一设备的网络状态为第一状态,采用“0”表示第一设备的网络状态为第二状态。当然,本申请实施例还可以采用其他满足实际使用需求的标识来设置上述第一设备的网络状态,本申请实施例不再一一列举。
S102、第二设备接收第一设备发送的第一信标报文。
S103、第二设备根据第一设备发送的第一信标报文,向第一设备发送第一认证信息。
本申请实施例中,第一设备广播第一信标报文之后,第二设备接收到第一设备广播(即发送)的第一信标报文,第二设备可以根据该第一信标报文中的第一设备的标识和第一设备的网络状态获知第一设备是否已经获取到用于接入第一网络的第一认证信息,若第一设备的网络状态为第二状态,则第二设备确定第一设备未获取到第一认证信息,从而第二设备向第一设备发送第一认证信息。
可选的,本申请实施例中,第二设备可以将第一网络的认证信息以广播、组播或单播的方式发送出去,从而第一设备可以接收第二设备广播、组播或者单播的第一认证信息。
可选的,本申请实施例中,第一认证信息可以包括第一网络的SSID、第一网络的密码和第一网络的认证证书中的至少一项。在通信系统中,某一个设备(例如上述第一设备)需要接入第一网络时,该第一设备可以输入第一网络的SSID、第一网络的密码和第一网络的认证证书中的至少一项,在该第一网络的SSID、第一网络的密码和第一网络的认证证书中至少一项被验证成功之后,第一设备可以接入第一网络,并且第一设备可以采用该第一网络与其他的设备之间通信。
S104、第一设备接收第二设备发送的第一认证信息。
本申请实施例中,第一设备广播第一信标报文时,第一设备处于监听模式,即第一设备可以监听到该第一设备周围的其他设备广播、组播或单播的信息。第一设备接收第二设备发送的第一认证信息具体可以为第一设备监听到第二设备广播、组播或者单播的第一认证信息,然后第一设备可以将该第一认证信息保存到该第一设备中,从而第一设备可以根据第一认证信息接入第一网络。
S105、第一设备确定第一设备获取第一认证信息失败。
本申请实施例中,在第一设备获取第一认证信息的过程中,可能存在一些因素导致第一设备获取认证信息失败,例如无线信号干扰、设备之间的信号载波频率不匹配等。示例性的,以信号载波频率不匹配这个因素为例,由于第二设备通常广播、组播或单播数据(即第一认证信息)的所采用的载波频率(可以称为第二载波频率)比较高,而第一设备通常接收数据所采用的载波频率(可以称为第一载波频率)比较低,在第二载波频率大于第一载波频率的情况下,第一设备可能无法接收第二设备发送的第一认证信息,从而可能导致第一设备获取第一认证信息失败。
可选的,本申请实施例中,第一设备接收第二设备发送的第一认证信息之后,第一设备可以确定是否继续广播信标报文,具体的,可以包括下述的两种情况(分别记为Situation1和Situation2):
Situation1:第一设备获取第一认证信息成功或者失败,第一设备均继续广播信标报文。
本申请实施例中,在Situation1中,无论第一设备是否获取到第一认证信息,第一设备均继续广播信标报文(以下可以称为第二信标报文),第二信标报文可以为用于指示第一设备获取第一认证信息成功的信标报文(以下可以称为信标报文1),或者第二信标报文可以为用于指示第一设备获取第一认证信息失败的信标报文(以下可以称为信标报文2,在这种情况下,信标报文2与上述第一信标报文相同)。具体的,第一设备获取第一认证信息成功时,第一设备可以广播信标报文1,在该信标报文1中,第一设备的网络状态为第一状态,其他设备接收到该信标报文1之后,可以根据该第一状态获知第一设备已经获取到第一认证信息;第一设备获取第一认证信息失败时,第一设备可以广播信标报文2,在该信标报文2中,第一设备的网络状态为第二状态,其他设备接收到该信标报文2之后,可以根据该第二状态获知第一设备未获取到第一认证信息。
Situation2:第一设备接收第一认证信息失败时,第一设备继续广播信标报文,第一设备获取第一认证信息成功时,第一设备停止广播信标报文。
本申请实施例中,在Situation2中,若第一设备获取第一认证信息成功,则第一设备停止向周围的其它设备广播信标报文,若第一设备获取第一认证信息失败,则第一设备会继续广播信标报文(可以称为第二信标报文),该第二信标报文为用于指示第一设备获取第一认证信息失败的信标报文,其它设备接收到第一设备广播的该第二信标报文,即可获知第一设备未获取到第一认证信息。
需要说明的是,本申请实施例中,上述第二信标报文可以为与第一信标报相同的信标报文,例如,在第一设备获取第一认证信息失败时,第一设备广播的第二信标报文与第一信标报文相同,第二信标报文中第一设备的网络状态与第一信标报文中第一设备的网络状态均为第二状态;第二信标报文也可以为与第一信标报文不同的信标报文,例如,在第一设备获取第一认证信息成功时,第一设备广播的第二信标报文与第一信标报文不同,第二信标报文中第一设备的网络状态为第一状态,第一信标报文中第一设备的网络状态为第二状态,从而第二设备可以根据第二信标报文确定第一设备获取第一认证信息成功还是失败。
本申请实施例中,根据上述的Situation1和Situation2两种不同的情况,第一设备确定该第一设备获取第一认证信息失败之后,第一设备可以继续执行下述步骤:
S106、第一设备广播第二信标报文。
本申请实施例中,对于Situation1,第一设备确定第一设备获取第一认证 信息失败时,第一设备可以广播的第二信标报文(该第二信标报文与第一信标报文相同,即该第二信标报文中第一设备的网络状态为第二状态),以再次向该第一设备周围的其他设备请求第一认证信息。对于Situation2,第一设备接收第二设备发送的第一认证信息之后,第一设备可以广播的第二信标报文,该第二信标报文中第一设备的网络状态可以为第一状态或第二状态。
S107、第二设备接收第一设备发送的第二信标报文。
S108、第二设备根据其接收的第二信标报文确定第一设备获取第一认证信息失败。
本申请实施例中,如果第二信标报文中第一设备的网络状态为第一状态时,那么第二设备可以根据其接收的第二信标报文中的该第二状态确定第一设备获取第一认证信息失败。
S109、第二设备创建第二网络。
本申请实施例中,第二设备接收到第一设备发送的第二信标报文,并且在第二设备确定第一设备接收第一认证信息失败的情况下,第二设备可以创建一个热点网络(以下均称为第二网络),从而其他设备接入该第二网络之后,第二设备可以与其他设备之间传输数据,或者多个其他设备接入该第二网络,该多个其他设备之间可以传输数据。
需要说明的是,本申请实施例中,第二设备在创建第二网络之前,第二设备可能处于接入第一网络的状态,而第二设备不能同时接入两种不同的网络(例如第二设备不能同时接入路由器的Wi-Fi网络和运营商提供的蜂窝网络),在这种情况下,在第二设备确定第一设备获取第一认证信息失败之后,第二设备创建第二网络之前,第二设备首先退出第一网络,以保证第二设备可以顺利地创建第二网络。
S110、第一设备接入第二设备创建的第二网络。
本申请实施例中,当第一设备获取第二设备广播的第一认证信息失败时,第一设备可以接入该第二设备根据其接收的第二信标报文创建的第二网络,如此,第一设备可以采用该第二网络与其他设备之间传输数据。
S111、第二设备采用第二网络向第一设备发送第一认证信息。
本申请实施例中,由于第二设备可以提供用于第一设备接入第一网络的第一认证信息,因此,第二设备创建的第二网络之后,第二设备可以采用该第二网络向第一设备发送第一认证信息。
需要说明的是,本申请实施例中,由于第二设备具有输入装置,从而第二设备可以与用户之间进行交互,即用户可以通过第二设备的输入装置输入第一认证信息,因此第二设备可以为第一设备提供第一认证信息。
可选的,本申请实施例中,第二设备向第一设备发送第一认证信息时,第二设备可以将该第一认证信息加密后发送给第一设备,第二设备可以采用一些加密协议或者数字证书校验协议对第一认证信息加密,第二设备接收到经加密的第一认证信息后,第一设备可以采用相应的解密方法解密,从而获取到第一认证信息,如此,可以保证第一认证信息传输过程的安全性。
本申请实施例中,第二设备可以采用用户数据报协议(user datagram protocol,UDP)、传输控制协议(transmission control protocol,TCP)或者其他传输数据的协议发送第一认证信息,具体可以根据实际的使用需求选择合适的数据传输协议发送第一认证信息,本申请实施例不作限定。
S112、第一设备接收第二设备采用第二网络发送的第一认证信息。
本申请实施例中,第一设备接收到第二设备采用第二网络发送的第一认证信息后,第一设备可以根据该第一认证信息接入第一网络,从而第一设备可以采用该第一网络与其他设备通信。具体的,第一设备接收到第二设备发送的第一认证信息后,第一设备退出第二设备创建的第二网络,然后第一设备根据第一认证信息再接入第一网络。
示例性的,假设第一设备为智能台灯,该台灯接入第一网络之后,该智能台灯可以与其他的智能设备(例如手机)通信,例如手机可以向该智能台灯发送消息,以控制该智能台灯的亮度或者灯光的颜色等。
本申请实施例提供的获取认证信息的方法,在第一设备获取用于第一设备接入第一网络的第一认证信息的过程中,第一设备可以广播用于请求第一认证信息的第一信标报文,该第一信标报文中包括第一设备的标识信息和第一设备的网络状态,第二设备接收到第一设备发送的第一信标报文之后,第二设备根据信标报文向第一设备发送第一认证信息,在第一设备接收第二设备发送的第一认证信息失败的情况下,第二设备创建第二网络(即第二设备创建的热点网络),在第一设备接入第二设备创建的第二网络之后,第二设备可以采用该第二网络向第一设备发送第一认证信息。与现有技术相比,本申请实施例中,由于第一设备在监听工作模式下获取第二设备发送的第一认证信息失败时,第一设备可以接入第二设备创建的第二网络,从而第二设备可以采用第二网络向第一设备发送第一认证信息,因此能够提高第一设备获取第一认证信息的成功率。
可选的,本申请实施例中,结合图4,如图5所示,上述S105具体可以通过S105a实现:
S105a、第一设备在预设时间段内未接收到第二设备发送的第一认证信息,第一设备确定所述第一设备获取所述第一认证信息失败。
本申请实施例中,第一设备广播第一信标报文之后,第一设备可以等待其他设备向第一设备发送第一认证信息,若第一设备在广播第一信标报文之后的一段预设时间段内未接收到第一认证信息,则第一设备可以确定该第一设备获取第一认证信息失败。
需要说明的是,本申请实施例中,上述预设时间段的时长为90s,也可以为其他时长的时间段,具体可以根据实际情况确定,本申请实施例不作限定。
可选的,本申请实施例中,结合图4,如图6所示,上述S109具体可以通过S109a实现:
S109a、第二设备根据第一设备发送的第二信标报文设置第二网络的 SSID。
本申请实施例中,第二设备确定第一设备获取第一认证信息失败时,第二设备可以创建第二网络(即上述的热点网络)。第二设备创建第二网络的方法具体可以为:第二设备首先开启第二设备的热点网络,其次第二设备可以根据第一设备在其接收第一认证信息失败之后发送的第二信标报文设置该第二网络的SSID。
具体的,第二设备根据第一设备发送的第二信标报文设置第二网络的SSID的方法为:在符合SSID的格式的情况下,第二设备可以将其接收的信标报文中携带的第一设备的标识(可以为第一设备的MAC地址或者第一设备的序列号)作为第二网络的SSID的一部分,并且第二设备还可以在第二网络的SSID中指定的字段设置一个特殊标识,该标识用于指示该第二设备处于可以提供第一认证信息的状态,即第二网络的SSID可以由第一设备的标识和一个特殊标识组成。
示例性的,假设第二网络的SSID的字节数(SSID的字节数最多可以为32个字节)为10个字节,第一设备的标识为MAC地址,该MAC地址的字节数为6个字节,在特殊标识的字节数小于或者等于4个字节的情况下,第二设备可以根据实际需求设置该特殊标识的字节数,本申请实施例不作具体限定。
需要说明的是,本申请实施例中,上述第一设备的标识为第一设备的序列号时,如果该第一设备的序列号和上述特殊标识的字节数超过了第二网络的SSID的最大字节数(32个字节),那么可以将第一设备的序列号的一部分作为第二网络的SSID的一部分。
本申请实施例中,第二网络的SSID可以通过上述的方法设置,关于第二网络的密码,可以基于网络的安全等级设置第二网络的密码。例如,在对网络的安全要求较低时,第二网络可以无密码,在对网络的安全等级的要求逐渐提高时,第二网络的密码可以为第一设备与第二设备预先约定的固定密码,或者还可以为其他方法设置的密码,下面将按照网络的安全等级由低到高的顺序,举例说明第二网络的密码的设置方法(分别以Sample1-Sample4)。
Sample1、第二网络无密码。
本申请实施例中,第二网络无密码时,第一设备在接入第二网络的过程中,第一设备可以根据第二网络的SSID直接接入该第二网络。
Sample2、第二网络的密码为第一设备与第二设备预先约定的固定密码。
本申请实施例中,第二网络的密码可以为第一设备与第二设备预先约定的固定密码,第一设备在接入第二网络的过程中,第一设备可以根据第二网络的SSID和固定密码接入该第二网络。
Sample3、第二网络的密码为可计算的密码。
本申请实施例中,第二网络的密码可以为以一定的规则设置的可计算的密码,而第一设备和第二设备预先约定好设置密码的规则,在第一设备接入第二网络的过程中,第一设备可以将该可计算的密码发送给第二设备,第二 设备可以通过预先约定好的设置密码的规则可以获知该密码为根据预先约定好的设置密码的规则设置的(即该密码为第二网络的密码),第二设备允许第一设备接入第二网络。
示例性的,该可计算的密码的设置规则可以为将第一设备的MAC地址或者序列号按照一定的规律排列(例如倒序排列)的规则,或者可以为第一设备的MAC地址或者序列号的指定的某几字节组合在一起(例如第1个字节、第3个字节、第5个字节)的规则,或者还可以为其他满足使用需求的规则,本申请实施例不作具体限定。
Sample4、第二网络的密码为采用公私钥机制加密的密码。
本申请实施例中,可以采用公私钥机制对第一网络的密码加密,第一设备和第二设备分别有各自的公钥和私钥,其中,第一设备和第二设备可以获取对方的公钥(即第一设备可以获取第一设备的公钥,第二设备可以获取第一设备的公钥),第二设备可以采用该第一设备的公钥和第二设备的私钥对第一网络的密码加密,第一设备接收到加密后的第一网络的密码,第一设备可以采用第二设备的公钥和第一设备的私钥解密,从而得到第一网络的密码。
可选的,本申请实施例中,结合图6,如图7所示,在上述S110之前,本申请实施例提供的获取认证信息的方法还可以包括S110a-S110b:
S110a、第一设备获取第二网络的SSID。
S110b、在第一设备获取到第二网络的SSID情况下,第一设备确定第二设备是为第一设备提供第一认证信息的设备。
本申请实施例中,第一设备可以检测到多个网络的SSID,当第一设备获取到第二网络的SSID时,第一设备可以根据第二网络的SSID中第一设备的标识获知第二设备能够为第一设备提供第一认证信息,并且该第一设备可以根据第二网络的SSID中的特殊标识获知该第二设备处于能够为第一设备提供第一认证信息的状态,如此,第二设备可以确定该第二网络的SSID对应的第二设备是能够为第一设备提供第一认证信息的设备,从而第一设备可以接入第二网络,并接收第二设备采用该第二网络发送的第一认证信息。
上述主要从各个网元之间交互的角度对本申请实施例提供的方案进行了介绍。可以理解的是,各个网元,例如第一设备、第二设备等为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本申请实施例能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
本申请实施例可以根据上述方法示例对第一设备、第二设备等进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的 形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
在采用对应各个功能划分各个功能模块的情况下,图8示出了上述实施例中所涉及的第二设备的一种可能的结构示意图,如图8所示,第二设备可以包括:接收模块40、发送模块41和创建模块42。接收模块40可以用于支持第二设备执行上述方法实施例中的S102和S107;发送模块41可以用于支持第二设备执行上述方法实施例中的S103和S111;创建模块42可以用于支持第二设备执行上述方法实施例中的S109(包括S109a)。可选的,如图8所示,该第二设备还可以包括确定模块43。确定模块43可以用于支持第一设备执行上述方法实施例中的S108。其中,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。
在采用集成的单元的情况下,图9示出了上述实施例中所涉及的第二设备的一种可能的结构示意图。如图9所示,第二设备可以包括:处理模块50和通信模块51。处理模块50可以用于对第二设备的动作进行控制管理,例如,处理模块50可以用于支持第二设备执行上述方法实施例中的S108和S109(包括S109a),和/或用于本文所描述的技术的其它过程。通信模块51可以用于支持第二设备与其他网络实体的通信,例如通信模块51可以用于支持第二设备执行上述方法实施例中的S102、S107、S103和S111。可选的,如图9所示,该第二设备还可以包括存储模块52,用于存储第二设备的程序代码和数据。
其中,处理模块50可以是处理器或控制器(例如可以是上述如图3所示的处理器30),例如可以是中央处理器(central processing unit,CPU)、通用处理器、数字信号处理器(digital signal processor,DSP)、专用集成电路(application-specific integrated circuit,ASIC)、现场可编程门阵列(field programmable gate array,FPGA)或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本申请实施例公开内容所描述的各种示例性的逻辑方框、模块和电路。上述处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,DSP和微处理器的组合等等。通信模块51可以是收发器、收发电路或通信接口等(例如可以是上述如图3所示的RF电路31)。存储模块52可以是存储器。
在采用对应各个功能划分各个功能模块的情况下,图10示出了上述实施例中所涉及的第一设备的一种可能的结构示意图,如图10所示,第一设备可以包括:发送模块60、接收模块61和接入模块62。发送模块60可以用于支持第一设备执行上述方法实施例中的S101和S106;接收模块61可以用于支持第一设备执行上述方法实施例中的S104和S112;接入模块62可以用于支持第一设备执行上述方法实施例中的S110。可选的,如图10所示,该第一设备还可以包括确定模块63和获取模块64。确定模块63可以用于支持第一设备执行上述方法实施例中的S105(包括S105a)和S110b;获取模块64可以 用于支持第一设备执行上述方法实施例中的S110a。其中,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。
在采用集成的单元的情况下,图11示出了上述实施例中所涉及的第一设备的一种可能的结构示意图。如图11所示,第一设备可以包括:处理模块70和通信模块71。处理模块70可以用于对第一设备的动作进行控制管理,例如,处理模块70可以用于支持第一设备执行上述方法实施例中的S105(包括S105a)、S110a、S110b和S110,和/或用于本文所描述的技术的其它过程。通信模块71可以用于支持第一设备与其他网络实体的通信,例如通信模块71可以用于支持第一设备执行上述方法实施例中的S101、S104、S106和S112。可选的,如图11所示,该第一设备还可以包括存储模块72,用于存储第一设备的程序代码和数据。
其中,处理模块70可以是处理器或控制器(例如可以是上述如图2所示的控制单元20),例如可以是CPU、通用处理器、DSP、ASIC、FPGA或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本申请实施例公开内容所描述的各种示例性的逻辑方框、模块和电路。上述处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,DSP和微处理器的组合等等。通信模块71可以是收发器、收发电路或通信接口等(例如可以是上述如图2所示的通信单元22)。存储模块72可以是存储器(例如可以是上述如图2所示的存储器21)。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件程序实现时,可以全部或部分地以计算机程序产品的形式实现。该计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行该计算机指令时,全部或部分地产生按照本申请实施例中的流程或功能。该计算机可以是通用计算机、专用计算机、计算机网络或者其他可编程装置。该计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,该计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL))方式或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心传输。该计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包括一个或多个可用介质集成的服务器、数据中心等数据存储设备。该可用介质可以是磁性介质(例如,软盘、磁盘、磁带)、光介质(例如,数字视频光盘(digital video disc,DVD))、或者半导体介质(例如固态硬盘(solid state drives,SSD))等。
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。上述 描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:快闪存储器、移动硬盘、只读存储器、随机存取存储器、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (28)

  1. 一种获取认证信息的方法,其特征在于,包括:
    第二设备接收第一设备发送的第一信标报文,所述第一信标报文中包括所述第一设备的标识信息和所述第一设备的网络状态;
    所述第二设备根据所述第一信标报文向所述第一设备发送第一认证信息,所述第一认证信息用于所述第一设备接入第一网络;
    在所述第二设备确定所述第一设备接收所述第一认证信息失败的情况下,所述第二设备创建第二网络;
    所述第二设备采用所述第二网络向所述第一设备发送所述第一认证信息。
  2. 根据权利要求1所述的方法,其特征在于,所述第二设备确定所述第一设备接收所述第一认证信息失败,包括:
    所述第二设备根据第二信标报文确定所述第一设备接收所述第一认证信息失败,所述第二信标报文中包括所述第一设备的标识信息和所述第一设备的网络状态。
  3. 根据权利要求2所述的方法,其特征在于,所述第二设备创建第二网络,包括:
    所述第二设备根据所述第二信标报文设置所述第二网络的服务集标识SSID。
  4. 根据权利要求1至3任意一项所述的方法,其特征在于,
    所述第一认证信息包括所述第一网络的SSID、所述第一网络的密码和所述第一网络的认证证书中的至少一项。
  5. 根据权利要求1至4任意一项所述的方法,其特征在于,
    所述第二网络为所述第二设备创建的热点网络。
  6. 一种获取认证信息的方法,其特征在于,包括:
    第一设备广播第一信标报文,所述第一信标报文中包括所述第一设备的标识信息和所述第一设备的网络状态,所述第一信标报文用于请求第一认证信息,所述第一认证信息用于所述第一设备接入第一网络;
    所述第一设备接收第二设备根据所述第一信标报文发送的所述第一认证信息;
    在所述第一设备确定所述第一设备获取所述第一认证信息失败的情况下,所述第一设备接入所述第二设备创建的第二网络;
    所述第一设备接收所述第二设备采用所述第二网络发送的所述第一认证信息。
  7. 根据权利要求6所述的方法,其特征在于,所述第一设备确定所述第一设备获取所述第一认证信息失败,包括:
    所述第一设备在预设时间段内未接收到所述第二设备发送的所述第一认证信息,所述第一设备确定所述第一设备获取所述第一认证信息失败。
  8. 根据权利要求7所述的方法,其特征在于,在所述第一设备确定所述第一设备获取所述第一认证信息失败之后,所述方法还包括:
    所述第一设备广播第二信标报文。
  9. 根据权利要求6所述的方法,其特征在于,在所述第一设备接收第二设备根据所述第一信标报文发送的所述第一认证信息之后,所述方法还包括:
    所述第一设备广播第二信标报文,所述第二信标报文包括所述第一设备的标识信息和所述第一设备的网络状态。
  10. 根据权利要求6所述的方法,其特征在于,所述第一设备接入所述第二设备创建的第二网络之前,所述方法还包括:
    在所述第一设备获取到所述第二网络的服务集标识SSID的情况下,所述第一设备根据所述第二网络的SSID确定所述第二设备是为所述第一设备提供所述第一认证信息的设备。
  11. 根据权利要求6至10任意一项所述的方法,其特征在于,
    所述第一认证信息包括第一网络的SSID和所述第一网络的密码和所述第一网络的认证证书中的至少一项。
  12. 根据权利要求1至11任意一项所述的方法,其特征在于,
    所述第二网络为在所述第二设备确定所述第一设备接收所述第一认证信息失败之后,所述第二设备创建的热点网络。
  13. 一种设备,其特征在于,所述设备包括接收模块、发送模块和创建模块;
    所述接收模块,用于接收第一设备发送的第一信标报文,所述第一信标报文中包括所述第一设备的标识信息和所述第一设备的网络状态;
    所述发送模块,用于根据所述接收模块接收的所述第一信标报文向所述第一设备发送第一认证信息,所述第一认证信息用于所述第一设备接入第一网络;
    所述创建模块,用于在所述设备确定所述第一设备接收所述第一认证信息失败的情况下,创建第二网络;
    所述发送模块,还用于采用所述第二网络向所述第一设备发送所述第一认证信息。
  14. 根据权利要求13所述的设备,其特征在于,所述设备还包括确定模块;
    所述确定模块,用于根据第二信标报文确定所述第一设备接收所述第一认证信息失败,所述第二信标报文中包括所述第一设备的标识信息和所述第一设备的网络状态。
  15. 根据权利要求14所述的设备,其特征在于,
    所述创建模块,具体用于根据所述第二信标报文设置所述第二网络的服务集标识SSID。
  16. 根据权利要求13至15任意一项所述的设备,其特征在于,
    所述第一认证信息包括所述第一网络的SSID、所述第一网络的密码和所述第一网络的认证证书中的至少一项。
  17. 根据权利要求13至16任意一项所述的设备,其特征在于,
    所述第二网络为所述第二设备创建的热点网络。
  18. 一种设备,其特征在于,所述设备包括发送模块、接收模块和接入模块;
    所述发送模块,用于广播第一信标报文,所述第一信标报文中包括所述设备的标识信息和所述设备的网络状态,所述第一信标报文用于请求第一认证信息,所述第一认证信息用于所述设备接入第一网络;
    所述接收模块,用于接收第二设备根据所述第一信标报文发送的所述第一认证信息;
    所述接入模块,用于在所述设备确定所述设备获取所述第一认证信息失败的情况下,接入所述第二设备创建的第二网络;
    所述接收模块,还用于接收所述第二设备采用所述第二网络发送的所述第一认证信息。
  19. 根据权利要求18所述的设备,其特征在于,所述设备还包括确定模块;
    所述确定模块,用于在所述接收模块在预设时间段内未接收到所述第二设备发送的所述第一认证信息时,确定所述设备获取所述第一认证信息失败。
  20. 根据权利要求19所述的设备,其特征在于,
    所述发送模块,还用于在所述接收模块接收所述第一认证信息失败之后,广播所述第二信标报文。
  21. 根据权利要求18所述的设备,其特征在于,
    所述发送模块,还用于在所述接收模块接收第二设备根据所述第一信标报文发送的所述第一认证信息之后,广播第二信标报文,所述第二信标报文包括所述设备的标识信息和所述设备的网络状态。
  22. 根据权利要求18所述的设备,其特征在于,
    所述确定模块,还用于在所述设备获取到第二网络的服务集标识SSID的情况下,根据所述第二网络的SSID确定所述第二设备是为所述设备提供所述第一认证信息的设备。
  23. 根据权利要求18至22任意一项所述的设备,其特征在于,
    所述第一认证信息包括第一网络的SSID、所述第一网络的密码和所述第一网络的认证证书中的至少一项。
  24. 一种设备,其特征在于,所述设备包括处理器、收发器和与所述处理器耦合连接的存储器;
    所述存储器用于存储计算机指令,当所述设备运行时,所述处理器执行所述存储器存储的所述计算机指令,所述处理器用于控制所述收发器接收第一设备发送的第一信标报文,所述第一信标报文中包括所述第一设备的标识信息和所述第一设备的网络状态;并且控制所述收发器根据所述第一信标报文向所述第一设备发送第一认证信息,所述第一认证信息用于所述第一设备接入第一网络;以及在确定所述第一设备接收所述第一认证信息失败的情况下,创建第二网络;并且控制所述收发器采用所述第二网络向所述第一设备发送所述第一认证信息。
  25. 一种设备,其特征在于,所述设备包括处理器、收发器和与所述处理器耦合连接的存储器;
    所述存储器用于存储计算机指令,当所述设备运行时,所述处理器执行所述存储器存储的所述计算机指令,所述处理器用于控制所述收发器广播第一信标报文,所述第一信标报文中包括所述设备的标识信息和所述设备的网络状态,所述第一信标报文用于请求第一认证信息,所述第一认证信息用于所述第一设备接入第一网络;并且控制所述收发器接收第二设备根据所述第一信标报文发送的所述第一认证信息;以及在确定所述设备获取所述第一认证信息失败的情况下,接入所述第二设备创建的第二网络;并且控制所述收发器接收所述第二设备采用所述第二网络发送的所述第一认证信息。
  26. 一种计算机可读存储介质,其特征在于,包括计算机指令,当所述计算机指令在一个设备上运行时,使得所述设备执行如权利要求1至5任意一项所述的获取认证信息的方法。
  27. 一种计算机可读存储介质,其特征在于,包括计算机指令,当所述计算机指令在一个设备上运行时,使得所述设备执行如权利要求6至12任意一项所述的获取认证信息的方法。
  28. 一种通信系统,其特征在于,包括如权利要求13至17任意一项或者权利要求24所述的设备,如权利要求18-23任意一项或者权利要求25所述的设备,所述如权利要求13至17任意一项或者24所述的设备为第一设备,所述如权利要求18至23任意一项或者25所述的设备为第二设备,所述第二设备为所述第一设备提供第一认证信息。
PCT/CN2017/086163 2016-12-30 2017-05-26 一种获取认证信息的方法、装置及系统 WO2018120624A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201780032665.2A CN109196916A (zh) 2016-12-30 2017-05-26 一种获取认证信息的方法、装置及系统

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201611265890 2016-12-30
CN201611265890.4 2016-12-30

Publications (1)

Publication Number Publication Date
WO2018120624A1 true WO2018120624A1 (zh) 2018-07-05

Family

ID=62706865

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/086163 WO2018120624A1 (zh) 2016-12-30 2017-05-26 一种获取认证信息的方法、装置及系统

Country Status (2)

Country Link
CN (1) CN109196916A (zh)
WO (1) WO2018120624A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113163381A (zh) * 2021-04-16 2021-07-23 横店集团得邦照明股份有限公司 一种支持快速配网的智能灯及其实现方法

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110662236A (zh) * 2019-09-30 2020-01-07 上海趣威文化发展有限公司 网络配置方法、系统及装置
CN113630282B (zh) * 2020-05-07 2022-12-27 北京华为数字技术有限公司 检测服务器状态的方法和装置

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130333016A1 (en) * 2012-06-08 2013-12-12 Brian Coughlin Wireless session configuration persistence
CN103716911A (zh) * 2014-01-02 2014-04-09 福建星网锐捷通讯股份有限公司 一种配置无线终端的方法、装置和系统
CN104880019A (zh) * 2015-06-18 2015-09-02 合肥美菱股份有限公司 一种用于智能冰箱的远程绑定方法
CN105049416A (zh) * 2015-06-15 2015-11-11 小米科技有限责任公司 一种接入wifi网络的方法及装置
CN105323824A (zh) * 2015-11-16 2016-02-10 北京京东世纪贸易有限公司 辅助wifi设备入网的电子设备、wifi设备及方法
CN105578561A (zh) * 2015-12-21 2016-05-11 深圳市控博士科技有限公司 一种智能空调插座接入家庭网关无线局域网网络的系统及方法

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9838940B2 (en) * 2013-09-18 2017-12-05 Qualcomm, Incorporated Packet transmission deferral based on BSSID information

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130333016A1 (en) * 2012-06-08 2013-12-12 Brian Coughlin Wireless session configuration persistence
CN103716911A (zh) * 2014-01-02 2014-04-09 福建星网锐捷通讯股份有限公司 一种配置无线终端的方法、装置和系统
CN105049416A (zh) * 2015-06-15 2015-11-11 小米科技有限责任公司 一种接入wifi网络的方法及装置
CN104880019A (zh) * 2015-06-18 2015-09-02 合肥美菱股份有限公司 一种用于智能冰箱的远程绑定方法
CN105323824A (zh) * 2015-11-16 2016-02-10 北京京东世纪贸易有限公司 辅助wifi设备入网的电子设备、wifi设备及方法
CN105578561A (zh) * 2015-12-21 2016-05-11 深圳市控博士科技有限公司 一种智能空调插座接入家庭网关无线局域网网络的系统及方法

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113163381A (zh) * 2021-04-16 2021-07-23 横店集团得邦照明股份有限公司 一种支持快速配网的智能灯及其实现方法
CN113163381B (zh) * 2021-04-16 2024-04-12 横店集团得邦照明股份有限公司 一种支持快速配网的智能灯及其实现方法

Also Published As

Publication number Publication date
CN109196916A (zh) 2019-01-11

Similar Documents

Publication Publication Date Title
US10531285B2 (en) Method of changing profile using identification module and electronic device implementing same
US10880746B2 (en) Network connection method, apparatus, storage medium and terminal
US9078087B2 (en) Method and apparatus for forming Wi-Fi P2P group using Wi-Fi direct
EP2733974B1 (en) Wireless local area network device configuration method, corresponding device and system
US11758399B2 (en) Wireless local area network configuration using probe request frame having authentication information
US11765577B2 (en) Identity obscuration for a wireless station
US11277744B2 (en) Wi-Fi hotspot connection method and terminal
JP7477589B2 (ja) ホットスポット接続を確立するための方法および端末デバイス
US20150085848A1 (en) Method and Apparatus for Controlling Wireless Network Access Parameter Sharing
EP3061226A1 (en) Peer based authentication
JP2015513288A (ja) オペレータ補助付きデバイス間(d2d)ディスカバリ
KR20130044922A (ko) 휴대단말기에서 WPS(Wi-Fi Protecte d Setup)을 이용한 와이파이 연결 방법 및 장치
US10674353B2 (en) Association establishment method in wireless local area network, terminal, and access point
WO2019029511A1 (zh) 接收广播消息的资源位置指示方法、网络设备、用户终端及系统
WO2018010148A1 (zh) 一种通过虚拟客户识别模块进行通信的方法及设备
KR20150087914A (ko) 위치 정보에 기반한 디바이스 검색 방법 및 장치
WO2018120624A1 (zh) 一种获取认证信息的方法、装置及系统
CN107734528B (zh) 无线网络检测方法、装置、存储介质及终端
WO2021164312A1 (zh) 设备无线网络信息配置方法及装置
WO2018205328A1 (zh) 一种设备接入无线网络的系统及方法
WO2018040805A1 (zh) 无线局域网中建立关联的方法、终端和接入点
WO2023078268A1 (zh) Dns消息的发送方法、终端及网络侧设备
WO2022257877A1 (zh) 信息处理方法、密钥材料的获取方法及设备
TWI425856B (zh) Automatically establish a wireless network topology
WO2018028575A1 (zh) 通信网络的连接方法、终端及服务平台

Legal Events

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

Ref document number: 17888768

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

Country of ref document: EP

Kind code of ref document: A1