WO2021164312A1 - Wireless network information configuration method and apparatus for device - Google Patents

Wireless network information configuration method and apparatus for device Download PDF

Info

Publication number
WO2021164312A1
WO2021164312A1 PCT/CN2020/125585 CN2020125585W WO2021164312A1 WO 2021164312 A1 WO2021164312 A1 WO 2021164312A1 CN 2020125585 W CN2020125585 W CN 2020125585W WO 2021164312 A1 WO2021164312 A1 WO 2021164312A1
Authority
WO
WIPO (PCT)
Prior art keywords
terminal device
information
wireless network
data
network
Prior art date
Application number
PCT/CN2020/125585
Other languages
French (fr)
Chinese (zh)
Inventor
马尔利
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2021164312A1 publication Critical patent/WO2021164312A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/03Protecting confidentiality, e.g. by encryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/08Access security
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/02Arrangements for optimising operational condition
    • 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
    • H04W48/10Access restriction or access information delivery, e.g. discovery data delivery using broadcasted information

Definitions

  • This application belongs to the field of smart home technology, and in particular relates to a device wireless network information configuration method and device.
  • each IOT device after each IOT device joins the local area network, if the network information of the local area network changes, for example, the service set identifier (SSID) of the local area network or the network password changes, each IOT device cannot access the local area network again.
  • the IOT device can turn on the wireless hotspot, and the terminal device held by the user can access the wireless hotspot, thereby establishing a wireless connection with the IOT device, and responding to the IOT device according to the changed network information Perform configuration so that the configured IOT device can rejoin the LAN.
  • SSID service set identifier
  • the embodiments of the present application provide a device wireless network information configuration method and device, which can solve the problem of low efficiency in configuring IOT devices.
  • an embodiment of the present application provides a device wireless network information configuration method, which is applied to a first terminal device in a wireless network, and includes:
  • the information request data includes a hotspot identifier, a session identifier, and a terminal address
  • the hotspot identifier is used to indicate that the first terminal device cannot access the wireless network
  • the session identifier is used to identify the first terminal device
  • the terminal address is used to indicate the physical address of the first terminal device
  • the broadcasting information request data through the wireless hotspot function includes:
  • the information request data is broadcast periodically.
  • the information request is generated according to the hotspot identifier, the session identifier, and the terminal address Data, including:
  • the information request data is generated according to the hotspot identifier, the encrypted session identifier, and the encrypted terminal address.
  • the configuring the first terminal device according to the configuration information in the network information data includes:
  • the network information data is verified according to a pre-stored public and private key pair to determine that the Whether the network information data matches the first terminal device includes:
  • the session identifier is consistent with the session identifier to be matched, determining that the network information data matches the first terminal device;
  • obtaining the configuration information from the network information data includes:
  • the configuration information includes identification information and a network password of the wireless network
  • the method further includes:
  • the method before the enabling the wireless hotspot function, the method further includes:
  • the public-private key pair is generated when the second terminal device accesses a historical wireless network, and the historical wireless network is the wireless network before the configuration information is changed.
  • the embodiments of the present application provide a device wireless network information configuration method, which is applied to a second terminal device of a wireless network, and includes:
  • the network information data is sent to the first terminal device through the hotspot function activated by the first terminal device, and the network information data is used to instruct the first terminal device according to the information in the network information data.
  • the configuration information is connected to the wireless network.
  • the information request data includes a hotspot identifier and a session identifier
  • the hotspot identifier is used to indicate that the first terminal device cannot access the wireless network
  • the session The identifier is used to identify the first terminal device
  • the generating network information data according to the information request data and the configuration information of the second terminal device includes:
  • the information request data is verified according to the pre-stored public and private keys to determine whether the second terminal device has the configuration of the first terminal device. 1. The authority of the terminal device;
  • the second terminal device has the authority to configure the first terminal device, acquiring configuration information of the second terminal device;
  • the network information data is generated according to the configuration information and the session identifier.
  • the generating the network information data according to the configuration information and the session identifier includes:
  • the network information data is generated according to the encrypted configuration information and the encrypted session identifier.
  • the acquiring configuration information of the second terminal device includes:
  • the second terminal device If the second terminal device has accessed the wireless network, acquiring the configuration information of the second terminal device.
  • the method further includes:
  • the second terminal device does not access the wireless network, access the wireless network according to the configuration information
  • an embodiment of the present application provides a device wireless network information configuration device, which is applied to a first terminal device in a wireless network, and includes:
  • the function enabling module is used to enable the wireless hotspot function if it is detected that the wireless network cannot be accessed;
  • the broadcasting module is configured to broadcast information request data through the wireless hotspot function, and the information request data is used to request network information of the wireless network;
  • the receiving module is configured to receive network information data fed back by the second terminal device according to the information request data, and the network information data is generated by the second terminal device after verification according to the information request data and sent to the Sent by the first terminal device;
  • the information request data includes a hotspot identifier, a session identifier, and a terminal address
  • the hotspot identifier is used to indicate that the first terminal device cannot access the wireless network
  • the session identifier is used to identify the first terminal device
  • the terminal address is used to indicate the physical address of the first terminal device
  • the broadcasting module is specifically configured to obtain the hotspot identifier, the session identifier, and the terminal address; generate the information request data according to the hotspot identifier, the session identifier, and the terminal address; periodically Broadcast the information request data.
  • the broadcast module is further specifically configured to compare the session identifier and the shared key according to a pre-stored public and private key pair.
  • the terminal address is encrypted to obtain an encrypted session identifier and an encrypted terminal address; according to the hotspot identifier, the encrypted session identifier, and the encrypted terminal address, the information request data is generated.
  • the configuration module is specifically configured to verify the network information data according to a pre-stored public and private key pair to determine whether the network information data is consistent with the The first terminal device matches; if the network information data matches the first terminal device, obtain the configuration information from the network information data; configure the first terminal device according to the configuration information .
  • the configuration module is further specifically configured to perform network information data processing according to the public and private key pair. Decrypt to obtain the session identifier to be matched and the candidate configuration information; compare the session identifier with the session identifier to be matched; if the session identifier and the session identifier to be matched are consistent, it is determined that the network information data is consistent with The first terminal device matches; if the session identifier and the to-be-matched session identifier are inconsistent, it is determined that the network information data does not match the first terminal device;
  • the configuration module is further specifically configured to use the candidate configuration information as the configuration information if the network information data matches the first terminal device.
  • the configuration information includes identification information and a network password of the wireless network
  • the device also includes:
  • the connection module uses the network password to access the wireless network.
  • the device further includes:
  • the obtaining module is configured to obtain a public-private key pair, the public-private key pair is generated when the second terminal device accesses a historical wireless network, and the historical wireless network is the wireless network before the configuration information is changed.
  • an embodiment of the present application provides a device wireless network information configuration device, which is applied to a second terminal device of a wireless network, and includes:
  • a receiving module configured to receive information request data sent by a first terminal device, the information request data being broadcast by the first terminal device after detecting that it cannot access the wireless network through an enabled hotspot function;
  • a generating module configured to generate network information data according to the information request data and the configuration information of the second terminal device
  • the sending module is configured to send the network information data to the first terminal device through the hotspot function activated by the first terminal device, and the network information data is used to instruct the first terminal device to perform the The configuration information in the data is connected to the wireless network.
  • the information request data includes a hotspot identifier and a session identifier
  • the hotspot identifier is used to indicate that the first terminal device cannot access the wireless network
  • the session The identifier is used to identify the first terminal device
  • the generating module is specifically configured to, if the hotspot identifier indicates that the first terminal device cannot access the wireless network, verify the information request data according to a pre-stored public and private key to determine the second Whether the terminal device has the authority to configure the first terminal device; if the second terminal device has the authority to configure the first terminal device, obtain the configuration information of the second terminal device; The session identifier is used to generate the network information data.
  • the generation module is further specifically configured to compare the configuration information and the configuration information according to the public and private key pair.
  • the session identifier is encrypted to obtain the encrypted configuration information and the encrypted session identifier; according to the encrypted configuration information and the encrypted session identifier, the network information data is generated.
  • the generating module is further specifically configured to determine whether the second terminal device is connected to the wireless network ; If the second terminal device has access to the wireless network, obtain the configuration information of the second terminal device.
  • the apparatus further includes:
  • a connection module configured to access the wireless network according to the configuration information if the second terminal device is not connected to the wireless network
  • the obtaining module is configured to obtain the configuration information if the wireless network is successfully accessed.
  • an embodiment of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and running on the processor.
  • the processor executes the computer program, The device wireless network information configuration method according to any one of the first aspect and the second aspect is implemented.
  • an embodiment of the present application provides a computer-readable storage medium that stores a computer program, and the computer program is characterized in that, when the computer program is executed by a processor, the above-mentioned first aspect and The device wireless network information configuration method described in any one of the second aspect.
  • the embodiments of the present application provide a computer program product, which when the computer program product runs on a terminal device, causes the terminal device to execute the device wireless network information described in any one of the first aspect or the second aspect. Configuration method.
  • the first terminal device when it is detected that the first terminal device cannot access the wireless network, the first terminal device turns on the wireless hotspot function, and broadcasts the information request data through the wireless hotspot function. Accordingly, the second terminal device can receive and request data according to The information request data generates network information data, and then sends the network information data to the first terminal device.
  • the first terminal device can receive the network information data fed back by the second terminal device according to the information request data, and according to the configuration in the network information data Information, configure the first terminal device.
  • the second terminal device can feed back network information data according to the information request data, so that the first terminal device can configure the network information data according to the network information data, which avoids users Performing the manual configuration operation on each first terminal device improves the efficiency of configuring the first terminal device.
  • FIG. 1 is a system schematic diagram of a device configuration system involved in a device wireless network information configuration method provided by an embodiment of the present application;
  • FIG. 2 is a block diagram of a part of the structure of a mobile phone provided by an embodiment of the present application
  • FIG. 3 is a schematic flowchart of a method for configuring wireless network information of a device according to an embodiment of the present application
  • FIG. 4 is a schematic diagram of a beacon frame provided by an embodiment of the present application.
  • FIG. 5 is a schematic flowchart of generating network information data according to an embodiment of the present application.
  • FIG. 6 is a schematic diagram of a behavior frame provided by an embodiment of the present application.
  • FIG. 7 is a schematic flowchart of configuring a first terminal device according to an embodiment of the present application.
  • FIG. 8 is a structural block diagram of a device wireless network information configuration device provided by an embodiment of the present application.
  • FIG. 9 is a structural block diagram of another device wireless network information configuration device provided by an embodiment of the present application.
  • FIG. 10 is a structural block diagram of another device wireless network information configuration device provided by an embodiment of the present application.
  • FIG. 11 is a structural block diagram of another device wireless network information configuration device provided by an embodiment of the present application.
  • FIG. 12 is a schematic structural diagram of a terminal device provided by an embodiment of the present application.
  • the device wireless network information configuration method provided by the embodiments of this application can be applied to mobile phones, tablet computers, wearable devices, augmented reality (AR)/virtual reality (VR) devices, notebook computers, and super mobile personal computers
  • AR augmented reality
  • VR virtual reality
  • UMPC ultra-mobile personal computer
  • netbooks netbooks
  • PDA personal digital assistant
  • the terminal device may be a station (STAION, ST) in a WLAN, a cellular phone, a cordless phone, a Session Initiation Protocol (SIP) phone, a Personal Digital Assistant (PDA) device, Wireless communication function handheld devices, computing devices or other processing devices connected to wireless modems, computers, laptop computers, handheld communication devices, handheld computing devices, satellite wireless devices, wireless modem cards, TV set top boxes , STB) and so on.
  • STAION station
  • ST Wireless communication function handheld devices
  • computing devices or other processing devices connected to wireless modems, computers, laptop computers, handheld communication devices, handheld computing devices, satellite wireless devices, wireless modem cards, TV set top boxes , STB) and so on.
  • the wearable device can also be a general term for applying wearable technology to intelligently design daily wear and develop wearable devices, such as glasses, gloves, Watches, clothing and shoes, etc.
  • a wearable device is a portable device that is directly worn on the body or integrated into the user's clothes or accessories.
  • Wearable devices are not only a kind of hardware device, but also realize powerful functions through software support, data interaction, and cloud interaction.
  • wearable smart devices include full-featured, large-sized, complete or partial functions that can be implemented without relying on smart phones, such as smart watches or smart glasses, and only focus on a certain type of application function, and need to be used in conjunction with other devices such as smart phones. , Such as all kinds of smart bracelets and smart jewelry for physical sign monitoring.
  • FIG. 1 is a system schematic diagram of a device configuration system involved in a device wireless network information configuration method provided by an embodiment of the present application.
  • the device configuration system may include: at least one first terminal device 110, and at least one first terminal device 110; Two terminal equipment 120 and router 130.
  • the router is connected to the Internet to provide a wireless network; each first terminal device and each second terminal device can be connected to the router wirelessly, thereby joining the wireless network provided by the router.
  • the first terminal device can be a terminal device that is inconvenient to modify configuration information, such as Internet of Things devices such as TVs, air conditioners, and washing machines;
  • the second terminal device can be a terminal device that can easily modify configuration information, such as mobile phones, laptops, and tablets. Networking equipment.
  • each first terminal device and each second terminal device can access the historical wireless network provided by the router, and any one of the first terminal devices or any one of the second terminal devices is accessing the historical wireless network.
  • both public and private key pairs can be generated, and the public and private key pairs can be sent to each other first terminal device and second terminal device in the wireless network through cloud control, so that each terminal device can be determined by the public and private key pair later. Whether you have the authority to configure other terminal devices.
  • the cloud control method may be to store the public-private key pair in the cloud through the router, and then the cloud sends the public-private key pair to each other first terminal device and each second terminal device.
  • the public-private key pair can also be sent to each terminal device in the historical wireless network through a local control method.
  • the local control method is to use a certain terminal device as a temporary trusted device.
  • Each other terminal device in the network sends a public-private key pair.
  • the second terminal device can update the configuration information of the second terminal device according to the operation triggered by the user, and according to the update After the configuration information is connected to the wireless network.
  • the network information of the historical wireless network such as SSID and/or network password
  • the wireless hotspot function can be turned on to broadcast information request data to other terminal devices in the wireless network.
  • a second terminal device connected to the wireless network can receive the information request data, and generate and feed back network information data according to the information request data, and each first terminal device that is not connected to the wireless network can receive the feedback network Information data, and update the configuration information of the first terminal device according to the configuration information carried in the network information data to complete the configuration of the first terminal device so that the first terminal device can join the wireless network according to the updated configuration information.
  • the first terminal device can use the public and private keys to encrypt the information request data
  • the second terminal device can decrypt the encrypted information request data according to the public and private keys, and again use the public and private keys to encrypt the network information data.
  • the first terminal device can decrypt the encrypted network information data according to the public and private keys, so that whether the second terminal device has the authority to configure the first terminal device can be determined by whether the second terminal device can successfully decrypt.
  • the embodiment of the present application only takes the second terminal device to update the configuration information according to the user-triggered operation as an example for description, but in practical applications, not only the second terminal device can configure the configuration according to the user-triggered operation Information is updated, the first terminal device can also update the configuration information according to an operation triggered by the user, and the first terminal device can also feed back network information data to other terminal devices that are not connected to the wireless network. Not limited.
  • the second terminal device is a mobile phone as an example for exemplification.
  • Fig. 2 is a block diagram of a part of the structure of a mobile phone provided by an embodiment of the present application.
  • the mobile phone includes: a radio frequency (RF) circuit 210, a memory 220, an input unit 230, a display unit 240, a sensor 250, an audio circuit 260, a wireless fidelity (WiFi) module 270, and a processor 280 , And power supply 290 and other components.
  • RF radio frequency
  • the structure of the mobile phone shown in FIG. 2 does not constitute a limitation on the mobile phone, and may include more or less components than those shown in the figure, or a combination of some components, or different component arrangements.
  • the touch detection device detects the user's touch position, detects the 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 it into contact coordinates, and then sends it To the processor 280, and can receive and execute the commands sent by the processor 280.
  • the touch panel 231 can be implemented in multiple types such as resistive, capacitive, infrared, and surface acoustic wave.
  • the input unit 230 may also include other input devices 232.
  • the other input device 232 may include, but is not limited to, one or more of a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), trackball, mouse, and joystick.
  • WiFi is a short-distance wireless transmission technology.
  • the mobile phone can help users send and receive emails, browse web pages, and access streaming media through the WiFi module 270. It provides users with wireless broadband Internet access.
  • FIG. 2 shows the WiFi module 270, it is understandable that it is not a necessary component of the mobile phone, and can be omitted as needed without changing the essence of the invention.
  • the processor 280 is the control center of the mobile phone. It uses various interfaces and lines to connect various parts of the entire mobile phone. Various functions and processing data of the mobile phone can be used to monitor the mobile phone as a whole.
  • the processor 280 may include one or more processing units; preferably, the processor 280 may integrate an application processor and a modem processor, where the application processor mainly processes the operating system, user interface, application programs, etc. , The modem processor mainly deals with wireless communication. It can be understood that the foregoing modem processor may not be integrated into the processor 280.
  • the public-private key pair is generated when the second terminal device accesses the historical wireless network, and the historical wireless network is the wireless network before the configuration information is changed. For example, if the network information of the first wireless network changes to form a second wireless network, the first wireless network is a historical wireless network, and the second wireless network is a new wireless network.
  • the second terminal device can generate a public and private key pair, and use the cloud control method to communicate to the first terminal device via the Internet.
  • the terminal device sends the generated public and private key pair.
  • the first terminal device can receive the public-private key pair generated by the second terminal device.
  • the first terminal device may obtain the hotspot identifier, the session identifier, and the terminal address, and generate the information request data according to the hotspot identifier, the session identifier, and the terminal address, and then periodically broadcast the information request data.
  • the second terminal device can obtain the stored configuration information, so that in the subsequent steps, network information data can be generated based on the configuration information, so that the first terminal device can be based on The network information data is added to the wireless network.
  • the second terminal device can also use the public key in the public-private key pair to compare the configuration information and the session in the process of generating the network information data.
  • the logo is encrypted. That is, the second terminal device can encrypt the configuration information and the session ID according to the public and private keys to obtain the encrypted configuration information and the encrypted session ID, and then generate the network information data according to the encrypted configuration information and the encrypted session ID .
  • Step 306 The second terminal device sends network information data to the first terminal device through the hotspot function activated by the first terminal device.
  • the first terminal device may receive the network information data sent by the second terminal device.
  • the second terminal device may send network information data to multiple first terminal devices, and any terminal device may receive multiple network information data, then step 308 may be executed to obtain multiple network information data from multiple first terminal devices.
  • the first terminal device In determining the network information data matching the first terminal device in the network information data, the first terminal device is configured according to the configuration information in the network information data.
  • the second terminal device Since the second terminal device encrypts and encapsulates the to-be-matched identification and candidate configuration information in the network information data in the process of generating the network information data, the first terminal device is decrypting and verifying, and determines that the network information data and the first After a terminal device is matched, the candidate configuration information obtained by decryption can be used as the configuration information sent by the second terminal device for updating.
  • the first terminal device may search for the wireless network according to the identification information, and access the wireless network according to the network password.
  • the first terminal device may first search for a wireless network matching the identification information in the current scene according to the identification information, and then try to join the found wireless network according to the updated network password, if successful Joining the wireless network means that the configuration update of the first terminal device is successful.
  • the effectiveness of the network information data can be improved.
  • the device includes:
  • the broadcasting module 802 is used to broadcast information request data through the wireless hotspot function, and the information request data is used to request network information of the wireless network;
  • the receiving module 803 is configured to receive network information data fed back by the second terminal device according to the information request data, and the network information data is generated by the second terminal device after verification according to the information request data and sent to the first terminal device Sent
  • the configuration module 804 is configured to configure the first terminal device according to the configuration information in the network information data.
  • the broadcasting module 802 is specifically configured to obtain the hotspot identifier, the session identifier, and the terminal address; generate the information request data according to the hotspot identifier, the session identifier, and the terminal address; broadcast the information request data periodically.
  • the broadcast module 802 is also specifically configured to encrypt the session identifier and the terminal address according to a pre-stored public and private key to obtain the encrypted session identifier and the encrypted terminal address; according to the hot spot identifier and the encrypted terminal address; The subsequent session identifier and the encrypted terminal address generate the information request data.
  • the configuration module 804 is specifically configured to verify the network information data according to a pre-stored public and private key pair to determine whether the network information data matches the first terminal device; if the network information data matches If the first terminal device matches, obtain the configuration information from the network information data; configure the first terminal device according to the configuration information.
  • the configuration module 804 is further specifically configured to decrypt the network information data according to the public and private key pair to obtain the session identifier to be matched and the candidate configuration information; to compare the session identifier with the session identifier to be matched If the session identifier is consistent with the session identifier to be matched, it is determined that the network information data matches the first terminal device; if the session identifier and the session identifier to be matched are inconsistent, it is determined that the network information data is consistent with the first terminal device. The terminal equipment does not match;
  • the configuration information includes the identification information and the network password of the wireless network
  • the device also includes:
  • the searching module 805 is used to search for the wireless network according to the identification information
  • the obtaining module 807 is configured to obtain a public-private key pair, which is generated when the second terminal device accesses the historical wireless network, and the historical wireless network is the wireless network before the configuration information is changed.
  • the first terminal device when it is detected that the first terminal device cannot access the wireless network, the first terminal device turns on the wireless hotspot function, and broadcasts information through the wireless hotspot function Request data so that the second terminal device can receive and generate network information data based on the information request data, and send the network information data to the first terminal device, and the first terminal device can receive the network that the second terminal device requests data feedback according to the information Information data, and configure the first terminal device according to the configuration information in the network information data.
  • the second terminal device can feed back network information data according to the information request data, so that the first terminal device can configure the network information data according to the network information data, which avoids users Performing the manual configuration operation on each first terminal device improves the efficiency of configuring the first terminal device.
  • the device includes:
  • the sending module 1003 is configured to send the network information data to the first terminal device through the hotspot function activated by the first terminal device, and the network information data is used to instruct the first terminal device to follow the configuration in the network information data.
  • the information is connected to the wireless network.
  • the information request data includes a hotspot identifier and a session identifier
  • the hotspot identifier is used to indicate that the first terminal device cannot access the wireless network
  • the session identifier is used to identify the first terminal device
  • the generating module 1002 is further specifically configured to determine whether the second terminal device is connected to the wireless network; if the second terminal device has already connected to the wireless network, obtain the configuration information of the second terminal device.
  • the device further includes:
  • the connection module 1004 is configured to access the wireless network according to the configuration information if the second terminal device is not connected to the wireless network;
  • the obtaining module 1005 is configured to obtain the configuration information if the wireless network is successfully accessed.
  • the first terminal device when it is detected that the first terminal device cannot access the wireless network, the first terminal device turns on the wireless hotspot function, and broadcasts information through the wireless hotspot function Request data.
  • the second terminal device can receive the information request data broadcasted by the first terminal device by turning on the wireless hotspot function when it detects that it cannot access the wireless network, and generate network information data based on the information request data, and then send it to The first terminal device sends the network information data so that the first terminal device can receive the network information data fed back by the second terminal device according to the information request data, and configure the first terminal device according to the configuration information in the network information data.
  • the second terminal device can feed back network information data according to the information request data, so that the first terminal device can configure the network information data according to the network information data, which avoids users Performing the manual configuration operation on each first terminal device improves the efficiency of configuring the first terminal device.
  • An embodiment of the present application also provides a terminal device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor.
  • a terminal device including a memory, a processor, and a computer program stored in the memory and capable of running on the processor.
  • the processor executes the computer program, the implementation is as shown in FIG. 3 , 5 and 7 shown in the first terminal device or the method performed by the second terminal device.
  • the embodiments of the present application also provide a computer-readable storage medium, the computer-readable storage medium stores a computer program, and is characterized in that the computer program is executed by a processor as shown in FIGS. 3, 5, and 7 The method performed by the first terminal device or the second terminal device.
  • FIG. 12 is a schematic structural diagram of a terminal device provided by an embodiment of the present application.
  • the terminal device 12 of this embodiment includes: at least one processor 121 (only one is shown in FIG. 12), a processor, a memory 122, and a processor that is stored in the memory 122 and can be processed in the at least one processor.
  • a computer program 122 running on the processor 121 when the processor 121 executes the computer program 122, the steps in any of the foregoing embodiments of the method for configuring wireless network information for each device are implemented.
  • the terminal device 12 may be a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud server.
  • the terminal device may include, but is not limited to, a processor 121 and a memory 122.
  • FIG. 12 is only an example of the terminal device 12, and does not constitute a limitation on the terminal device 12. It may include more or less components than shown in the figure, or a combination of certain components, or different components. , For example, can also include input and output devices, network access devices, and so on.
  • the so-called processor 121 may be a central processing unit (Central Processing Unit, CPU), and the processor 121 may also be other general-purpose processors, digital signal processors (Digital Signal Processors, DSPs), and application specific integrated circuits (Application Specific Integrated Circuits). , ASIC), ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
  • the disclosed device and method may be implemented in other ways.
  • the system embodiment described above is merely illustrative.
  • the division of the modules or units is only a logical function division.
  • there may be other division methods for example, multiple units or components may be It can be combined or integrated into another system, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
  • the computer program can be stored in a computer-readable storage medium. When executed by the processor, the steps of the foregoing method embodiments can be implemented.
  • the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file, or some intermediate forms.
  • the computer-readable medium may at least include: any entity or device capable of carrying computer program code to a terminal device, a recording medium, a computer memory, a read-only memory (ROM, Read-Only Memory), and a random access memory (RAM, Random Access Memory), electric carrier signal, telecommunications signal and software distribution medium.
  • ROM read-only memory
  • RAM random access memory
  • electric carrier signal telecommunications signal and software distribution medium.
  • U disk mobile hard disk, floppy disk or CD-ROM, etc.
  • computer-readable media cannot be electrical carrier signals and telecommunication signals.

Landscapes

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

Abstract

The present application is suitable for the technical field of smart home, and provides a wireless network information configuration method and apparatus for a device. The method comprises: if it is detected that it is impossible to access a wireless network, enabling a wireless hotspot function; broadcasting information request data by means of the wireless hotspot function; receiving network information data fed back by a second terminal device according to the information request data, the network information data being generated by the second terminal device after checking according to the information request data and sent to a first terminal device; and configuring the first terminal device according to configuration information in the network information data. The wireless hotspot function is enabled and the information request data is broadcasted, so that the second terminal device can feed back the network information data according to the information request data, and therefore, the first terminal device can be configured according to the network information data, which prevents a user from manually configurating each first terminal device, and improves the efficiency of configuring the first terminal device.

Description

设备无线网络信息配置方法及装置Device wireless network information configuration method and device
本申请要求于2020年2月18日提交国家知识产权局、申请号为2020100993414、申请名称为“设备无线网络信息配置方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the State Intellectual Property Office on February 18, 2020, the application number is 2020100993414, and the application name is "Device wireless network information configuration method and device", the entire content of which is incorporated herein by reference Applying.
技术领域Technical field
本申请属于智能家居技术领域,尤其涉及一种设备无线网络信息配置方法及装置。This application belongs to the field of smart home technology, and in particular relates to a device wireless network information configuration method and device.
背景技术Background technique
随着物联网(The Internet of Things,IOT)的不断发展,在日常生活中,各种IOT设备均可以加入局域网中,而用户则可以通过终端设备在局域网中对各个IOT设备进行控制,使得各个IOT设备实现不同的功能。With the continuous development of the Internet of Things (IOT), in daily life, various IOT devices can be added to the local area network, and users can control each IOT device in the local area network through the terminal device, making each IOT The equipment implements different functions.
相关技术中,各个IOT设备加入局域网后,若局域网的网络信息发生变化,例如,局域网的服务集标识(Service Set Identifier,SSID)或者网络密码发生变化,则每个IOT设备无法再次接入局域网,对于每个无法接入局域网的IOT设备,IOT设备可以开启无线热点,用户持有的终端设备则可以接入该无线热点,从而与IOT设备建立无线连接,并根据变化后的网络信息对IOT设备进行配置,使得配置后的IOT设备可以重新加入局域网。In related technologies, after each IOT device joins the local area network, if the network information of the local area network changes, for example, the service set identifier (SSID) of the local area network or the network password changes, each IOT device cannot access the local area network again. For each IOT device that cannot access the LAN, the IOT device can turn on the wireless hotspot, and the terminal device held by the user can access the wireless hotspot, thereby establishing a wireless connection with the IOT device, and responding to the IOT device according to the changed network information Perform configuration so that the configured IOT device can rejoin the LAN.
但是,在对IOT设备进行配置的过程中,需要对每个IOT设备重复相同的操作进行配置,导致配置IOT设备步骤较多,效率较低。However, in the process of configuring the IOT device, it is necessary to repeat the same operation for each IOT device to configure, resulting in more steps for configuring the IOT device and lower efficiency.
发明内容Summary of the invention
本申请实施例提供了一种设备无线网络信息配置方法及装置,可以解决对IOT设备进行配置的效率较低的问题。The embodiments of the present application provide a device wireless network information configuration method and device, which can solve the problem of low efficiency in configuring IOT devices.
第一方面,本申请实施例提供了一种设备无线网络信息配置方法,应用于无线网络中的第一终端设备,包括:In the first aspect, an embodiment of the present application provides a device wireless network information configuration method, which is applied to a first terminal device in a wireless network, and includes:
若检测到无法接入所述无线网络,则开启无线热点功能;If it is detected that the wireless network cannot be accessed, turn on the wireless hotspot function;
通过所述无线热点功能,广播信息请求数据,所述信息请求数据用于请求所述无线网络的网络信息;Broadcast information request data through the wireless hotspot function, and the information request data is used to request network information of the wireless network;
接收第二终端设备根据所述信息请求数据反馈的网络信息数据,所述网络信息数据是所述第二终端设备在根据所述信息请求数据进行校验后生成并向所述第一终端设备发送的;Receive network information data fed back by a second terminal device according to the information request data, where the network information data is generated by the second terminal device after checking according to the information request data and sent to the first terminal device of;
根据所述网络信息数据中的配置信息,对所述第一终端设备进行配置。Configure the first terminal device according to the configuration information in the network information data.
在第一方面的第一种可能的实现方式中,所述信息请求数据包括热点标识、会话标识和终端地址,所述热点标识用于指示所述第一终端设备无法接入所述无线网络,所述会话标识用于标识所述第一终端设备,所述终端地址用于表示所述第一终端设备的物理地址;In a first possible implementation manner of the first aspect, the information request data includes a hotspot identifier, a session identifier, and a terminal address, and the hotspot identifier is used to indicate that the first terminal device cannot access the wireless network, The session identifier is used to identify the first terminal device, and the terminal address is used to indicate the physical address of the first terminal device;
所述通过所述无线热点功能,广播信息请求数据,包括:The broadcasting information request data through the wireless hotspot function includes:
获取所述热点标识、所述会话标识和所述终端地址;Acquiring the hotspot identifier, the session identifier, and the terminal address;
根据所述热点标识、所述会话标识和所述终端地址,生成所述信息请求数据;Generating the information request data according to the hotspot identifier, the session identifier, and the terminal address;
周期性地广播所述信息请求数据。The information request data is broadcast periodically.
基于第一方面的第一种可能的实现方式,在第一方面的第二种可能的实现方式中,所述根据所述热点标识、所述会话标识和所述终端地址,生成所述信息请求数据,包括:Based on the first possible implementation manner of the first aspect, in the second possible implementation manner of the first aspect, the information request is generated according to the hotspot identifier, the session identifier, and the terminal address Data, including:
根据预先存储的公私钥对对所述会话标识和所述终端地址加密,得到加密后的会话标识和加密后的终端地址;Encrypting the session identifier and the terminal address according to a pre-stored public and private key pair to obtain an encrypted session identifier and an encrypted terminal address;
根据所述热点标识、所述加密后的会话标识和所述加密后的终端地址,生成所述信息请求数据。The information request data is generated according to the hotspot identifier, the encrypted session identifier, and the encrypted terminal address.
在第一方面的第三种可能的实现方式中,所述根据所述网络信息数据中的配置信息,对所述第一终端设备进行配置,包括:In a third possible implementation manner of the first aspect, the configuring the first terminal device according to the configuration information in the network information data includes:
根据预先存储的公私钥对,对所述网络信息数据进行校验,确定所述网络信息数据是否与所述第一终端设备相匹配;Verifying the network information data according to the pre-stored public and private key pair to determine whether the network information data matches the first terminal device;
若所述网络信息数据与所述第一终端设备相匹配,从所述网络信息数据中获取所述配置信息;If the network information data matches the first terminal device, obtain the configuration information from the network information data;
根据所述配置信息对所述第一终端设备进行配置。Configure the first terminal device according to the configuration information.
基于第一方面的第三种可能的实现方式,在第一方面的第四种可能的实现方式中,所述根据预先存储的公私钥对,对所述网络信息数据进行校验,确定所述网络信息数据是否与所述第一终端设备相匹配,包括:Based on the third possible implementation manner of the first aspect, in the fourth possible implementation manner of the first aspect, the network information data is verified according to a pre-stored public and private key pair to determine that the Whether the network information data matches the first terminal device includes:
根据所述公私钥对,对所述网络信息数据进行解密,得到待匹配会话标识和备选配置信息;Decrypt the network information data according to the public and private key pair to obtain the session identifier to be matched and the candidate configuration information;
将所述会话标识和所述待匹配会话标识进行比较;Comparing the session identifier with the to-be-matched session identifier;
若所述会话标识和所述待匹配会话标识一致,则确定所述网络信息数据与所述第一终端设备相匹配;If the session identifier is consistent with the session identifier to be matched, determining that the network information data matches the first terminal device;
若所述会话标识和所述待匹配会话标识不一致,则确定所述网络信息数据与所述第一终端设备不匹配;If the session identifier and the session identifier to be matched are inconsistent, determining that the network information data does not match the first terminal device;
所述若所述网络信息数据与所述第一终端设备相匹配,从所述网络信息数据中获取所述配置信息,包括:If the network information data matches the first terminal device, obtaining the configuration information from the network information data includes:
若所述网络信息数据与所述第一终端设备相匹配,则将所述备选配置信息作为所述配置信息。If the network information data matches the first terminal device, use the candidate configuration information as the configuration information.
在第一方面的第五种可能的实现方式中,所述配置信息包括所述无线网络的标识信息和网络密码;In a fifth possible implementation manner of the first aspect, the configuration information includes identification information and a network password of the wireless network;
在所述根据所述网络信息数据中的配置信息,对所述第一终端设备进行配置之后,所述方法还包括:After the configuring the first terminal device according to the configuration information in the network information data, the method further includes:
根据所述标识信息查找所述无线网络;Searching for the wireless network according to the identification information;
根据所述网络密码,接入所述无线网络。Access the wireless network according to the network password.
在第一方面的第六种可能的实现方式中,在所述开启无线热点功能之前,所述方法还包括:In a sixth possible implementation manner of the first aspect, before the enabling the wireless hotspot function, the method further includes:
获取公私钥对,所述公私钥对是所述第二终端设备接入历史无线网络时生成的,所述历史无线网络为所述配置信息变化之前的所述无线网络。Obtain a public-private key pair, where the public-private key pair is generated when the second terminal device accesses a historical wireless network, and the historical wireless network is the wireless network before the configuration information is changed.
第二方面,本申请实施例提供了一种设备无线网络信息配置方法,应用于无线网络的第二终端设备,包括:In the second aspect, the embodiments of the present application provide a device wireless network information configuration method, which is applied to a second terminal device of a wireless network, and includes:
接收第一终端设备发送的信息请求数据,所述信息请求数据是所述第一终端设备在检测到无法接入所述无线网络后通过开启的热点功能广播发送的;Receiving information request data sent by a first terminal device, the information request data being broadcast and sent by the first terminal device through an activated hotspot function after detecting that the first terminal device cannot access the wireless network;
根据所述信息请求数据和所述第二终端设备的配置信息,生成网络信息数据;Generating network information data according to the information request data and the configuration information of the second terminal device;
通过所述第一终端设备开启的热点功能,向所述第一终端设备发送所述网络信息数据,所述网络信息数据用于指示所述第一终端设备根据所述网络信息数据中的所述配置信息接入所述无线网络。The network information data is sent to the first terminal device through the hotspot function activated by the first terminal device, and the network information data is used to instruct the first terminal device according to the information in the network information data. The configuration information is connected to the wireless network.
在第二方面的第一种可能的实现方式中,所述信息请求数据包括热点标识、会话标识,所述热点标识用于指示所述第一终端设备无法接入所述无线网络,所述会话标识用于标识所述第一终端设备;In a first possible implementation manner of the second aspect, the information request data includes a hotspot identifier and a session identifier, and the hotspot identifier is used to indicate that the first terminal device cannot access the wireless network, and the session The identifier is used to identify the first terminal device;
所述根据所述信息请求数据和所述第二终端设备的配置信息,生成网络信息数据,包括:The generating network information data according to the information request data and the configuration information of the second terminal device includes:
若所述热点标识指示所述第一终端设备无法接入所述无线网络,根据预先存储的公私钥对对所述信息请求数据进行校验,确定所述第二终端设备是否具有配置所述第一终端设备的权限;If the hotspot identifier indicates that the first terminal device cannot access the wireless network, the information request data is verified according to the pre-stored public and private keys to determine whether the second terminal device has the configuration of the first terminal device. 1. The authority of the terminal device;
若所述第二终端设备具有配置所述第一终端设备的权限,获取所述第二终端设备的配置信息;If the second terminal device has the authority to configure the first terminal device, acquiring configuration information of the second terminal device;
根据所述配置信息和所述会话标识,生成所述网络信息数据。The network information data is generated according to the configuration information and the session identifier.
基于第二方面的第一种可能的实现方式,在第二方面的第二种可能的实现方式中,所述根据所述配置信息和所述会话标识,生成所述网络信息数据,包括:Based on the first possible implementation manner of the second aspect, in the second possible implementation manner of the second aspect, the generating the network information data according to the configuration information and the session identifier includes:
根据所述公私钥对对所述配置信息和所述会话标识进行加密,得到加密后的配置信息和加密后的会话标识;Encrypting the configuration information and the session identifier according to the public and private keys to obtain the encrypted configuration information and the encrypted session identifier;
根据所述加密后的配置信息和所述加密后的会话标识,生成所述网络信息数据。The network information data is generated according to the encrypted configuration information and the encrypted session identifier.
基于第二方面的第一种可能的实现方式,在第二方面的第三种可能的实现方式中,所述获取所述第二终端设备的配置信息,包括:Based on the first possible implementation manner of the second aspect, in the third possible implementation manner of the second aspect, the acquiring configuration information of the second terminal device includes:
判断所述第二终端设备是否接入所述无线网络;Judging whether the second terminal device accesses the wireless network;
若所述第二终端设备已经接入所述无线网络,获取所述第二终端设备的所述配置信息。If the second terminal device has accessed the wireless network, acquiring the configuration information of the second terminal device.
基于第二方面的第三种可能的实现方式,在第二方面的第四种可能的实现方式中,所述方法还包括:Based on the third possible implementation manner of the second aspect, in the fourth possible implementation manner of the second aspect, the method further includes:
若所述第二终端设备并未接入所述无线网络,根据所述配置信息接入所述无线网络;If the second terminal device does not access the wireless network, access the wireless network according to the configuration information;
若成功接入所述无线网络,获取所述配置信息。If successfully accessing the wireless network, obtain the configuration information.
第三方面,本申请实施例提供了一种设备无线网络信息配置装置,应用于无线网络中的第一终端设备,包括:In a third aspect, an embodiment of the present application provides a device wireless network information configuration device, which is applied to a first terminal device in a wireless network, and includes:
功能开启模块,用于若检测到无法接入所述无线网络,则开启无线热点功能;The function enabling module is used to enable the wireless hotspot function if it is detected that the wireless network cannot be accessed;
广播模块,用于通过所述无线热点功能,广播信息请求数据,所述信息请求数据用于请求所述无线网络的网络信息;The broadcasting module is configured to broadcast information request data through the wireless hotspot function, and the information request data is used to request network information of the wireless network;
接收模块,用于接收第二终端设备根据所述信息请求数据反馈的网络信息数据,所述网络信息数据是所述第二终端设备在根据所述信息请求数据进行校验后生成并向所述第一终端设备发送的;The receiving module is configured to receive network information data fed back by the second terminal device according to the information request data, and the network information data is generated by the second terminal device after verification according to the information request data and sent to the Sent by the first terminal device;
配置模块,用于根据所述网络信息数据中的配置信息,对所述第一终端设备进行配置。The configuration module is used to configure the first terminal device according to the configuration information in the network information data.
在第三方面的第一种可能的实现方式中,所述信息请求数据包括热点标识、会话标识和终端地址,所述热点标识用于指示所述第一终端设备无法接入所述无线网络,所述会话标识用于标识所述第一终端设备,所述终端地址用于表示所述第一终端设备的物理地址;In a first possible implementation manner of the third aspect, the information request data includes a hotspot identifier, a session identifier, and a terminal address, and the hotspot identifier is used to indicate that the first terminal device cannot access the wireless network, The session identifier is used to identify the first terminal device, and the terminal address is used to indicate the physical address of the first terminal device;
所述广播模块,具体用于获取所述热点标识、所述会话标识和所述终端地址;根据所述热点标识、所述会话标识和所述终端地址,生成所述信息请求数据;周期性地广播所述信息请求数据。The broadcasting module is specifically configured to obtain the hotspot identifier, the session identifier, and the terminal address; generate the information request data according to the hotspot identifier, the session identifier, and the terminal address; periodically Broadcast the information request data.
基于第三方面的第一种可能的实现方式,在第三方面的第二种可能的实现方式中,所述广播模块,还具体用于根据预先存储的公私钥对对所述会话标识和所述终端地址加密,得到加密后的会话标识和加密后的终端地址;根据所述热点标识、所述加密后的会话标识和所述加密后的终端地址,生成所述信息请求数据。Based on the first possible implementation manner of the third aspect, in the second possible implementation manner of the third aspect, the broadcast module is further specifically configured to compare the session identifier and the shared key according to a pre-stored public and private key pair. The terminal address is encrypted to obtain an encrypted session identifier and an encrypted terminal address; according to the hotspot identifier, the encrypted session identifier, and the encrypted terminal address, the information request data is generated.
在第三方面的第三种可能的实现方式中,所述配置模块,具体用于根据预先存储的公私钥对,对所述网络信息数据进行校验,确定所述网络信息数据是否与所述第一终端设备相匹配;若所述网络信息数据与所述第一终端设备相匹配,从所述网络信息数据中获取所述配置信息;根据所述配置信息对所述第一终端设备进行配置。In a third possible implementation manner of the third aspect, the configuration module is specifically configured to verify the network information data according to a pre-stored public and private key pair to determine whether the network information data is consistent with the The first terminal device matches; if the network information data matches the first terminal device, obtain the configuration information from the network information data; configure the first terminal device according to the configuration information .
基于第三方面的第三种可能的实现方式,在第三方面的第四种可能的实现方式中,所述配置模块,还具体用于根据所述公私钥对,对所述网络信息数据进行解密,得到待匹配会话标识和备选配置信息;将所述会话标识和所述待匹配会话标识进行比较;若所述会话标识和所述待匹配会话标识一致,则确定所述网络信息数据与所述第一终端设备相匹配;若所述会话标识和所述待匹配会话标识不一致,则确定所述网络信息数据与所述第一终端设备不匹配;Based on the third possible implementation manner of the third aspect, in the fourth possible implementation manner of the third aspect, the configuration module is further specifically configured to perform network information data processing according to the public and private key pair. Decrypt to obtain the session identifier to be matched and the candidate configuration information; compare the session identifier with the session identifier to be matched; if the session identifier and the session identifier to be matched are consistent, it is determined that the network information data is consistent with The first terminal device matches; if the session identifier and the to-be-matched session identifier are inconsistent, it is determined that the network information data does not match the first terminal device;
所述配置模块,还具体用于若所述网络信息数据与所述第一终端设备相匹配,则将所述备选配置信息作为所述配置信息。The configuration module is further specifically configured to use the candidate configuration information as the configuration information if the network information data matches the first terminal device.
在第三方面的第五种可能的实现方式中,所述配置信息包括所述无线网络的标识信息和网络密码;In a fifth possible implementation manner of the third aspect, the configuration information includes identification information and a network password of the wireless network;
所述装置还包括:The device also includes:
查找模块,用于根据所述标识信息查找所述无线网络;A searching module for searching the wireless network according to the identification information;
连接模块,用根据所述网络密码,接入所述无线网络。The connection module uses the network password to access the wireless network.
在第三方面的第六种可能的实现方式中,所述装置还包括:In a sixth possible implementation manner of the third aspect, the device further includes:
获取模块,用于获取公私钥对,所述公私钥对是所述第二终端设备接入历史无线网络时生成的,所述历史无线网络为所述配置信息变化之前的所述无线网络。The obtaining module is configured to obtain a public-private key pair, the public-private key pair is generated when the second terminal device accesses a historical wireless network, and the historical wireless network is the wireless network before the configuration information is changed.
第四方面,本申请实施例提供了一种设备无线网络信息配置装置,应用于无线网 络的第二终端设备,包括:In a fourth aspect, an embodiment of the present application provides a device wireless network information configuration device, which is applied to a second terminal device of a wireless network, and includes:
接收模块,用于接收第一终端设备发送的信息请求数据,所述信息请求数据是所述第一终端设备在检测到无法接入所述无线网络后通过开启的热点功能广播发送的;A receiving module, configured to receive information request data sent by a first terminal device, the information request data being broadcast by the first terminal device after detecting that it cannot access the wireless network through an enabled hotspot function;
生成模块,用于根据所述信息请求数据和所述第二终端设备的配置信息,生成网络信息数据;A generating module, configured to generate network information data according to the information request data and the configuration information of the second terminal device;
发送模块,用于通过所述第一终端设备开启的热点功能,向所述第一终端设备发送所述网络信息数据,所述网络信息数据用于指示所述第一终端设备根据所述网络信息数据中的所述配置信息接入所述无线网络。The sending module is configured to send the network information data to the first terminal device through the hotspot function activated by the first terminal device, and the network information data is used to instruct the first terminal device to perform the The configuration information in the data is connected to the wireless network.
在第四方面的第一种可能的实现方式中,所述信息请求数据包括热点标识、会话标识,所述热点标识用于指示所述第一终端设备无法接入所述无线网络,所述会话标识用于标识所述第一终端设备;In a first possible implementation manner of the fourth aspect, the information request data includes a hotspot identifier and a session identifier, and the hotspot identifier is used to indicate that the first terminal device cannot access the wireless network, and the session The identifier is used to identify the first terminal device;
所述生成模块,具体用于若所述热点标识指示所述第一终端设备无法接入所述无线网络,根据预先存储的公私钥对对所述信息请求数据进行校验,确定所述第二终端设备是否具有配置所述第一终端设备的权限;若所述第二终端设备具有配置所述第一终端设备的权限,获取所述第二终端设备的配置信息;根据所述配置信息和所述会话标识,生成所述网络信息数据。The generating module is specifically configured to, if the hotspot identifier indicates that the first terminal device cannot access the wireless network, verify the information request data according to a pre-stored public and private key to determine the second Whether the terminal device has the authority to configure the first terminal device; if the second terminal device has the authority to configure the first terminal device, obtain the configuration information of the second terminal device; The session identifier is used to generate the network information data.
基于第四方面的第一种可能的实现方式,在第四方面的第二种可能的实现方式中,所述生成模块,还具体用于根据所述公私钥对对所述配置信息和所述会话标识进行加密,得到加密后的配置信息和加密后的会话标识;根据所述加密后的配置信息和所述加密后的会话标识,生成所述网络信息数据。Based on the first possible implementation manner of the fourth aspect, in the second possible implementation manner of the fourth aspect, the generation module is further specifically configured to compare the configuration information and the configuration information according to the public and private key pair. The session identifier is encrypted to obtain the encrypted configuration information and the encrypted session identifier; according to the encrypted configuration information and the encrypted session identifier, the network information data is generated.
基于第四方面的第一种可能的实现方式,在第四方面的第三种可能的实现方式中,所述生成模块,还具体用于判断所述第二终端设备是否接入所述无线网络;若所述第二终端设备已经接入所述无线网络,获取所述第二终端设备的所述配置信息。Based on the first possible implementation manner of the fourth aspect, in the third possible implementation manner of the fourth aspect, the generating module is further specifically configured to determine whether the second terminal device is connected to the wireless network ; If the second terminal device has access to the wireless network, obtain the configuration information of the second terminal device.
基于第四方面的第三种可能的实现方式,在第四方面的第四种可能的实现方式中,所述装置还包括:Based on the third possible implementation manner of the fourth aspect, in the fourth possible implementation manner of the fourth aspect, the apparatus further includes:
连接模块,用于若所述第二终端设备并未接入所述无线网络,根据所述配置信息接入所述无线网络;A connection module, configured to access the wireless network according to the configuration information if the second terminal device is not connected to the wireless network;
获取模块,用于若成功接入所述无线网络,获取所述配置信息。The obtaining module is configured to obtain the configuration information if the wireless network is successfully accessed.
第五方面,本申请实施例提供了一种终端设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如上述第一方面和第二方面中任一项所述的设备无线网络信息配置方法。In a fifth aspect, an embodiment of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, The device wireless network information configuration method according to any one of the first aspect and the second aspect is implemented.
第六方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如上述第一方面和第二方面中任一项所述的设备无线网络信息配置方法。In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium that stores a computer program, and the computer program is characterized in that, when the computer program is executed by a processor, the above-mentioned first aspect and The device wireless network information configuration method described in any one of the second aspect.
第七方面,本申请实施例提供了一种计算机程序产品,当计算机程序产品在终端设备上运行时,使得终端设备执行上述第一方面或第二方面中任一项所述的设备无线网络信息配置方法。In a seventh aspect, the embodiments of the present application provide a computer program product, which when the computer program product runs on a terminal device, causes the terminal device to execute the device wireless network information described in any one of the first aspect or the second aspect. Configuration method.
本申请实施例与现有技术相比存在的有益效果是:Compared with the prior art, the embodiments of this application have the following beneficial effects:
本申请实施例在检测到第一终端设备无法接入无线网络时,第一终端设备开启无 线热点功能,并通过该无线热点功能,广播信息请求数据,相应的,第二终端设备可以接收并根据该信息请求数据生成网络信息数据,再向第一终端设备发送该网络信息数据,第一终端设备则可以接收第二终端设备根据信息请求数据反馈的网络信息数据,并根据网络信息数据中的配置信息,对第一终端设备进行配置。上述技术方案中,通过开启无线热点功能并广播信息请求数据,使得第二终端设备可以根据该信息请求数据反馈网络信息数据,从而,第一终端设备可以根据该网络信息数据进行配置,避免了用户对每个第一终端设备执行手动配置的操作,提高了对第一终端设备进行配置的效率。In the embodiment of the application, when it is detected that the first terminal device cannot access the wireless network, the first terminal device turns on the wireless hotspot function, and broadcasts the information request data through the wireless hotspot function. Accordingly, the second terminal device can receive and request data according to The information request data generates network information data, and then sends the network information data to the first terminal device. The first terminal device can receive the network information data fed back by the second terminal device according to the information request data, and according to the configuration in the network information data Information, configure the first terminal device. In the above technical solution, by enabling the wireless hotspot function and broadcasting the information request data, the second terminal device can feed back network information data according to the information request data, so that the first terminal device can configure the network information data according to the network information data, which avoids users Performing the manual configuration operation on each first terminal device improves the efficiency of configuring the first terminal device.
附图说明Description of the drawings
图1是本申请实施例提供的设备无线网络信息配置方法所涉及的设备配置系统的系统示意图;FIG. 1 is a system schematic diagram of a device configuration system involved in a device wireless network information configuration method provided by an embodiment of the present application;
图2是本申请实施例提供的手机的部分结构的框图;FIG. 2 is a block diagram of a part of the structure of a mobile phone provided by an embodiment of the present application;
图3是本申请实施例提供的一种设备无线网络信息配置方法的示意性流程图;FIG. 3 is a schematic flowchart of a method for configuring wireless network information of a device according to an embodiment of the present application;
图4是本申请实施例提供的一种信标帧的示意图;FIG. 4 is a schematic diagram of a beacon frame provided by an embodiment of the present application;
图5是本申请实施例提供的一种生成网络信息数据的示意性流程图;FIG. 5 is a schematic flowchart of generating network information data according to an embodiment of the present application;
图6是本申请实施例提供的一种行为帧的示意图;FIG. 6 is a schematic diagram of a behavior frame provided by an embodiment of the present application;
图7是本申请实施例提供的一种对第一终端设备进行配置的示意性流程图;FIG. 7 is a schematic flowchart of configuring a first terminal device according to an embodiment of the present application;
图8是本申请实施例提供的一种设备无线网络信息配置装置的结构框图;FIG. 8 is a structural block diagram of a device wireless network information configuration device provided by an embodiment of the present application;
图9是本申请实施例提供的另一种设备无线网络信息配置装置的结构框图;FIG. 9 is a structural block diagram of another device wireless network information configuration device provided by an embodiment of the present application;
图10是本申请实施例提供的又一种设备无线网络信息配置装置的结构框图;10 is a structural block diagram of another device wireless network information configuration device provided by an embodiment of the present application;
图11是本申请实施例提供的又一种设备无线网络信息配置装置的结构框图;11 is a structural block diagram of another device wireless network information configuration device provided by an embodiment of the present application;
图12是本申请一实施例提供的终端设备的结构示意图。FIG. 12 is a schematic structural diagram of a terminal device provided by an embodiment of the present application.
具体实施方式Detailed ways
以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、技术之类的具体细节,以便透彻理解本申请实施例。然而,本领域的技术人员应当清楚,在没有这些具体细节的其它实施例中也可以实现本申请。在其它情况中,省略对众所周知的系统、装置、电路以及方法的详细说明,以免不必要的细节妨碍本申请的描述。In the following description, for the purpose of illustration rather than limitation, specific details such as a specific system structure and technology are proposed for a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid unnecessary details from obstructing the description of this application.
以下实施例中所使用的术语只是为了描述特定实施例的目的,而并非旨在作为对本申请的限制。如在本申请的说明书和所附权利要求书中所使用的那样,单数表达形式“一个”、“一种”、“所述”、“上述”、“该”和“这一”旨在也包括例如“一个或多个”这种表达形式,除非其上下文中明确地有相反指示。还应当理解,在本申请实施例中,“一个或多个”是指一个、两个或两个以上;“和/或”,描述关联对象的关联关系,表示可以存在三种关系;例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A、B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。The terms used in the following embodiments are only for the purpose of describing specific embodiments, and are not intended to limit the application. As used in the specification and appended claims of this application, the singular expressions "a", "an", "said", "above", "the" and "this" are intended to also This includes expressions such as "one or more" unless the context clearly indicates to the contrary. It should also be understood that in the embodiments of the present application, "one or more" refers to one, two, or more than two; "and/or" describes the association relationship of associated objects, indicating that there may be three relationships; for example, A and/or B can mean the situation where A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character "/" generally indicates that the associated objects before and after are in an "or" relationship.
本申请实施例提供的设备无线网络信息配置方法可以应用于手机、平板电脑、可穿戴设备、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、个人数字助理(personal digital assistant,PDA)等终端设备上,本申请实施例对终端设备的 具体类型不作任何限制。The device wireless network information configuration method provided by the embodiments of this application can be applied to mobile phones, tablet computers, wearable devices, augmented reality (AR)/virtual reality (VR) devices, notebook computers, and super mobile personal computers For terminal devices (ultra-mobile personal computer, UMPC), netbooks, and personal digital assistants (personal digital assistant, PDA), the embodiments of this application do not impose any restrictions on the specific types of terminal devices.
例如,所述终端设备可以是WLAN中的站点(STAION,ST),可以是蜂窝电话、无绳电话、会话启动协议(Session InitiationProtocol,SIP)电话、个人数字处理(Personal Digital Assistant,PDA)设备、具有无线通信功能的手持设备、计算设备或连接到无线调制解调器的其它处理设备、电脑、膝上型计算机、手持式通信设备、手持式计算设备、卫星无线设备、无线调制解调器卡、电视机顶盒(set top box,STB)等。For example, the terminal device may be a station (STAION, ST) in a WLAN, a cellular phone, a cordless phone, a Session Initiation Protocol (SIP) phone, a Personal Digital Assistant (PDA) device, Wireless communication function handheld devices, computing devices or other processing devices connected to wireless modems, computers, laptop computers, handheld communication devices, handheld computing devices, satellite wireless devices, wireless modem cards, TV set top boxes , STB) and so on.
作为示例而非限定,当所述终端设备为可穿戴设备时,该可穿戴设备还可以是应用穿戴式技术对日常穿戴进行智能化设计、开发出可以穿戴的设备的总称,如眼镜、手套、手表、服饰及鞋等。可穿戴设备即直接穿在身上,或是整合到用户的衣服或配件的一种便携式设备。可穿戴设备不仅仅是一种硬件设备,更是通过软件支持以及数据交互、云端交互来实现强大的功能。广义穿戴式智能设备包括功能全、尺寸大、可不依赖智能手机实现完整或者部分的功能,如智能手表或智能眼镜等,以及只专注于某一类应用功能,需要和其它设备如智能手机配合使用,如各类进行体征监测的智能手环、智能首饰等。As an example and not a limitation, when the terminal device is a wearable device, the wearable device can also be a general term for applying wearable technology to intelligently design daily wear and develop wearable devices, such as glasses, gloves, Watches, clothing and shoes, etc. A wearable device is a portable device that is directly worn on the body or integrated into the user's clothes or accessories. Wearable devices are not only a kind of hardware device, but also realize powerful functions through software support, data interaction, and cloud interaction. In a broad sense, wearable smart devices include full-featured, large-sized, complete or partial functions that can be implemented without relying on smart phones, such as smart watches or smart glasses, and only focus on a certain type of application function, and need to be used in conjunction with other devices such as smart phones. , Such as all kinds of smart bracelets and smart jewelry for physical sign monitoring.
图1是本申请实施例提供的设备无线网络信息配置方法所涉及的设备配置系统的系统示意图,如图1所示,该设备配置系统中可以包括:至少一个第一终端设备110、至少一个第二终端设备120和路由器130。FIG. 1 is a system schematic diagram of a device configuration system involved in a device wireless network information configuration method provided by an embodiment of the present application. As shown in FIG. 1, the device configuration system may include: at least one first terminal device 110, and at least one first terminal device 110; Two terminal equipment 120 and router 130.
其中,路由器与互联网连接,可以提供无线网络;每个第一终端设备和每个第二终端设备均可以与路由器无线连接,从而加入路由器提供的无线网络。第一终端设备可以为不方便修改配置信息的终端设备,如电视、空调和洗衣机等物联网设备;第二终端设备可以为方便修改配置信息的终端设备,如手机、笔记本电脑和平板电脑等物联网设备。Among them, the router is connected to the Internet to provide a wireless network; each first terminal device and each second terminal device can be connected to the router wirelessly, thereby joining the wireless network provided by the router. The first terminal device can be a terminal device that is inconvenient to modify configuration information, such as Internet of Things devices such as TVs, air conditioners, and washing machines; the second terminal device can be a terminal device that can easily modify configuration information, such as mobile phones, laptops, and tablets. Networking equipment.
在一种可能的实现方式中,各个第一终端设备和各个第二终端设备均可以接入路由器提供的历史无线网络,任意一个第一终端设备或任意一个第二终端设备在接入历史无线网络后,均可以生成公私钥对,并通过云端控制的方式,向无线网络中的其他各个第一终端设备和第二终端设备发送该公私钥对,以便后续可以通过该公私钥对确定各个终端设备是否具有配置其他终端设备的权限。In a possible implementation, each first terminal device and each second terminal device can access the historical wireless network provided by the router, and any one of the first terminal devices or any one of the second terminal devices is accessing the historical wireless network. After that, both public and private key pairs can be generated, and the public and private key pairs can be sent to each other first terminal device and second terminal device in the wireless network through cloud control, so that each terminal device can be determined by the public and private key pair later. Whether you have the authority to configure other terminal devices.
其中,云端控制的方式可以是通过路由器将公私钥对存储在云端,再由云端向其他各个第一终端设备和各个第二终端设备发送公私钥对。另外,还可以通过本地控制的方式向历史无线网络中的各个终端设备发送公私钥对,该本地控制的方式为将某个终端设备作为临时信任设备,则该临时信任设备可以通过路由器向历史无线网络内的其他各个终端设备发送公私钥对。The cloud control method may be to store the public-private key pair in the cloud through the router, and then the cloud sends the public-private key pair to each other first terminal device and each second terminal device. In addition, the public-private key pair can also be sent to each terminal device in the historical wireless network through a local control method. The local control method is to use a certain terminal device as a temporary trusted device. Each other terminal device in the network sends a public-private key pair.
若历史无线网络的网络信息(如SSID和/或网络密码)发生变化,形成新的无线网络,第二终端设备可以根据用户触发的操作,对第二终端设备的配置信息进行更新,并根据更新后的配置信息接入无线网络。If the network information of the historical wireless network (such as SSID and/or network password) changes to form a new wireless network, the second terminal device can update the configuration information of the second terminal device according to the operation triggered by the user, and according to the update After the configuration information is connected to the wireless network.
若多个第一终端设备并未对配置信息进行更新,则无法加入新的无线网络,那么可以开启无线热点功能,向无线网络中的其他终端设备广播信息请求数据。相对应的,接入无线网络的第二终端设备可以接收该信息请求数据,并根据该信息请求数据生成 并反馈网络信息数据,则未接入无线网络的各个第一终端设备可以接收反馈的网络信息数据,并根据网络信息数据携带的配置信息对第一终端设备的配置信息进行更新,完成对第一终端设备的配置,使得第一终端设备可以根据更新后的配置信息加入无线网络。If multiple first terminal devices have not updated the configuration information and cannot join a new wireless network, the wireless hotspot function can be turned on to broadcast information request data to other terminal devices in the wireless network. Correspondingly, a second terminal device connected to the wireless network can receive the information request data, and generate and feed back network information data according to the information request data, and each first terminal device that is not connected to the wireless network can receive the feedback network Information data, and update the configuration information of the first terminal device according to the configuration information carried in the network information data to complete the configuration of the first terminal device so that the first terminal device can join the wireless network according to the updated configuration information.
其中,第一终端设备可以采用公私钥对针对信息请求数据进行加密,第二终端设备则可以根据公私钥对对加密后的信息请求数据进行解密,并再次采用公私钥对对网络信息数据进行加密,而第一终端设备可以根据公私钥对对加密后网络信息数据进行解密,从而可以通过第二终端设备能否解密成功来确定第二终端设备是否具有配置第一终端设备的权限。Among them, the first terminal device can use the public and private keys to encrypt the information request data, and the second terminal device can decrypt the encrypted information request data according to the public and private keys, and again use the public and private keys to encrypt the network information data. , And the first terminal device can decrypt the encrypted network information data according to the public and private keys, so that whether the second terminal device has the authority to configure the first terminal device can be determined by whether the second terminal device can successfully decrypt.
需要说明的是,本申请实施例仅是以第二终端设备根据用户触发的操作对配置信息进行更新为例进行说明,但是在实际应用中,不但第二终端设备可以根据用户触发的操作对配置信息进行更新,第一终端设备也可以根据用户触发的操作对配置信息进行更新,而且,第一终端设备也可以向其他未接入无线网络的终端设备反馈网络信息数据,本申请实施例对此不做限定。It should be noted that the embodiment of the present application only takes the second terminal device to update the configuration information according to the user-triggered operation as an example for description, but in practical applications, not only the second terminal device can configure the configuration according to the user-triggered operation Information is updated, the first terminal device can also update the configuration information according to an operation triggered by the user, and the first terminal device can also feed back network information data to other terminal devices that are not connected to the wireless network. Not limited.
为了便于理解,本申请实施例中以所述第二终端设备为手机为例进行示例性说明。图2是本申请实施例提供的手机的部分结构的框图。参考图2,手机包括:射频(Radio Frequency,RF)电路210、存储器220、输入单元230、显示单元240、传感器250、音频电路260、无线保真(wireless fidelity,WiFi)模块270、处理器280、以及电源290等部件。本领域技术人员可以理解,图2中示出的手机结构并不构成对手机的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。For ease of understanding, in the embodiment of the present application, the second terminal device is a mobile phone as an example for exemplification. Fig. 2 is a block diagram of a part of the structure of a mobile phone provided by an embodiment of the present application. Referring to FIG. 2, the mobile phone includes: a radio frequency (RF) circuit 210, a memory 220, an input unit 230, a display unit 240, a sensor 250, an audio circuit 260, a wireless fidelity (WiFi) module 270, and a processor 280 , And power supply 290 and other components. Those skilled in the art can understand that the structure of the mobile phone shown in FIG. 2 does not constitute a limitation on the mobile phone, and may include more or less components than those shown in the figure, or a combination of some components, or different component arrangements.
下面结合图2对手机的各个构成部件进行具体的介绍:The following describes the components of the mobile phone in detail with reference to Figure 2:
RF电路210可用于收发信息或通话过程中,信号的接收和发送,特别地,将基站的下行信息接收后,给处理器280处理;另外,将设计上行的数据发送给基站。通常,RF电路包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器(Low Noise Amplifier,LNA)、双工器等。此外,RF电路210还可以通过无线通信与网络和其他设备通信。上述无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统(Global System of Mobile communication,GSM)、通用分组无线服务(General Packet Radio Service,GPRS)、码分多址(Code Division Multiple Access,CDMA)、宽带码分多址(Wideband Code Division Multiple Access,WCDMA)、长期演进(Long Term Evolution,LTE))、电子邮件、短消息服务(Short Messaging Service,SMS)等。The RF circuit 210 can be used for receiving and sending signals during the process of sending and receiving information or talking. In particular, after receiving the downlink information of the base station, it is processed by the processor 280; in addition, the designed uplink data is sent to the base station. Generally, the RF circuit includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (LNA), a duplexer, and the like. In addition, the RF circuit 210 can also communicate with the network and other devices through wireless communication. The above-mentioned 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 (Code Division) Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE)), Email, Short Messaging Service (SMS), etc.
存储器220可用于存储软件程序以及模块,处理器280通过运行存储在存储器220的软件程序以及模块,从而执行手机的各种功能应用以及数据处理。存储器220可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据手机的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器220可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory 220 may be used to store software programs and modules. The processor 280 executes various functional applications and data processing of the mobile phone by running the software programs and modules stored in the memory 220. The memory 220 may mainly include a program storage area and a data storage area. The program storage area may store an operating system, an application program required by at least one function (such as a sound playback function, an image playback function, etc.), etc.; Data created by the use of mobile phones (such as audio data, phone book, etc.), etc. In addition, the memory 220 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.
输入单元230可用于接收输入的数字或字符信息,以及产生与手机的用户设置以 及功能控制有关的键信号输入。具体地,输入单元230可包括触控面板231以及其他输入设备232。触控面板231,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板231上或在触控面板231附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触控面板231可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器280,并能接收处理器280发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板231。除了触控面板231,输入单元230还可以包括其他输入设备232。具体地,其他输入设备232可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。The input unit 230 can be used to receive inputted number or character information, and generate key signal input related to the user settings and function control of the mobile phone. Specifically, the input unit 230 may include a touch panel 231 and other input devices 232. The touch panel 231, also called a touch screen, can collect the user's touch operations on or near it (for example, the user uses any suitable objects or accessories such as fingers, stylus, etc.) on the touch panel 231 or near the touch panel 231. Operation), and drive the corresponding connection device according to the preset program. Optionally, the touch panel 231 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch position, detects the 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 it into contact coordinates, and then sends it To the processor 280, and can receive and execute the commands sent by the processor 280. In addition, the touch panel 231 can be implemented in multiple types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 231, the input unit 230 may also include other input devices 232. Specifically, the other input device 232 may include, but is not limited to, one or more of a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), trackball, mouse, and joystick.
显示单元240可用于显示由用户输入的信息或提供给用户的信息以及手机的各种菜单。显示单元240可包括显示面板241,可选的,可以采用液晶显示器(Liquid Crystal Display,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板241。进一步的,触控面板231可覆盖显示面板241,当触控面板231检测到在其上或附近的触摸操作后,传送给处理器280以确定触摸事件的类型,随后处理器280根据触摸事件的类型在显示面板241上提供相应的视觉输出。虽然在图2中,触控面板231与显示面板241是作为两个独立的部件来实现手机的输入和输入功能,但是在某些实施例中,可以将触控面板231与显示面板241集成而实现手机的输入和输出功能。The display unit 240 may be used to display information input by the user or information provided to the user and various menus of the mobile phone. The display unit 240 may include a display panel 241. Optionally, the display panel 241 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. Further, the touch panel 231 can cover the display panel 241. When the touch panel 231 detects a touch operation on or near it, it transmits it to the processor 280 to determine the type of the touch event, and then the processor 280 responds to the touch event. The type provides corresponding visual output on the display panel 241. Although in FIG. 2, the touch panel 231 and the display panel 241 are used as two independent components to realize the input and input functions of the mobile phone, but in some embodiments, the touch panel 231 and the display panel 241 may be integrated. Realize the input and output functions of the mobile phone.
WiFi属于短距离无线传输技术,手机通过WiFi模块270可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图2示出了WiFi模块270,但是可以理解的是,其并不属于手机的必须构成,完全可以根据需要在不改变发明的本质的范围内而省略。WiFi is a short-distance wireless transmission technology. The mobile phone can help users send and receive emails, browse web pages, and access streaming media through the WiFi module 270. It provides users with wireless broadband Internet access. Although FIG. 2 shows the WiFi module 270, it is understandable that it is not a necessary component of the mobile phone, and can be omitted as needed without changing the essence of the invention.
处理器280是手机的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在存储器220内的软件程序和/或模块,以及调用存储在存储器220内的数据,执行手机的各种功能和处理数据,从而对手机进行整体监控。可选的,处理器280可包括一个或多个处理单元;优选的,处理器280可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器280中。The processor 280 is the control center of the mobile phone. It uses various interfaces and lines to connect various parts of the entire mobile phone. Various functions and processing data of the mobile phone can be used to monitor the mobile phone as a whole. Optionally, the processor 280 may include one or more processing units; preferably, the processor 280 may integrate an application processor and a modem processor, where the application processor mainly processes the operating system, user interface, application programs, etc. , The modem processor mainly deals with wireless communication. It can be understood that the foregoing modem processor may not be integrated into the processor 280.
手机还包括给各个部件供电的电源290(比如电池),优选的,电源可以通过电源管理系统与处理器280逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。The mobile phone also includes a power source 290 (such as a battery) for supplying power to various components. Preferably, the power source can be logically connected to the processor 280 through a power management system, so that functions such as charging, discharging, and power consumption management can be managed through the power management system.
另外,尽管未示出,手机还可以包括蓝牙模块等,在此不再赘述。In addition, although not shown, the mobile phone may also include a Bluetooth module, etc., which will not be repeated here.
图3是本申请实施例提供的一种设备无线网络信息配置方法的示意性流程图,作为示例而非限定,该方法可以应用于上述第一终端设备和第二终端设备中,参见图3,该方法包括:FIG. 3 is a schematic flowchart of a device wireless network information configuration method provided by an embodiment of the present application. As an example and not a limitation, the method can be applied to the above-mentioned first terminal device and the second terminal device, see FIG. 3, The method includes:
步骤301、第一终端设备获取公私钥对。Step 301: The first terminal device obtains a public-private key pair.
其中,公私钥对是第二终端设备接入历史无线网络时生成的,该历史无线网络为配置信息变化之前的无线网络。例如,第一无线网络的网络信息发生变化,形成第二无线网络,则第一无线网络是历史无线网络,而第二无线网络为新的无线网络。The public-private key pair is generated when the second terminal device accesses the historical wireless network, and the historical wireless network is the wireless network before the configuration information is changed. For example, if the network information of the first wireless network changes to form a second wireless network, the first wireless network is a historical wireless network, and the second wireless network is a new wireless network.
第一终端设备在加入历史无线网络后,可以通过云端控制的方式获取第二终端设备生成的公私钥对,以便在后续步骤中,第一终端设备可以根据公私钥对对发送的数据进行加密,从而可以基于能否对加密的数据进行解密,确定第二终端设备是否具有配置第一终端设备的权限。After the first terminal device joins the historical wireless network, it can obtain the public-private key pair generated by the second terminal device through cloud control, so that in the subsequent steps, the first terminal device can encrypt the sent data according to the public and private keys. Therefore, it can be determined whether the second terminal device has the authority to configure the first terminal device based on whether the encrypted data can be decrypted.
在一种可能的实现方式中,第一终端设备和第二终端设备在加入历史无线网络完成配网后,第二终端设备可以生成公私钥对,并采用云端控制的方式,通过互联网向第一终端设备发送生成的公私钥对。相应的,第一终端设备则可以接收第二终端设备生成的公私钥对。In a possible implementation manner, after the first terminal device and the second terminal device have joined the historical wireless network to complete the network configuration, the second terminal device can generate a public and private key pair, and use the cloud control method to communicate to the first terminal device via the Internet. The terminal device sends the generated public and private key pair. Correspondingly, the first terminal device can receive the public-private key pair generated by the second terminal device.
需要说明的是,在实际应用中,第一终端设备可能与第二终端设备同时加入历史无线网络,则第二终端设备在生成公私钥对后,第一终端设备可以通过云端控制的方式获取公私钥对;第一终端设备也可能在第二终端设备生成公私钥对后加入历史无线网络,则在第一终端设备加入历史无线网络后,也可以通过云端控制的方式获取公私钥对。而且,第二终端设备生成公私钥对后,其他的第二终端设备也可以加入历史无线网络,则同样可以通过云端控制的方式向其他第二终端设备发送公私钥对。It should be noted that in practical applications, the first terminal device may join the historical wireless network at the same time as the second terminal device. After the second terminal device generates a public-private key pair, the first terminal device can obtain the public and private through cloud control. Key pair; the first terminal device may also join the historical wireless network after the public-private key pair is generated by the second terminal device. After the first terminal device joins the historical wireless network, the public-private key pair can also be obtained through cloud control. Moreover, after the public-private key pair is generated by the second terminal device, other second terminal devices can also join the historical wireless network, and the public-private key pair can also be sent to other second terminal devices in a cloud-controlled manner.
另外,第二终端设备可以周期性的对公私钥对进行维护和更新。例如,第二终端设备可以每隔一周或一个月重新生成公私钥对,并采用云端控制或本地控制的方式,向历史无线网络中的第一终端设备发送重新生成的公私钥对,从而完成对公私钥对的更新。In addition, the second terminal device can periodically maintain and update the public and private key pair. For example, the second terminal device can regenerate the public and private key pair every other week or month, and use cloud control or local control to send the regenerated public and private key pair to the first terminal device in the historical wireless network to complete the pairing. Update of public and private key pairs.
需要说明的是,本申请实施例仅是以一个第一终端设备和一个第二终端设备为例进行说明,但是在实际应用中,历史无线网络或变更网络信息的无线网络中均可以包括多个第一终端设备和多个第二终端设备,本申请实施例对第一终端设备和第二终端设备的数量均不做限定。It should be noted that the embodiment of the present application only takes one first terminal device and one second terminal device as an example for description, but in practical applications, historical wireless networks or wireless networks that change network information may include multiple wireless networks. For the first terminal device and multiple second terminal devices, the embodiment of the present application does not limit the number of the first terminal device and the second terminal device.
步骤302、第一终端设备若检测到无法接入无线网络,则开启无线热点功能。Step 302: If the first terminal device detects that it cannot access the wireless network, it turns on the wireless hotspot function.
第一终端设备可以根据记录的历史配置信息,加入历史无线网络。若历史无线网络的网络信息发生变化,则第一终端设备在尝试加入历史无线网络的过程中,由于历史配置信息与变化后的网络信息不匹配,则第一终端设备无法加入历史无线网络,也即是无法加入网络信息变化后形成的新的无线网络,第一终端设备可以开启无线热点功能,以便在后续步骤中,可以基于该无线热点功能获取更新后的无线网络的配置信息。The first terminal device may join the historical wireless network according to the recorded historical configuration information. If the network information of the historical wireless network changes, the first terminal device cannot join the historical wireless network because the historical configuration information does not match the changed network information in the process of trying to join the historical wireless network. That is, it is impossible to join a new wireless network formed after the network information changes, and the first terminal device can turn on the wireless hotspot function, so that in subsequent steps, the updated wireless network configuration information can be obtained based on the wireless hotspot function.
例如,第一终端设备若无法加入无线网络,则根据预先设置的文本信息,生成该无线热点的SSID,该文本信息可以表示第一终端设备无法加入无线网络,从而可以基于开启的无线热点功能,建立无线热点,以便能够通过该无线热点向第二终端设备发送包含有热点标识的信息请求数据。For example, if the first terminal device cannot join the wireless network, it generates the SSID of the wireless hotspot according to the preset text information. The text information may indicate that the first terminal device cannot join the wireless network, so it can be based on the wireless hotspot function that is turned on. The wireless hotspot is established so that the information request data including the hotspot identifier can be sent to the second terminal device through the wireless hotspot.
需要说明的是,若历史无线网络的网络信息并未发生变化,仅是由于网络问题、硬件问题或其他问题导致第一终端设备无法加入历史无线网络,则第一终端设备在周 期性开启无线热点功能时,还可以交替的周期性尝试加入历史无线网络。例如,若第一终端设备在时刻14:15:03确定无法加入历史无线网络,则可以在时刻14:15:04至时刻14:16:03的时间段内开启无线热点功能,并且停止尝试加入历史无线网络,在时刻14:16:04至时刻14:17:03的时间段内关闭热点功能,并再次尝试加入历史无线网络,循环上述过程直至第一终端设备加入无线网络或历史无线网络。It should be noted that if the network information of the historical wireless network has not changed, but the first terminal device cannot join the historical wireless network due to network problems, hardware problems, or other problems, the first terminal device is periodically turning on the wireless hotspot When functioning, you can also alternate and periodically try to join historical wireless networks. For example, if the first terminal device determines that it cannot join the historical wireless network at time 14:15:03, it can turn on the wireless hotspot function from time 14:15:04 to time 14:16:03 and stop trying to join Historical wireless network, turn off the hotspot function in the time period from time 14:16:04 to time 14:17:03, and try to join the historical wireless network again, and loop the above process until the first terminal device joins the wireless network or historical wireless network.
步骤303、第一终端设备通过无线热点功能,广播信息请求数据。Step 303: The first terminal device broadcasts the information request data through the wireless hotspot function.
其中,该信息请求数据用于请求无线网络的网络信息,该信息请求数据可以包括热点标识、会话标识和终端地址,该热点标识用于指示第一终端设备无法接入无线网络,该会话标识用于标识第一终端设备,该终端地址用于表示第一终端设备的物理地址。例如,该热点标识可以是根据无线热点的SSID生成的,该终端地址可以为媒体接入控制(Medium Access Control,MAC)地址。Wherein, the information request data is used to request network information of the wireless network. The information request data may include a hotspot identifier, a session identifier, and a terminal address. The hotspot identifier is used to indicate that the first terminal device cannot access the wireless network, and the session identifier is used To identify the first terminal device, the terminal address is used to indicate the physical address of the first terminal device. For example, the hotspot identifier may be generated according to the SSID of the wireless hotspot, and the terminal address may be a medium access control (MAC) address.
第一终端设备在开启无线热点功能后,则建立了一个无线热点,可以通过该无线热点向无线网络内的其他终端设备广播信息请求数据,以便其他接入无线网络或可以接入无线网络的终端设备,可以根据该信息请求数据向第一终端设备反馈更新后的无线网络的网络信息。After the first terminal device turns on the wireless hotspot function, a wireless hotspot is established, which can broadcast information request data to other terminal devices in the wireless network through the wireless hotspot, so that other terminals that can access the wireless network or can access the wireless network The device may feed back the updated network information of the wireless network to the first terminal device according to the information request data.
可选的,第一终端设备可以获取热点标识、会话标识和终端地址,并根据热点标识、会话标识和终端地址,生成所述信息请求数据,再周期性地广播信息请求数据。Optionally, the first terminal device may obtain the hotspot identifier, the session identifier, and the terminal address, and generate the information request data according to the hotspot identifier, the session identifier, and the terminal address, and then periodically broadcast the information request data.
在一种可能的实现方式中,第一终端设备可以根据无线热点的SSID生成热点标识,并根据第一终端设备生成会话标识,再将热点标识、会话标识以及预先存储的终端地址封装在无线热点发送的数据帧中,得到信息请求数据,再采用周期性广播的方式,广播生成的信息请求数据。In a possible implementation, the first terminal device may generate a hotspot identifier according to the SSID of the wireless hotspot, and generate a session identifier according to the first terminal device, and then encapsulate the hotspot identifier, the session identifier, and the pre-stored terminal address in the wireless hotspot In the sent data frame, the information request data is obtained, and then the generated information request data is broadcasted in a periodic broadcast manner.
进一步地,为了避免其他不具备配置权限的终端设备接收到该信息请求数据后进行反馈,第一终端设备在生成信息请求数据的过程中,可以根据预先存储的公私钥对,对会话标识和终端地址进行加密,使得其他无线网络的终端设备无法根据该公私钥对进行解密反馈。即第一终端设备可以根据预先存储的公私钥对对会话标识和终端地址加密,得到加密后的会话标识和加密后的终端地址,再根据热点标识、加密后的会话标识和加密后的终端地址,生成信息请求数据。Further, in order to prevent other terminal devices that do not have the configuration authority from receiving the information request data and feedback, the first terminal device may compare the session identifier and the terminal according to the pre-stored public and private key pair during the process of generating the information request data. The address is encrypted so that terminal devices on other wireless networks cannot perform decryption feedback based on the public and private key pair. That is, the first terminal device can encrypt the session ID and terminal address according to the pre-stored public and private key to obtain the encrypted session ID and the encrypted terminal address, and then according to the hot spot ID, the encrypted session ID and the encrypted terminal address , Generate information request data.
具体地,第一终端设备可以先从预先设置的存储空间中获取公私钥对,再根据该公私钥对中的公钥对会话标识和终端地址进行加密,得到加密后的会话标识和加密后的终端地址,再结合第一终端设备的热点标识进行封装,生成信息请求数据。Specifically, the first terminal device may first obtain a public-private key pair from a preset storage space, and then encrypt the session identifier and terminal address according to the public key in the public-private key pair to obtain the encrypted session identifier and the encrypted session identifier. The terminal address is combined with the hot spot identifier of the first terminal device for encapsulation to generate information request data.
例如,参见图4,第一终端设备可以将热点标识封装在信标(beacon)帧的必选字段中,并在信标帧的可选扩展字段的选项(option)字段中添加加密后的会话标识和加密后的终端地址。For example, referring to Figure 4, the first terminal device may encapsulate the hotspot identifier in a mandatory field of a beacon frame, and add an encrypted session to the option field of the optional extension field of the beacon frame. The terminal address after identification and encryption.
需要说明的是,本申请实施例仅是以先对会话标识和终端地址进行加密,再将热点标识、加密后的会话标识和加密后的终端地址一同封装在数据帧中,在实际应用中,也可以先将热点标识封装在数据帧的必选字段中,再对会话标识和终端地址进行加密,并将加密后的会话标识和加密后的终端地址封装在数据帧的可选扩展字段中,本申请实施例对封装加密的顺序不做限定。It should be noted that the embodiment of this application only encrypts the session identifier and terminal address first, and then encapsulates the hotspot identifier, the encrypted session identifier, and the encrypted terminal address in a data frame. In actual applications, You can also encapsulate the hotspot ID in the required field of the data frame, then encrypt the session ID and terminal address, and encapsulate the encrypted session ID and the encrypted terminal address in the optional extension field of the data frame. The embodiment of the present application does not limit the order of encapsulation and encryption.
步骤304、第二终端设备接收第一终端设备发送的信息请求数据。Step 304: The second terminal device receives the information request data sent by the first terminal device.
在一种可能的实现方式中,第二终端设备可以周期性地搜索当前场景中的无线热点,若检测到无线热点发送的数据帧,则可以确定当前场景中存在无线热点,并且可以根据数据帧中的热点标识进行判断,确定该数据帧是否为信息请求数据,若该数据帧为信息请求数据,则可以执行步骤305,若该数据帧不是信息请求数据,则可以忽略该数据帧。In a possible implementation, the second terminal device may periodically search for wireless hotspots in the current scene. If a data frame sent by the wireless hotspot is detected, it may be determined that there is a wireless hotspot in the current scene, and it may be based on the data frame. The hot spot identifier in the data frame is judged to determine whether the data frame is information request data. If the data frame is information request data, step 305 can be performed. If the data frame is not information request data, the data frame can be ignored.
例如,第二终端设备在接收到无线热点发送的数据帧后,可以从该数据帧指定位置的必选字段中获取数据帧中携带的SSID,并判断该SSID是否为特殊的用于指示第一终端设备无法加入无线网络的SSID。若第二终端设备无法获取SSID,或者获取的SSID不是特殊的SSID,则可以忽略该数据帧,但是若该SSID是特殊的SSID,则可以确定第一终端设备无法加入无线网络,该数据帧为第一终端设备发送的信息请求数据。For example, after receiving the data frame sent by the wireless hotspot, the second terminal device can obtain the SSID carried in the data frame from the required field in the specified position of the data frame, and determine whether the SSID is special for indicating the first The terminal device cannot join the SSID of the wireless network. If the second terminal device cannot obtain the SSID, or the obtained SSID is not a special SSID, the data frame can be ignored, but if the SSID is a special SSID, it can be determined that the first terminal device cannot join the wireless network, and the data frame is The information request data sent by the first terminal device.
需要说明的是,在实际应用中,第二终端设备可以包括多种终端设备,而用于检测无线热点的终端设备可以为检测无线热点时所需功耗较小的终端设备,例如,可以为手机或平板电脑。It should be noted that in practical applications, the second terminal device may include a variety of terminal devices, and the terminal device used to detect wireless hotspots may be a terminal device that requires less power consumption when detecting wireless hotspots, for example, Mobile phone or tablet.
步骤305、第二终端设备根据信息请求数据和第二终端设备的配置信息,生成网络信息数据。Step 305: The second terminal device generates network information data according to the information request data and the configuration information of the second terminal device.
第二终端设备在接收信息请求数据后,若信息请求数据中的热点标识为预先设置的特殊热点标识,则可以确定该热点标识指示第一终端设备无法接入无线网络,而第二终端设备可以根据该信息请求数据向第一终端设备反馈网络信息数据,以使第一终端设备可以根据该网络信息数据接入无线网络。After the second terminal device receives the information request data, if the hotspot identifier in the information request data is a preset special hotspot identifier, it can be determined that the hotspot identifier indicates that the first terminal device cannot access the wireless network, and the second terminal device can The network information data is fed back to the first terminal device according to the information request data, so that the first terminal device can access the wireless network according to the network information data.
在第二终端设备生成网络信息数据的过程中,第二终端设备可以先对信息请求数据进行校验,判断发送信息请求数据的第一终端设备是否将第二终端设备作为信任设备,也即是判断第二终端设备是否具有配置第一终端设备的权限,从而根据判断结果确定是否需要生成并反馈网络信息数据。In the process of generating network information data by the second terminal device, the second terminal device may first check the information request data to determine whether the first terminal device sending the information request data regards the second terminal device as a trusted device, that is, It is determined whether the second terminal device has the authority to configure the first terminal device, so as to determine whether it is necessary to generate and feed back network information data according to the determination result.
参见图5,步骤305可以包括步骤305a、步骤305b和步骤305c:Referring to FIG. 5, step 305 may include step 305a, step 305b, and step 305c:
步骤305a、若热点标识指示第一终端设备无法接入无线网络,根据预先存储的公私钥对对信息请求数据进行校验,确定第二终端设备是否具有配置第一终端设备的权限。 Step 305a: If the hotspot identifier indicates that the first terminal device cannot access the wireless network, verify the information request data according to the pre-stored public and private keys to determine whether the second terminal device has the authority to configure the first terminal device.
第二终端设备在获取信息请求数据后,若热点标识指示第一终端设备无法接入无线网络,则可以根据预先存储的公私钥对中的私钥,对信息请求数据中的会话标识和终端地址进行解密,若解密成功,说明第一终端设备和第二终端设备使用的是相同的公私钥对,第二终端设备具有配置第一终端设备的权限,能够对第一终端设备的无线网络信息进行配置,从而可以执行步骤305b。After the second terminal device obtains the information request data, if the hotspot identifier indicates that the first terminal device cannot access the wireless network, it can use the pre-stored private key in the public-private key pair to determine the session identifier and terminal address in the information request data. Perform decryption. If the decryption is successful, it means that the first terminal device and the second terminal device use the same public-private key pair. The second terminal device has the authority to configure the first terminal device and can perform the wireless network information of the first terminal device. Configure so that step 305b can be performed.
若对会话标识和终端地址解密失败,则说明第一终端设备和第二终端设备存储的公私钥对不一致,第二终端设备并不具有配置第一终端设备的权限,从而可以忽略该信息请求数据。If the decryption of the session ID and terminal address fails, it means that the public and private key pairs stored by the first terminal device and the second terminal device are inconsistent, and the second terminal device does not have the authority to configure the first terminal device, so the information request data can be ignored .
步骤305b、若第二终端设备具有配置第一终端设备的权限,获取第二终端设备的配置信息。 Step 305b: If the second terminal device has the authority to configure the first terminal device, obtain the configuration information of the second terminal device.
若确定第二终端设备具有配置第一终端设备的权限,则第二终端设备可以获取存 储的配置信息,以便在后续步骤中,可以根据该配置信息生成网络信息数据,使得第一终端设备可以根据该网络信息数据加入无线网络。If it is determined that the second terminal device has the authority to configure the first terminal device, the second terminal device can obtain the stored configuration information, so that in the subsequent steps, network information data can be generated based on the configuration information, so that the first terminal device can be based on The network information data is added to the wireless network.
而且,为了提高反馈的网络信息数据的有效性,第二终端设备可以先确定第二终端设备是否能够接入无线网络,从而根据判断结果确定存储的配置信息能否加入无线网络,进而确定能否根据存储的配置信息生成网络信息数据。Moreover, in order to improve the effectiveness of the feedback network information data, the second terminal device may first determine whether the second terminal device can access the wireless network, and then determine whether the stored configuration information can join the wireless network according to the judgment result, and then determine whether the stored configuration information can join the wireless network. Generate network information data according to the stored configuration information.
可选的,第二终端设备可以先判断第二终端设备是否接入无线网络,若第二终端设备已经接入无线网络,则说明第二终端设备可以根据当前存储的配置信息加入无线网络,可以获取第二终端设备的配置信息;若第二终端设备并未接入无线网络,则可以先控制第二终端设备根据配置信息接入无线网络,若成功接入无线网络,则说明第二终端设备当前存储的配置信息是有效的,可以获取配置信息。Optionally, the second terminal device may first determine whether the second terminal device is connected to the wireless network. If the second terminal device has already connected to the wireless network, it means that the second terminal device can join the wireless network according to the currently stored configuration information. Acquire the configuration information of the second terminal device; if the second terminal device is not connected to the wireless network, you can first control the second terminal device to access the wireless network according to the configuration information, and if it successfully accesses the wireless network, the second terminal device is indicated The currently stored configuration information is valid, and the configuration information can be obtained.
若第二终端设备加入无线网络失败,则说明第二终端设备当前存储的配置信息也是无效信息,则第二终端设备也可以采用如步骤302至步骤303的方式生成并广播信息请求数据,以便无线网络中的其他终端设备可以针对第二终端设备发送的信息请求数据进行反馈,从而更新第二终端设备的配置信息。If the second terminal device fails to join the wireless network, it means that the configuration information currently stored by the second terminal device is also invalid information. The second terminal device can also generate and broadcast the information request data in a manner such as step 302 to step 303 for wireless Other terminal devices in the network may feedback the information request data sent by the second terminal device, thereby updating the configuration information of the second terminal device.
步骤305c、根据配置信息和会话标识,生成网络信息数据。 Step 305c: Generate network information data according to the configuration information and the session identifier.
第二终端设备得到有效的配置信息后,则可以根据该配置信息,生成网络信息数据。而且,在实际应用中,第二终端设备可能会收到多个第一终端设备发送的信息请求数据,为了使每个第一终端设备能够准确接收反馈的相对应的网络信息数据,在生成网络信息数据的过程中,第二终端设备还可以结合接收的信息请求数据中的会话标识,生成网络信息数据。After the second terminal device obtains valid configuration information, it can generate network information data according to the configuration information. Moreover, in practical applications, the second terminal device may receive information request data sent by multiple first terminal devices. In order to enable each first terminal device to accurately receive the corresponding network information data fed back, the In the process of information data, the second terminal device may also generate network information data in combination with the session identifier in the received information request data.
而且,为了避免其他网络中的终端设备接收第二终端设备发送的网络信息数据,第二终端设备在生成网络信息数据的过程中,还可以通过公私钥对中的公钥,对配置信息和会话标识进行加密。即第二终端设备可以根据公私钥对对配置信息和会话标识进行加密,得到加密后的配置信息和加密后的会话标识,再根据加密后的配置信息和加密后的会话标识,生成网络信息数据。Moreover, in order to prevent the terminal devices in other networks from receiving the network information data sent by the second terminal device, the second terminal device can also use the public key in the public-private key pair to compare the configuration information and the session in the process of generating the network information data. The logo is encrypted. That is, the second terminal device can encrypt the configuration information and the session ID according to the public and private keys to obtain the encrypted configuration information and the encrypted session ID, and then generate the network information data according to the encrypted configuration information and the encrypted session ID .
在一种可能的实现方式中,第二终端设备可以获取公私钥对,并根据公私钥对中的公钥对配置信息和会话标识进行加密,再将加密后的配置信息和加密后的会话标识封装在数据帧的指定位置,从而可以将封装后的数据帧作为网络信息数据。In a possible implementation manner, the second terminal device may obtain the public-private key pair, and encrypt the configuration information and the session identifier according to the public key in the public-private key pair, and then encrypt the encrypted configuration information and the encrypted session identifier Encapsulated in the designated position of the data frame, so that the encapsulated data frame can be used as network information data.
例如,参见图6,第二终端设备可以将加密后的会话标识和加密后的配置信息,封装在行为(Action)帧的指定位置,从而得到由行为帧组成的网络信息数据。另外,配置信息中不但可以包括无线网络的网络密码,还可以包括无线网络的SSID。For example, referring to FIG. 6, the second terminal device may encapsulate the encrypted session identifier and the encrypted configuration information in a specified position of an action frame, thereby obtaining network information data composed of action frames. In addition, the configuration information can include not only the network password of the wireless network, but also the SSID of the wireless network.
步骤306、第二终端设备通过第一终端设备开启的热点功能,向第一终端设备发送网络信息数据。Step 306: The second terminal device sends network information data to the first terminal device through the hotspot function activated by the first terminal device.
其中,该网络信息数据用于指示第一终端设备根据网络信息数据中的配置信息接入无线网络。Wherein, the network information data is used to instruct the first terminal device to access the wireless network according to the configuration information in the network information data.
第二终端设备生成网络数据后,可以根据第一终端设备开启的无线热点,向第一终端设备反馈生成的网络信息数据,以便第一终端设备能够根据网络信息数据中的配置信息,对第一终端设备的配置信息进行更新,从而根据更新后的配置信息加入无线网络。After the second terminal device generates the network data, it can feed back the generated network information data to the first terminal device according to the wireless hotspot opened by the first terminal device, so that the first terminal device can check the first terminal device according to the configuration information in the network information data. The configuration information of the terminal device is updated, thereby joining the wireless network according to the updated configuration information.
例如,第二终端设备在接收到第一终端设备通过无线热点发送的信标帧后,可以基于该信标帧生成包括配置信息和会话标识的行为帧,再根据第一终端设备开启的无线热点向第一终端设备反馈生成的行为帧,以便第一终端设备可以根据行为帧中的配置信息加入无线网络。For example, after receiving the beacon frame sent by the first terminal device through the wireless hotspot, the second terminal device may generate a behavior frame including the configuration information and the session identifier based on the beacon frame, and then according to the wireless hotspot opened by the first terminal device Feed back the generated behavior frame to the first terminal device, so that the first terminal device can join the wireless network according to the configuration information in the behavior frame.
步骤307、第一终端设备接收第二终端设备根据信息请求数据反馈的网络信息数据。Step 307: The first terminal device receives the network information data fed back by the second terminal device according to the information request data.
与步骤306相对应的,第一终端设备可以接收第二终端设备发送的网络信息数据。另外,在实际应用中,第二终端设备可能会向多个第一终端设备发送网络信息数据,而任意一个终端设备可能接收多个网络信息数据,则可以执行步骤308,从多个网络信息数据中确定与第一终端设备相匹配的网络信息数据,从而根据网络信息数据中的配置信息对第一终端设备进行配置。Corresponding to step 306, the first terminal device may receive the network information data sent by the second terminal device. In addition, in practical applications, the second terminal device may send network information data to multiple first terminal devices, and any terminal device may receive multiple network information data, then step 308 may be executed to obtain multiple network information data from multiple first terminal devices. In determining the network information data matching the first terminal device in the network information data, the first terminal device is configured according to the configuration information in the network information data.
步骤308、第一终端设备根据网络信息数据中的配置信息,对第一终端设备进行配置。Step 308: The first terminal device configures the first terminal device according to the configuration information in the network information data.
第一终端设备可以接收第二终端设备发送的网络信息数据,并根据网络信息数据携带的配置信息,对第一终端设备进行配置,也即是对第一终端设备的历史配置信息进行更新,以便在后续步骤中,第一终端设备可以根据更新后的配置信息加入无线网络。The first terminal device can receive the network information data sent by the second terminal device, and configure the first terminal device according to the configuration information carried in the network information data, that is, update the historical configuration information of the first terminal device so as to In the subsequent steps, the first terminal device may join the wireless network according to the updated configuration information.
在第一终端设备根据网络信息数据进行配置的过程中,可以先对网络信息数据进行解密校验,在校验通过后再根据解密得到的配置信息对第一终端设备进行配置,参见图7,步骤308可以包括:步骤308a、步骤308b和步骤308c。In the process of configuring the first terminal device according to the network information data, the network information data can be decrypted and verified, and after the verification is passed, the first terminal device can be configured according to the decrypted configuration information, as shown in FIG. 7, Step 308 may include: step 308a, step 308b, and step 308c.
步骤308a、根据预先存储的公私钥对,对网络信息数据进行校验,确定网络信息数据是否与第一终端设备相匹配。 Step 308a: Check the network information data according to the pre-stored public and private key pair to determine whether the network information data matches the first terminal device.
第一终端设备在接收网络信息数据的过程中,可能在接收第二终端设备发送的网络信息数据的同时,还会接收到其他网络的终端设备发送的数据,则在接收到多种数据时,可以先根据预先存储的公私钥对,对网络信息数据进行解密校验。In the process of receiving network information data, the first terminal device may receive the network information data sent by the second terminal device while also receiving data sent by other network terminal devices. When receiving multiple types of data, The network information data can be decrypted and verified according to the pre-stored public and private key pair.
若第一终端设备能够成功解密网络信息数据,则可以确定发送网络信息数据的第二终端设备的公私钥对与第一终端设备的公私钥对相一致,第二终端设备具有配置第一终端设备的权限。If the first terminal device can successfully decrypt the network information data, it can be determined that the public-private key pair of the second terminal device sending the network information data is consistent with the public-private key pair of the first terminal device, and the second terminal device has the configuration of the first terminal device permission.
进一步地,在同一无线网络中,可能存在多个第一终端设备,且第二终端设备向多个第一终端设备发送了网络信息数据,则第一终端设备可以根据网络信息数据中携带的待匹配会话标识进行判断,确定该网络信息数据是否与第一终端设备相匹配。Further, in the same wireless network, there may be multiple first terminal devices, and the second terminal device sends network information data to multiple first terminal devices, then the first terminal device can be based on the waiting information carried in the network information data. The session identifier is matched to make a judgment to determine whether the network information data matches the first terminal device.
可选的,第一终端设备可以根据公私钥对,对网络信息数据进行解密,得到待匹配会话标识和备选配置信息,并将会话标识和该待匹配会话标识进行比较。若会话标识和待匹配会话标识一致,则网络信息数据与第一终端设备相匹配,但是若会话标识和待匹配会话标识不一致,则网络信息数据与第一终端设备不匹配。Optionally, the first terminal device may decrypt the network information data according to the public and private key pair to obtain the session identifier to be matched and the candidate configuration information, and compare the session identifier with the session identifier to be matched. If the session identifier and the session identifier to be matched are consistent, the network information data matches the first terminal device, but if the session identifier and the session identifier to be matched are inconsistent, the network information data does not match the first terminal device.
在一种可能的实现方式中,第一终端设备可以先从预先设置的存储空间中获取公私钥对,并采用公私钥对的私钥对网络信息数据进行解密,得到网络信息数据携带的待匹配会话标识和备选配置信息。In a possible implementation, the first terminal device may first obtain a public-private key pair from a preset storage space, and use the private key of the public-private key pair to decrypt the network information data to obtain the to-be-matched information carried by the network information data Session ID and alternative configuration information.
之后,第一终端设备可以将待匹配会话标识,与步骤303中生成的会话标识进行 比较,判断二者是否一致,若待匹配会话标识与会话标识一致,则说明该网络信息数据是第二终端设备发送给第一终端设备的,该网络信息数据与第一终端设备相匹配。但是,若待匹配会话标识与会话标识不一致,则说明网络信息数据与第一终端设备不匹配,可以忽略该网络信息数据。After that, the first terminal device may compare the session identifier to be matched with the session identifier generated in step 303 to determine whether the two are consistent. If the session identifier to be matched is consistent with the session identifier, it indicates that the network information data is the second terminal. When the device sends to the first terminal device, the network information data matches the first terminal device. However, if the session identifier to be matched is inconsistent with the session identifier, it means that the network information data does not match the first terminal device, and the network information data can be ignored.
步骤308b、若网络信息数据与第一终端设备相匹配,从网络信息数据中获取配置信息。 Step 308b: If the network information data matches the first terminal device, obtain configuration information from the network information data.
与步骤308a相对应的,若网络信息数据与第一终端设备相匹配,则第一终端设备可以将备选配置信息作为配置信息。Corresponding to step 308a, if the network information data matches the first terminal device, the first terminal device may use the candidate configuration information as the configuration information.
由于第二终端设备在生成网络信息数据的过程中,将待匹配标识和备选配置信息一同加密封装在了网络信息数据中,则第一终端设备在解密校验、并且确定网络信息数据与第一终端设备相匹配后,可以将解密得到的备选配置信息作为第二终端设备发送的用于更新的配置信息。Since the second terminal device encrypts and encapsulates the to-be-matched identification and candidate configuration information in the network information data in the process of generating the network information data, the first terminal device is decrypting and verifying, and determines that the network information data and the first After a terminal device is matched, the candidate configuration information obtained by decryption can be used as the configuration information sent by the second terminal device for updating.
步骤308c、根据配置信息对第一终端设备进行配置。 Step 308c: Configure the first terminal device according to the configuration information.
第一终端设备在得到配置信息后,可以根据该配置信息对第一终端设备的历史配置信息进行更新,得到配置后的第一终端设备,使得第一终端设备可以在后续步骤中加入无线网络,完成第一终端设备的正确配置。After obtaining the configuration information, the first terminal device can update the historical configuration information of the first terminal device according to the configuration information to obtain the configured first terminal device so that the first terminal device can join the wireless network in subsequent steps. Complete the correct configuration of the first terminal device.
例如,第一终端设备可以获取配置信息中的SSID和网络密码,并获取历史配置信息,将SSID与历史配置信息中的SSID进行比较,若不一致,则对历史配置信息的SSID进行更新,若一致则不再对历史配置信息的SSID进行更新;类似的,可以采用上述方式根据网络密码对历史配置信息中的网络密码进行更新。For example, the first terminal device can obtain the SSID and network password in the configuration information, and obtain the historical configuration information, compare the SSID with the SSID in the historical configuration information, if they are inconsistent, update the SSID of the historical configuration information, if they are consistent Then the SSID of the historical configuration information is no longer updated; similarly, the network password in the historical configuration information can be updated according to the network password in the above-mentioned manner.
步骤309、第一终端设备根据更新后的配置信息接入无线网络。Step 309: The first terminal device accesses the wireless network according to the updated configuration information.
其中,该配置信息可以包括无线网络的标识信息和网络密码。Wherein, the configuration information may include identification information and network password of the wireless network.
第一终端设备在根据网络信息数据对历史配置信息更新完毕后,可以根据更新后的配置信息,尝试加入网络信息发生变化的无线网络。若第一终端设备成功加入无线网络,则说明对第一终端设备成功配置完毕。After the first terminal device has updated the historical configuration information according to the network information data, it may try to join the wireless network whose network information has changed according to the updated configuration information. If the first terminal device successfully joins the wireless network, it means that the configuration of the first terminal device is successfully completed.
若第一终端设备加入无线网络失败,则可以再次执行步骤302、步骤303、步骤307和步骤308,以便对第一终端设备的配置信息再次进行更新,并再次尝试加入无线网络,直至第一终端设备成功加入无线网络。If the first terminal device fails to join the wireless network, step 302, step 303, step 307, and step 308 can be executed again to update the configuration information of the first terminal device again, and try to join the wireless network again, until the first terminal The device successfully joined the wireless network.
可选的,在第一终端设备加入无线网络的过程中,第一终端设备可以根据标识信息查找无线网络,并根据网络密码,接入无线网络。Optionally, when the first terminal device joins the wireless network, the first terminal device may search for the wireless network according to the identification information, and access the wireless network according to the network password.
在一种可能的实现方式中,第一终端设备可以先根据标识信息,在当前场景中查找与该标识信息相匹配的无线网络,再根据更新的网络密码尝试加入查找到的无线网络,如成功加入无线网络,则说明对第一终端设备的配置更新成功。In a possible implementation manner, the first terminal device may first search for a wireless network matching the identification information in the current scene according to the identification information, and then try to join the found wireless network according to the updated network password, if successful Joining the wireless network means that the configuration update of the first terminal device is successful.
综上所述,本申请实施例提供的设备无线网络信息配置方法,在检测到第一终端设备无法接入无线网络时,第一终端设备开启无线热点功能,并通过该无线热点功能,广播信息请求数据,相应的,第二终端设备可以接收并根据该信息请求数据生成网络信息数据,再向第一终端设备发送该网络信息数据,第一终端设备则可以接收第二终端设备根据信息请求数据反馈的网络信息数据,并根据网络信息数据中的配置信息,对第一终端设备进行配置。上述技术方案中,通过开启无线热点功能并广播信息请求 数据,使得第二终端设备可以根据该信息请求数据反馈网络信息数据,从而,第一终端设备可以根据该网络信息数据进行配置,避免了用户对每个第一终端设备执行手动配置的操作,提高了对第一终端设备进行配置的效率。In summary, in the device wireless network information configuration method provided by the embodiments of the present application, when it is detected that the first terminal device cannot access the wireless network, the first terminal device turns on the wireless hotspot function, and broadcasts information through the wireless hotspot function Request data, correspondingly, the second terminal device can receive and generate network information data based on the information request data, and then send the network information data to the first terminal device, and the first terminal device can receive the second terminal device according to the information request data The network information data is fed back, and the first terminal device is configured according to the configuration information in the network information data. In the above technical solution, by enabling the wireless hotspot function and broadcasting the information request data, the second terminal device can feed back network information data according to the information request data, so that the first terminal device can configure the network information data according to the network information data, which avoids users Performing the manual configuration operation on each first terminal device improves the efficiency of configuring the first terminal device.
而且,通过公私钥对对信息请求数据进行加密,可以避免第一终端设备与其他网络的终端设备进行交互,使得第一终端设备仅能够与相同网络中的终端设备进行数据交互,提高了信息请求数据的安全性。Moreover, encrypting the information request data through the public and private keys can prevent the first terminal device from interacting with terminal devices on other networks, so that the first terminal device can only interact with terminal devices on the same network, which improves the information request. Data security.
另外,通过对会话标识进行比较,可以确定第二终端设备反馈的网络信息数据是否与第一终端设备相匹配,从而可以提高第二终端设备向不同第一终端设备反馈的准确度。In addition, by comparing the session identifiers, it can be determined whether the network information data fed back by the second terminal device matches the first terminal device, so that the accuracy of the second terminal device's feedback to different first terminal devices can be improved.
进一步地,通过在生成网络信息数据之前,确定生成网络信息数据的第二终端设备是否已经加入无线网络,从而确定第二终端设备的配置信息是否有效,可以提高网络信息数据的有效性。Further, by determining whether the second terminal device generating the network information data has joined the wireless network before generating the network information data, thereby determining whether the configuration information of the second terminal device is valid, the effectiveness of the network information data can be improved.
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that the size of the sequence number of each step in the foregoing embodiment does not mean the order of execution. The execution sequence of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.
对应于上文实施例所述的设备无线网络信息配置方法,图8是本申请实施例提供的一种设备无线网络信息配置装置的结构框图,为了便于说明,仅示出了与本申请实施例相关的部分。Corresponding to the device wireless network information configuration method described in the above embodiment, FIG. 8 is a structural block diagram of a device wireless network information configuration device provided in an embodiment of the present application. The relevant part.
参照图8,该装置包括:Referring to Figure 8, the device includes:
功能开启模块801,用于若检测到无法接入该无线网络,则开启无线热点功能;The function enabling module 801 is used to enable the wireless hotspot function if it is detected that the wireless network cannot be accessed;
广播模块802,用于通过该无线热点功能,广播信息请求数据,该信息请求数据用于请求该无线网络的网络信息;The broadcasting module 802 is used to broadcast information request data through the wireless hotspot function, and the information request data is used to request network information of the wireless network;
接收模块803,用于接收第二终端设备根据该信息请求数据反馈的网络信息数据,该网络信息数据是该第二终端设备在根据该信息请求数据进行校验后生成并向该第一终端设备发送的;The receiving module 803 is configured to receive network information data fed back by the second terminal device according to the information request data, and the network information data is generated by the second terminal device after verification according to the information request data and sent to the first terminal device Sent
配置模块804,用于根据该网络信息数据中的配置信息,对该第一终端设备进行配置。The configuration module 804 is configured to configure the first terminal device according to the configuration information in the network information data.
可选的,该信息请求数据包括热点标识、会话标识和终端地址,该热点标识用于指示该第一终端设备无法接入该无线网络,该会话标识用于标识该第一终端设备,该终端地址用于表示该第一终端设备的物理地址;Optionally, the information request data includes a hotspot identifier, a session identifier, and a terminal address. The hotspot identifier is used to indicate that the first terminal device cannot access the wireless network, and the session identifier is used to identify the first terminal device. The address is used to indicate the physical address of the first terminal device;
该广播模块802,具体用于获取该热点标识、该会话标识和该终端地址;根据该热点标识、该会话标识和该终端地址,生成该信息请求数据;周期性地广播该信息请求数据。The broadcasting module 802 is specifically configured to obtain the hotspot identifier, the session identifier, and the terminal address; generate the information request data according to the hotspot identifier, the session identifier, and the terminal address; broadcast the information request data periodically.
可选的,该广播模块802,还具体用于根据预先存储的公私钥对对该会话标识和该终端地址加密,得到加密后的会话标识和加密后的终端地址;根据该热点标识、该加密后的会话标识和该加密后的终端地址,生成该信息请求数据。Optionally, the broadcast module 802 is also specifically configured to encrypt the session identifier and the terminal address according to a pre-stored public and private key to obtain the encrypted session identifier and the encrypted terminal address; according to the hot spot identifier and the encrypted terminal address; The subsequent session identifier and the encrypted terminal address generate the information request data.
可选的,该配置模块804,具体用于根据预先存储的公私钥对,对该网络信息数 据进行校验,确定该网络信息数据是否与该第一终端设备相匹配;若该网络信息数据与该第一终端设备相匹配,从该网络信息数据中获取该配置信息;根据该配置信息对该第一终端设备进行配置。Optionally, the configuration module 804 is specifically configured to verify the network information data according to a pre-stored public and private key pair to determine whether the network information data matches the first terminal device; if the network information data matches If the first terminal device matches, obtain the configuration information from the network information data; configure the first terminal device according to the configuration information.
可选的,该配置模块804,还具体用于根据该公私钥对,对该网络信息数据进行解密,得到待匹配会话标识和备选配置信息;将该会话标识和该待匹配会话标识进行比较;若该会话标识和该待匹配会话标识一致,则确定该网络信息数据与该第一终端设备相匹配;若该会话标识和该待匹配会话标识不一致,则确定该网络信息数据与该第一终端设备不匹配;Optionally, the configuration module 804 is further specifically configured to decrypt the network information data according to the public and private key pair to obtain the session identifier to be matched and the candidate configuration information; to compare the session identifier with the session identifier to be matched If the session identifier is consistent with the session identifier to be matched, it is determined that the network information data matches the first terminal device; if the session identifier and the session identifier to be matched are inconsistent, it is determined that the network information data is consistent with the first terminal device. The terminal equipment does not match;
该配置模块804,还具体用于若该网络信息数据与该第一终端设备相匹配,则将该备选配置信息作为该配置信息。The configuration module 804 is further specifically configured to use the candidate configuration information as the configuration information if the network information data matches the first terminal device.
可选的,参照图9,该配置信息包括该无线网络的标识信息和网络密码;Optionally, referring to FIG. 9, the configuration information includes the identification information and the network password of the wireless network;
该装置还包括:The device also includes:
查找模块805,用于根据该标识信息查找该无线网络;The searching module 805 is used to search for the wireless network according to the identification information;
连接模块806,用根据该网络密码,接入该无线网络。The connection module 806 uses the network password to access the wireless network.
可选的,该装置还包括:Optionally, the device further includes:
获取模块807,用于获取公私钥对,该公私钥对是第二终端设备接入历史无线网络时生成的,该历史无线网络为配置信息变化之前的无线网络。The obtaining module 807 is configured to obtain a public-private key pair, which is generated when the second terminal device accesses the historical wireless network, and the historical wireless network is the wireless network before the configuration information is changed.
综上所述,本申请实施例提供的设备无线网络信息配置装置,在检测到第一终端设备无法接入无线网络时,第一终端设备开启无线热点功能,并通过该无线热点功能,广播信息请求数据,使得第二终端设备可以接收并根据该信息请求数据生成网络信息数据,向第一终端设备发送该网络信息数据,第一终端设备则可以接收第二终端设备根据信息请求数据反馈的网络信息数据,并根据网络信息数据中的配置信息,对第一终端设备进行配置。上述技术方案中,通过开启无线热点功能并广播信息请求数据,使得第二终端设备可以根据该信息请求数据反馈网络信息数据,从而,第一终端设备可以根据该网络信息数据进行配置,避免了用户对每个第一终端设备执行手动配置的操作,提高了对第一终端设备进行配置的效率。To sum up, in the device wireless network information configuration device provided by the embodiment of the application, when it is detected that the first terminal device cannot access the wireless network, the first terminal device turns on the wireless hotspot function, and broadcasts information through the wireless hotspot function Request data so that the second terminal device can receive and generate network information data based on the information request data, and send the network information data to the first terminal device, and the first terminal device can receive the network that the second terminal device requests data feedback according to the information Information data, and configure the first terminal device according to the configuration information in the network information data. In the above technical solution, by enabling the wireless hotspot function and broadcasting the information request data, the second terminal device can feed back network information data according to the information request data, so that the first terminal device can configure the network information data according to the network information data, which avoids users Performing the manual configuration operation on each first terminal device improves the efficiency of configuring the first terminal device.
对应于上文实施例所述的设备无线网络信息配置方法,图10是本申请实施例提供的一种设备无线网络信息配置装置的结构框图,为了便于说明,仅示出了与本申请实施例相关的部分。Corresponding to the device wireless network information configuration method described in the above embodiment, FIG. 10 is a structural block diagram of a device wireless network information configuration device provided in an embodiment of the present application. The relevant part.
参照图10,该装置包括:Referring to Figure 10, the device includes:
接收模块1001,用于接收第一终端设备发送的信息请求数据,该信息请求数据是该第一终端设备在检测到无法接入该无线网络后通过开启的热点功能广播发送的;The receiving module 1001 is configured to receive information request data sent by a first terminal device. The information request data is broadcast and sent by the first terminal device after detecting that it cannot access the wireless network through an activated hotspot function;
生成模块1002,用于根据信息请求数据和该第二终端设备的配置信息,生成网络信息数据;The generating module 1002 is configured to generate network information data according to the information request data and the configuration information of the second terminal device;
发送模块1003,用于通过该第一终端设备开启的热点功能,向该第一终端设备发送该网络信息数据,该网络信息数据用于指示该第一终端设备根据该网络信息数据中的该配置信息接入该无线网络。The sending module 1003 is configured to send the network information data to the first terminal device through the hotspot function activated by the first terminal device, and the network information data is used to instruct the first terminal device to follow the configuration in the network information data. The information is connected to the wireless network.
可选的,该信息请求数据包括热点标识、会话标识,该热点标识用于指示该第一 终端设备无法接入该无线网络,该会话标识用于标识该第一终端设备;Optionally, the information request data includes a hotspot identifier and a session identifier, the hotspot identifier is used to indicate that the first terminal device cannot access the wireless network, and the session identifier is used to identify the first terminal device;
该生成模块1002,具体用于若该热点标识指示该第一终端设备无法接入该无线网络,根据预先存储的公私钥对对该信息请求数据进行校验,确定第二终端设备是否具有配置第一终端设备的权限;若该第二终端设备具有配置该第一终端设备的权限,获取该第二终端设备的配置信息;根据该配置信息和该会话标识,生成该网络信息数据。The generating module 1002 is specifically configured to, if the hotspot identifier indicates that the first terminal device cannot access the wireless network, verify the information request data according to the pre-stored public and private keys to determine whether the second terminal device has a configuration first The authority of a terminal device; if the second terminal device has the authority to configure the first terminal device, obtain configuration information of the second terminal device; generate the network information data according to the configuration information and the session identifier.
可选的,该生成模块1002,还具体用于根据该公私钥对对该配置信息和该会话标识进行加密,得到加密后的配置信息和加密后的会话标识;根据该加密后的配置信息和该加密后的会话标识,生成该网络信息数据。Optionally, the generating module 1002 is also specifically configured to encrypt the configuration information and the session identifier according to the public and private keys to obtain the encrypted configuration information and the encrypted session identifier; according to the encrypted configuration information and The encrypted session identifier generates the network information data.
可选的,该生成模块1002,还具体用于判断该第二终端设备是否接入该无线网络;若该第二终端设备已经接入该无线网络,获取该第二终端设备的该配置信息。Optionally, the generating module 1002 is further specifically configured to determine whether the second terminal device is connected to the wireless network; if the second terminal device has already connected to the wireless network, obtain the configuration information of the second terminal device.
可选的,参照图11,该装置还包括:Optionally, referring to FIG. 11, the device further includes:
连接模块1004,用于若该第二终端设备并未接入该无线网络,根据该配置信息接入该无线网络;The connection module 1004 is configured to access the wireless network according to the configuration information if the second terminal device is not connected to the wireless network;
获取模块1005,用于若成功接入该无线网络,获取该配置信息。The obtaining module 1005 is configured to obtain the configuration information if the wireless network is successfully accessed.
综上所述,本申请实施例提供的设备无线网络信息配置装置,在检测到第一终端设备无法接入无线网络时,第一终端设备开启无线热点功能,并通过该无线热点功能,广播信息请求数据,相应的,第二终端设备可以接收第一终端设备在检测到无法接入无线网络时通过开启无线热点功能广播发送的信息请求数据,并根据该信息请求数据生成网络信息数据,再向第一终端设备发送该网络信息数据,使得第一终端设备可以接收第二终端设备根据信息请求数据反馈的网络信息数据,并根据网络信息数据中的配置信息,对第一终端设备进行配置。上述技术方案中,通过开启无线热点功能并广播信息请求数据,使得第二终端设备可以根据该信息请求数据反馈网络信息数据,从而,第一终端设备可以根据该网络信息数据进行配置,避免了用户对每个第一终端设备执行手动配置的操作,提高了对第一终端设备进行配置的效率。To sum up, in the device wireless network information configuration device provided by the embodiment of the application, when it is detected that the first terminal device cannot access the wireless network, the first terminal device turns on the wireless hotspot function, and broadcasts information through the wireless hotspot function Request data. Correspondingly, the second terminal device can receive the information request data broadcasted by the first terminal device by turning on the wireless hotspot function when it detects that it cannot access the wireless network, and generate network information data based on the information request data, and then send it to The first terminal device sends the network information data so that the first terminal device can receive the network information data fed back by the second terminal device according to the information request data, and configure the first terminal device according to the configuration information in the network information data. In the above technical solution, by enabling the wireless hotspot function and broadcasting the information request data, the second terminal device can feed back network information data according to the information request data, so that the first terminal device can configure the network information data according to the network information data, which avoids users Performing the manual configuration operation on each first terminal device improves the efficiency of configuring the first terminal device.
本申请实施例还提供一种终端设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如图3、5和7中所展示的第一终端设备或第二终端设备所执行的方法。An embodiment of the present application also provides a terminal device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor. When the processor executes the computer program, the implementation is as shown in FIG. 3 , 5 and 7 shown in the first terminal device or the method performed by the second terminal device.
本申请实施例还提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如图3、5和7中所展示的第一终端设备或第二终端设备所执行的方法。The embodiments of the present application also provide a computer-readable storage medium, the computer-readable storage medium stores a computer program, and is characterized in that the computer program is executed by a processor as shown in FIGS. 3, 5, and 7 The method performed by the first terminal device or the second terminal device.
图12是本申请一实施例提供的终端设备的结构示意图。如图12所示,该实施例的终端设备12包括:至少一个处理器121(图12中仅示出一个)处理器、存储器122以及存储在所述存储器122中并可在所述至少一个处理器121上运行的计算机程序122,所述处理器121执行所述计算机程序122时实现上述任意各个设备无线网络信息配置方法实施例中的步骤。FIG. 12 is a schematic structural diagram of a terminal device provided by an embodiment of the present application. As shown in FIG. 12, the terminal device 12 of this embodiment includes: at least one processor 121 (only one is shown in FIG. 12), a processor, a memory 122, and a processor that is stored in the memory 122 and can be processed in the at least one processor. A computer program 122 running on the processor 121, when the processor 121 executes the computer program 122, the steps in any of the foregoing embodiments of the method for configuring wireless network information for each device are implemented.
所述终端设备12可以是桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。该终端设备可包括,但不仅限于,处理器121、存储器122。本领域技术人员可以理解,图12仅仅是终端设备12的举例,并不构成对终端设备12的限定,可以包括比 图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如还可以包括输入输出设备、网络接入设备等。The terminal device 12 may be a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud server. The terminal device may include, but is not limited to, a processor 121 and a memory 122. Those skilled in the art can understand that FIG. 12 is only an example of the terminal device 12, and does not constitute a limitation on the terminal device 12. It may include more or less components than shown in the figure, or a combination of certain components, or different components. , For example, can also include input and output devices, network access devices, and so on.
所称处理器121可以是中央处理单元(Central Processing Unit,CPU),该处理器121还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。The so-called processor 121 may be a central processing unit (Central Processing Unit, CPU), and the processor 121 may also be other general-purpose processors, digital signal processors (Digital Signal Processors, DSPs), and application specific integrated circuits (Application Specific Integrated Circuits). , ASIC), ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
所述存储器122在一些实施例中可以是所述终端设备12的内部存储单元,例如终端设备12的硬盘或内存。所述存储器122在另一些实施例中也可以是所述终端设备12的外部存储设备,例如所述终端设备12上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,所述存储器122还可以既包括所述终端设备12的内部存储单元也包括外部存储设备。所述存储器122用于存储操作系统、应用程序、引导装载程序(BootLoader)、数据以及其他程序等,例如所述计算机程序的程序代码等。所述存储器122还可以用于暂时地存储已经输出或者将要输出的数据。The memory 122 may be an internal storage unit of the terminal device 12 in some embodiments, such as a hard disk or a memory of the terminal device 12. In other embodiments, the memory 122 may also be an external storage device of the terminal device 12, for example, a plug-in hard disk equipped on the terminal device 12, a smart media card (SMC), and a secure digital (Secure Digital, SD) card, Flash Card, etc. Further, the memory 122 may also include both an internal storage unit of the terminal device 12 and an external storage device. The memory 122 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program. The memory 122 can also be used to temporarily store data that has been output or will be output.
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。实施例中的各功能单元、模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中,上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。另外,各功能单元、模块的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。上述系统中单元、模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and conciseness of description, only the division of the above functional units and modules is used as an example. In practical applications, the above functions can be allocated to different functional units and modules as needed. Module completion, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist alone physically, or two or more units can be integrated into one unit. The above-mentioned integrated units can be hardware-based Formal realization can also be realized in the form of a software functional unit. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the present application. For the specific working process of the units and modules in the foregoing system, reference may be made to the corresponding process in the foregoing method embodiment, which will not be repeated here.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。In the above-mentioned embodiments, the description of each embodiment has its own focus. For parts that are not described in detail or recorded in an embodiment, reference may be made to related descriptions of other embodiments.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。A person of ordinary skill in the art may realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraint conditions of the technical solution. Professionals and technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered beyond the scope of this application.
在本申请所提供的实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的系统实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通讯连接可以是通过一些接口,装置或单元的间接耦合或通讯连接,可以是电性,机械或其它的形式。In the embodiments provided in this application, it should be understood that the disclosed device and method may be implemented in other ways. For example, the system embodiment described above is merely illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods, for example, multiple units or components may be It can be combined or integrated into another system, or some features can be ignored or not implemented. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显 示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机程序包括计算机程序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质至少可以包括:能够将计算机程序代码携带到终端设备的任何实体或装置、记录介质、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质。例如U盘、移动硬盘、磁碟或者光盘等。在某些司法管辖区,根据立法和专利实践,计算机可读介质不可以是电载波信号和电信信号。If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the implementation of all or part of the processes in the above-mentioned embodiment methods in the present application can be accomplished by instructing relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When executed by the processor, the steps of the foregoing method embodiments can be implemented. Wherein, the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file, or some intermediate forms. The computer-readable medium may at least include: any entity or device capable of carrying computer program code to a terminal device, a recording medium, a computer memory, a read-only memory (ROM, Read-Only Memory), and a random access memory (RAM, Random Access Memory), electric carrier signal, telecommunications signal and software distribution medium. For example, U disk, mobile hard disk, floppy disk or CD-ROM, etc. In some jurisdictions, according to legislation and patent practices, computer-readable media cannot be electrical carrier signals and telecommunication signals.
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。The above-mentioned embodiments are only used to illustrate the technical solutions of the present application, not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still implement the foregoing The technical solutions recorded in the examples are modified, or some of the technical features are equivalently replaced; these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the application, and should be included in Within the scope of protection of this application.

Claims (16)

  1. 一种设备无线网络信息配置方法,其特征在于,应用于无线网络中的第一终端设备,包括:A method for configuring equipment wireless network information is characterized in that a first terminal device applied to a wireless network includes:
    若检测到无法接入所述无线网络,则开启无线热点功能;If it is detected that the wireless network cannot be accessed, turn on the wireless hotspot function;
    通过所述无线热点功能,广播信息请求数据,所述信息请求数据用于请求所述无线网络的网络信息;Broadcast information request data through the wireless hotspot function, and the information request data is used to request network information of the wireless network;
    接收第二终端设备根据所述信息请求数据反馈的网络信息数据,所述网络信息数据是所述第二终端设备在根据所述信息请求数据进行校验后生成并向所述第一终端设备发送的;Receive network information data fed back by a second terminal device according to the information request data, where the network information data is generated by the second terminal device after checking according to the information request data and sent to the first terminal device of;
    根据所述网络信息数据中的配置信息,对所述第一终端设备进行配置。Configure the first terminal device according to the configuration information in the network information data.
  2. 如权利要求1所述的设备无线网络信息配置方法,其特征在于,所述信息请求数据包括热点标识、会话标识和终端地址,所述热点标识用于指示所述第一终端设备无法接入所述无线网络,所述会话标识用于标识所述第一终端设备,所述终端地址用于表示所述第一终端设备的物理地址;The device wireless network information configuration method according to claim 1, wherein the information request data includes a hotspot identifier, a session identifier, and a terminal address, and the hotspot identifier is used to indicate that the first terminal device cannot access the station. In the wireless network, the session identifier is used to identify the first terminal device, and the terminal address is used to indicate the physical address of the first terminal device;
    所述通过所述无线热点功能,广播信息请求数据,包括:The broadcasting information request data through the wireless hotspot function includes:
    获取所述热点标识、所述会话标识和所述终端地址;Acquiring the hotspot identifier, the session identifier, and the terminal address;
    根据所述热点标识、所述会话标识和所述终端地址,生成所述信息请求数据;Generating the information request data according to the hotspot identifier, the session identifier, and the terminal address;
    周期性地广播所述信息请求数据。The information request data is broadcast periodically.
  3. 如权利要求2所述的设备无线网络信息配置方法,其特征在于,所述根据所述热点标识、所述会话标识和所述终端地址,生成所述信息请求数据,包括:The method for configuring wireless network information of a device according to claim 2, wherein said generating said information request data according to said hotspot identifier, said session identifier and said terminal address comprises:
    根据预先存储的公私钥对对所述会话标识和所述终端地址加密,得到加密后的会话标识和加密后的终端地址;Encrypting the session identifier and the terminal address according to a pre-stored public and private key pair to obtain an encrypted session identifier and an encrypted terminal address;
    根据所述热点标识、所述加密后的会话标识和所述加密后的终端地址,生成所述信息请求数据。The information request data is generated according to the hotspot identifier, the encrypted session identifier, and the encrypted terminal address.
  4. 如权利要求1所述的设备无线网络信息配置方法,其特征在于,所述根据所述网络信息数据中的配置信息,对所述第一终端设备进行配置,包括:The device wireless network information configuration method according to claim 1, wherein the configuring the first terminal device according to the configuration information in the network information data comprises:
    根据预先存储的公私钥对,对所述网络信息数据进行校验,确定所述网络信息数据是否与所述第一终端设备相匹配;Verifying the network information data according to the pre-stored public and private key pair to determine whether the network information data matches the first terminal device;
    若所述网络信息数据与所述第一终端设备相匹配,从所述网络信息数据中获取所述配置信息;If the network information data matches the first terminal device, obtain the configuration information from the network information data;
    根据所述配置信息对所述第一终端设备进行配置。Configure the first terminal device according to the configuration information.
  5. 如权利要求4所述的设备无线网络信息配置方法,其特征在于,所述根据预先存储的公私钥对,对所述网络信息数据进行校验,确定所述网络信息数据是否与所述第一终端设备相匹配,包括:The device wireless network information configuration method according to claim 4, wherein the network information data is verified according to a pre-stored public and private key pair to determine whether the network information data is the same as the first Matching terminal equipment, including:
    根据所述公私钥对,对所述网络信息数据进行解密,得到待匹配会话标识和备选配置信息;Decrypt the network information data according to the public and private key pair to obtain the session identifier to be matched and the candidate configuration information;
    将所述会话标识和所述待匹配会话标识进行比较;Comparing the session identifier with the to-be-matched session identifier;
    若所述会话标识和所述待匹配会话标识一致,则确定所述网络信息数据与所述第 一终端设备相匹配;If the session identifier is consistent with the session identifier to be matched, determining that the network information data matches the first terminal device;
    若所述会话标识和所述待匹配会话标识不一致,则确定所述网络信息数据与所述第一终端设备不匹配;If the session identifier and the session identifier to be matched are inconsistent, determining that the network information data does not match the first terminal device;
    所述若所述网络信息数据与所述第一终端设备相匹配,从所述网络信息数据中获取所述配置信息,包括:If the network information data matches the first terminal device, obtaining the configuration information from the network information data includes:
    若所述网络信息数据与所述第一终端设备相匹配,则将所述备选配置信息作为所述配置信息。If the network information data matches the first terminal device, use the candidate configuration information as the configuration information.
  6. 如权利要求1至5任一所述的设备无线网络信息配置方法,其特征在于,所述配置信息包括所述无线网络的标识信息和网络密码;The device wireless network information configuration method according to any one of claims 1 to 5, wherein the configuration information includes identification information and a network password of the wireless network;
    在所述根据所述网络信息数据中的配置信息,对所述第一终端设备进行配置之后,所述方法还包括:After the configuring the first terminal device according to the configuration information in the network information data, the method further includes:
    根据所述标识信息查找所述无线网络;Searching for the wireless network according to the identification information;
    根据所述网络密码,接入所述无线网络。Access the wireless network according to the network password.
  7. 如权利要求1至5任一所述的设备无线网络信息配置方法,其特征在于,在所述开启无线热点功能之前,所述方法还包括:The device wireless network information configuration method according to any one of claims 1 to 5, characterized in that, before said enabling the wireless hotspot function, the method further comprises:
    获取公私钥对,所述公私钥对是所述第二终端设备接入历史无线网络时生成的,所述历史无线网络为所述配置信息变化之前的所述无线网络。Obtain a public-private key pair, where the public-private key pair is generated when the second terminal device accesses a historical wireless network, and the historical wireless network is the wireless network before the configuration information is changed.
  8. 一种设备无线网络信息配置方法,其特征在于,应用于无线网络的第二终端设备,包括:A method for configuring equipment wireless network information is characterized in that a second terminal device applied to a wireless network includes:
    接收第一终端设备发送的信息请求数据,所述信息请求数据是所述第一终端设备在检测到无法接入所述无线网络后通过开启的热点功能广播发送的;Receiving information request data sent by a first terminal device, the information request data being broadcast and sent by the first terminal device through an activated hotspot function after detecting that the first terminal device cannot access the wireless network;
    根据所述信息请求数据和所述第二终端设备的配置信息,生成网络信息数据;Generating network information data according to the information request data and the configuration information of the second terminal device;
    通过所述第一终端设备开启的热点功能,向所述第一终端设备发送所述网络信息数据,所述网络信息数据用于指示所述第一终端设备根据所述网络信息数据中的所述配置信息接入所述无线网络。The network information data is sent to the first terminal device through the hotspot function activated by the first terminal device, and the network information data is used to instruct the first terminal device according to the information in the network information data. The configuration information is connected to the wireless network.
  9. 如权利要求8所述的设备无线网络信息配置方法,其特征在于,所述信息请求数据包括热点标识、会话标识,所述热点标识用于指示所述第一终端设备无法接入所述无线网络,所述会话标识用于标识所述第一终端设备;The device wireless network information configuration method according to claim 8, wherein the information request data includes a hotspot identifier and a session identifier, and the hotspot identifier is used to indicate that the first terminal device cannot access the wireless network , The session identifier is used to identify the first terminal device;
    所述根据所述信息请求数据和所述第二终端设备的配置信息,生成网络信息数据,包括:The generating network information data according to the information request data and the configuration information of the second terminal device includes:
    若所述热点标识指示所述第一终端设备无法接入所述无线网络,根据预先存储的公私钥对对所述信息请求数据进行校验,确定所述第二终端设备是否具有配置所述第一终端设备的权限;If the hotspot identifier indicates that the first terminal device cannot access the wireless network, the information request data is verified according to the pre-stored public and private keys to determine whether the second terminal device has the configuration of the first terminal device. 1. The authority of the terminal device;
    若所述第二终端设备具有配置所述第一终端设备的权限,获取所述第二终端设备的配置信息;If the second terminal device has the authority to configure the first terminal device, acquiring configuration information of the second terminal device;
    根据所述配置信息和所述会话标识,生成所述网络信息数据。The network information data is generated according to the configuration information and the session identifier.
  10. 如权利要求9所述的设备无线网络信息配置方法,其特征在于,所述根据所述配置信息和所述会话标识,生成所述网络信息数据,包括:The method for configuring wireless network information of a device according to claim 9, wherein said generating said network information data according to said configuration information and said session identifier comprises:
    根据所述公私钥对对所述配置信息和所述会话标识进行加密,得到加密后的配置 信息和加密后的会话标识;Encrypting the configuration information and the session identifier according to the public and private keys to obtain the encrypted configuration information and the encrypted session identifier;
    根据所述加密后的配置信息和所述加密后的会话标识,生成所述网络信息数据。The network information data is generated according to the encrypted configuration information and the encrypted session identifier.
  11. 如权利要求9所述的设备无线网络信息配置方法,其特征在于,所述获取所述第二终端设备的配置信息,包括:The method for configuring wireless network information of a device according to claim 9, wherein said obtaining configuration information of said second terminal device comprises:
    判断所述第二终端设备是否接入所述无线网络;Judging whether the second terminal device accesses the wireless network;
    若所述第二终端设备已经接入所述无线网络,获取所述第二终端设备的所述配置信息。If the second terminal device has accessed the wireless network, acquiring the configuration information of the second terminal device.
  12. 如权利要求11所述的设备无线网络信息配置方法,其特征在于,所述方法还包括:The method for configuring wireless network information of a device according to claim 11, wherein the method further comprises:
    若所述第二终端设备并未接入所述无线网络,根据所述配置信息接入所述无线网络;If the second terminal device does not access the wireless network, access the wireless network according to the configuration information;
    若成功接入所述无线网络,获取所述配置信息。If successfully accessing the wireless network, obtain the configuration information.
  13. 一种设备无线网络信息配置装置,其特征在于,应用于无线网络中的第一终端设备,包括:A device for configuring wireless network information for equipment, characterized in that a first terminal device applied to a wireless network includes:
    功能开启模块,用于若检测到无法接入所述无线网络,则开启无线热点功能;The function enabling module is used to enable the wireless hotspot function if it is detected that the wireless network cannot be accessed;
    广播模块,用于通过所述无线热点功能,广播信息请求数据,所述信息请求数据用于请求所述无线网络的网络信息;The broadcasting module is configured to broadcast information request data through the wireless hotspot function, and the information request data is used to request network information of the wireless network;
    接收模块,用于接收第二终端设备根据所述信息请求数据反馈的网络信息数据,所述网络信息数据是所述第二终端设备在根据所述信息请求数据进行校验后生成并向所述第一终端设备发送的;The receiving module is configured to receive network information data fed back by the second terminal device according to the information request data, and the network information data is generated by the second terminal device after verification according to the information request data and sent to the Sent by the first terminal device;
    配置模块,用于根据所述网络信息数据中的配置信息,对所述第一终端设备进行配置。The configuration module is used to configure the first terminal device according to the configuration information in the network information data.
  14. 一种设备无线网络信息配置装置,其特征在于,应用于无线网络的第二终端设备,包括:A device for configuring wireless network information for equipment, characterized in that a second terminal device applied to a wireless network includes:
    接收模块,用于接收第一终端设备发送的信息请求数据,所述信息请求数据是所述第一终端设备在检测到无法接入所述无线网络后通过开启的热点功能广播发送的;A receiving module, configured to receive information request data sent by a first terminal device, the information request data being broadcast by the first terminal device after detecting that it cannot access the wireless network through an enabled hotspot function;
    生成模块,用于根据所述信息请求数据和所述第二终端设备的配置信息,生成网络信息数据;A generating module, configured to generate network information data according to the information request data and the configuration information of the second terminal device;
    发送模块,用于通过所述第一终端设备开启的热点功能,向所述第一终端设备发送所述网络信息数据,所述网络信息数据用于指示所述第一终端设备根据所述网络信息数据中的所述配置信息接入所述无线网络。The sending module is configured to send the network information data to the first terminal device through the hotspot function activated by the first terminal device, and the network information data is used to instruct the first terminal device to perform the The configuration information in the data is connected to the wireless network.
  15. 一种终端设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如权利要求1至12任一项所述的方法。A terminal device, comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the processor executes the computer program as claimed in claims 1 to 12. The method of any one.
  16. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至12任一项所述的方法。A computer-readable storage medium storing a computer program, wherein the computer program is executed by a processor to implement the method according to any one of claims 1 to 12.
PCT/CN2020/125585 2020-02-18 2020-10-30 Wireless network information configuration method and apparatus for device WO2021164312A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010099341.4A CN113286294B (en) 2020-02-18 2020-02-18 Equipment wireless network information configuration method and device
CN202010099341.4 2020-02-18

Publications (1)

Publication Number Publication Date
WO2021164312A1 true WO2021164312A1 (en) 2021-08-26

Family

ID=77274862

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/125585 WO2021164312A1 (en) 2020-02-18 2020-10-30 Wireless network information configuration method and apparatus for device

Country Status (2)

Country Link
CN (1) CN113286294B (en)
WO (1) WO2021164312A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114389716A (en) * 2021-12-14 2022-04-22 中科创达软件股份有限公司 Terminal access method, device, equipment and storage medium
CN116684942A (en) * 2022-09-09 2023-09-01 荣耀终端有限公司 Network access method, electronic equipment and storage medium
CN114389716B (en) * 2021-12-14 2024-06-07 中科创达软件股份有限公司 Terminal access method, device, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080107055A1 (en) * 2006-11-07 2008-05-08 Le Electronics Inc. Performing presence service in a wireless communication system
CN103533512A (en) * 2013-09-17 2014-01-22 英华达(上海)科技有限公司 Method, device and system for configuring and adding equipment into network group
CN105101464A (en) * 2015-06-30 2015-11-25 广东美的制冷设备有限公司 Wireless network configuration method and wireless network configuration system
CN106413037A (en) * 2016-10-31 2017-02-15 青岛海尔科技有限公司 Network access method and device for interment-of-things equipment, equipment and mobile terminal
CN111132373A (en) * 2019-12-05 2020-05-08 北京小米移动软件有限公司 Network connection method, device and equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104410970A (en) * 2014-12-23 2015-03-11 北京极科极客科技有限公司 Wireless intelligent accessing method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080107055A1 (en) * 2006-11-07 2008-05-08 Le Electronics Inc. Performing presence service in a wireless communication system
CN103533512A (en) * 2013-09-17 2014-01-22 英华达(上海)科技有限公司 Method, device and system for configuring and adding equipment into network group
CN105101464A (en) * 2015-06-30 2015-11-25 广东美的制冷设备有限公司 Wireless network configuration method and wireless network configuration system
CN106413037A (en) * 2016-10-31 2017-02-15 青岛海尔科技有限公司 Network access method and device for interment-of-things equipment, equipment and mobile terminal
CN111132373A (en) * 2019-12-05 2020-05-08 北京小米移动软件有限公司 Network connection method, device and equipment

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114389716A (en) * 2021-12-14 2022-04-22 中科创达软件股份有限公司 Terminal access method, device, equipment and storage medium
CN114389716B (en) * 2021-12-14 2024-06-07 中科创达软件股份有限公司 Terminal access method, device, equipment and storage medium
CN116684942A (en) * 2022-09-09 2023-09-01 荣耀终端有限公司 Network access method, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN113286294B (en) 2022-12-27
CN113286294A (en) 2021-08-20

Similar Documents

Publication Publication Date Title
CN110611905B (en) Information sharing method, terminal device, storage medium, and computer program product
US20220330029A1 (en) Method for mutual recognition or mutual trust between bluetooth devices
US10880746B2 (en) Network connection method, apparatus, storage medium and terminal
EP3641366B1 (en) Wireless local area network configuration method and apparatus
WO2018176781A1 (en) Information sending method, information receiving method, apparatus, and system
WO2017020630A1 (en) Method, apparatus and system for processing order information
WO2016082801A1 (en) Method and device for establishing wireless connection
WO2017185711A1 (en) Method, apparatus and system for controlling smart device, and storage medium
JP2016528844A (en) Network connection method, hotspot terminal and management terminal
US11277744B2 (en) Wi-Fi hotspot connection method and terminal
CN103650554A (en) Data integrity for proximity-based communication
CN103688562A (en) Data integrity for proximity-based communication
EP3893595B1 (en) Establishment by a second terminal device of a wlan hotspot connection to a first terminal device for connecting to the internet
US10454905B2 (en) Method and apparatus for encrypting and decrypting picture, and device
CN112291100A (en) Network distribution method, network distribution device and storage medium
US10674353B2 (en) Association establishment method in wireless local area network, terminal, and access point
US20230318916A1 (en) Network Configuration Method and Apparatus for Intelligent Device
CN107734528B (en) Wireless network detection method, device, storage medium and terminal
WO2021164312A1 (en) Wireless network information configuration method and apparatus for device
WO2018120624A1 (en) Method, apparatus and system for obtaining authentication information
TWI633800B (en) Methods for device pairing and data transmission in handheld communication devices
WO2015058514A1 (en) Nfc data transmission method and device, and terminal device
WO2022143130A1 (en) Application program login method and system
WO2018023495A1 (en) Device pairing and data transmission method for handheld communication device
US12010519B2 (en) Information sharing method, terminal device, storage medium, and computer program product

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

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

Country of ref document: EP

Kind code of ref document: A1