CN111954199A - Wireless network access method, mobile terminal and readable storage medium - Google Patents

Wireless network access method, mobile terminal and readable storage medium Download PDF

Info

Publication number
CN111954199A
CN111954199A CN202010846010.2A CN202010846010A CN111954199A CN 111954199 A CN111954199 A CN 111954199A CN 202010846010 A CN202010846010 A CN 202010846010A CN 111954199 A CN111954199 A CN 111954199A
Authority
CN
China
Prior art keywords
information
slave
slave device
network access
wireless 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.)
Pending
Application number
CN202010846010.2A
Other languages
Chinese (zh)
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.)
Shenzhen Microphone Holdings Co Ltd
Shenzhen Transsion Holdings Co Ltd
Original Assignee
Shenzhen Microphone Holdings 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 Shenzhen Microphone Holdings Co Ltd filed Critical Shenzhen Microphone Holdings Co Ltd
Priority to CN202010846010.2A priority Critical patent/CN111954199A/en
Publication of CN111954199A publication Critical patent/CN111954199A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/005Discovery of network devices, e.g. terminals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/11Allocation or use of connection identifiers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The application discloses a wireless network access method, which is applied to a mobile terminal, wherein the mobile terminal is provided with a hotspot module and a receiving module corresponding to the hotspot module, and the wireless network access method comprises the following steps: the master device is in a scanning state to scan the slave device information sent by the slave device, or the master device sends the master device information and receives the slave device information replied by the slave device; when the slave device information is matched with the device information in the information list, sending an association request to the slave device; and when the target slave device responds to the association request, establishing connection with the target slave device. The application also provides a mobile terminal and a readable storage medium. According to the wireless network access method, the master device actively sends the association request to the target slave device, and when the response of the target slave device is received, the target slave device is quickly connected, so that the phenomenon that the slave device association request is continuously reconnected with the master device due to overtime failure is avoided, and the power consumption is saved.

Description

Wireless network access method, mobile terminal and readable storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a wireless network access method, a mobile terminal, and a readable storage medium.
Background
The short-range wireless network technology is a communication technology in which both communication parties transmit information by radio waves and the transmission distance is limited to a short range. In the prior art, a slave device determines a master device by scanning a transmission from the slave device to the master device, so as to enable the slave device to transmit an authentication packet to the master device, when the master device determines that the slave device has the authority to connect with the master device according to the received authentication packet, the slave device may transmit an association request to the master device, and finally, the master device determines whether to allow the slave device to associate with the master device according to its own resource status.
In the process of first authentication and then association, if the master device is already in a busy state, other slave devices cannot associate, and from this point of view, the slave device is trying to connect all the time, and the problem that connection cannot be prompted after timeout occurs, that is, before association, the slave device does not know that the resource condition of the master device is in tension, and the authentication request and the association request sent out fail due to timeout, which finally results in large power consumption and poor user experience.
The above is only for the purpose of assisting understanding of the technical solutions of the present application, and does not represent an admission that the above is prior art.
Disclosure of Invention
The present application mainly aims to provide a wireless network access method, a terminal device and a readable storage medium, and aims to solve the problem of high power consumption caused by the fact that a slave device actively sends an authentication request and an association request to a master device to connect with the master device only when a timeout connection fails.
In order to achieve the above object, the present application provides a wireless network access method, which is applied to a mobile terminal, where the mobile terminal is provided with a hotspot module and a receiving module corresponding to the hotspot module, and the wireless network access method includes:
the method comprises the steps that a master device is in a scanning state to scan slave device information sent by a slave device, or the master device sends the master device information and receives slave device information replied by the slave device;
sending an association request to the slave device when the slave device information matches trusted device information;
and when receiving the target slave equipment to respond to the association request, establishing connection with the target slave equipment.
Optionally, the mobile terminal has a function of scanning and transmitting, and the wireless network access method further includes:
acquiring used resource data; wherein the used resource data comprises at least one of a number of connected slave devices and used network data traffic;
and when the used resource data is greater than or equal to a preset threshold value, executing the step that the master device is in a scanning state and scans the device information sent by the slave device.
Optionally, after the step of acquiring the current used resource data, the method further includes:
and when the used resource data is smaller than a preset threshold value, executing the steps that the master device sends device information and receives slave device information replied by the slave device.
Optionally, the step of scanning the device information sent by the slave device is followed by:
and when the equipment information does not match with the trusted equipment information, adding the slave equipment information of the slave equipment to an information list of the trusted equipment.
Optionally, the step of scanning the device information sent from the device is preceded by:
establishing or maintaining an information list of the trusted device according to a preset rule, wherein the preset rule comprises at least one of the following:
the user establishes or maintains an information list of the trusted device; or the like, or, alternatively,
the master device receives the application information of the slave device and then adds the application information into the information list; or the like, or, alternatively,
the master device generates a two-dimensional code and uses the two-dimensional code for the slave device to scan and join the two-dimensional code into the information list; or the like, or, alternatively,
and the master equipment receives the two-dimensional code sent by the slave equipment, scans the two-dimensional code and then adds the two-dimensional code into the information list.
Optionally, before the step of adding the application information of the slave device to the information list after the master device receives the application information, the method includes:
the master device and the slave device are connected in a preset communication mode, wherein the preset communication mode comprises at least one of WIFI connection, Bluetooth connection, ZIGBEE connection, UWB connection and data connection.
Optionally, the application information includes a MAC address of the slave device, and/or a device name.
Optionally, after the step of scanning the two-dimensional code of the slave device by the master device, the method includes:
acquiring slave equipment information of the slave equipment;
judging whether the slave equipment information is in the information list, and executing at least one of the following steps:
if not, adding the equipment information of the slave equipment into the information list, and/or sending an association request to the slave equipment, and establishing connection with the slave equipment according to the association request; or the like, or, alternatively,
and if so, sending an association request to the slave equipment, and establishing connection with the slave equipment according to the association request.
Optionally, the step of generating a two-dimensional code by the master device and using the two-dimensional code for the slave device to scan and join the two-dimensional code into the information list includes:
after the slave device information of the slave device is added to the information list, and/or the slave device corresponding to the slave device information establishes connection.
Optionally, before the step of adding the slave device information of the slave device to the trusted device information list, at least one of the following steps is performed:
judging whether the number of connected slave devices is smaller than a first preset value or not, and if so, adding the slave device information into the information list;
judging whether the number of the unconnected slave devices is larger than a second preset value or not, and if so, adding the slave device information into the information list;
judging whether the used network data flow is smaller than a third preset value, if so, adding the slave equipment information into the information list;
and judging whether the unused network data flow is larger than a fourth preset value or not, and if so, adding the slave equipment information into the information list.
Optionally, the master device information sent by the master device includes the information list; and/or the slave device information includes at least one of a MAC address and a device name.
Optionally, the association request includes target device information of the target slave device.
In addition, the present application further provides a wireless network access method, which is applied to a mobile terminal, where the mobile terminal is provided with a hotspot module and a receiving module corresponding to the hotspot module, so that the mobile terminal has functions of scanning and sending, and the wireless network access method includes:
the method comprises the steps that slave equipment sends slave equipment information or master equipment information sent by the slave equipment from scanning to the master equipment, and the slave equipment information is sent to the master equipment according to the master equipment information;
when an association request sent by a main device is received, target device information in the association request is obtained;
responding to the association request when the slave device information matches the target device information.
Optionally, before the step of sending the slave device information from the slave device, the wireless network access method includes:
and when the master device information sent by the master device is not scanned, the slave device is switched to a sending state to execute the step of sending the slave device information by the slave device.
Optionally, the wireless network access method further includes:
when the slave device information is not matched with the target device information, the slave device generates a two-dimensional code and sends the two-dimensional code to the master device, wherein the two-dimensional code contains slave device information of the slave device; or the like, or, alternatively,
when the slave device information does not match the target device information, the slave device sends application information to the master device, wherein the application information comprises the MAC address of the slave device and/or the device name.
Optionally, the slave device and the master device establish a connection according to a preset communication mode, where the preset communication mode includes at least one of a WIFI connection, a bluetooth connection, a ZIGBEE connection, a UWB connection, and a data connection.
In order to achieve the above object, the present application provides a wireless network access method, in which a master device scans a two-dimensional code of a slave device to obtain slave device information of the slave device; judging whether the slave equipment information is matched with the trusted equipment information or not, and executing at least one of the following steps:
if not, adding the equipment information of the slave equipment into an information list of the trusted equipment, sending an association request to the slave equipment, and establishing connection with the slave equipment according to the association request; or the like, or, alternatively,
and if so, sending an association request to the slave equipment, and establishing connection with the slave equipment according to the association request.
Optionally, the step of the master device scanning the two-dimensional code of the slave device includes:
establishing or maintaining an information list of the trusted device according to a preset rule, wherein the preset rule comprises at least one of the following:
the user establishes or maintains an information list of the trusted device; or the like, or, alternatively,
the master device receives the application information of the slave device and then adds the application information into the information list; or the like, or, alternatively,
the master device generates a two-dimensional code and uses the two-dimensional code for the slave device to scan and join the two-dimensional code into the information list; or the like, or, alternatively,
and the master equipment receives the two-dimensional code sent by the slave equipment, scans the two-dimensional code and then adds the two-dimensional code into the information list.
In order to achieve the above object, the present application provides a wireless network access method, where a master device generates a two-dimensional code and uses the two-dimensional code for scanning and joining with a slave device, and after adding slave device information of the slave device to an information list of a trusted device, a connection is established with the slave device.
Optionally, before the information list of the trusted device adds the slave device information of the slave device, at least one of the following steps is performed:
judging whether the number of connected slave devices is smaller than a first preset value or not, and if so, adding the slave device information into the information list;
judging whether the number of the unconnected slave devices is larger than a second preset value or not, and if so, adding the slave device information into the information list;
judging whether the used network data flow is smaller than a third preset value, if so, adding the slave equipment information into the information list;
and judging whether the unused network data flow is larger than a fourth preset value or not, and if so, adding the slave equipment information into the information list.
In addition, in order to achieve the above object, the present application further provides a mobile terminal, where the mobile terminal is provided with a hotspot module and a receiving module corresponding to the hotspot module, so that the mobile terminal has functions of scanning and sending, and the mobile terminal includes: a memory, a processor, and a wireless network access program stored in the memory and executable on the processor, the wireless network access program when executed by the processor implementing the steps of the wireless network access method as described above.
In addition, to achieve the above object, the present application also provides a readable storage medium storing thereon a wireless network access program, which when executed by the processor, implements the steps of the wireless network access method as described above.
According to the wireless network access method, the mobile terminal and the readable storage medium, the master device has a scanning function and a sending function at the same time, the master device scans the slave device information sent by the slave device, or the master device sends the master device information and receives the slave device information replied by the slave device, if the slave device information is matched with the device information in the trusted device information list, the master device actively sends the association request to the target slave device corresponding to the matched slave device information, and when the response of the target slave device is received, the fast connection with the target slave device is realized, so that the phenomenon that the slave device association request is continuously reconnected with the master device due to timeout failure is avoided, and the power consumption is saved.
Drawings
Fig. 1 is a block diagram of a mobile terminal according to various embodiments of a wireless network access method of the present application;
fig. 2 is a flowchart illustrating a first embodiment of a wireless network access method when a mobile terminal is used as a master device;
fig. 3 is a flowchart illustrating a second embodiment of a wireless network access method according to the present application;
fig. 4 is a schematic flow chart illustrating a process of using resource data smaller than a preset threshold in a second embodiment of a wireless network access method according to the present application;
fig. 5 is a flowchart illustrating a fifth embodiment of a wireless network access method when a mobile terminal is used as a slave device.
The implementation, functional features and advantages of the objectives of the present application will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for the convenience of description of the present application, and have no specific meaning in themselves. Thus, "module", "component" or "unit" may be used mixedly.
The mobile terminal may be implemented in various forms. When the mobile terminal is a master device, the mobile terminal may be a wireless AP, which may be a device such as a wireless router, a home gateway, a WNIC, etc., as long as it is used for providing a wireless network access service for a slave device. When the mobile terminal is a slave device, the mobile terminal described in this application may include a terminal device such as a mobile phone, a tablet computer, a notebook computer, a palm computer, a Personal Digital Assistant (PDA) wearable device, and the like, wherein the slave device can be accessed into a Wireless local area network established by the master device, such as a Wi-Fi (Wireless Fidelity) network. It will be understood by those skilled in the art that the configuration according to the embodiment of the present application can be applied to a fixed type terminal device, in addition to elements particularly used for moving purposes. Referring to fig. 1, fig. 1 is a block diagram illustrating a mobile terminal according to various embodiments of a wireless network access method of the present application, where the mobile terminal may include: memory 101, processor 102, and communication unit 103. those skilled in the art will appreciate that the block diagram of the mobile terminal shown in fig. 1 does not constitute a limitation of the mobile terminal, and that the mobile terminal may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. The memory 101 stores therein an operating system and a wireless network access program. The processor 102 is a control center of the mobile terminal, and the processor 102 executes a wireless network access program stored in the memory 101 to implement the steps of the embodiments of the wireless network access method of the present application. The communication module 103 may establish a connection with the server through a network protocol.
In addition, the mobile terminal is also provided with a hot spot module and a receiving module, so that the mobile terminal has the functions of scanning and sending. The hotspot module can be used for sharing a network to surrounding equipment, and the receiving module is used for connecting the hotspot shared network. For example, if the hotspot module of the first mobile terminal shares the network with other mobile terminals, the other mobile terminals may connect to the first mobile terminal through the receiving module and use the network shared by the first mobile terminal, that is, the other mobile terminals access the network of the first mobile terminal, at this time, the first mobile terminal may be considered as a master device, and the other mobile terminals are slave devices.
Furthermore, when the mobile terminal transmits device information such as mobile terminal broadcast device information, slave device information replied by the target slave device is received, and an association request is transmitted to the target slave device according to the slave device information and connection is established with the target slave device. When the mobile terminal scans, the slave device information sent by the current slave device is scanned, the target slave device is determined according to the slave device information, and then an association request is sent to the target slave device and connection is established with the target slave device.
When the mobile terminal is a master device, the wireless network access program of the mobile terminal in the storage area 101 realizes the following steps when being executed by the processor 102:
the method comprises the steps that a master device is in a scanning state, scans slave device information sent by a slave device, or the master device sends the device information and receives slave device information replied by the slave device;
sending an association request to the slave device when the slave device information matches trusted device information;
and when receiving the target slave equipment to respond to the association request, establishing connection with the target slave equipment.
When the mobile terminal is a slave device, the wireless network access program of the mobile terminal in the storage area 101 realizes the following steps when being executed by the processor 102:
the method comprises the steps that the slave equipment sends equipment information, or the slave equipment scans the master equipment information sent by the master equipment, and sends the slave equipment information to the master equipment according to the master equipment information;
when an association request sent by a main device is received, target device information in the association request is obtained;
and responding to the association request when the equipment information is matched with the target equipment information.
Based on the structural schematic diagram of the mobile terminal, the first to fourth embodiments of the wireless network access method of the present application are proposed.
Referring to fig. 2, fig. 2 is a schematic flowchart of a first embodiment of a wireless network access method when a mobile terminal is used as a master device, where in this embodiment, the wireless network access method includes the following steps:
step S10, the master device is in scanning state, scans the slave device information sent by the slave device, or the master device sends the master device information, and receives the slave device information replied by the slave device;
the main equipment information sent by the main equipment comprises an information list and equipment information corresponding to the main equipment; the information list is used for storing slave device information corresponding to each connected slave device, and the information list can be understood as an information list of a trusted device. The master device information is a unique identifier of the master device, and the master device information includes at least one of a MAC address and a device name of the master device. The slave device information is a unique identification of the slave device, and the slave device information includes at least one of a MAC address and a device name of the slave device.
The slave device information transmitted from the slave device may be in a broadcast format, and the step of scanning the slave device information transmitted from the slave device when the slave device transmits the slave device information in the broadcast format includes: scanning broadcast frames of the slave devices; parsing the broadcast frame results in slave device information for the slave device.
It should be noted that, a hot spot module and a receiving module are provided corresponding to the mobile terminal, so that the mobile terminal has functions of scanning and sending. The mobile terminal can be switched from the scanning state to the sending state under a first preset condition, optionally, the sending state includes a broadcasting state, and if the first preset condition is that the number of devices currently connected to the mobile terminal is smaller than a preset number, which indicates that the current network condition of the mobile terminal is loose, the mobile terminal can be triggered to be switched from the scanning state to the sending state such as the broadcasting state, so that other mobile terminals can access to a network shared by the mobile terminal; or, under a second preset condition, the mobile terminal may switch from the sending state to the scanning state, where the second preset condition is that when the number of devices currently connected to the mobile terminal is greater than the preset number, which indicates that the current network condition of the mobile terminal is nervous, the mobile terminal may be triggered to switch from the sending state to the scanning state, so as to selectively select other terminal devices to access the network currently shared by the mobile terminal. Or the mobile terminal can be in any state of scanning or sending without setting preset conditions, and connection between the master device and the slave device is carried out.
Optionally, before the step of scanning the slave device information sent by the slave device in step S10, the method includes:
establishing or maintaining an information list of the trusted device according to a preset rule, wherein the preset rule comprises at least one of the following:
the user establishes or maintains the information list of the trusted device, that is, the slave device information of the slave device to be connected can be added to the information list through manual operation of the user, and it can be understood that the user can also delete the slave device information stored in the information list through manual operation;
or, the master device adds the application information of the slave device to the information list after receiving the application information, where the application information includes the MAC address of the slave device and/or the device name, and it is easy to understand that the form of the application information sent from the slave device to the master device includes at least one of a short message, a two-dimensional code, and an upload to a third party such as a server or application software;
or the master device generates a two-dimensional code and uses the two-dimensional code for the slave device to scan and join the two-dimensional code into the information list, actually generates the two-dimensional code for the master device and sends the two-dimensional code to the slave device, and the slave device directly joins the information list of the trusted device by scanning the two-dimensional code, or the master device obtains slave device information of the slave device fed back when the slave device scans the two-dimensional code and adds the slave device information into the information list to update the information list;
or, the master device receives the two-dimensional code sent by the slave device, scans the two-dimensional code and then adds the two-dimensional code into the information list, and similarly, the two-dimensional code sent by the slave device contains slave device information of the slave device, and the master device directly scans the two-dimensional code to obtain slave device information of the slave device and adds the slave device information to the information list to update the information list of the trusted device.
It should be noted that, before the step of adding the application information of the slave device to the information list after the master device receives the application information, or before the step of generating a two-dimensional code by the master device and using the two-dimensional code for the slave device to scan and add the two-dimensional code to the information list, or before the step of adding the two-dimensional code sent by the master device to the information list of the trusted device after the master device receives the two-dimensional code sent by the slave device and scans the two-dimensional code, the method further includes the steps of: the method comprises the steps that the main equipment and the slave equipment are connected according to a preset communication mode, and the preset communication mode comprises at least one of WIFI connection, Bluetooth connection, ZIGBEE connection, UWB connection, MODEM connection, NFC connection, LiFi, short message connection and data connection.
Step S20, when the slave device information is matched with the trusted device information, sending an association request to the slave device;
and step S30, when the target slave device responds to the association request, establishing connection with the target slave device.
It should be noted that the association request includes target device information of the target slave device and master device information, the association request is used for the master device to send a signal for establishing connection to the slave device, and when the slave device responds to the association request, the connection between the master device and the slave device can be established. When the slave device information is matched with the trusted device information, an association request is sent to the slave device, that is, the slave device corresponding to the slave device information can serve as a target slave device connected with the master device, and the association request can be sent to the target slave device through the slave device information, so that the connection between the master device and the target slave device is realized, that is, the slave device accesses a wireless network provided by the master device.
It can be understood that whether the slave device information is matched with the trusted device information is judged, the slave device information can be sequentially compared with each device information in the information list of the trusted device, and when the slave device information is matched with one device information in the information list of the trusted device, it is indicated that the slave device information is matched with the device information in the information list of the trusted device; similarly, when the slave device information does not match any device information in the information list of the trusted device, it indicates that the slave device information does not match the device information in the information list of the trusted device.
Optionally, after the step of scanning the slave device information sent by the slave device in step S10, the method further includes:
and when the slave device information does not match the trusted device information, adding the slave device information of the slave device to an information list of the trusted device.
In an actual application process, when the master device and the slave device are connected for the first time, the device information of the slave device does not exist in the information list of the trusted device stored in the master device, that is, when the slave device information scanned by the slave device does not match the device information in the information list of the trusted device, or the slave device information is not included in the information list of the trusted device, the slave device information of the slave device may be added to the information list of the trusted device, so that the master device scans the slave device information of the slave device again, and the master device and the slave device are connected; or when the master device sends the device information and receives the slave device information replied by the slave device, the connection between the master device and the slave device is realized.
In the technical scheme disclosed in this embodiment, the master device has both a scanning function and a sending function, and scans the slave device information sent by the slave device at the master device, or the master device sends the master device information and receives the slave device information replied by the slave device, and if the slave device information matches the device information in the information list of the trusted device, the master device actively sends an association request to a target slave device corresponding to the matched slave device information, and when a response of the target slave device is received, the master device and the target slave device are quickly connected, so that a phenomenon that the slave device association request is continuously reconnected with the master device due to timeout failure is avoided, and power consumption is saved.
A second embodiment of the wireless network access method of the present application is provided based on the first embodiment, please refer to fig. 3, and fig. 3 is a flowchart illustrating the second embodiment of the wireless network access method of the present application. In this embodiment, the wireless network access method further includes:
step S40, acquiring used resource data; wherein the used resource data comprises at least one of a number of connected slave devices and used network data traffic;
and step S50, when the used resource data is greater than or equal to the preset threshold, executing the step S10 that the master device is in a scanning state and scanning the slave device information sent by the slave device.
The used resource data includes at least one of a number of connected slave devices and used network data traffic. The number of connected slave devices refers to the mobile terminals currently having a wireless network connection with the master device. The master device has recorded therein an identification of each connected slave device, such as slave device information, which can determine the number of connected slave devices based on the identification of the slave device. The used network data flow refers to the sum of the quantity data of the network access operation corresponding to each slave device which is currently connected with the master device. The used network data traffic can be obtained by obtaining a network access record, where the network access record is used for the network access status of the connected slave devices, and the network access record includes information such as time, traffic, and data size of a network access operation corresponding to each slave device.
The method for acquiring the used resource data includes acquiring the used resource data, that is, acquiring the number of the currently connected slave devices, when the used resource data is the number of the connected slave devices, and acquiring the used resource data, that is, acquiring the number of the currently connected slave devices, through a preset time interval, or acquiring the used resource data, that is, acquiring the used resource data by newly adding the connected slave devices when detecting that the number of the connected slave devices changes, which is not limited herein. When the used resource is the used network data traffic, the current used resource data, that is, the current used network data traffic, may be obtained through a preset time interval, or may be obtained in real time, which is not limited herein.
In practical application, the master device is provided with the maximum connection number of the slave devices, which is the maximum number of the slave devices, i.e. mobile terminals, that the master device can provide connection with the wireless network. When the used resource data is greater than or equal to a preset threshold value, namely, any one of the number of slave devices which are currently connected by the master device and the used network data flow is greater than or equal to the preset threshold value, the situation that the current used resource data of the master device is in shortage is indicated, in order to avoid overload connection of the master device, when the used resource data is greater than or equal to the preset threshold value, and when the current master device is in a sending state, the master device is switched from the sending state to a scanning state, the step that the master device scans slave device information sent by the slave device is executed, and the master device can determine whether to send a correlation request to the scanned slave device, and overload connection cannot be caused; or when the main device uses the resource data, the main device stops scanning or sending until the used resource data is smaller than the preset value, and then starts to execute scanning or sending operation.
The preset threshold is a minimum value representing the shortage of the used resource data of the master device, and may be preset according to actual requirements, or may be set by obtaining a value obtained by a large amount of experimental data when the shortage of the used resource data of the master device is detected, which is not limited to this. It will be appreciated that the preset threshold is less than the maximum number of connections that the master device can connect to a slave device or the maximum data traffic that can be used by a connected slave device.
Optionally, referring to fig. 4, in fig. 4, a flowchart illustrating that used resource data in a second embodiment of the wireless network access method of the present application is smaller than a preset threshold is shown, and after step S40, the method further includes:
and step S60, when the used resource data is smaller than the preset threshold, executing the step S10 that the master device sends the device information and receives the slave device information replied by the slave device.
Similarly, when the used resource data is smaller than the preset threshold, that is, both the number of slave devices currently connected to the master device and the used network data traffic are smaller than the preset threshold, it indicates that the current available resource data of the master device is loose, and when the used resource data is smaller than the preset threshold, and the current master device is in the scanning state, the master device switches from the scanning state to the sending state, and executes the steps of sending device information by the master device and receiving slave device information replied by the slave device.
In the technical solution disclosed in this embodiment, by obtaining current used resource data, such as the number of connected slave devices and/or the used network data traffic, and comparing the used resource data with a preset threshold, when the used resource data is greater than or equal to the preset threshold, that is, when the current available resource data of the master device is insufficient, the master device scans the slave device information sent by the slave device; when the used resource data is smaller than a preset threshold value, namely the current available resource data of the master device is loose, executing the master device to send device information, and receiving slave device information replied by the slave device; the master device is connected with the slave device in a scanning mode or a sending mode according to the self-used resource data which is judged in advance, so that the slave device is prevented from being continuously reconnected.
A third embodiment of the wireless network access method according to the present application is provided based on any one of the above embodiments, in this embodiment, after the step of receiving, by the master device, the two-dimensional code sent by the slave device and scanning the two-dimensional code of the slave device, the method includes:
acquiring slave equipment information of the slave equipment;
judging whether the slave equipment information is in the information list, and executing at least one of the following steps:
if not, adding the equipment information of the slave equipment into the information list, and/or sending an association request to the slave equipment, and establishing connection with the slave equipment according to the association request; or the like, or, alternatively,
and if so, sending an association request to the slave equipment, and establishing connection with the slave equipment according to the association request.
The method comprises the steps that after a two-dimensional code sent by a slave device is received by a master device and is scanned to obtain slave device information of the slave device, whether the slave device information is in an information list or not is judged, the slave device information can be sequentially compared with each piece of device information in the information list, when the slave device information is matched with one piece of device information in the information list, the slave device information is matched with the piece of device information in the information list, namely the slave device information is in the information list, an association request is directly sent to the slave device through the matched slave device information, and when the slave device responds to the association request, connection with the slave device is achieved, namely connection with the slave device is established according to the association request. Similarly, when the slave device information is not matched with any device information in the information list, it indicates that the slave device information is not matched with the device information in the information list, that is, the slave device information is not in the information list, and the slave device information can be added to the information list; after the slave device information is added to the information list, an association request can be sent to the slave device corresponding to the slave device information, so that connection can be established with the slave device when the slave device responds to the association request; and the slave device information matching method also can directly send an association request to the slave device corresponding to the slave device information according to the matched slave device information, and further establishes connection with the slave device after receiving the slave device response.
Compared with any of the above embodiments, a new way for establishing connection between the master device and the slave device is provided, in the technical scheme disclosed in this embodiment, the slave device information of the slave device is obtained based on the two-dimensional code sent by the master device through the slave device, and as long as the slave device information is matched with the device information in the information list, the association request can be directly sent to the slave device, and the slave device is connected with the slave device after receiving the response from the slave device; or, when the slave device information is not matched with the device information in the information list, the slave device information is added to a new trusted device list, so that when the same slave device information is obtained again through a two-dimensional code or in other manners, an association request can be directly sent to the slave device corresponding to the slave device information.
A fourth embodiment of the wireless network access method according to the present application is provided based on any one of the above embodiments, where in this embodiment, after the step of generating a two-dimensional code by a master device and using the two-dimensional code for scanning and joining by a slave device, the method includes:
and adding the slave equipment information of the slave equipment in the information list, and/or establishing connection with the slave equipment corresponding to the slave equipment information.
The two-dimensional code is generated based on the master device and sent to the slave device, the slave device information of the slave device added to the information list can be directly added to the information list by scanning the two-dimensional code through the slave device, the slave device information corresponding to the slave device can also be directly added to the information list through scanning the two-dimensional code through the slave device, the master device obtains the slave device information fed back by the slave device, and then the slave device information is added to the information list. Optionally, after the slave device information is added to the information list, an association request may be sent to the slave device corresponding to the slave device information, so as to establish a connection with the slave device according to the association request; or generating a two-dimensional code based on the master device and sending the two-dimensional code to the slave device, and when the master device receives slave device information obtained by scanning the two-dimensional code by the slave device, directly sending an association request to the slave device corresponding to the slave device information so as to establish connection with the slave device according to the association request. Wherein establishing a connection with the slave device according to the association request comprises: and when the slave equipment responds to the association request, establishing connection with the slave equipment.
Optionally, before the step master device generates a two-dimensional code and uses the two-dimensional code for the slave device to scan and join, at least one of the following steps is performed:
judging whether the number of connected slave devices is smaller than a first preset value, if so, indicating that the master device can be connected with other slave devices, adding the slave device information into the information list;
judging whether the number of the slave devices which are not connected is larger than a second preset value, if so, indicating that the master device can be connected with other slave devices, adding the slave device information into the information list;
judging whether the used network data flow is smaller than a third preset value, if so, indicating that the current usable network data flow of the master device is loose, adding the slave device information into the information list;
and judging whether the unused network data flow is greater than a fourth preset value, if the unused network data flow is greater than the fourth preset value, namely the current usable network data flow of the master equipment is loose, adding the slave equipment information into the information list.
The number of connected slave devices refers to the mobile terminals currently having wireless network connection with the master device. The master device has recorded therein an identification of each connected slave device, such as slave device information, which can determine the number of connected slave devices based on the identification of the slave device. The used network data flow refers to the sum of the quantity data of the network access operation corresponding to each slave device which is currently connected with the master device. The used network data traffic can be obtained by obtaining a network access record, where the network access record is used for the network access status of the connected slave devices, and the network access record includes information such as time, traffic, and data size of a network access operation corresponding to each slave device.
Compared with any of the above embodiments, a new way of establishing a connection between a master device and a slave device is provided, in the technical solution disclosed in this embodiment, based on a two-dimensional code generated by the master device, the two-dimensional code is sent to the slave device, so as to add slave device information of the slave device to an information list when the slave device scans the two-dimensional code, or the slave device information of the slave device is fed back to the master device, so as to enable the master device to send a correlation request to the slave device according to the slave device information.
Based on the above schematic structural diagram of the mobile terminal, a fifth embodiment of the wireless network access method of the present application is provided.
Referring to fig. 5, fig. 5 is a schematic flowchart of a fifth embodiment of a wireless network access method when a mobile terminal is used as a slave device, where in this embodiment, the wireless network access method includes the following steps:
step S70, the slave device sends the slave device information, or the master device information sent by the slave device scanning to the master device, and sends the slave device information to the master device according to the master device information;
the slave device information is a unique identification of the slave device, and the slave device information includes at least one of a MAC address and a device name of the slave device. The slave device scans the slave device information sent by the slave device corresponding to the master device in the first embodiment to realize that the master device scans to obtain the sending data packet with the slave device information sent by the slave device, and then parses the sending data packet to obtain the slave device information of the slave device. Optionally, before the slave device sends the device information in step S70, the method includes: and when the master device information transmitted by the master device is not scanned, the slave device is switched to a transmission state to execute the step of transmitting the device information by the slave device. It should be noted that, the master device information that is not sent by the master device by scanning, that is, no master device currently sends, corresponds to the first embodiment, when the master device satisfies the second preset condition, the master device switches from the sending state to the scanning state, and when the master device information that is sent by the master device is not scanned, the slave device switches to the sending state, so that the slave device sends the slave device information.
It is understood that, corresponding to the first embodiment, the master device may switch from the scanning state to the sending state if the first preset condition is satisfied. When the master device is in a transmission state, the slave device scans the transmitted device information of the master device, and then transmits the slave device information of the slave device to the master device according to the device information. After receiving the slave device information replied by the slave device, the master device executes a step of sending an association request to the slave device if the slave device information is matched with the device information in the information list. It should be noted that, when the slave device is in the sending state and does not receive the association request within the preset time period, the slave device may switch to the scanning state to scan whether the master device information sent by the master device exists.
Step S80, when receiving the association request sent by the main device, obtaining the target device information in the association request;
and step S90, responding to the association request when the slave device information is matched with the target device information.
The association request comprises target equipment information and master equipment information of the target slave equipment, the association request is used for sending a signal for establishing connection to the slave equipment by the master equipment, and when the slave equipment responds to the association request, connection establishment between the master equipment and the slave equipment can be realized. When the slave device receives the association request sent by the master device, the slave device information of the slave device can be compared with the target device information in the association request, and when the slave device information is matched with the target device information, the association request sent by the master device is responded, so that the master device and the slave device are connected.
Optionally, corresponding to the first embodiment, the master device receives a two-dimensional code sent by the slave device, scans the two-dimensional code to obtain slave device information of the slave device, and further adds the slave device information to the information list to update the trusted information device list, when the slave device information does not match with the target device information, the slave device generates the two-dimensional code and sends the two-dimensional code to the master device, where the two-dimensional code includes slave device information of the slave device; or, corresponding to the first embodiment, the master device joins after receiving the application information of the slave device, and when the slave device information does not match the target device information, the slave device sends the application information to the master device, where the application information includes the MAC address and/or the device name of the slave device. It should be noted that the form of the application information sent from the slave device to the master device includes at least one of a short message, a two-dimensional code, and an upload to a third party such as a server or application software.
In an actual application process, when the slave device is not connected with the master device, that is, before the slave device does not access to the network shared by the master device, the slave device is connected with the master device in a preset communication mode, wherein the preset communication mode includes at least one of a WIFI connection, a bluetooth connection, a ZIGBEE connection, a UWB connection, and a data connection.
Corresponding to the first embodiment, in the technical solution disclosed in this embodiment, the master device has both a scanning function and a sending function, and scans the slave device information sent by the slave device at the master device, or the master device sends the master device information and receives the slave device information replied by the slave device, and if the slave device information matches the device information in the information list, the master device actively sends an association request to the target slave device corresponding to the matched slave device information, and when receiving a response from the target slave device, fast connection with the target slave device is implemented, so that a phenomenon that the slave device association request is continuously reconnected with the master device due to timeout failure is avoided, and power consumption is saved.
Based on the above schematic structural diagram of the mobile terminal, a sixth embodiment of the wireless network access method of the present application is provided. In the embodiment, a master device scans a two-dimensional code of a slave device to acquire slave device information of the slave device; judging whether the slave equipment information is matched with the trusted equipment information, wherein the wireless network access method comprises the following steps:
if not, adding the equipment information of the slave equipment into the information list of the trusted equipment, sending an association request to the slave equipment, and establishing connection with the slave equipment according to the association request; or the like, or, alternatively,
and if so, sending an association request to the slave equipment, and establishing connection with the slave equipment according to the association request.
The method comprises the steps that after a two-dimensional code sent by a slave device is received by a master device and is scanned to obtain slave device information of the slave device, whether the slave device information is in an information list or not is judged, the slave device information can be sequentially compared with each piece of device information in the information list, when the slave device information is matched with one piece of device information in the information list, the slave device information is matched with the piece of device information in the information list, namely the slave device information is in the information list, an association request is directly sent to the slave device through the matched slave device information, and when the slave device responds to the association request, connection with the slave device is achieved, namely connection with the slave device is established according to the association request. Similarly, when the slave device information does not match any device information in the information list, it indicates that the slave device information does not match the device information in the information list, that is, the slave device information is not in the information list, or after the slave device information is added to the information list, an association request is sent to the slave device corresponding to the slave device information, so as to establish a connection with the slave device when the slave device receives a response to the association request.
Optionally, the step of the master device scanning the two-dimensional code of the slave device includes:
establishing or maintaining an information list of the trusted device according to a preset rule, wherein the preset rule comprises at least one of the following: the user establishes or maintains an information list of the trusted device; or, the master device adds the application information of the slave device into the information list after receiving the application information; or the master device generates a two-dimensional code and uses the two-dimensional code for the slave device to scan and join the two-dimensional code into the information list; or the master device receives the two-dimensional code sent by the slave device, scans the two-dimensional code and then adds the two-dimensional code into the information list.
It should be noted that, the user maintains the information list, that is, the slave device information of the slave device to be connected may be added to the information list through a manual operation of the user, and it may be understood that the user may also manually delete the slave device information already stored in the information list; or, the master device joins the slave device after receiving the application information of the slave device, where the application information includes an MAC address of the slave device and/or a device name, and it is easy to understand that the form of the application information sent from the slave device to the master device includes at least one of a short message, a two-dimensional code, and an upload to a third party such as a server or application software; or the master device generates a two-dimensional code and uses the two-dimensional code for the slave device to scan and join, actually generates the two-dimensional code for the master device and sends the two-dimensional code to the slave device, and the slave device directly joins the information list by scanning the two-dimensional code, or the master device acquires slave device information of the slave device fed back when the slave device scans the two-dimensional code and adds the slave device information to the information list to update the information list; or, the master device receives the two-dimensional code sent by the slave device and scans the two-dimensional code, and then joins the two-dimensional code.
In the technical scheme disclosed in this embodiment, the slave device information of the slave device is obtained based on the two-dimensional code sent by the master device through the slave device, and as long as the slave device information is matched with the device information in the information list, the association request can be directly sent to the slave device, and after receiving the response of the slave device, the connection with the slave device is established; or when the slave device information is not matched with the device information in the information list, the slave device information is added to the new trusted device list, so that when the same slave device information is obtained again through the two-dimensional code or in other manners, the sending association request can be directly sent to the slave device corresponding to the slave device information, and the operation is simpler while the energy consumption is saved.
Based on the above schematic structural diagram of the mobile terminal, a sixth embodiment of the wireless network access method of the present application is provided. In this embodiment, a master device generates a two-dimensional code and uses the two-dimensional code for scanning and joining of a slave device, and after an information list of a trusted device adds slave device information of the slave device, a connection is established with the slave device.
The two-dimensional code is generated based on the master device and sent to the slave device, the slave device information of the slave device added to the information list can be directly added to the information list by scanning the two-dimensional code through the slave device, or the slave device information fed back by the slave device can be obtained by the master device after scanning the two-dimensional code through the slave device, and then the slave device information is added to the information list, and furthermore, after the slave device information is added to the information list, an association request can be sent to the slave device corresponding to the slave device information to establish a connection with the slave device according to the association request, wherein the establishment of the connection with the slave device according to the association request includes: and when the slave equipment responds to the association request, establishing connection with the slave equipment.
Optionally, before the information list adds the slave device information of the slave device, at least one of the following steps is performed:
judging whether the number of connected slave devices is smaller than a first preset value, if so, indicating that the master device can be connected with other slave devices, adding the slave device information into the information list;
judging whether the number of the slave devices which are not connected is larger than a second preset value, if so, indicating that the master device can be connected with other slave devices, adding the slave device information into the information list;
judging whether the used network data flow is smaller than a third preset value, if so, indicating that the current usable network data flow of the master device is loose, adding the slave device information into the information list;
and judging whether the unused network data flow is greater than a fourth preset value, if the unused network data flow is greater than the fourth preset value, namely the current usable network data flow of the master equipment is loose, adding the slave equipment information into the information list.
The number of connected slave devices refers to the mobile terminals currently having wireless network connection with the master device. The master device has recorded therein an identification of each connected slave device, such as slave device information, which can determine the number of connected slave devices based on the identification of the slave device. The used network data flow refers to the sum of the quantity data of the network access operation corresponding to each slave device which is currently connected with the master device. The used network data traffic can be obtained by obtaining a network access record, where the network access record is used for the network access status of the connected slave devices, and the network access record includes information such as time, traffic, and data size of a network access operation corresponding to each slave device.
In the technical scheme disclosed in this embodiment, the two-dimensional code generated by the master device is based on, and the two-dimensional code is sent to the slave device, so that the slave device information of the slave device is added to the information list when the slave device scans the two-dimensional code, or the slave device information of the slave device is fed back to the master device, so that the master device sends the association request to the slave device according to the slave device information, and the operation is simpler while the energy consumption is saved.
The application also provides a mobile terminal, which is provided with a hotspot module and a receiving module corresponding to the hotspot module so that the mobile terminal has the functions of scanning and sending, the mobile terminal comprises a memory, a processor and a wireless network access program which is stored in the memory and can be operated on the processor, and the wireless network access program is executed by the processor to realize the steps of the wireless network access method in any embodiment.
The present application also provides a computer readable storage medium having a wireless network access program stored thereon, which when executed by the processor implements the steps of the wireless network access method as in any of the above embodiments.
In the embodiments of the mobile terminal and the readable storage medium provided in the present application, all technical features of the embodiments of the wireless network access method are included, and the expanding and explaining contents of the specification are basically the same as those of the embodiments of the wireless network access method, and are not described herein again.
Embodiments of the present application also provide a computer program product, which includes computer program code, when the computer program code runs on a computer, the computer is caused to execute the method as described in the above various possible embodiments.
An embodiment of the present application further provides a chip, which includes a memory and a processor, where the memory is used to store a computer program, and the processor is used to call and run the computer program from the memory, so that a device in which the chip is installed executes the method described in the above various possible embodiments.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, the recitation of an element by the phrase "comprising an … …" does not exclude the presence of additional like elements in the process, method, article, or apparatus that comprises the element, and further, where similarly-named elements, features, or elements in different embodiments of the disclosure may have the same meaning, or may have different meanings, that particular meaning should be determined by their interpretation in the embodiment or further by context with the embodiment.
It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope herein. Depending on the context, the word "if" as used herein may be interpreted as "at … …" or "at … …" or "in response to a determination". Also, as used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context indicates otherwise. It will be further understood that the terms "comprises," "comprising," "includes" and/or "including," when used in this specification, specify the presence of stated features, steps, operations, elements, components, items, species, and/or groups, but do not preclude the presence, or addition of one or more other features, steps, operations, elements, components, species, and/or groups thereof. The terms "or" and/or "as used herein are to be construed as inclusive or meaning any one or any combination. Thus, "A, B or C" or "A, B and/or C" means "any of the following: a; b; c; a and B; a and C; b and C; A. b and C ". An exception to this definition will occur only when a combination of elements, functions, steps or operations are inherently mutually exclusive in some way.
It should be understood that, although the steps in the flowcharts in the embodiments of the present application are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and may be performed in other orders unless explicitly stated herein. Moreover, at least some of the steps in the figures may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, in different orders, and may be performed alternately or at least partially with respect to other steps or sub-steps of other steps.
It should be noted that step numbers such as S10 and S20 are used herein for the purpose of more clearly and briefly describing the corresponding content, and do not constitute a substantial limitation on the sequence, and those skilled in the art may perform S20 first and then S10 in specific implementation, which should be within the scope of the present application.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, a controlled terminal, or a network device) to execute the method of each embodiment of the present application.
The above description is only a preferred embodiment of the present application, and not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings of the present application, or which are directly or indirectly applied to other related technical fields, are included in the scope of the present application.

Claims (22)

1. A wireless network access method is applied to a mobile terminal, the mobile terminal is provided with a hotspot module and a receiving module, and the wireless network access method is characterized by comprising the following steps:
the method comprises the steps that a master device is in a scanning state to scan slave device information sent by a slave device, or the master device sends the master device information and receives slave device information replied by the slave device;
sending an association request to the slave device when the slave device information matches trusted device information;
and when receiving the target slave equipment to respond to the association request, establishing connection with the target slave equipment.
2. The wireless network access method of claim 1, wherein the mobile terminal has a function of scanning and transmitting, the wireless network access method further comprising:
acquiring used resource data; wherein the used resource data comprises at least one of a number of connected slave devices and used network data traffic;
and when the used resource data is greater than or equal to a preset threshold value, executing the step that the master device is in a scanning state and scans the device information sent by the slave device.
3. The wireless network access method of claim 2, wherein the step of obtaining the current used resource data is followed by further comprising:
and when the used resource data is smaller than a preset threshold value, executing the steps that the master device sends device information and receives slave device information replied by the slave device.
4. The wireless network access method of any of claims 1 to 3, wherein the step of scanning for device information sent from a device is followed by:
and when the equipment information does not match with the trusted equipment information, adding the slave equipment information of the slave equipment to an information list of the trusted equipment.
5. The wireless network access method of any one of claims 1 to 3, wherein the step of scanning for device information sent from a device is preceded by:
establishing or maintaining an information list of the trusted device according to a preset rule, wherein the preset rule comprises at least one of the following:
the user establishes or maintains an information list of the trusted device; or the like, or, alternatively,
the master device receives the application information of the slave device and then adds the application information into the information list; or the like, or, alternatively,
the master device generates a two-dimensional code and uses the two-dimensional code for the slave device to scan and join the two-dimensional code into the information list; or the like, or, alternatively,
and the master equipment receives the two-dimensional code sent by the slave equipment, scans the two-dimensional code and then adds the two-dimensional code into the information list.
6. The wireless network access method of claim 5, wherein the step of adding the master device to the information list after receiving the application information of the slave device comprises:
the master device and the slave device are connected in a preset communication mode, wherein the preset communication mode comprises at least one of WIFI connection, Bluetooth connection, ZIGBEE connection, UWB connection and data connection.
7. The wireless network access method of claim 5, wherein the application information includes a MAC address of the slave device, and/or a device name.
8. The wireless network access method of claim 5, wherein the step of the master device scanning the two-dimensional code of the slave device is followed by:
acquiring slave equipment information of the slave equipment;
judging whether the slave equipment information is in the information list, and executing at least one of the following steps:
if not, adding the equipment information of the slave equipment into the information list, and/or sending an association request to the slave equipment, and establishing connection with the slave equipment according to the association request; or the like, or, alternatively,
and if so, sending an association request to the slave equipment, and establishing connection with the slave equipment according to the association request.
9. The wireless network access method of claim 5, wherein the step of the master device generating a two-dimensional code and using the two-dimensional code for the slave device to scan for joining to the list of information is followed by the step of:
after the slave device information of the slave device is added to the information list, and/or the slave device corresponding to the slave device information establishes connection.
10. The wireless network access method of claim 9, wherein the step of adding the slave device information of the slave device to the trusted device information list is preceded by the step of performing at least one of the following steps:
judging whether the number of connected slave devices is smaller than a first preset value or not, and if so, adding the slave device information into the information list;
judging whether the number of the unconnected slave devices is larger than a second preset value or not, and if so, adding the slave device information into the information list;
judging whether the used network data flow is smaller than a third preset value, if so, adding the slave equipment information into the information list;
and judging whether the unused network data flow is larger than a fourth preset value or not, and if so, adding the slave equipment information into the information list.
11. The wireless network access method according to any one of claims 1 to 3, wherein the master device information transmitted by the master device includes the information list; and/or the slave device information includes at least one of a MAC address and a device name.
12. The wireless network access method of any of claims 1-3, wherein the association request includes target device information for a target slave device.
13. A wireless network access method is applied to a mobile terminal, the mobile terminal is provided with a hotspot module and a receiving module so that the mobile terminal has the functions of scanning and sending, and the wireless network access method is characterized by comprising the following steps:
the method comprises the steps that slave equipment sends slave equipment information or master equipment information sent by the slave equipment from scanning to the master equipment, and the slave equipment information is sent to the master equipment according to the master equipment information;
when an association request sent by a main device is received, target device information in the association request is obtained;
responding to the association request when the slave device information matches the target device information.
14. The wireless network access method of claim 13, wherein the step of the slave device transmitting slave device information is preceded by the wireless network access method comprising:
and when the master device information sent by the master device is not scanned, the slave device is switched to a sending state to execute the step of sending the slave device information by the slave device.
15. The wireless network access method of claim 13, wherein the wireless network access method further comprises:
when the slave device information is not matched with the target device information, the slave device generates a two-dimensional code and sends the two-dimensional code to the master device, wherein the two-dimensional code contains slave device information of the slave device; or the like, or, alternatively,
when the slave device information does not match the target device information, the slave device sends application information to the master device, wherein the application information comprises the MAC address of the slave device and/or the device name.
16. The wireless network access method of claim 15, wherein the slave device establishes a connection with the master device according to a predetermined communication manner, and the predetermined communication manner comprises at least one of a WIFI connection, a bluetooth connection, a ZIGBEE connection, a UWB connection, and a data connection.
17. A wireless network access method is characterized in that a master device scans a two-dimensional code of a slave device to obtain slave device information of the slave device; judging whether the slave equipment information is matched with the trusted equipment information or not, and executing at least one of the following steps:
if not, adding the equipment information of the slave equipment into an information list of the trusted equipment, sending an association request to the slave equipment, and establishing connection with the slave equipment according to the association request; or the like, or, alternatively,
and if so, sending an association request to the slave equipment, and establishing connection with the slave equipment according to the association request.
18. The wireless network access method of claim 17, wherein the step of the master device scanning the two-dimensional code of the slave device is preceded by:
establishing or maintaining an information list of the trusted device according to a preset rule, wherein the preset rule comprises at least one of the following:
the user establishes or maintains an information list of the trusted device; or the like, or, alternatively,
the master device receives the application information of the slave device and then adds the application information into the information list; or the like, or, alternatively,
the master device generates a two-dimensional code and uses the two-dimensional code for the slave device to scan and join the two-dimensional code into the information list; or the like, or, alternatively,
and the master equipment receives the two-dimensional code sent by the slave equipment, scans the two-dimensional code and then adds the two-dimensional code into the information list.
19. A wireless network access method is characterized in that a master device generates a two-dimensional code and uses the two-dimensional code for scanning and joining of a slave device, and after slave device information of the slave device is added to an information list of a trusted device, connection is established with the slave device.
20. The wireless network access method of claim 19, wherein the step of selecting the access point is performed according to the selected access point. Before adding the slave device information of the slave device to the information list of the trusted device, performing at least one of the following steps:
judging whether the number of connected slave devices is smaller than a first preset value or not, and if so, adding the slave device information into the information list;
judging whether the number of the unconnected slave devices is larger than a second preset value or not, and if so, adding the slave device information into the information list;
judging whether the used network data flow is smaller than a third preset value, if so, adding the slave equipment information into the information list;
and judging whether the unused network data flow is larger than a fourth preset value or not, and if so, adding the slave equipment information into the information list.
21. A mobile terminal is characterized in that the mobile terminal is provided with a hotspot module and a receiving module so that the mobile terminal has the functions of scanning and sending, and the mobile terminal comprises: a memory, a processor, and a wireless network access program stored in the memory and executable on the processor, the wireless network access program when executed by the processor implementing the steps of the wireless network access method of any one of claims 1 to 20.
22. A computer-readable storage medium, having a wireless network access program stored thereon, which when executed by a processor, performs the steps of the wireless network access method of any one of claims 1 to 20.
CN202010846010.2A 2020-08-20 2020-08-20 Wireless network access method, mobile terminal and readable storage medium Pending CN111954199A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010846010.2A CN111954199A (en) 2020-08-20 2020-08-20 Wireless network access method, mobile terminal and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010846010.2A CN111954199A (en) 2020-08-20 2020-08-20 Wireless network access method, mobile terminal and readable storage medium

Publications (1)

Publication Number Publication Date
CN111954199A true CN111954199A (en) 2020-11-17

Family

ID=73358652

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010846010.2A Pending CN111954199A (en) 2020-08-20 2020-08-20 Wireless network access method, mobile terminal and readable storage medium

Country Status (1)

Country Link
CN (1) CN111954199A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112566278A (en) * 2020-12-02 2021-03-26 浙江三维万易联科技有限公司 Method and system for determining master device, storage medium, and electronic apparatus
CN113129573A (en) * 2021-03-11 2021-07-16 科陆国际技术有限公司 Automatic connection method and system of electric energy meter and computer readable storage medium
CN115348322A (en) * 2022-07-11 2022-11-15 深圳市九洲电器有限公司 Data processing method, networking device and computer readable storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104375497A (en) * 2014-12-15 2015-02-25 广东美的厨房电器制造有限公司 Smart home, smart home control method, control system and electronic equipment
CN104618905A (en) * 2015-03-09 2015-05-13 广东欧珀移动通信有限公司 WIFI hotspot sharing method and mobile terminal
US20150141005A1 (en) * 2013-11-20 2015-05-21 Qualcomm Incorporated Using Sensor Data to Provide Information For Proximally-Relevant Group Communications
CN106686596A (en) * 2017-03-13 2017-05-17 联想(北京)有限公司 Data network sharing method, main device and slave device
CN106888488A (en) * 2017-02-22 2017-06-23 深圳创维-Rgb电子有限公司 The networking method and its device of smart machine
CN107820303A (en) * 2017-12-13 2018-03-20 广东欧珀移动通信有限公司 Mobile terminal wireless local area network scan method and apparatus, computer equipment
CN110267248A (en) * 2019-06-28 2019-09-20 阿里巴巴集团控股有限公司 BLE communication means, device, equipment and storage medium
CN111314400A (en) * 2018-12-11 2020-06-19 中兴通讯股份有限公司 Vehicle data processing method and device, computer equipment and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150141005A1 (en) * 2013-11-20 2015-05-21 Qualcomm Incorporated Using Sensor Data to Provide Information For Proximally-Relevant Group Communications
CN104375497A (en) * 2014-12-15 2015-02-25 广东美的厨房电器制造有限公司 Smart home, smart home control method, control system and electronic equipment
CN104618905A (en) * 2015-03-09 2015-05-13 广东欧珀移动通信有限公司 WIFI hotspot sharing method and mobile terminal
CN106888488A (en) * 2017-02-22 2017-06-23 深圳创维-Rgb电子有限公司 The networking method and its device of smart machine
CN106686596A (en) * 2017-03-13 2017-05-17 联想(北京)有限公司 Data network sharing method, main device and slave device
CN107820303A (en) * 2017-12-13 2018-03-20 广东欧珀移动通信有限公司 Mobile terminal wireless local area network scan method and apparatus, computer equipment
CN111314400A (en) * 2018-12-11 2020-06-19 中兴通讯股份有限公司 Vehicle data processing method and device, computer equipment and storage medium
CN110267248A (en) * 2019-06-28 2019-09-20 阿里巴巴集团控股有限公司 BLE communication means, device, equipment and storage medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112566278A (en) * 2020-12-02 2021-03-26 浙江三维万易联科技有限公司 Method and system for determining master device, storage medium, and electronic apparatus
CN112566278B (en) * 2020-12-02 2023-05-23 三维通信股份有限公司 Determination method and system of master device, storage medium and electronic device
CN113129573A (en) * 2021-03-11 2021-07-16 科陆国际技术有限公司 Automatic connection method and system of electric energy meter and computer readable storage medium
CN115348322A (en) * 2022-07-11 2022-11-15 深圳市九洲电器有限公司 Data processing method, networking device and computer readable storage medium
CN115348322B (en) * 2022-07-11 2023-07-18 深圳市九洲电器有限公司 Data processing method, networking equipment and computer readable storage medium

Similar Documents

Publication Publication Date Title
CN109792287B (en) Method and device for transmitting response message
EP2919527B1 (en) Device association methods and systems
CN107567023B (en) Method and apparatus for WLAN initial link setup
CN111954199A (en) Wireless network access method, mobile terminal and readable storage medium
US11452156B2 (en) Configuration system, client device, embedded device configuration method, and storage medium
CN106455060B (en) Calling method, device, terminal and core network system
CN101772199A (en) Method and device for establishing D2D network
EP2991440B1 (en) Method and device for connecting to network
US20140328334A1 (en) Provisioning a wireless device for secure communication using an access point designed with push-button mode of wps (wi-fi protected setup)
US9883439B2 (en) Offloading method and apparatus
CN104885552A (en) Method and apparatus for device-to-device communication
CN104254145A (en) WLAN (wireless local area network) based direct-communication establishment method and device
US10149134B2 (en) Near field discovery method, user equipment, and storage medium
KR20150018302A (en) Group Owner Centric Service Discovery method and apparatus
US11057746B2 (en) Method, device and system for transmitting broadcasting services, and computer storage medium
US20160316395A1 (en) Service query method, apparatus and system, and station
WO2015008714A1 (en) Control device and communication terminal
US10999729B2 (en) Discovery method and device
CN112566104A (en) Roaming coordination method based on Mesh network, wireless access point and storage medium
US10172178B2 (en) Wireless LAN station having platform capable of changing wireless LAN connection technique
CN108174434B (en) Method, terminal and intelligent device for automatically switching communication modes
KR100700170B1 (en) A method and apparatus of remote operation for wi-fi terminal
CN111954200B (en) Message transmission method and device
US20230276223A1 (en) Ip-based system supporting multi-usims
CN106102050A (en) Wireless network configuration method, wireless router and smart machine

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20201117