CN113286294B - Equipment wireless network information configuration method and device - Google Patents

Equipment wireless network information configuration method and device Download PDF

Info

Publication number
CN113286294B
CN113286294B CN202010099341.4A CN202010099341A CN113286294B CN 113286294 B CN113286294 B CN 113286294B CN 202010099341 A CN202010099341 A CN 202010099341A CN 113286294 B CN113286294 B CN 113286294B
Authority
CN
China
Prior art keywords
wireless network
terminal device
information
terminal equipment
network
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN202010099341.4A
Other languages
Chinese (zh)
Other versions
CN113286294A (en
Inventor
马尔利
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202010099341.4A priority Critical patent/CN113286294B/en
Priority to PCT/CN2020/125585 priority patent/WO2021164312A1/en
Publication of CN113286294A publication Critical patent/CN113286294A/en
Application granted granted Critical
Publication of CN113286294B publication Critical patent/CN113286294B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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

Landscapes

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

Abstract

The application is suitable for the technical field of smart home, and provides a method and a device for configuring wireless network information of equipment, wherein the method comprises the following steps: if the wireless network cannot be accessed, starting a wireless hotspot function; broadcasting information request data through a wireless hotspot function; receiving network information data fed back by the second terminal device according to the information request data, wherein the network information data are generated after the second terminal device is verified according to the information request data and are sent to the first terminal device; and configuring the first terminal equipment according to the configuration information in the network information data. By starting the wireless hotspot function and broadcasting the information request data, the second terminal equipment can feed back the network information data according to the information request data, so that the first terminal equipment can be configured according to the network information data, the operation that a user executes manual configuration on each first terminal equipment is avoided, and the efficiency of configuring the first terminal equipment is improved.

Description

Equipment wireless network information configuration method and device
Technical Field
The application belongs to the technical field of smart home, and particularly relates to a method and a device for configuring wireless network information of equipment.
Background
With The continuous development of The Internet of Things (IOT), in daily life, various IOT devices can be added to a local area network, and a user can control The IOT devices in The local area network through a terminal device, so that The IOT devices can realize different functions.
In the related art, after each IOT device joins the local area network, if network information of the local area network changes, for example, a Service Set Identifier (SSID) or a network password of the local area network changes, each IOT device cannot be re-accessed to the local area network, for each IOT device that cannot be accessed to the local area network, the IOT device may open a wireless hotspot, and a terminal device held by a user may access the wireless hotspot, so as to establish a wireless connection with the IOT device, and configure the IOT device according to the changed network information, so that the configured IOT device may be re-joined to the local area network.
However, in the process of configuring the IOT devices, the same operation needs to be repeated for each IOT device to perform configuration, which results in more steps for configuring the IOT devices and lower efficiency.
Disclosure of Invention
The embodiment of the application provides a method and a device for configuring wireless network information of equipment, which can solve the problem of low efficiency of configuring IOT equipment.
In a first aspect, an embodiment of the present application provides an apparatus wireless network information configuration method, which is applied to a first terminal apparatus in a wireless network, and includes:
if the wireless network cannot be accessed, starting a wireless hotspot function;
broadcasting information request data through the wireless hotspot function, wherein the information request data is used for requesting network information of the wireless network;
receiving network information data fed back by second terminal equipment according to the information request data, wherein the network information data is generated after the second terminal equipment is verified according to the information request data and is sent to the first terminal equipment;
and configuring the first terminal equipment 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, where 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 a physical address of the first terminal device;
the broadcasting information request data through the wireless hotspot function includes:
acquiring the hotspot identification, the session identification and the terminal address;
generating the information request data according to the hotspot identification, the session identification and the terminal address;
the information request data is broadcast periodically.
Based on the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, the generating the information request data according to the hotspot identifier, the session identifier, and the terminal address includes:
encrypting the session identifier and the terminal address according to a pre-stored public and private key to obtain an encrypted session identifier and an encrypted terminal address;
and generating the information request data according to the hotspot identification, the encrypted session identification and the encrypted terminal address.
In a third possible implementation manner of the first aspect, the configuring, according to configuration information in the network information data, the first terminal device includes:
according to a pre-stored public and private key pair, checking the network information data to determine whether the network information data is matched with the first terminal equipment;
if the network information data is matched with the first terminal equipment, acquiring the configuration information from the network information data;
and configuring the first terminal equipment according to the configuration information.
Based on the third possible implementation manner of the first aspect, in a fourth possible implementation manner of the first aspect, the verifying 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 includes:
decrypting the network information data according to the public and private key pair to obtain a session identifier to be matched and alternative configuration information;
comparing the session identification with the session identification to be matched;
if the session identifier is consistent with the session identifier to be matched, determining that the network information data is matched with the first terminal equipment;
if the session identifier is not consistent with the session identifier to be matched, determining that the network information data is not matched with the first terminal equipment;
if the network information data is matched with the first terminal device, acquiring the configuration information from the network information data, including:
and if the network information data is matched with the first terminal equipment, taking the alternative configuration information as the configuration information.
In a fifth possible implementation manner of the first aspect, the configuration information includes identification information of the wireless network and a network password;
after the configuring the first terminal device according to the configuration information in the network information data, the method further includes:
searching the wireless network according to the identification information;
and accessing the wireless network according to the network password.
In a sixth possible implementation manner of the first aspect, before the turning on the wireless hotspot function, the method further includes:
and acquiring a public and private key pair, wherein the public and private key pair is generated when the second terminal equipment is accessed into a historical wireless network, and the historical wireless network is the wireless network before the configuration information is changed.
In a second aspect, an embodiment of the present application provides 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 first terminal equipment, wherein the information request data are sent by the first terminal equipment through a started hotspot function broadcast after the first terminal equipment detects that the first terminal equipment cannot be accessed to the wireless network;
generating network information data according to the information request data and the configuration information of the second terminal equipment;
and sending the network information data to the first terminal equipment through a hotspot function started by the first terminal equipment, wherein the network information data are used for indicating the first terminal equipment to access the wireless network according to the configuration information in the network information data.
In a first possible implementation manner of the second aspect, the information request data includes a hotspot identifier and a session identifier, where 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;
generating network information data according to the information request data and the configuration information of the second terminal device, including:
if the hotspot identification indicates that the first terminal equipment cannot be accessed to the wireless network, verifying the information request data according to a pre-stored public and private key pair to determine whether the second terminal equipment has the authority to configure the first terminal equipment;
if the second terminal equipment has the authority of configuring the first terminal equipment, acquiring configuration information of the second terminal equipment;
and generating the network information data according to the configuration information and the session identification.
Based on the first possible implementation manner of the second aspect, in a 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 identification according to the public and private keys to obtain encrypted configuration information and encrypted session identification;
and generating the network information data according to the encrypted configuration information and the encrypted session identification.
Based on the first possible implementation manner of the second aspect, in a third possible implementation manner of the second aspect, the obtaining the configuration information of the second terminal device includes:
judging whether the second terminal equipment is accessed to the wireless network;
and if the second terminal equipment has access to the wireless network, acquiring the configuration information of the second terminal equipment.
Based on the third possible implementation manner of the second aspect, in a fourth possible implementation manner of the second aspect, the method further includes:
if the second terminal equipment is not accessed to the wireless network, accessing to the wireless network according to the configuration information;
and if the wireless network is successfully accessed, acquiring the configuration information.
In a third aspect, an embodiment of the present application provides an apparatus for configuring wireless network information of a device, which is applied to a first terminal device in a wireless network, and includes:
the function starting module is used for starting a wireless hotspot function if the wireless network cannot be accessed is detected;
the broadcast module is used for broadcasting information request data through the wireless hotspot function, and the information request data is used for requesting network information of the wireless network;
a receiving module, configured to 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 being verified according to the information request data and is sent to the first terminal device;
and the configuration module is used for configuring the first terminal equipment 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, where 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 a physical address of the first terminal device;
the broadcast module is specifically configured to obtain the hotspot identifier, the session identifier, and the terminal address; generating the information request data according to the hotspot identification, the session identification and the terminal address; the information request data is broadcast periodically.
Based on the first possible implementation manner of the third aspect, in a second possible implementation manner of the third aspect, the broadcast module is further specifically configured to encrypt the session identifier and the terminal address according to a pre-stored public and private key pair, so as to obtain an encrypted session identifier and an encrypted terminal address; and generating the information request data according to the hotspot identification, the encrypted session identification and the encrypted terminal address.
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, and determine whether the network information data matches the first terminal device; if the network information data is matched with the first terminal equipment, acquiring the configuration information from the network information data; and configuring the first terminal equipment according to the configuration information.
Based on the third possible implementation manner of the third aspect, in a fourth possible implementation manner of the third aspect, the configuration module is further specifically configured to decrypt the network information data according to the public and private key pair to obtain a session identifier to be matched and alternative configuration information; comparing the session identification with the session identification to be matched; if the session identifier is consistent with the session identifier to be matched, determining that the network information data is matched with the first terminal equipment; if the session identifier is not consistent with the session identifier to be matched, determining that the network information data is not matched with the first terminal equipment;
the configuration module is further specifically configured to use the alternative 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 of the wireless network and a network password;
the device further comprises:
the searching module is used for searching the wireless network according to the identification information;
and the connecting module is used for accessing the wireless network according to the network password.
In a sixth possible implementation manner of the third aspect, the apparatus further includes:
and the acquisition module is used for acquiring a public and private key pair, wherein the public and private key pair is generated when the second terminal equipment is accessed to a historical wireless network, and the historical wireless network is the wireless network before the configuration information changes.
In a fourth aspect, an embodiment of the present application provides an apparatus for configuring wireless network information, which is applied to a second terminal device of a wireless network, and includes:
the receiving module is used for receiving information request data sent by first terminal equipment, wherein the information request data are sent by the first terminal equipment through a started hotspot function broadcast after the first terminal equipment detects that the first terminal equipment cannot access the wireless network;
a generating module, configured to generate network information data according to the information request data and the configuration information of the second terminal device;
and the sending module is used for sending the network information data to the first terminal equipment through the hotspot function started by the first terminal equipment, wherein the network information data is used for indicating the first terminal equipment to access the wireless network according to the configuration information in the network information data.
In a first possible implementation manner of the fourth aspect, the information request data includes a hotspot identifier and a session identifier, where 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 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 pair, and determine whether the second terminal device has a right to configure the first terminal device; if the second terminal equipment has the authority of configuring the first terminal equipment, acquiring configuration information of the second terminal equipment; and generating the network information data according to the configuration information and the session identification.
Based on the first possible implementation manner of the fourth aspect, in a second possible implementation manner of the fourth aspect, the generating module is further specifically configured to encrypt the configuration information and the session identifier according to the public and private key pair to obtain encrypted configuration information and an encrypted session identifier; and generating the network information data according to the encrypted configuration information and the encrypted session identification.
Based on the first possible implementation manner of the fourth aspect, in a third possible implementation manner of the fourth aspect, the generating module is further specifically configured to determine whether the second terminal device accesses the wireless network; and if the second terminal equipment has access to the wireless network, acquiring the configuration information of the second terminal equipment.
Based on the third possible implementation manner of the fourth aspect, in a fourth possible implementation manner of the fourth aspect, the apparatus further includes:
the connection module is used for accessing the wireless network according to the configuration information if the second terminal equipment is not accessed to the wireless network;
and the acquisition module is used for acquiring the configuration information if the wireless network is successfully accessed.
In a fifth aspect, an embodiment of the present application provides a terminal device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor, when executing the computer program, implements the device wireless network information configuration method according to any one of the first and second aspects.
In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, where a computer program is stored, where the computer program is executed by a processor to implement the device wireless network information configuration method according to any one of the first aspect and the second aspect.
In a seventh aspect, an embodiment of the present application provides a computer program product, which when run on a terminal device, causes the terminal device to execute the device wireless network information configuration method described in any one of the first aspect or the second aspect.
Compared with the prior art, the embodiment of the application has the beneficial effects that:
according to the embodiment of the application, when the first terminal device is detected to be incapable of accessing a wireless network, the first terminal device starts a wireless hotspot function, and broadcasts information request data through the wireless hotspot function, correspondingly, the second terminal device can receive and generate network information data according to the information request data, and then sends the network information data to the first terminal device, and 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 configuration information in the network information data. In the technical scheme, the second terminal device can feed back the network information data according to the information request data by starting the wireless hotspot function and broadcasting the information request data, so that the first terminal device can be configured according to the network information data, the operation that a user executes manual configuration on each first terminal device is avoided, and the efficiency of configuring the first terminal device is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a system schematic diagram of a device configuration system according to a device wireless network information configuration method provided in an embodiment of the present application;
fig. 2 is a block diagram of a partial structure of a mobile phone provided in 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 in an embodiment of the present application;
fig. 5 is a schematic flow chart of generating network information data according to an embodiment of the present application;
FIG. 6 is a 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 block diagram illustrating a configuration apparatus of a wireless network information of a device according to an embodiment of the present application;
fig. 9 is a block diagram of another apparatus for configuring wireless network information according to an embodiment of the present application;
fig. 10 is a block diagram illustrating a configuration apparatus of a wireless network information of another device according to an embodiment of the present application;
fig. 11 is a block diagram illustrating a configuration apparatus of a wireless network information of another device according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
The terminology used in the following examples is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification of this application and the appended claims, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, such as "one or more", unless the context clearly indicates otherwise. It should also be understood that in the embodiments of the present application, "one or more" means one, two, or more than two; "and/or" describes the association relationship of the associated objects, indicating that three relationships may exist; for example, a and/or B, may represent: a alone, both A and B, and B alone, where A, B may be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
The device wireless network information configuration method provided by the embodiment of the application can be applied to terminal devices such as a mobile phone, a tablet personal computer, a wearable device, an Augmented Reality (AR)/Virtual Reality (VR) device, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a Personal Digital Assistant (PDA), and the like, and the embodiment of the application does not limit the specific type of the terminal device at all.
For example, the terminal device may be a Station (ST) in a WLAN, and may be a cellular phone, a cordless phone, a Session Initiation Protocol (SIP) phone, a Personal Digital Assistant (PDA) device, a handheld device with wireless communication capability, a computing device or other processing device connected to a wireless modem, a computer, a laptop computer, a handheld communication device, a handheld computing device, a satellite radio, a wireless modem card, a Set Top Box (STB), and so on.
By way of example and not limitation, when the terminal device is a wearable device, the wearable device may also be a generic term for intelligently designing daily wearing by applying wearable technology, developing wearable devices, such as glasses, gloves, watches, clothing, shoes, and the like. A wearable device is a portable device that is worn directly on the body or integrated into the clothing or accessories of the user. The wearable device is not only a hardware device, but also realizes powerful functions through software support, data interaction and cloud interaction. The generalized wearable intelligent device has the advantages that the generalized wearable intelligent device is complete in function and large in size, can realize complete or partial functions without depending on a smart phone, such as a smart watch or smart glasses, and only is concentrated on a certain application function, and needs to be matched with other devices such as the smart phone for use, such as various smart bracelets for monitoring physical signs, smart jewelry and the like.
Fig. 1 is a system schematic view of a device configuration system related to a device wireless network information configuration method provided in an embodiment of the present application, and as shown in fig. 1, the device configuration system may include: at least one first end device 110, at least one second end device 120 and a router 130.
The router is connected with the Internet and can provide a wireless network; each first terminal device and each second terminal device can be wirelessly connected with the router so as to join the wireless network provided by the router. The first terminal device may be a terminal device which is inconvenient to modify configuration information, such as an internet of things device like a television, an air conditioner and a washing machine; the second terminal device may be a terminal device that facilitates modification of configuration information, such as a mobile phone, a laptop, a tablet computer, and other internet of things devices.
In a possible implementation manner, each first terminal device and each second terminal device can access a historical wireless network provided by a router, any first terminal device or any second terminal device can generate a public and private key pair after accessing the historical wireless network, and the public and private key pair is sent to other first terminal devices and second terminal devices in the wireless network in a cloud control manner, so that whether each terminal device has the authority for configuring other terminal devices can be determined through the public and private key pair in the following process.
The cloud control mode can be that the public and private key pair is stored in the cloud through a router, and then the public and private key pair is sent to other first terminal devices and second terminal devices through the cloud. In addition, a public and private key pair can be sent to each terminal device in the historical wireless network in a local control mode, wherein the local control mode is that a certain terminal device is used as a temporary trust device, and the temporary trust device can send the public and private key pair to other terminal devices in the historical wireless network through a router.
If the network information (such as SSID and/or network password) of the historical wireless network changes, a new wireless network is formed, the second terminal device can update the configuration information of the second terminal device according to the operation triggered by the user, and access the wireless network according to the updated configuration information.
If the configuration information is not updated by the first terminal devices, the first terminal devices cannot join a new wireless network, and then the wireless hotspot function can be started to broadcast the information request data to other terminal devices in the wireless network. Correspondingly, the second terminal device accessing the wireless network can receive the information request data, and generate and feed back the network information data according to the information request data, so that each first terminal device not accessing the wireless network can receive the fed back network information data, update the configuration information of the first terminal device according to the configuration information carried by the network information data, complete the configuration of the first terminal device, and enable the first terminal device to join the wireless network according to the updated configuration information.
The first terminal equipment can adopt a public and private key to encrypt the information request data, the second terminal equipment can decrypt the encrypted information request data according to the public and private key and adopt the public and private key to encrypt the network information data again, and the first terminal equipment can decrypt the encrypted network information data according to the public and private key, so that whether the second terminal equipment has the authority for configuring the first terminal equipment can be determined through whether the second terminal equipment can decrypt successfully.
It should be noted that, in this embodiment, only the second terminal device updates the configuration information according to the operation triggered by the user is taken as an example for description, but in practical applications, not only the second terminal device may update the configuration information according to the operation triggered by the user, but also the first terminal device may update the configuration information according to the operation triggered by the user, and the first terminal device may also feed back network information data to other terminal devices that do not access the wireless network, which is not limited in this embodiment.
For convenience of understanding, in the embodiment of the present application, the second terminal device is taken as an example for an exemplary description. Fig. 2 is a block diagram of a partial structure of a mobile phone according to an embodiment of the present application. Referring to fig. 2, the handset 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, a processor 280, and a power supply 290. Those skilled in the art will appreciate that the handset configuration shown in fig. 2 is not intended to be limiting and may include more or fewer components than shown, or some components may be combined, or a different arrangement of components.
The following describes each component of the mobile phone in detail with reference to fig. 2:
the RF circuit 210 may be used for receiving and transmitting signals during information transmission and reception or during a call, and in particular, receives downlink information of a base station and then processes the received downlink information to the processor 280; in addition, the data for designing uplink is transmitted to the base station. Typically, the RF circuitry 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 circuitry 210 may also communicate with networks and other devices via wireless communications. The wireless communication may use any communication standard or protocol, including but not limited to Global System for Mobile communication (GSM), general Packet Radio Service (GPRS), code Division Multiple Access (CDMA), wideband Code Division Multiple Access (WCDMA), long Term Evolution (LTE)), e-mail, short Messaging Service (SMS), and the like.
The memory 220 may be used to store software programs and modules, and the processor 280 executes various functional applications and data processing of the mobile phone by operating 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, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 220 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The input unit 230 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the cellular phone. Specifically, the input unit 230 may include a touch panel 231 and other input devices 232. The touch panel 231, also referred to as a touch screen, may collect touch operations of a user (e.g., operations of the user on or near the touch panel 231 using any suitable object or accessory such as a finger, a stylus, etc.) thereon or nearby, and drive the corresponding connection device according to a preset program. Alternatively, the touch panel 231 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts it to touch point coordinates, and then provides the touch point coordinates to the processor 280, and can receive and execute commands from the processor 280. In addition, the touch panel 231 may be implemented in various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. The input unit 230 may include other input devices 232 in addition to the touch panel 231. In particular, other input devices 232 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
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, and optionally, the Display panel 241 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. Further, the touch panel 231 may cover the display panel 241, and when the touch panel 231 detects a touch operation thereon or nearby, the touch panel is transmitted to the processor 280 to determine the type of the touch event, and then the processor 280 provides a corresponding visual output on the display panel 241 according to the type of the touch event. Although in fig. 2, the touch panel 231 and the display panel 241 are two independent components to implement the input and output functions of the mobile phone, in some embodiments, the touch panel 231 and the display panel 241 may be integrated to implement the input and output functions of the mobile phone.
WiFi belongs to short-distance wireless transmission technology, and the mobile phone can help a user to receive and send e-mails, browse webpages, access streaming media and the like through the WiFi module 270, and provides wireless broadband internet access for the user. Although fig. 2 shows the WiFi module 270, it is understood that it does not belong to the essential constitution of the handset, and may be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 280 is a control center of the mobile phone, connects various parts of the entire mobile phone using various interfaces and lines, and performs various functions of the mobile phone and processes data by operating or executing software programs and/or modules stored in the memory 220 and calling data stored in the memory 220, thereby integrally monitoring the mobile phone. Alternatively, processor 280 may include one or more processing units; preferably, the processor 280 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 280.
The handset also includes a power supply 290 (e.g., a battery) for powering the various components, which may preferably be logically coupled to the processor 280 via a power management system, such that the power management system may be used to manage charging, discharging, and power consumption.
In addition, although not shown, the mobile phone may further include a bluetooth module, etc., which will not be described herein.
Fig. 3 is a schematic flow chart of a device wireless network information configuration method provided in an embodiment of the present application, and by way of example and not limitation, the method may be applied to the first terminal device and the second terminal device, and referring to fig. 3, the method includes:
step 301, the first terminal device obtains a public and private key pair.
And the public and private key pair is generated when the second terminal equipment is accessed to 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 the 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, a public and private key pair generated by the second terminal device can be obtained through a cloud control mode, so that in subsequent steps, the first terminal device can encrypt sent data according to the public and private key pair, and whether the second terminal device has the authority for configuring the first terminal device can be determined based on whether the encrypted data can be decrypted or not.
In a possible implementation manner, after the first terminal device and the second terminal device join the historical wireless network and complete the distribution network, the second terminal device can generate a public and private key pair, and the generated public and private key pair is sent to the first terminal device through the internet in a cloud control manner. Accordingly, the first terminal device can receive the public and private key pair generated by the second terminal device.
It should be noted that, in practical applications, the first terminal device and the second terminal device may join the historical wireless network at the same time, and after the second terminal device generates the public and private key pair, the first terminal device may obtain the public and private key pair in a cloud control manner; the first terminal device may also join the historical wireless network after the second terminal device generates the public and private key pair, and then the public and private key pair may also be obtained in a cloud control manner after the first terminal device joins the historical wireless network. Moreover, after the second terminal device generates the public and private key pair, other second terminal devices can also join the historical wireless network, and the public and private key pair can be sent to other second terminal devices in a cloud control mode.
In addition, the second terminal equipment can maintain and update the public and private key pair periodically. For example, the second terminal device may regenerate the public-private key pair every other week or one month, and send the regenerated public-private key pair to the first terminal device in the historical wireless network in a cloud control or local control manner, thereby completing updating of the public-private key pair.
It should be noted that, in the embodiment of the present application, only one first terminal device and one second terminal device are taken as an example for description, but in practical applications, a plurality of first terminal devices and a plurality of second terminal devices may be included in both a historical wireless network and a wireless network that changes network information.
Step 302, if the first terminal device detects that the first terminal device cannot access the wireless network, the wireless hotspot function is started.
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, in the process that the first terminal device tries to join the historical wireless network, because the historical configuration information is not matched with the changed network information, the first terminal device cannot join the historical wireless network, namely cannot join a new wireless network formed after the network information is changed, and the first terminal device can start a wireless hotspot function, so that in the subsequent steps, the updated configuration information of the wireless network can be obtained based on the wireless hotspot function.
For example, if the first terminal device cannot join the wireless network, the SSID of the wireless hotspot is generated according to preset text information, and the text information may indicate that the first terminal device cannot join the wireless network, so that the wireless hotspot may be established based on the opened wireless hotspot function, and information request data including a hotspot identifier may be sent to the second terminal device through the wireless hotspot.
It should be noted that, if the network information of the historical wireless network does not change, only because the first terminal device cannot join the historical wireless network due to network problems, hardware problems, or other problems, the first terminal device may also alternately and periodically attempt to join the historical wireless network when the wireless hotspot function is periodically turned on. For example, if the first terminal device at time 14:15:03 determines that it is not possible to join the historic wireless network, then at time 14:15:04 to time 14:16:03 and stops attempting to join the historical wireless network, at time 14:16:04 to time 14:17: and closing the hotspot function in 03 time period, trying to join the historical wireless network again, and circulating the above process until the first terminal equipment joins the wireless network or the historical wireless network.
Step 303, the first terminal device broadcasts the information request data through the wireless hotspot function.
The information request data is used for requesting network information of a wireless network, and may include a hotspot identifier, a session identifier and a terminal address, where 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 a physical address of the first terminal device. For example, the hotspot identification may be generated according to an SSID of the wireless hotspot, and the terminal address may be a Medium Access Control (MAC) address.
After the first terminal device starts the wireless hotspot function, a wireless hotspot is established, and the information request data can be broadcast to other terminal devices in the wireless network through the wireless hotspot, so that other terminal devices which are accessed to the wireless network or can be accessed to the wireless network can conveniently feed back 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, generate the information request data according to the hotspot identifier, the session identifier, and the terminal address, and periodically broadcast the information request data.
In a possible implementation manner, the first terminal device may generate a hotspot identifier according to an SSID of the wireless hotspot, generate a session identifier according to the first terminal device, encapsulate the hotspot identifier, the session identifier, and a pre-stored terminal address in a data frame sent by the wireless hotspot to obtain information request data, and broadcast the generated information request data in a periodic broadcast manner.
Further, in order to avoid feedback after other terminal devices without configuration authority receive the information request data, the first terminal device may encrypt the session identifier and the terminal address according to a pre-stored public and private key pair in the process of generating the information request data, so that the terminal devices of other wireless networks cannot decrypt and feed back according to the public and private key pair. That is, the first terminal device may encrypt the session identifier and the terminal address according to a pre-stored public and private key to obtain an encrypted session identifier and an encrypted terminal address, and then generate the information request data according to the hotspot identifier, the encrypted session identifier, and the encrypted terminal address.
Specifically, the first terminal device may first obtain a public and private key pair from a preset storage space, encrypt the session identifier and the terminal address according to a public key in the public and private key pair to obtain an encrypted session identifier and an encrypted terminal address, and package the session identifier and the encrypted terminal address in combination with a hot spot identifier of the first terminal device to generate the information request data.
For example, referring to fig. 4, the first terminal device may encapsulate the hotspot identification in a mandatory field of a beacon (beacon) frame, and add the encrypted session identification and the encrypted terminal address in an option field of an optional extension field of the beacon frame.
It should be noted that, in the embodiment of the present application, only the session identifier and the terminal address are encrypted first, and then the hotspot identifier, the encrypted session identifier, and the encrypted terminal address are encapsulated in the data frame together.
And step 304, the second terminal device receives the information request data sent by the first terminal device.
In a possible implementation manner, the second terminal device may periodically search for a wireless hotspot in a current scene, and if a data frame sent by the wireless hotspot is detected, may determine that the wireless hotspot exists in the current scene, and may determine, according to a hotspot identifier in the data frame, whether the data frame is information request data, if the data frame is the information request data, step 305 may be executed, and if the data frame is not the information request data, the data frame may be ignored.
For example, after receiving a data frame sent by the wireless hotspot, the second terminal device may obtain an SSID carried in the data frame from a mandatory field at an appointed position of the data frame, and determine whether the SSID is a special SSID used for indicating that the first terminal device cannot join the wireless network. If the SSID is not the special SSID, the data frame may be ignored, but if the SSID is the special SSID, it may 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 multiple terminal devices, and the terminal device for detecting the wireless hotspot may be a terminal device with smaller power consumption when detecting the wireless hotspot, for example, a mobile phone or a tablet computer.
And 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 identification in the information request data is a preset special hotspot identification, it can be determined that the hotspot identification indicates that the first terminal device cannot access the wireless network, and the second terminal device can feed back network information data 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 the network information data by the second terminal device, the second terminal device may check the information request data, and determine whether the first terminal device that sends the information request data uses the second terminal device as a trusted device, that is, determine whether the second terminal device has a right to configure the first terminal device, thereby determining whether the network information data needs to be generated and fed back according to the determination result.
Referring to fig. 5, step 305 may include step 305a, step 305b, and step 305c:
step 305a, if the hotspot identification indicates that the first terminal equipment cannot be accessed to the wireless network, verifying the information request data according to a pre-stored public and private key pair, and determining whether the second terminal equipment has the authority to configure the first terminal equipment.
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, the session identifier and the terminal address in the information request data may be decrypted according to a private key in a pre-stored public and private key pair, and if the decryption is successful, it indicates that the first terminal device and the second terminal device use the same public and private key pair, and the second terminal device has a right to configure the first terminal device, and can configure the wireless network information of the first terminal device, so that step 305b may be executed.
If the decryption of the session identifier and the terminal address fails, it indicates that the public and private key pairs stored in 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 that the information request data can be ignored.
And 305b, if the second terminal device has the authority of configuring the first terminal device, acquiring configuration information of the second terminal device.
If it is determined that the second terminal device has the right to configure the first terminal device, the second terminal device may obtain the stored configuration information, so that in the subsequent step, network information data may be generated according to the configuration information, so that the first terminal device may join the wireless network according to the network information data.
In addition, in order to improve the effectiveness of the fed back network information data, the second terminal device may first determine whether the second terminal device can access the wireless network, so as to determine whether the stored configuration information can be added to the wireless network according to the determination result, and further determine whether the network information data can be generated according to the stored configuration information.
Optionally, the second terminal device may first determine whether the second terminal device accesses the wireless network, and if the second terminal device has already accessed the wireless network, it indicates that the second terminal device may join the wireless network according to the currently stored configuration information, and may obtain the configuration information of the second terminal device; if the second terminal device does not access the wireless network, the second terminal device may be controlled to access the wireless network according to the configuration information, and if the second terminal device successfully accesses the wireless network, it indicates that the configuration information currently stored by the second terminal device is valid, and the configuration information may be acquired.
If it is failed that the second terminal device joins the wireless network, it indicates that the configuration information currently stored by the second terminal device is also invalid information, and the second terminal device may also generate and broadcast the information request data in the manner of steps 302 to 303, so that other terminal devices in the wireless network may feed back the information request data sent by the second terminal device, thereby updating the configuration information of the second terminal device.
And 305c, generating network information data according to the configuration information and the session identifier.
After the second terminal device obtains the valid configuration information, it may 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, and in order to enable each first terminal device to accurately receive corresponding fed-back network information data, in the process of generating network information data, the second terminal device may further generate network information data by combining session identifiers in the received information request data.
Moreover, in order to avoid that terminal devices in other networks receive network information data sent by the second terminal device, the second terminal device may encrypt the configuration information and the session identifier through a public key in a public and private key pair in the process of generating the network information data. That is, the second terminal device may encrypt the configuration information and the session identifier according to the public and private key to obtain the encrypted configuration information and the encrypted session identifier, and then generate the network information data according to the encrypted configuration information and the encrypted session identifier.
In a possible implementation manner, the second terminal device may obtain a public-private key pair, encrypt the configuration information and the session identifier according to a public key in the public-private key pair, and encapsulate the encrypted configuration information and the encrypted session identifier at an assigned position of the data frame, so that the encapsulated data frame may be used as network information data.
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 the Action frame. In addition, the configuration information may include not only the network password of the wireless network but also the SSID of the wireless network.
And step 306, the second terminal device sends the network information data to the first terminal device through the hot spot function started by the first terminal device.
The network information data is used for indicating the first terminal equipment to access the wireless network according to the configuration information in the network information data.
After the second terminal device generates the network data, the generated network information data can be fed back to the first terminal device according to the wireless hotspot started by the first terminal device, so that the first terminal device can update the configuration information of the first terminal device according to the configuration information in the network information data, and then the second terminal device joins the wireless network according to the updated configuration information.
For example, after receiving a beacon frame sent by a first terminal device through a wireless hotspot, a second terminal device may generate a behavior frame including configuration information and a session identifier based on the beacon frame, and then feed back the generated behavior frame to the first terminal device according to the wireless hotspot started by the first terminal device, so that the first terminal device may join in a wireless network according to the configuration information in the behavior frame.
Step 307, the first terminal device receives network information data fed back by the second terminal device according to the information request data.
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 a plurality of first terminal devices, and any one terminal device may receive a plurality of network information data, step 308 may be executed to determine network information data matching the first terminal device from the plurality of network information data, so as to configure the first terminal device according to configuration information in the network information data.
And 308, the first terminal device configures the first terminal device according to the configuration information in the network information data.
The first terminal device may 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 that in the subsequent steps, the first terminal device may join the wireless network according to the updated configuration information.
In the process that the first terminal device performs configuration according to the network information data, decryption verification may be performed on the network information data first, and after the verification is passed, the first terminal device may be configured according to configuration information obtained by decryption, referring to fig. 7, where step 308 may include: step 308a, step 308b and step 308c.
Step 308a, according to the pre-stored public and private key pair, checking the network information data, and determining whether the network information data is matched with 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 and also receive data sent by terminal devices of other networks, and when receiving various data, the first terminal device may decrypt and check the network information data according to a pre-stored public and private key pair.
If the first terminal device can successfully decrypt the network information data, it can be determined that a public-private key pair of a second terminal device sending the network information data is consistent with a public-private key pair of the first terminal device, and the second terminal device has the authority for configuring the first terminal device.
Further, in the same wireless network, there may be a plurality of first terminal devices, and the second terminal device sends the network information data to the plurality of first terminal devices, so that the first terminal device may determine, according to the session identifier to be matched carried in the network information data, whether the network information data is matched with 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 alternative configuration information, and compare the session identifier with the session identifier to be matched. If the session identifier is consistent with the session identifier to be matched, the network information data is matched with the first terminal device, but if the session identifier is inconsistent with the session identifier to be matched, the network information data is not matched with the first terminal device.
In a possible implementation manner, the first terminal device may first obtain a public and private key pair from a preset storage space, and decrypt the network information data by using a private key of the public and private key pair to obtain the session identifier to be matched and the alternative configuration information carried by the network information data.
Then, the first terminal device may compare the session identifier to be matched with the session identifier generated in step 303, and determine whether the session identifier to be matched is consistent with the session identifier generated in step 303, and if the session identifier to be matched is consistent with the session identifier, it indicates that the network information data is sent to the first terminal device by the second terminal device, and the network information data is matched with the first terminal device. However, if the session identifier to be matched is not consistent with the session identifier, it indicates that the network information data is not matched with the first terminal device, and the network information data may be ignored.
And 308b, if the network information data is matched with the first terminal equipment, acquiring configuration information from the network information data.
Corresponding to step 308a, if the network information data matches the first terminal device, the first terminal device may use the alternative configuration information as the configuration information.
In the process of generating the network information data, the second terminal device encrypts and encapsulates the identifier to be matched and the alternative configuration information in the network information data, so that the first terminal device can use the alternative configuration information obtained by decryption as the configuration information for updating, which is sent by the second terminal device, after the decryption verification and the determination that the network information data is matched with the first terminal device.
And 308c, configuring the first terminal equipment according to the configuration information.
After the first terminal device obtains the configuration information, the historical configuration information of the first terminal device can be updated according to the configuration information to obtain the configured first terminal device, so that the first terminal device can be added into a wireless network in the subsequent steps to complete the correct configuration of the first terminal device.
For example, the first terminal device may obtain an SSID and a network password in the configuration information, obtain historical configuration information, compare the SSID with an SSID in the historical configuration information, update the SSID of the historical configuration information if the SSID is not consistent with the SSID in the historical configuration information, and not update the SSID of the historical configuration information again if the SSID is consistent with the SSID; similarly, the network password in the historical configuration information may be updated according to the network password in the above manner.
And 309, the first terminal equipment accesses the wireless network according to the updated configuration information.
The configuration information may include identification information of the wireless network and a network password.
After the historical configuration information is updated according to the network information data, the first terminal device may attempt to join the wireless network with the changed network information according to the updated configuration information. And if the first terminal equipment is successfully added into the wireless network, the successful configuration of the first terminal equipment is completed.
If the first terminal device fails to join the wireless network, step 302, step 303, step 307, and step 308 may be executed again, so as to update the configuration information of the first terminal device again, and attempt to join the wireless network again until the first terminal device successfully joins the wireless network.
Optionally, in the process that 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 matched with the identification information in the current scene according to the identification information, and then try to join the searched wireless network according to the updated network password, where if the first terminal device successfully joins the wireless network, it indicates that the configuration update of the first terminal device is successful.
To sum up, according to the method for configuring wireless network information of a device provided in the embodiment of the present application, when it is detected that a first terminal device cannot access a wireless network, the first terminal device starts a wireless hotspot function, and broadcasts information request data through the wireless hotspot function, and accordingly, a second terminal device can receive and generate network information data according to the information request data, and then sends the network information data to the first terminal device, and 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 configuration information in the network information data. In the technical scheme, the second terminal device can feed back the network information data according to the information request data by starting the wireless hotspot function and broadcasting the information request data, so that the first terminal device can configure according to the network information data, the operation that a user executes manual configuration on each first terminal device is avoided, and the efficiency of configuring the first terminal devices is improved.
Moreover, the information request data is encrypted through a public and private key pair, so that interaction between the first terminal device and terminal devices of other networks can be avoided, the first terminal device can only perform data interaction with the terminal devices in the same network, and the safety of the information request data is improved.
In addition, by comparing the session identifiers, whether the network information data fed back by the second terminal device is matched with the first terminal device can be determined, so that the accuracy of the feedback of the second terminal device to different first terminal devices can be improved.
Further, by determining whether the second terminal device that generates 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 validity of the network information data can be improved.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by functions and internal logic of the process, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Fig. 8 is a block diagram of a device wireless network information configuration apparatus according to an embodiment of the present application, and only shows a part related to the embodiment of the present application for convenience of description.
Referring to fig. 8, the apparatus includes:
a function starting module 801, configured to start a wireless hotspot function if it is detected that the wireless network cannot be accessed;
a broadcasting module 802, configured to broadcast information request data through the wireless hotspot function, where the information request data is used to request network information of the wireless network;
a receiving module 803, configured to receive network information data fed back by a second terminal device according to the information request data, where the network information data is generated after the second terminal device performs verification according to the information request data and is sent to the first terminal device;
a configuring module 804, 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, where 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 a physical address of the first terminal device;
the broadcasting module 802 is specifically configured to obtain the hotspot identifier, the session identifier, and the terminal address; generating the information request data according to the hotspot identification, the session identification and the terminal address; the information request data is periodically broadcast.
Optionally, the broadcasting module 802 is further specifically configured to encrypt 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; and generating the information request data according to the hotspot identification, the encrypted session identification and the encrypted terminal address.
Optionally, the configuration module 804 is specifically configured to verify the network information data according to a pre-stored public and private key pair, and determine whether the network information data matches the first terminal device; if the network information data is matched with the first terminal equipment, acquiring the configuration information from the network information data; and configuring the first terminal equipment according to the configuration information.
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 a session identifier to be matched and alternative configuration information; comparing the session identifier with the session identifier to be matched; if the session identifier is consistent with the session identifier to be matched, determining that the network information data is matched with the first terminal equipment; if the session identifier is inconsistent with the session identifier to be matched, determining that the network information data is not matched with the first terminal equipment;
the configuration module 804 is further specifically configured to use the alternative configuration information as the configuration information if the network information data is matched with the first terminal device.
Optionally, referring to fig. 9, the configuration information includes identification information of the wireless network and a network password;
the device also includes:
a searching module 805, configured to search for the wireless network according to the identification information;
and a connection module 806 for accessing the wireless network according to the network password.
Optionally, the apparatus further comprises:
an obtaining module 807 configured to obtain a public-private key pair generated when the second terminal device accesses a historical wireless network, where the historical wireless network is a wireless network before the configuration information changes.
To sum up, the device wireless network information configuration apparatus provided in this embodiment of the application, when detecting that the first terminal device cannot access the wireless network, the first terminal device starts the wireless hotspot function, and broadcasts the information request data through the wireless hotspot function, so that the second terminal device can receive and generate network information data according to the information request data, and send the network information data to the first terminal device, and 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 configuration information in the network information data. In the technical scheme, the second terminal device can feed back the network information data according to the information request data by starting the wireless hotspot function and broadcasting the information request data, so that the first terminal device can be configured according to the network information data, the operation that a user executes manual configuration on each first terminal device is avoided, and the efficiency of configuring the first terminal device is improved.
Corresponding to the device wireless network information configuration method described in the foregoing embodiment, fig. 10 is a block diagram of a device wireless network information configuration apparatus provided in the embodiment of the present application, and for convenience of description, only a part related to the embodiment of the present application is shown.
Referring to fig. 10, the apparatus includes:
a receiving module 1001, configured to receive information request data sent by a first terminal device, where the information request data is sent by a broadcast through a hot spot function that is turned on after the first terminal device detects that the first terminal device cannot access the wireless network;
a generating module 1002, configured to generate network information data according to the information request data and the configuration information of the second terminal device;
a sending module 1003, configured to send the network information data to the first terminal device through a hotspot function started by the first terminal device, where 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.
Optionally, the information request data includes a hotspot identifier and a session identifier, where 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 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 a pre-stored public and private key pair, and determine whether the second terminal device has a right to configure the first terminal device; if the second terminal equipment has the authority of configuring the first terminal equipment, acquiring configuration information of the second terminal equipment; and generating the network information data according to the configuration information and the session identification.
Optionally, the generating module 1002 is further specifically configured to encrypt the configuration information and the session identifier according to the public and private key pair to obtain encrypted configuration information and an encrypted session identifier; and generating the network information data according to the encrypted configuration information and the encrypted session identification.
Optionally, the generating module 1002 is further specifically configured to determine whether the second terminal device accesses the wireless network; and if the second terminal equipment has accessed the wireless network, acquiring the configuration information of the second terminal equipment.
Optionally, referring to fig. 11, the apparatus further includes:
a connection module 1004, configured to access the wireless network according to the configuration information if the second terminal device does not access the wireless network;
an obtaining module 1005, configured to obtain the configuration information if the wireless network is successfully accessed.
To sum up, according to the device wireless network information configuration apparatus provided in this embodiment of the present application, when it is detected that the first terminal device cannot access the wireless network, the first terminal device starts the wireless hotspot function, and broadcasts the information request data through the wireless hotspot function, and correspondingly, the second terminal device may receive the information request data broadcast and sent by starting the wireless hotspot function when the first terminal device detects that the first terminal device cannot access the wireless network, and generate network information data according to the information request data, and then send the network information data to the first terminal device, so that the first terminal device may 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 configuration information in the network information data. In the technical scheme, the second terminal device can feed back the network information data according to the information request data by starting the wireless hotspot function and broadcasting the information request data, so that the first terminal device can be configured according to the network information data, the operation that a user executes manual configuration on each first terminal device is avoided, and the efficiency of configuring the first terminal device is improved.
An embodiment of the present application further provides a terminal device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the method performed by the first terminal device or the second terminal device shown in fig. 3, 5, and 7 is implemented.
An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program, where the computer program is implemented to implement the method performed by the first terminal device or the second terminal device as shown in fig. 3, 5 and 7 when executed by a processor.
Fig. 12 is a schematic structural diagram of a terminal device according to 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 memory 122, and a computer program 122 stored in the memory 122 and executable on the at least one processor 121, wherein the processor 121 executes the computer program 122 to implement the steps in any of the various device wireless network information configuration method embodiments described above.
The terminal device 12 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The terminal device may include, but is not limited to, a processor 121, a memory 122. Those skilled in the art will appreciate that fig. 12 is merely an example of terminal device 12 and does not constitute a limitation on terminal device 12, and may include more or less components than those shown, or some components in combination, or different components, such as input output devices, network access devices, etc.
The Processor 121 may be a Central Processing Unit (CPU), and the Processor 121 may be other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, a discrete hardware component, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage 122 may in some embodiments be an internal storage unit of the terminal device 12, such as a hard disk or a memory of the terminal device 12. The memory 122 may also be an external storage device of the terminal device 12 in other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the terminal device 12. Further, the memory 122 may also include both an internal storage unit and an external storage device of the terminal device 12. The memory 122 is used for storing an operating system, an application program, a BootLoader (BootLoader), data, and other programs, such as program codes of the computer programs. The memory 122 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only used for distinguishing one functional unit from another, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described system embodiments are merely illustrative, and for example, the division of the modules or units is only one type of logical functional division, and other divisions may be realized in practice, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium and can implement the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include at least: any entity or apparatus capable of carrying computer program code to a terminal device, including recording media, computer Memory, read-Only Memory (ROM), random Access Memory (RAM), electrical carrier signals, telecommunications signals, and software distribution media. Such as a usb-disk, a removable hard disk, a magnetic or optical disk, etc. In some jurisdictions, computer-readable media may not be an electrical carrier signal or a telecommunications signal in accordance with legislative and proprietary practices.
The above-mentioned embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (12)

1. The method for configuring the wireless network information of the equipment is applied to a first terminal equipment in a wireless network, and comprises the following steps:
if the wireless network cannot be accessed, periodically starting a wireless hotspot function;
broadcasting information request data through the wireless hotspot function, wherein the information request data is used for requesting network information of the wireless network;
receiving network information data fed back by second terminal equipment according to the information request data, wherein the network information data are generated after the second terminal equipment is verified according to the information request data and are sent to the first terminal equipment;
according to configuration information in the network information data, configuring the first terminal device, wherein the configuration information is obtained and added into the network information data after the second terminal device has accessed the wireless network;
the configuring the first terminal device according to the configuration information in the network information data includes:
according to a pre-stored public and private key pair, checking the network information data to determine whether the network information data is matched with the first terminal equipment, wherein the public and private key pair is generated when the second terminal equipment is accessed into a historical wireless network, the historical wireless network is the wireless network historically accessed by the first terminal equipment and the second terminal equipment, and the public and private key pair is acquired when the first terminal equipment is accessed into the historical wireless network before;
if the network information data is matched with the first terminal equipment, acquiring the configuration information from the network information data;
and configuring the first terminal equipment according to the configuration information.
2. The device wireless network information configuration method according to claim 1, wherein the information request data includes a hotspot identification, a session identification and a terminal address, the hotspot identification is used for indicating that the first terminal device cannot access the wireless network, the session identification is used for identifying the first terminal device, and the terminal address is used for representing a physical address of the first terminal device;
the broadcasting information request data through the wireless hotspot function includes:
acquiring the hotspot identification, the session identification and the terminal address;
generating the information request data according to the hotspot identification, the session identification and the terminal address;
the information request data is periodically broadcast.
3. The device wireless network information configuration method according to claim 2, wherein the generating the information request data according to the hotspot identification, the session identification and the terminal address includes:
encrypting the session identifier and the terminal address according to a pre-stored public and private key to obtain an encrypted session identifier and an encrypted terminal address;
and generating the information request data according to the hotspot identification, the encrypted session identification and the encrypted terminal address.
4. The method for configuring wireless network information of a device according to claim 1, wherein said checking the network information data according to a pre-stored public-private key pair to determine whether the network information data matches the first terminal device comprises:
decrypting the network information data according to the public and private key pair to obtain a session identifier to be matched and alternative configuration information;
comparing the session identification with the session identification to be matched;
if the session identifier is consistent with the session identifier to be matched, determining that the network information data is matched with the first terminal equipment;
if the session identifier is not consistent with the session identifier to be matched, determining that the network information data is not matched with the first terminal equipment;
if the network information data is matched with the first terminal device, acquiring the configuration information from the network information data, including:
and if the network information data is matched with the first terminal equipment, taking the alternative configuration information as the configuration information.
5. The device wireless network information configuration method according to any one of claims 1 to 4, wherein the configuration information includes identification information of the wireless network and a network password;
after the configuring the first terminal device according to the configuration information in the network information data, the method further includes:
searching the wireless network according to the identification information;
and accessing the wireless network according to the network password.
6. The equipment wireless network information configuration method is applied to a second terminal device of a wireless network, and comprises the following steps:
receiving information request data periodically sent by first terminal equipment, wherein the information request data are sent by the first terminal equipment through a started hotspot function broadcast after the first terminal equipment detects that the first terminal equipment cannot be accessed to the wireless network;
generating network information data according to the information request data and the configuration information of the second terminal equipment;
sending the network information data to the first terminal equipment through a hotspot function started by the first terminal equipment, wherein the network information data is used for indicating the first terminal equipment to access the wireless network according to the configuration information in the network information data;
the information request data comprises a hotspot identification and a session identification, wherein the hotspot identification is used for indicating that the first terminal equipment cannot be accessed to the wireless network, and the session identification is used for identifying the first terminal equipment;
generating network information data according to the information request data and the configuration information of the second terminal device, including:
if the hotspot identification indicates that the first terminal equipment cannot be accessed to the wireless network, verifying the information request data according to a pre-stored public and private key pair to determine whether the second terminal equipment has the authority to configure the first terminal equipment, wherein the public and private key pair is generated when the second terminal equipment is accessed to a historical wireless network, the historical wireless network is the wireless network historically accessed by the first terminal equipment and the second terminal equipment, and the public and private key pair is sent to the first terminal equipment by the second terminal equipment when the first terminal equipment is previously accessed to the historical wireless network;
if the second terminal equipment has the authority of configuring the first terminal equipment, acquiring configuration information of the second terminal equipment;
generating the network information data according to the configuration information and the session identification;
the obtaining of the configuration information of the second terminal device includes:
judging whether the second terminal equipment is accessed to the wireless network;
and if the second terminal equipment has access to the wireless network, acquiring the configuration information of the second terminal equipment.
7. The device wireless network information configuring method of claim 6, wherein the generating the network information data according to the configuration information and the session identifier comprises:
encrypting the configuration information and the session identification according to the public and private keys to obtain encrypted configuration information and encrypted session identification;
and generating the network information data according to the encrypted configuration information and the encrypted session identification.
8. The device wireless network information configuration method of claim 6, wherein the method further comprises:
if the second terminal equipment is not accessed to the wireless network, accessing to the wireless network according to the configuration information;
and if the wireless network is successfully accessed, acquiring the configuration information.
9. The device wireless network information configuration device is applied to a first terminal device in a wireless network, and comprises the following components:
the function starting module is used for periodically starting a wireless hotspot function if the wireless network cannot be accessed is detected;
the broadcasting module is used for broadcasting information request data through the wireless hotspot function, and the information request data is used for requesting network information of the wireless network;
a receiving module, configured to 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 being verified according to the information request data and is sent to the first terminal device;
the configuration module is used for configuring the first terminal equipment according to configuration information in the network information data, wherein the configuration information is acquired after the second terminal equipment has accessed the wireless network and is added into the network information data;
the configuration module is specifically configured to verify the network information data according to a pre-stored public and private key pair, and determine whether the network information data matches the first terminal device; if the network information data is matched with the first terminal equipment, acquiring the configuration information from the network information data; and configuring the first terminal equipment according to the configuration information, wherein the public and private key pair is generated when the second terminal equipment is accessed to a historical wireless network, the historical wireless network is a wireless network which is historically accessed by the first terminal equipment and the second terminal equipment, and the public and private key pair is obtained when the first terminal equipment is previously accessed to the historical wireless network.
10. The device wireless network information configuration device is applied to a second terminal device of a wireless network, and comprises the following components:
the receiving module is used for receiving information request data periodically sent by first terminal equipment, wherein the information request data are sent by the first terminal equipment through a hot spot function broadcast started after the first terminal equipment detects that the first terminal equipment cannot be accessed to the wireless network;
a generating module, configured to generate network information data according to the information request data and the configuration information of the second terminal device;
a sending module, configured to send the network information data to the first terminal device through a hotspot function started by the first terminal device, where 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;
the information request data comprises a hotspot identification and a session identification, wherein the hotspot identification is used for indicating that the first terminal equipment cannot access the wireless network, and the session identification is used for identifying the first terminal equipment;
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 pair, and determine whether the second terminal device has a right to configure the first terminal device; if the second terminal equipment has the authority of configuring the first terminal equipment, acquiring configuration information of the second terminal equipment; generating the network information data according to the configuration information and the session identifier, wherein the public and private key pair is generated when the second terminal device accesses a historical wireless network, the historical wireless network is the wireless network historically accessed by both the first terminal device and the second terminal device, and the public and private key pair is sent to the first terminal device by the second terminal device when the first terminal device accesses the historical wireless network before;
the generating module is further specifically configured to determine whether the second terminal device accesses the wireless network; and if the second terminal equipment has access to the wireless network, acquiring the configuration information of the second terminal equipment.
11. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1 to 8 when executing the computer program.
12. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 8.
CN202010099341.4A 2020-02-18 2020-02-18 Equipment wireless network information configuration method and device Active CN113286294B (en)

Priority Applications (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
PCT/CN2020/125585 WO2021164312A1 (en) 2020-02-18 2020-10-30 Wireless network information configuration method and apparatus for device

Applications Claiming Priority (1)

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

Publications (2)

Publication Number Publication Date
CN113286294A CN113286294A (en) 2021-08-20
CN113286294B true CN113286294B (en) 2022-12-27

Family

ID=77274862

Family Applications (1)

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

Country Status (2)

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

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116684942A (en) * 2022-09-09 2023-09-01 荣耀终端有限公司 Network access method, electronic equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103533512A (en) * 2013-09-17 2014-01-22 英华达(上海)科技有限公司 Method, device and system for configuring and adding equipment into network group
CN104410970A (en) * 2014-12-23 2015-03-11 北京极科极客科技有限公司 Wireless intelligent accessing method

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008056889A1 (en) * 2006-11-07 2008-05-15 Lg Electronics Inc. Performing presence service in a wireless communication system
CN105101464B (en) * 2015-06-30 2019-01-11 广东美的制冷设备有限公司 Wireless network configuration method and radio 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
CN111132373B (en) * 2019-12-05 2023-08-04 北京小米移动软件有限公司 Network connection method, device and equipment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103533512A (en) * 2013-09-17 2014-01-22 英华达(上海)科技有限公司 Method, device and system for configuring and adding equipment into network group
CN104410970A (en) * 2014-12-23 2015-03-11 北京极科极客科技有限公司 Wireless intelligent accessing method

Also Published As

Publication number Publication date
CN113286294A (en) 2021-08-20
WO2021164312A1 (en) 2021-08-26

Similar Documents

Publication Publication Date Title
US20220330029A1 (en) Method for mutual recognition or mutual trust between bluetooth devices
US10880746B2 (en) Network connection method, apparatus, storage medium and terminal
EP4007321A1 (en) Information sharing method, terminal apparatus, storage medium, and computer program product
CN108476060B (en) Method for establishing classic Bluetooth connection between dual-mode Bluetooth devices and dual-mode Bluetooth device
CN108702623B (en) Configuration method and equipment of wireless local area network
US10904760B2 (en) Data transmission method, apparatus, and device
CN110431868B (en) Wi-Fi hotspot connection method and terminal
CN107483213B (en) Security authentication method, related device and system
EP3893595B1 (en) Establishment by a second terminal device of a wlan hotspot connection to a first terminal device for connecting to the internet
CN111355707B (en) Data processing method and related equipment
WO2019228270A1 (en) Method and device for accessing wireless router and computer readable storage medium
CN106550361B (en) Data transmission method, equipment and computer readable storage medium
US10454905B2 (en) Method and apparatus for encrypting and decrypting picture, and device
CN105704712B (en) Network resource sharing method, mobile terminal and server
CN104967601A (en) Data processing method and apparatus
US20190191301A1 (en) Association Establishment Method in Wireless Local Area Network, Terminal, and Access Point
WO2017128538A1 (en) Network search control method and device
CN113286294B (en) Equipment wireless network information configuration method and device
CN105940368A (en) Pattern lock unlocking method and terminal
CN110393021B (en) Connection method based on wireless communication and terminal
CN106815510B (en) Data processing method and terminal
CN105553718A (en) Method and device for displaying guidance information
CN111757320B (en) Method for starting vehicle and related equipment
CN113923005B (en) Method and system for writing data
CN107925565B (en) Algorithm updating method, equipment to be updated and server

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant