CN115866711A - Network access method and device of equipment to be accessed to network, storage medium and electronic device - Google Patents
Network access method and device of equipment to be accessed to network, storage medium and electronic device Download PDFInfo
- Publication number
- CN115866711A CN115866711A CN202111123100.XA CN202111123100A CN115866711A CN 115866711 A CN115866711 A CN 115866711A CN 202111123100 A CN202111123100 A CN 202111123100A CN 115866711 A CN115866711 A CN 115866711A
- Authority
- CN
- China
- Prior art keywords
- network
- accessed
- networked
- equipment
- distance
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 52
- 238000004590 computer program Methods 0.000 claims description 12
- 238000010586 diagram Methods 0.000 description 8
- 230000008569 process Effects 0.000 description 7
- 230000005540 biological transmission Effects 0.000 description 6
- 230000004044 response Effects 0.000 description 6
- 238000004891 communication Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 230000006855 networking Effects 0.000 description 3
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 238000012795 verification Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 238000000060 site-specific infrared dichroism spectroscopy Methods 0.000 description 1
Images
Landscapes
- Mobile Radio Communication Systems (AREA)
Abstract
The invention discloses a network access method and device of a device to be accessed to a network, a storage medium and an electronic device, wherein the method comprises the following steps: determining a first distance between a first network-accessed device and a device to be accessed through a proximity sensing network; sending first prompt information to second network-accessed equipment under the condition that the first distance is smaller than a preset distance, wherein the first prompt information is used for indicating that the first network-accessed equipment receives a network distribution request of equipment to be accessed, and the first network-accessed equipment and the second network-accessed equipment are equipment under the same account; and when the second distance between the second network-accessed device and the device to be accessed is smaller than the preset distance, sending network access information to the device to be accessed to indicate the device to be accessed to execute network access operation according to the network access information.
Description
Technical Field
The present invention relates to the field of communications, and in particular, to a network access method and apparatus for a device to be accessed, a storage medium, and an electronic apparatus.
Background
With the increasing number of intelligent devices, intelligent household products facing users are more and more common, and convenience brought to the users is obvious.
In the related technology, the mode of realizing the network distribution of the device to be networked generally needs user participation because the problem of attribution of the device to be networked is not easily judged, and the device to be networked has a high probability of accessing a wireless network in other families under the condition of no user participation, so that part of the mode of realizing the network distribution of the device to be networked is to perform NFC triggering on the device to be networked and the device to be networked, although the device to be networked is ensured to access the corresponding wireless network in the family, the requirement on user operation is high, and extra hardware is relied on.
In the related art, an effective solution is not provided for the problem that the network to be accessed device can be accessed to a wireless network in other families at a high probability in the process that the network to be accessed device is the network to be accessed device in the related art.
Disclosure of Invention
The embodiment of the invention provides a network access method and device of a device to be accessed to a network, a storage medium and an electronic device, which are used for at least solving the problems that in the related art, the device to be accessed to the network can be accessed to a wireless network in other families at a high probability in the process that the device to be accessed to the network is a network distribution device to be accessed to the network.
According to an embodiment of the present invention, a network access method for a device to be accessed to a network is provided, including: determining a first distance between the first network-accessed device and the device to be accessed through a proximity sensing network; sending first prompt information to second networked equipment under the condition that the first distance is smaller than the preset distance, wherein the first prompt information is used for indicating that the first networked equipment receives a distribution network request of the equipment to be networked, and the first networked equipment and the second networked equipment are equipment under the same account; and sending network access information to the equipment to be accessed to instruct the equipment to be accessed to execute network access operation according to the network access information under the condition that a second distance between the second equipment to be accessed and the equipment to be accessed to be smaller than the preset distance.
In an exemplary embodiment, before determining, by the proximity-aware network, the first distance between the first networked device and the device to be networked, the method further includes: receiving a distribution network request sent by the device to be networked, wherein the distribution network request is used for requesting the first networked device to send the network access information to the device to be networked; and under the condition of successfully receiving a distribution network request sent by the equipment to be networked, determining a first distance between the first networked equipment and the equipment to be networked through a proximity sensing network.
In an exemplary embodiment, determining, by a proximity-aware network, a first distance between the first networked device and the device to be networked includes: receiving a ranging request sent by the equipment to be networked, wherein the ranging request carries first position information of the equipment to be networked; and determining a first distance between the first network-accessed device and the device to be networked according to the first position information and second position information of the first network-accessed device.
In an exemplary embodiment, after sending the first prompt message to the second network-accessed device and before sending the network access information to the device to be network-accessed, the method further includes: determining a second distance between the second network-accessed device and the device to be networked according to the third position information of the second network-accessed device and the first position information; and sending network access information to the equipment to be accessed under the condition that the second distance between the second accessed equipment and the equipment to be accessed is smaller than the preset distance.
In an exemplary embodiment, the network access information is sent to the device to be networked, and the method further includes: sending second prompt information to a client corresponding to the account, wherein the second prompt information is used for indicating a target object corresponding to the account to confirm whether a network distribution request of a device to be networked is accepted or not; and sending network access information to the equipment to be accessed to instruct the equipment to be accessed to execute network access operation according to the network access information under the condition that a target object is received to confirm that the network distribution request of the equipment to be accessed to the network is accepted.
In an exemplary embodiment, in a case that the first distance is smaller than the preset distance, after the first prompt message is sent to the second network-connected device, the method further includes: determining whether a second distance between the second network-accessed device and the device to be networked is smaller than a preset distance; and under the condition that the second distance between the second network-accessed device and the device to be accessed is determined to be greater than the preset distance, prohibiting the network access information from being sent to the device to be accessed.
According to another embodiment of the present invention, there is provided a network access apparatus for a device to be networked, including: the determining module is used for determining a first distance between the first network-accessed device and the device to be accessed through a proximity sensing network; the first sending module is configured to send first prompt information to a second device already connected to the network when the first distance is smaller than the preset distance, where the first prompt information is used to indicate that the first device already connected to the network has received a network distribution request of the device to be connected to the network, and the first device already connected to the network and the second device already connected to the network are devices under the same account; and the second sending module is used for sending network access information to the equipment to be accessed to instruct the equipment to be accessed to execute network access operation according to the network access information under the condition that the second distance between the second equipment already accessed to the network and the equipment to be accessed to the network is smaller than the preset distance.
In one exemplary embodiment, further comprising: the determining module is further configured to receive a distribution network request sent by the device to be networked, where the distribution network request is used to request the first networked device to send the network access information to the device to be networked; and under the condition of successfully receiving a distribution network request sent by the equipment to be networked, determining a first distance between the first networked equipment and the equipment to be networked through a proximity sensing network.
According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, in which a computer program is stored, where the computer program is configured to, when running, execute the network access method of the above-mentioned device to be networked.
According to another aspect of the embodiments of the present invention, there is also provided an electronic apparatus, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the network accessing method of the device to be networked through the computer program.
In the embodiment of the invention, a first distance between the first network-accessed device and the device to be accessed is determined through a proximity sensing network; sending first prompt information to second networked equipment under the condition that the first distance is smaller than the preset distance, wherein the first prompt information is used for indicating that the first networked equipment receives a distribution network request of the equipment to be networked, and the first networked equipment and the second networked equipment are equipment under the same account; and sending network access information to the equipment to be networked under the condition that a second distance between the second networked equipment and the equipment to be networked is smaller than the preset distance so as to indicate the equipment to be networked to execute networking operation according to the network access information, namely determining a first distance between the first networked equipment and the equipment to be networked and a second distance between the second networked equipment and the equipment to be networked through a proximity sensing network, and sending the network access information to the equipment to be networked under the condition that the first distance and the second distance are both smaller than the preset distance.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention and do not constitute a limitation of the invention. In the drawings:
fig. 1 is a block diagram of a hardware structure of a mobile terminal of a network access method of a device to be accessed to a network according to an embodiment of the present invention;
fig. 2 is a flowchart of a network access method of a device to be networked according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a network entry method of a device to be networked according to an alternative embodiment of the present invention;
fig. 4 is a block diagram (a) of a network access apparatus of a device to be networked according to an embodiment of the present invention;
fig. 5 is a block diagram (ii) of a network access apparatus of a device to be networked according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The method provided by the embodiment of the application can be executed in a mobile terminal, a computer terminal or a similar operation device. Taking the operation on the mobile terminal as an example, fig. 1 is a hardware structure block diagram of the mobile terminal of the network access method of the device to be accessed in the embodiment of the present invention. As shown in fig. 1, the mobile terminal may include one or more (only one shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, which in an exemplary embodiment may also include a transmission device 106 for communication functions and an input-output device 108. It will be understood by those of ordinary skill in the art that the structure shown in fig. 1 is only an illustration and is not intended to limit the structure of the mobile terminal. For example, the mobile terminal may also include more or fewer components than shown in FIG. 1, or have a different configuration with equivalent functionality to that shown in FIG. 1 or with more functionality than that shown in FIG. 1.
The memory 104 may be used to store a computer program, for example, a software program and a module of an application software, such as a computer program corresponding to the network access method of the device to be networked in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, so as to implement the method described above. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the mobile terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a Network adapter (NIC), which can be connected to other Network devices through a base station so as to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
In this embodiment, a network access method of a device to be networked is provided, which is applied to the mobile terminal, specifically, a first network-accessed device, and fig. 2 is a flowchart of a network access method of a device to be networked according to an embodiment of the present invention, where the flowchart includes the following steps:
step S202, a first distance between the first network-accessed device and the device to be accessed is determined through a proximity sensing network;
step S204, sending first prompt information to a second network-accessed device under the condition that the first distance is smaller than the preset distance, wherein the first prompt information is used for indicating that the first network-accessed device has received a network distribution request of the device to be accessed, and the first network-accessed device and the second network-accessed device are devices under the same account;
it should be noted that, when the first distance is greater than the preset distance, the first prompt message is prohibited from being sent to the second network-accessed device.
Step S206, sending network access information to the device to be networked to instruct the device to be networked to execute a network access operation according to the network access information when a second distance between the second device already networked and the device to be networked is smaller than the preset distance.
Through the steps, a first distance between the first network-accessed device and the device to be accessed is determined through a proximity sensing network; sending first prompt information to second networked equipment under the condition that the first distance is smaller than the preset distance, wherein the first prompt information is used for indicating that the first networked equipment receives a distribution network request of the equipment to be networked, and the first networked equipment and the second networked equipment are equipment under the same account; the method comprises the steps that network access information is sent to the equipment to be networked under the condition that a second distance between the second networked equipment and the equipment to be networked is smaller than a preset distance, the equipment to be networked executes network access operation according to the network access information, namely, a first distance between the first networked equipment and the equipment to be networked, a second distance between the second networked equipment and the equipment to be networked are determined through a proximity sensing network, and the network access information is sent to the equipment to be networked under the condition that the first distance and the second distance are smaller than the preset distance. And the distribution process can be finished locally, the cloud verification is not needed, the flow is fast and convenient, and the information safety is improved.
The network access information in step S206 includes: a service set identification and a password; and under the condition that the first distance between the first network-accessed device and the device to be networked is determined, and the second distance between the second network-accessed device and the device to be networked is smaller than the preset distance, the first network-accessed device sends a service set identifier and a password to the device to be networked, and the device to be networked accesses the network according to the service set identifier and the password.
In an exemplary embodiment, before determining a first distance between the first network-accessed device and the device to be network-accessed through a proximity-aware network, receiving a distribution network request sent by the device to be network-accessed, where the distribution network request is used to request the first network-accessed device to send the network access information to the device to be network-accessed; and under the condition of successfully receiving a distribution network request sent by the equipment to be networked, determining a first distance between the first networked equipment and the equipment to be networked through a proximity sensing network.
In other words, the device to be networked sends a distribution network request at a preset time, and the first device to be networked determines a first distance between the first device to be networked and the device to be networked through a proximity sensing network under the condition that the first device to be networked successfully receives the distribution network request sent by the device to be networked, wherein the proximity sensing network is a network based on a WiFI Neighbor aware Networking protocol and includes a capability of determining a range.
In an exemplary embodiment, determining, by a proximity-aware network, a first distance between the first networked device and the device to be networked includes: receiving a ranging request sent by the equipment to be networked, wherein the ranging request carries first position information of the equipment to be networked; and determining a first distance between the first network-accessed device and the device to be networked according to the first position information and second position information of the first network-accessed device.
Specifically, the device to be networked sends a ranging request through a proximity sensing network, and when the first networked device receives the ranging request, the first networked device obtains first location information of the device to be networked through the ranging request, and the first networked device obtains second location information corresponding to the first networked device according to a positioning function of the first networked device, where the first location information and the second location information may be location information in a home to which the device to be networked and the first networked device correspond.
In an exemplary embodiment, after sending the first prompt message to the second network-accessed device and before sending the network access message to the device to be network-accessed, a second distance between the second network-accessed device and the device to be network-accessed is determined according to the third location information of the second network-accessed device and the first location information; and sending network access information to the equipment to be accessed under the condition that the second distance between the second accessed equipment and the equipment to be accessed is smaller than the preset distance.
In the exemplary embodiment of the present invention, a first network-accessed device sends first prompt information to a second network-accessed device, where the first prompt information is used to instruct the second network-accessed device to send third location information of the second network-accessed device to the first network-accessed device, and when the first network-accessed device receives the third location information of the second network-accessed device, a second distance between the second network-accessed device and a device to be network-accessed is determined according to the third location information and the first location information, and when the second distance is smaller than a preset threshold, network access information is sent to the device to be network-accessed, so that the device to be network-accessed performs network access operation; and when the first position information is the coordinate information in the family corresponding to the device to be accessed, the third position information is the coordinate information in the family corresponding to the device to be accessed.
In another exemplary embodiment of the present invention, a first network-accessed device sends first prompt information to a second network-accessed device, where the first prompt information is used to instruct the second network-accessed device to obtain first location information of a device to be networked, the second network-accessed device determines, according to the first location information and third location information, a second distance between the second network-accessed device and the device to be networked, and sends a response message to the first network-accessed device when the second distance is determined to be smaller than a preset distance by the second network-accessed device, and sends network access information to the device to be networked to enable the device to be networked to perform a network access operation when the first network-accessed device receives the response message sent by the second network-accessed device, where the response message is used to instruct the first network-accessed device to allow the first network-accessed device to send the network access information to the device to be networked.
Specifically, the second network-accessed device obtains the first location information of the device to be accessed through at least one of the following methods: sending position request information to the first network-accessed equipment; and receiving the ranging request sent by the equipment to be networked.
In an exemplary embodiment, network access information is sent to the device to be networked, and second prompt information is sent to the client corresponding to the account, wherein the second prompt information is used for indicating a target object corresponding to the account to confirm whether a distribution network request of the device to be networked is accepted or not; and sending network access information to the equipment to be accessed to instruct the equipment to be accessed to execute network access operation according to the network access information under the condition that a target object is received to confirm that the network distribution request of the equipment to be accessed to the network is accepted.
In order to improve the accuracy of accessing the device to be accessed to the wireless network, under the condition that a first distance of the device to be accessed to the network and a second distance of a second device already accessed to the network and the device to be accessed to the network are both smaller than a preset distance, second prompt information is sent to a client corresponding to the account, so that a target object confirms whether to accept a distribution network request of the device to be accessed to the network according to the second prompt information, and under the preset condition, network access information is sent to the device to be accessed to the network, wherein the preset condition comprises at least one of the following conditions: the target object confirms that the network distribution request of the equipment to be networked is received; exceeding a preset time.
In an exemplary embodiment, when the first distance is smaller than the preset distance, after sending a first prompt message to a second network-accessed device, determining whether a second distance between the second network-accessed device and the device to be network-accessed is smaller than the preset distance; and under the condition that the second distance between the second network-accessed device and the device to be accessed is determined to be greater than the preset distance, prohibiting the network access information from being sent to the device to be accessed.
That is to say, when the first network-accessed device determines whether the second distance between the second network-accessed device and the device to be network-accessed is smaller than the preset distance, the network access information is not sent to the device to be network-accessed.
In another exemplary embodiment, after the device to be networked performs the network access operation according to the network access information, the device to be networked determines a wireless network accessed by other network-accessed devices in the same family, and disconnects the connection when the network accessed by the device to be networked and the wireless network accessed by other network-accessed devices are not the same wireless network.
In an exemplary embodiment, before determining a first distance between the first network-accessed device and the device to be networked through the proximity-aware network, the first network-accessed device determines whether the first network-accessed device and the device to be networked are devices bound by a same account, and directly sends network access information to the device to be networked under the condition that the first network-accessed device determines that the first network-accessed device and the device to be networked are devices bound by a same account.
In order to better understand the process of the network access method of the device to be networked, the following describes a flow of the network access method of the device to be networked with an optional embodiment, but the flow is not limited to the technical solution of the embodiment of the present invention.
As shown in fig. 3, fig. 3 is a schematic diagram of a network entry method of a device to be networked according to an alternative embodiment of the present invention, which is specifically as follows:
step S301: a device to be networked (which is equivalent to the device to be networked in the embodiment) sends a network distribution request to a first device already networked;
step S302: the first network-accessed device determines a first distance from the network device to be configured through a proximity sensing network;
step S303: under the condition that the first distance is smaller than a preset threshold value, the first network-accessed equipment reports the equipment to be configured to the second network-accessed equipment;
step S304: the second network-accessed device determines a second distance from the network-to-be-configured device;
the position of the network equipment to be distributed is secondarily judged through more than two pieces of network equipment which are already connected, so that the positioning accuracy of the network equipment to be distributed can be improved, and the connection of equipment beyond a set range is avoided.
Step S305: under the condition that the first distance and the second distance are both smaller than a preset threshold value, the second network-accessed device sends indication information to the first network-accessed device, and the first network-accessed device is indicated to send network access information to the device to be configured;
step S306: the first network-accessed device sends network access information, such as SSID/password information, to the device to be networked;
step S307: the equipment to be distributed is connected with the wireless network hotspot through network access information.
In the embodiment of the invention, a first distance between the first network-accessed device and the network device to be configured is determined through a proximity sensing network; sending first prompt information to second networked equipment under the condition that the first distance is smaller than the preset distance, wherein the first prompt information is used for indicating that the first networked equipment receives a network distribution request of the equipment to be distributed, and the first networked equipment and the second networked equipment are equipment under the same account; and sending network access information to the equipment to be distributed under the condition that a second distance between the second accessed equipment and the equipment to be distributed is smaller than the preset distance so as to indicate the equipment to be distributed to execute network access operation according to the network access information, namely, determining a first distance between the first accessed equipment and the equipment to be distributed and a second distance between the second accessed equipment and the equipment to be distributed through a proximity sensing network, and sending network access information to the equipment to be distributed under the condition that the first distance and the second distance are smaller than the preset distance.
Through the description of the foregoing embodiments, it is clear to those skilled in the art that the method according to the foregoing embodiments may be implemented by software plus a necessary general hardware platform, and certainly may also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
Fig. 4 is a block diagram (a) of a network access apparatus of a device to be networked according to an embodiment of the present invention; as shown in fig. 4, includes:
a determining module 42, configured to determine a first distance between the first network-accessed device and the device to be networked through a proximity-aware network;
a first sending module 44, configured to send first prompt information to a second network-accessed device when the first distance is smaller than the preset distance, where the first prompt information is used to indicate that the first network-accessed device has received a network distribution request of the device to be networked, where the first network-accessed device and the second network-accessed device are devices under the same account;
it should be noted that, when the first distance is greater than the preset distance, the first prompt message is prohibited from being sent to the second network-accessed device.
A second sending module 46, configured to send network access information to the device to be networked to instruct the device to be networked to perform a network access operation according to the network access information when a second distance between the second device already networked and the device to be networked is smaller than the preset distance.
Through the above apparatus, the determining module 42 determines a first distance between the first network-accessed device and the device to be networked through the proximity sensing network; the first sending module 44 is configured to send first prompt information to a second network-accessed device when the first distance is smaller than the preset distance, where the first prompt information is used to indicate that the first network-accessed device has received a network distribution request of the device to be networked, and the first network-accessed device and the second network-accessed device are devices under the same account; the second sending module 46 is configured to send network access information to the device to be networked when a second distance between the second device to be networked and the device to be networked is smaller than the preset distance, so as to instruct the device to be networked to perform a network access operation according to the network access information, that is, determine a first distance between the first device to be networked and the device to be networked and a second distance between the second device to be networked and the device to be networked through a proximity sensing network, and send network access information to the device to be networked when the first distance and the second distance are both smaller than the preset distance. And the distribution process can be finished locally, the cloud verification is not needed, the flow is fast and convenient, and the information safety is improved.
It should be noted that the network access information includes: a service set identification and a password; and under the condition that the first distance between the first network-accessed device and the device to be networked is determined, and the second distance between the second network-accessed device and the device to be networked is smaller than the preset distance, the first network-accessed device sends a service set identifier and a password to the device to be networked, and the device to be networked accesses the network according to the service set identifier and the password.
In an exemplary embodiment, the determining module 42 is further configured to receive a distribution network request sent by the device to be networked, where the distribution network request is used to request the first networked device to send the network access information to the device to be networked; and under the condition of successfully receiving a distribution network request sent by the equipment to be networked, determining a first distance between the first networked equipment and the equipment to be networked through a proximity sensing network.
In other words, the device to be networked sends the distribution network request at a preset time, and when the first device to be networked successfully receives the distribution network request sent by the device to be networked, the first device to be networked determines a first distance between the first device to be networked and the device to be networked through a proximity sensing network, where the proximity sensing network is a network based on a WiFI Neighbor Awareness Networking protocol and includes a capability of determining a range.
In an exemplary embodiment, the determining module 42 is further configured to receive a ranging request sent by the device to be networked, where the ranging request carries first location information of the device to be networked; and determining a first distance between the first network-accessed device and the device to be networked according to the first position information and second position information of the first network-accessed device.
Specifically, the device to be networked sends a ranging request through a proximity-aware network, and when receiving the ranging request, the first networked device obtains first location information of the device to be networked through the ranging request, and the first networked device obtains second location information corresponding to the first networked device according to its own positioning function, where the first location information and the second location information may be location information in a home to which the device to be networked and the first networked device correspond.
In an exemplary embodiment, the second sending module 46 is further configured to determine a second distance between the second network-accessed device and the device to be network-accessed according to the third location information of the second network-accessed device and the first location information; and sending network access information to the equipment to be accessed under the condition that the second distance between the second accessed equipment and the equipment to be accessed is smaller than the preset distance.
In the exemplary embodiment of the present invention, a first network-accessed device sends first prompt information to a second network-accessed device, where the first prompt information is used to instruct the second network-accessed device to send third location information of the second network-accessed device to the first network-accessed device, and when the first network-accessed device receives the third location information of the second network-accessed device, a second distance between the second network-accessed device and a device to be network-accessed is determined according to the third location information and the first location information, and when the second distance is smaller than a preset threshold, network access information is sent to the device to be network-accessed, so that the device to be network-accessed performs network access operation; and when the first position information is the coordinate information in the family corresponding to the device to be accessed, the third position information is the coordinate information in the family corresponding to the device to be accessed.
In another exemplary embodiment of the present invention, fig. 5 is a block diagram (ii) of a network access apparatus of a device to be networked according to an embodiment of the present invention; as shown in fig. 5, the above apparatus further includes: the receiving module 52 is configured to send first prompt information to a second network-accessed device by a first network-accessed device, where the first prompt information is used to instruct the second network-accessed device to obtain first location information of a device to be network-accessed, the second network-accessed device determines a second distance between the second network-accessed device and the device to be network-accessed according to the first location information and third location information, and when the second distance is determined by the second network-accessed device to be smaller than a preset distance, sends a response message to the first network-accessed device, and when the first network-accessed device receives the response message sent by the second network-accessed device, sends network access information to the device to be network-accessed, so that the device to be network-accessed performs network access operation, where the response message is used to instruct the first network-accessed device to allow the first network-accessed device to send the network access information to the device to be network-accessed.
Specifically, the second network-accessed device obtains the first location information of the device to be accessed through at least one of the following methods: sending position request information to the first network-accessed device; and receiving the ranging request sent by the equipment to be networked.
In an exemplary embodiment, the second sending module is further configured to send second prompt information to the client corresponding to the account, where the second prompt information is used to indicate that a target object corresponding to the account confirms whether to accept a distribution network request of a device to be networked; and sending network access information to the equipment to be accessed to instruct the equipment to be accessed to execute network access operation according to the network access information under the condition that a target object is received to confirm that the network distribution request of the equipment to be accessed to the network is accepted.
In order to improve the accuracy of accessing the device to be accessed to the wireless network, under the condition that a first distance of the device to be accessed to the network and a second distance of a second device already accessed to the network and the device to be accessed to the network are both smaller than a preset distance, second prompt information is sent to a client corresponding to the account, so that a target object confirms whether to accept a distribution network request of the device to be accessed to the network according to the second prompt information, and under the preset condition, network access information is sent to the device to be accessed to the network, wherein the preset condition comprises at least one of the following conditions: the target object confirms that the network distribution request of the equipment to be networked is received; exceeding a preset time.
In an exemplary embodiment, the determining module is further configured to determine whether a second distance between the second network-connected device and the device to be networked is less than a preset distance; and under the condition that the second distance between the second network-accessed device and the device to be accessed is determined to be greater than the preset distance, prohibiting the network access information from being sent to the device to be accessed.
That is to say, when the first network-accessed device determines whether the second distance between the second network-accessed device and the device to be network-accessed is smaller than the preset distance, the network access information is not sent to the device to be network-accessed.
In another exemplary embodiment, after the device to be networked performs the network access operation according to the network access information, the device to be networked determines a wireless network accessed by other network-accessed devices in the same family, and disconnects the connection when the network accessed by the device to be networked and the wireless network accessed by other network-accessed devices are not the same wireless network.
In an exemplary embodiment, before determining a first distance between the first network-connected device and the device to be networked through the proximity sensing network, the first network-connected device determines whether the first network-connected device and the device to be networked are devices bound by a same account, and directly sends network access information to the device to be networked if the first network-connected device determines that the first network-connected device and the device to be networked are devices bound by the same account.
An embodiment of the present invention further provides a storage medium including a stored program, where the program executes the method of any one of the above.
Alternatively, in the present embodiment, the storage medium may be configured to store program codes for performing the following steps:
s1, determining a first distance between the first network-accessed device and the device to be accessed through a proximity sensing network;
s2, sending first prompt information to second accessed equipment under the condition that the first distance is smaller than the preset distance, wherein the first prompt information is used for indicating that the first accessed equipment receives a distribution network request of the equipment to be accessed, and the first accessed equipment and the second accessed equipment are equipment under the same account;
and S3, sending network access information to the equipment to be accessed to indicate the equipment to be accessed to execute network access operation according to the network access information under the condition that the second distance between the second equipment already accessed to the network and the equipment to be accessed to the network is smaller than the preset distance.
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, determining a first distance between the first network-accessed device and the device to be networked through a proximity sensing network;
s2, sending first prompt information to second accessed equipment under the condition that the first distance is smaller than a preset distance, wherein the first prompt information is used for indicating that the first accessed equipment receives a distribution network request of the equipment to be accessed, and the first accessed equipment and the second accessed equipment are equipment under the same account;
and S3, sending network access information to the equipment to be accessed to indicate the equipment to be accessed to execute network access operation according to the network access information under the condition that the second distance between the second equipment to be accessed to the network and the equipment to be accessed to the network is smaller than the preset distance.
Optionally, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing program codes, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the principle of the present invention should be included in the protection scope of the present invention.
Claims (10)
1. A network access method of a device to be accessed to a network is applied to a first accessed device, and is characterized by comprising the following steps:
determining a first distance between the first network-accessed device and the device to be accessed through a proximity sensing network;
sending first prompt information to second networked equipment under the condition that the first distance is smaller than a preset distance, wherein the first prompt information is used for indicating that the first networked equipment receives a distribution network request of the equipment to be networked, and the first networked equipment and the second networked equipment are equipment under the same account;
and sending network access information to the equipment to be accessed to instruct the equipment to be accessed to execute network access operation according to the network access information under the condition that a second distance between the second equipment to be accessed and the equipment to be accessed to be smaller than the preset distance.
2. The network entry method of the device to be networked according to claim 1, wherein before determining the first distance between the first networked device and the device to be networked through a proximity-aware network, the method further comprises:
receiving a distribution network request sent by the device to be networked, wherein the distribution network request is used for requesting the first networked device to send the network access information to the device to be networked;
and under the condition of successfully receiving a distribution network request sent by the equipment to be networked, determining a first distance between the first networked equipment and the equipment to be networked through a proximity sensing network.
3. The network accessing method of the device to be accessed according to claim 1, wherein determining the first distance between the first network-accessed device and the device to be accessed through a proximity-aware network comprises:
receiving a ranging request sent by the equipment to be networked, wherein the ranging request carries first position information of the equipment to be networked;
and determining a first distance between the first network-accessed device and the device to be networked according to the first position information and second position information of the first network-accessed device.
4. The network access method of the device to be networked according to claim 3, wherein after the first prompt message is sent to the second device to be networked, and before the network access message is sent to the device to be networked, the method further comprises:
determining a second distance between the second network-accessed device and the device to be networked according to the third position information of the second network-accessed device and the first position information;
and sending network access information to the equipment to be accessed under the condition that the second distance between the second accessed equipment and the equipment to be accessed is smaller than the preset distance.
5. The network access method of the device to be accessed according to claim 1, wherein sending network access information to the device to be accessed comprises:
sending second prompt information to a client corresponding to the account, wherein the second prompt information is used for indicating a target object corresponding to the account to confirm whether a network distribution request of a device to be networked is accepted or not;
and sending network access information to the equipment to be accessed to instruct the equipment to be accessed to execute network access operation according to the network access information under the condition that a target object is received to confirm that the network distribution request of the equipment to be accessed to the network is accepted.
6. The network access method of the device to be accessed according to claim 1, wherein when the first distance is smaller than the preset distance, after sending the first prompt message to the second device already accessed, the method further comprises:
determining whether a second distance between the second network-accessed device and the device to be accessed is smaller than a preset distance;
and under the condition that the second distance between the second network-accessed device and the device to be accessed is determined to be greater than the preset distance, prohibiting the network access information from being sent to the device to be accessed.
7. A network access device of a device to be networked is characterized by comprising:
the determining module is used for determining a first distance between the first network-accessed device and the device to be accessed through a proximity sensing network;
the first sending module is configured to send first prompt information to a second network-accessed device when the first distance is smaller than the preset distance, where the first prompt information is used to indicate that the first network-accessed device has received a network distribution request of the device to be networked, and the first network-accessed device and the second network-accessed device are devices under the same account;
and the second sending module is used for sending network access information to the equipment to be accessed to instruct the equipment to be accessed to execute network access operation according to the network access information under the condition that the second distance between the second equipment already accessed to the network and the equipment to be accessed to the network is smaller than the preset distance.
8. The network entry device of the device to be networked according to claim 7, comprising:
the determining module is further configured to receive a distribution network request sent by the device to be networked, where the distribution network request is used to request the first networked device to send the network access information to the device to be networked; and under the condition of successfully receiving a distribution network request sent by the equipment to be networked, determining a first distance between the first networked equipment and the equipment to be networked through a proximity sensing network.
9. A computer-readable storage medium, comprising a stored program, wherein the program is operable to perform the method of any one of claims 1 to 6.
10. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 6 by means of the computer program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111123100.XA CN115866711A (en) | 2021-09-24 | 2021-09-24 | Network access method and device of equipment to be accessed to network, storage medium and electronic device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111123100.XA CN115866711A (en) | 2021-09-24 | 2021-09-24 | Network access method and device of equipment to be accessed to network, storage medium and electronic device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115866711A true CN115866711A (en) | 2023-03-28 |
Family
ID=85652590
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111123100.XA Pending CN115866711A (en) | 2021-09-24 | 2021-09-24 | Network access method and device of equipment to be accessed to network, storage medium and electronic device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115866711A (en) |
-
2021
- 2021-09-24 CN CN202111123100.XA patent/CN115866711A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110383896B (en) | Network access method, terminal, access network and core network | |
CN109792287B (en) | Method and device for transmitting response message | |
CN108901055B (en) | Method and equipment for access control | |
CN111885115B (en) | Device binding changing method and device | |
CN110915264B (en) | Session processing method in wireless communication and terminal equipment | |
CN112566078A (en) | Device connection method and apparatus, storage medium, and electronic apparatus | |
CN113596792B (en) | Binding method and device of electronic equipment, storage medium and electronic device | |
CN114205378A (en) | Network distribution method and device of Internet of things equipment, storage medium and electronic device | |
CN112637221B (en) | Equipment control method and device | |
CN107454659B (en) | Terminal identification method, system, terminal equipment and base station | |
EP4250685A1 (en) | Network configuration method and apparatus for internet of things device | |
CN113259918A (en) | Equipment binding method and system | |
CN107404404B (en) | Terminal routing method based on Internet of things and Internet of things terminal | |
CN113784371A (en) | Communication method and device | |
CN110278597B (en) | Communication between terminal and base station, and network access method and device of terminal | |
CN115866711A (en) | Network access method and device of equipment to be accessed to network, storage medium and electronic device | |
CN106899965B (en) | Configuration method of transmission power, terminal, base station and baseband chip | |
CN105163335B (en) | A kind of network access management method, server, mobile terminal and system | |
CN115474162B (en) | Method, device, equipment, system and storage medium for negotiating broadcast perception process | |
CN111885583B (en) | Network sharing method and device | |
CN115733878B (en) | Method and device for setting equipment groups, storage medium and electronic device | |
CN115866597B (en) | Method and device for sending password information, storage medium and electronic device | |
CN113254805A (en) | Method and network equipment for inquiring group position | |
CN113395744B (en) | Networking method and device of equipment, storage medium and electronic device | |
CN111294414A (en) | Message processing method, device and system |
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 |