CN115442871A - Equipment network access method, system and device and terminal equipment - Google Patents

Equipment network access method, system and device and terminal equipment Download PDF

Info

Publication number
CN115442871A
CN115442871A CN202211053271.4A CN202211053271A CN115442871A CN 115442871 A CN115442871 A CN 115442871A CN 202211053271 A CN202211053271 A CN 202211053271A CN 115442871 A CN115442871 A CN 115442871A
Authority
CN
China
Prior art keywords
client
networked
virtual network
service address
network service
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
CN202211053271.4A
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.)
Hangzhou Micro Image Software Co ltd
Original Assignee
Hangzhou Micro Image Software 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 Hangzhou Micro Image Software Co ltd filed Critical Hangzhou Micro Image Software Co ltd
Priority to CN202211053271.4A priority Critical patent/CN115442871A/en
Publication of CN115442871A publication Critical patent/CN115442871A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/16Discovering, processing access restriction or access information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup

Landscapes

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

Abstract

The invention discloses a device network access method, a device network access system, a device network access device and a terminal device, wherein the device network access method comprises the following steps: establishing communication connection between a device to be accessed to a network and a preset client, and receiving a resource request message sent by the client based on the communication connection; redirecting the resource request message to a virtual network service address of the equipment to be networked, wherein the virtual network service address is preset with a corresponding distribution network page; and receiving wireless network configuration data submitted by the client through the distribution network page, and accessing a corresponding target wireless network by using the wireless network configuration data. By adopting the technical scheme of the invention, the equipment can be accessed to the wireless network only through the design of the software layer of the equipment under the condition of not increasing the production and manufacturing cost of the equipment.

Description

Equipment network access method, system and device and terminal equipment
Technical Field
The present invention relates to the field of network connection technologies, and in particular, to a device network access method, a device network access system, a device network access apparatus, and a terminal device.
Background
In recent times, wireless network devices with small volume, such as thermal imaging sensors, often do not have wired network ports, so that such devices access a wireless network through an internally integrated wireless module. However, since such devices do not have a display screen like a smart phone, a human-computer interaction interface cannot be provided externally, and further, such devices cannot configure network access related parameters through the screen. Based on this, the wireless network device has to perform network entry parameter configuration by means of other clients or form a local area network only with other terminals that have already accessed the wireless network.
However, at present, the wireless network device configures the network access parameters by using other clients, or the device itself must support the wired network first, so that the other clients log in the device through the wired network and then enter a configuration interface to configure the network access parameters, or the device is required to cooperate with a dedicated APP (Application program) installed in the client to configure the network access parameters based on a mode of transmitting a UDP (User Datagram Protocol) message. Whether the device supports a wired network or the device can receive the UDP message needs to be specially designed aiming at the hardware and software, so that the production and manufacturing cost of the device is inevitably increased. In addition, although the local area network formed with other clients does not need to be specially designed, in this case, the device itself can only be used as an AP access point and cannot be accessed to the public network, thereby greatly limiting the device functions.
Disclosure of Invention
The invention mainly aims to provide a device network access method, a device network access system, a device network access device and a terminal device, aiming at realizing that the device can be accessed into a wireless network only through the design of a device software layer under the condition of not increasing the production and manufacturing cost of the device.
In order to achieve the above object, the present invention provides a device network access method, which comprises the following steps:
establishing communication connection between a device to be accessed to a network and a preset client, and receiving a resource request message sent by the client based on the communication connection;
redirecting the resource request message to a virtual network service address of the equipment to be networked, wherein the virtual network service address is preset with a corresponding distribution network page;
and receiving wireless network configuration data submitted by the client through the distribution network page, and accessing a corresponding target wireless network by using the wireless network configuration data.
In a possible embodiment, the step of redirecting the resource request message to the virtual network service address of the device to be networked includes:
sending the virtual network service address of the equipment to be networked to the client according to the resource request message;
receiving an access request initiated by the client based on the virtual network service address;
and responding to the access request to send a distribution network page corresponding to the virtual network service address to the client.
In a possible embodiment, the step of sending the virtual network service address of the device to be networked to the client according to the resource request message includes:
determining a URL format of the resource request message;
if the URL format is a domain name format, sending the virtual network service address of the equipment to be accessed to the network to the client; or,
if the URL format is a protocol address format, determining whether an Internet protocol address carried by the resource request message is the same as the virtual network service address;
and if the Internet protocol address is different from the virtual network service address, sending the virtual network service address to the client.
In a possible embodiment, after the step of determining whether the internet protocol address carried by the resource request message is the same as the virtual network service address, the method further includes:
and if the Internet protocol address is the same as the virtual network service address, sending a distribution network page corresponding to the virtual network service address to the client.
In addition, in order to achieve the above object, the present invention provides an equipment network access system, where the equipment network access system includes an equipment to be networked and a client, and the equipment to be networked is in communication connection with the client; wherein,
the equipment to be networked is used for receiving the resource request message sent by the client through the communication connection; redirecting the resource request message to a virtual network service address of the equipment to be networked, wherein the virtual network service address is preset with a corresponding distribution network page; receiving wireless network configuration data submitted by the client through the distribution network page, and accessing a corresponding target wireless network by using the wireless network configuration data;
the client is used for sending a resource request message to the equipment to be networked through the communication connection; receiving a virtual network service address fed back by the equipment to be networked responding to the resource request message, and determining wireless network configuration data according to a distribution network page corresponding to the virtual network service address; and sending the wireless network configuration data to the equipment to be networked.
In a possible embodiment, the client is configured to send a resource request message in a URL format and a domain name format to the device to be networked through the communication connection; or, the client is further configured to send a resource request message in a protocol address format in a URL format to the device to be networked through the communication connection.
In a possible embodiment, the client is configured to initiate an access request to the device to be networked according to the virtual network service address fed back by the device to be networked; and receiving a distribution network page corresponding to the virtual network service address fed back by the device to be networked responding to the access request.
In a possible embodiment, the client is configured to send the resource request message to the device to be networked when detecting a user start instruction, perform visual output display on the distribution network page, receive a network configuration interaction operation based on the distribution network page, and determine the wireless network configuration data based on the network configuration interaction operation.
In addition, in order to achieve the above object, the present invention further provides an apparatus for accessing a network, including a receiving module, configured to establish a communication connection between a device to be accessed and a preset client, and receive a resource request message sent by the client based on the communication connection;
the message redirection module is used for redirecting the resource request message to a virtual network service address of the equipment to be networked, wherein the virtual network service address is preset with a corresponding distribution network page;
and the network access module is used for receiving the wireless network configuration data submitted by the client through the distribution network page and accessing the corresponding target wireless network by using the wireless network configuration data.
In a possible embodiment, the message redirection module includes:
a virtual address sending unit, configured to send a virtual network service address of the device to be networked to the client according to the resource request message;
a request receiving unit, configured to receive an access request initiated by the client based on the virtual network service address;
the page sending unit is used for responding to the access request so as to send the distribution network page corresponding to the virtual network service address to the client;
the virtual address sending unit includes:
the first sending subunit is used for determining the URL format of the resource request message; if the URL format is the domain name format, sending the virtual network service address of the equipment to be accessed to the network to the client;
a second sending subunit, configured to determine, if the URL format is a protocol address format, whether an internet protocol address carried by the resource request message is the same as the virtual network service address; if the internet protocol address is different from the virtual network service address, the virtual network service address is sent to the client;
the page sending unit is further configured to send a distribution network page corresponding to the virtual network service address to the client if the internet protocol address is the same as the virtual network service address.
The functional modules of the device network access device realize the steps of the device network access method when in operation.
In addition, to achieve the above object, the present invention also provides a terminal device, including: the device networking method comprises the steps of storing a device networking program, storing the device networking program in a memory, storing a processor and running on the processor, and realizing the device networking method when the device networking program is executed by the processor.
In addition, to achieve the above object, the present invention further provides a computer storage medium, where a device networking program is stored, and the device networking program, when executed by a processor, implements the steps of the device networking method described above.
In the embodiment of the invention, in the process of connecting the wireless network equipment to the wireless network, the equipment to be accessed to the network establishes the communication connection with the preset client at first, so as to receive the resource request message sent by the client based on the communication connection, then the equipment redirects the resource request message to the virtual network service address of the equipment to be accessed to the network, and the client determines and submits the wireless network configuration data based on the distribution network page corresponding to the virtual network service address, so that the equipment can access the corresponding target wireless network by receiving the wireless network configuration data submitted by the client and utilizing the wireless network configuration data.
Therefore, compared with the traditional equipment network access mode of carrying out network access parameter configuration by other clients or only forming a local area network with other terminals, the method and the system do not need the wireless network equipment to support a wired network, do not need the client to install special client software and provide corresponding matching support by the wireless network equipment, and realize the network access of the equipment only by establishing connection with the client and carrying out data interaction by the client based on the communication connection, namely, realize that the equipment is stably accessed to the wireless network only through the design of the equipment software layer under the condition of not increasing the overall production and manufacturing cost of the wireless network equipment.
Drawings
FIG. 1 is a schematic diagram of a hardware operating environment according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of an embodiment of a device networking method according to the present invention;
fig. 3 is a schematic view of an application flow related to an apparatus network access method according to an embodiment of the present invention;
fig. 4 is a schematic view of an application scenario involved in an apparatus network access method according to an embodiment of the present invention;
fig. 5 is a schematic diagram of functional modules involved in an embodiment of the device networking apparatus of the present invention.
The implementation, functional features and advantages of the present invention will be further described with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As shown in fig. 1, fig. 1 is a schematic device structure diagram of a hardware operating environment related to a terminal device according to an embodiment of the present invention.
It should be noted that, in the embodiment of the present invention, the terminal device is a Web server (a website server, and currently, the three most mainstream Web servers are Apache, nginx, and IIS) for controlling the wireless network device to perform operations related to accessing the wireless network. Or, the terminal device may also be a client that forms a local area network with the wireless network device to perform data communication with the wireless network device, where the client may specifically be a device such as a smart phone, a personal computer, and a server, and is not limited specifically herein.
As shown in fig. 1, the terminal device may include: a processor 1001, e.g. a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the device architecture shown in fig. 1 does not constitute a limitation of the terminal device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a device network access program. An operating system is a program that manages and controls the hardware and software resources of a device, supporting the operation of device networking programs, as well as other software or programs. In the device shown in fig. 1, the user interface 1003 is mainly used for data communication with a client; the network interface 1004 is mainly used for establishing communication connection with a server; and the processor 1001 may be configured to call the device networking program stored in the memory 1005 and perform the following operations:
establishing communication connection between a device to be accessed to a network and a preset client, and receiving a resource request message sent by the client based on the communication connection;
redirecting the resource request message to a virtual network service address of the equipment to be networked, wherein the virtual network service address is preset with a corresponding distribution network page;
and receiving wireless network configuration data submitted by the client through the distribution network page, and accessing a corresponding target wireless network by using the wireless network configuration data.
As a possible implementation, the processor 1001 may be further configured to call a device networking program stored in the memory 1005, and further perform the following operations:
sending the virtual network service address of the equipment to be networked to the client according to the resource request message;
receiving an access request initiated by the client based on the virtual network service address;
and responding to the access request to send a distribution network page corresponding to the virtual network service address to the client.
As a possible implementation, the processor 1001 may be further configured to call a device networking program stored in the memory 1005, and further perform the following operations:
determining a URL format of the resource request message;
if the URL format is a domain name format, sending the virtual network service address of the equipment to be accessed to the network to the client; or,
if the URL format is a protocol address format, determining whether an Internet protocol address carried by the resource request message is the same as the virtual network service address;
and if the Internet protocol address is different from the virtual network service address, sending the virtual network service address to the client.
As a possible implementation manner, the processor 1001 may be further configured to invoke a device networking program stored in the memory 1005, and after performing the step of determining whether the internet protocol address carried by the resource request message is the same as the virtual network service address, further perform the following operations:
and if the internet protocol address is the same as the virtual network service address, sending a distribution network page corresponding to the virtual network service address to the client.
Based on the above structure, various embodiments of the device network access method are provided.
Referring to fig. 2, fig. 2 is a flowchart illustrating a first embodiment of a device networking method according to the present invention.
While the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in an order different from that shown or described herein. In this embodiment, the execution main body of the device network access method of the present invention may be a device to be accessed to a wireless network, and the device to be accessed to the network may be a terminal device which has a small volume, does not have a human-computer interaction interface like a mobile phone touch screen, does not have a wired network port, and only inherits a wireless module with a small volume inside to access the wireless network. For example, the device to be networked may be a thermal imaging human body sensor device, an electrical device such as a household appliance, and the like. It should be understood that no limitation is made to the specific type of device to be networked in this embodiment. The following description of the present embodiment is made by directly replacing the above execution main bodies with the devices to be networked.
In this embodiment, the network access method of the device of the present invention includes:
step S10, establishing communication connection between the equipment to be accessed to the network and a preset client, and receiving a resource request message sent by the client based on the communication connection;
it should be noted that, in this embodiment, the preset client is a client that forms a local area network with the to-be-networked device that needs to access the wireless network currently to perform data communication with the to-be-networked device, where the client may specifically be a smart phone, a personal computer, a server, and the like, and is not limited specifically here.
In this embodiment, the device to be networked starts the hotspot function by operating the wireless access point mode, so that the client establishes a communication connection between the device to be networked and the client after accessing based on the hotspot function. Then, the device to be networked may perform data communication with the client based on the communication connection, that is, the device to be networked receives, based on the communication connection, a resource request message sent by the client through the communication connection.
For example, it is assumed that the client is a mobile phone of a user, and a resource request message initiated by the client after accessing a hotspot opened by a device to be networked is specifically an HTTP (hypertext Transfer Protocol) request. As shown in the application flow of fig. 3, when a device to be networked (illustrated as "device") that needs to access a wireless network is started to enter an operation flow of accessing the wireless network, a wireless access point mode of the device to be networked is started to start a hotspot function, so that a user mobile phone can access the device hotspot of the device to be networked and the device to be networked to form a local area network for data communication, and then, the smart phone automatically sends an HTTP request to the device to be networked by starting a browser of the smart phone.
It should be noted that, in this embodiment, after establishing a communication connection with the device to be networked, the client may automatically send, by starting a browser running on the client, an HTTP request in which the URL format is a domain name format or the URL format is an IP format to the device to be networked in the wireless access point mode in which the device to be networked runs.
Step S20, redirecting the resource request message to a virtual network service address of the equipment to be networked, wherein the virtual network service address is preset with a corresponding distribution network page;
in this embodiment, after receiving a resource request message sent by a client through the communication connection, a device to be networked immediately performs a resource redirection operation on the resource request message to redirect the resource request message to a pre-configured virtual network service address of the device to be networked, so that the client further obtains a distribution network page preset by the virtual network service address after obtaining the virtual network service address, so that the client can obtain, based on the distribution network page, wireless network configuration data configured by a user to enable the device to be networked to access a target wireless network, and the client further sends the wireless network configuration data to the device to be networked through the communication connection with the device to be networked.
It should be noted that, in this embodiment, after receiving the resource request message sent by the client through the communication connection, the device to be networked may transmit the distribution network page for configuring the wireless network configuration data to the client for visual output display by using the distribution network page as response data of an access request initiated by the client based on the virtual network service address, so that the client may receive, based on the distribution network page, a network configuration interactive operation performed by a user to obtain the wireless network configuration data.
In some possible embodiments, as shown in the application flow illustrated in fig. 3, the device to be networked may perform a process of feeding back response data to the user handset according to a resource request message, i.e., an HTTP request, sent by the user handset based on the IP redirection and DNS hijacking functions. After receiving the distribution network page fed back by the device to be networked, the client can output and display the distribution network page to the user through the currently running browser, so that the user can perform configuration operation of relevant network access parameters (such as the name, SSID and password of the wireless network) of the target wireless network based on the distribution network page, and further the client can obtain the network access parameters to serve as wireless network configuration data of the target wireless network and further send the wireless network configuration data to the device to be networked.
And step S30, receiving wireless network configuration data submitted by the client through the distribution network page, and accessing a corresponding target wireless network by using the wireless network configuration data.
In this embodiment, the device to be networked feeds back a distribution network page with a preset virtual network service address to the client by redirecting a resource request message initiated by the client, so that after the client obtains wireless network configuration data based on the distribution network page and returns the wireless network configuration data to the device to be networked, the device to be networked further switches from a currently running wireless access point mode to a running WIFI access mode, and thus, the device to be networked adds the resource request message to a target wireless network corresponding to the wireless network configuration data through the wireless network configuration data request.
Exemplarily, as shown in the application flow of fig. 3, after further receiving the wireless network configuration data, i.e., SSID and password, sent by the client, the device to be networked immediately stops operating the wireless access point mode to close the hotspot function, and simultaneously closes the IP redirection and DNS hijacking functions. And then, the device to be accessed to the network further starts a WIFI access mode to open the WiFi function, so that the device to be accessed to the network is added into the target wireless network (namely the target SSID network) according to the SSID and the password request.
In this embodiment, the device to be networked starts the hotspot function by operating the wireless access point mode, so that the client establishes a communication connection between the device to be networked and the client after accessing based on the hotspot function. Then, the device to be networked may perform data communication with the client based on the communication connection, that is, the device to be networked receives, based on the communication connection, a resource request message sent by the client through the communication connection. And then, the device to be networked immediately performs a resource redirection operation on the resource request message to redirect the resource request message to a pre-configured virtual network service address of the device to be networked, so that the client further obtains a distribution network page preset by the virtual network service address after obtaining the virtual network service address, and thus, the client can obtain wireless network configuration data configured by a user to enable the device to be networked to access a target wireless network based on the distribution network page, and further sends the wireless network configuration data to the device to be networked through communication connection with the device to be networked. And finally, the to-be-networked device is further switched from the currently running wireless access point mode to the running WIFI access mode, so that the to-be-networked device is added into a target wireless network corresponding to the wireless network configuration data through the wireless network configuration data request.
Therefore, the device to be accessed to the network firstly operates the wireless access point mode to communicate with the client, so that the client can obtain the wireless network configuration data only by operating the browser to perform communication data interaction with the device to be accessed to the network, and then the device to be accessed to the network can be accessed to the wireless network based on the wireless network configuration data. Therefore, compared with the traditional equipment network access mode of carrying out network access parameter configuration by other clients or only forming a local area network with other terminals, the method does not need to support a wired network by the equipment to be accessed, does not need to install special client software by the client and provide corresponding matching support by the equipment to be accessed, and can realize the network access of the equipment by the client based on a browser only after the connection is established with the client through the hotspot function of the equipment, namely, the equipment can be stably accessed to the wireless network only through the design of the software layer of the equipment under the condition of not increasing the integral production and manufacturing cost of the equipment to be accessed.
In addition, in this embodiment, the device to be networked feeds back an effective IP address to the client for the client to access through relatively mature IP redirection and DNS hijacking so as to further feed back a distribution network page to the client to acquire wireless network configuration data, so that the device is networked in a low-cost manner without considering the influence of performance and environment on function implementation, and the stability of the device in networking is further improved.
In addition, based on the first embodiment of the network access method of the device of the present invention, a second embodiment of the network access method of the device of the present invention is provided. In this embodiment, the main execution body of the device network entry method of the present invention may still be the device to be networked, which is the device to be networked.
In this embodiment, the step S20 of redirecting the resource request message to the virtual network service address of the device to be networked may specifically include:
step S201, sending the virtual network service address of the equipment to be networked to the client according to the resource request message;
in this embodiment, when the device to be networked receives a resource request message initiated by a client, and redirects the resource request message to a pre-configured virtual network service address of the device to be networked, so that the client obtains a configured web page preset by the virtual network service address, the device to be networked feeds back the virtual network service address to the client based on running a DNS hijacking function after receiving the resource request message.
In some possible embodiments, in the step S201, sending the virtual network service address of the device to be networked to the client according to the resource request message may specifically include:
step S2011, determining a URL format of the resource request message;
in this embodiment, after receiving a resource request message, i.e., an HTTP request, sent by a client, a device to be networked parses the HTTP request to determine whether a URL format of the HTTP request is a domain name format or a protocol address format.
It should be noted that, in this embodiment, the domain name format of the URL may specifically be: http:// domain name/resource path, and the protocol address format (i.e., IP format) of the URL may specifically be: http:// IP/resource Path.
Step S2012, if the URL format is a domain name format, sending the virtual network service address of the device to be networked to the client;
it should be noted that, in this embodiment, the preset virtual network card is a virtual network card of a different network segment generated by the device to be networked through an original network card in advance. For example, in this embodiment, the device to be networked may be connected to an operating system of the device to be networked in advance, so that a design and development worker of the device to be networked generates a virtual network card wlan0:1 in a different network segment through an original network card wlan0 of the device to be networked by using the operating system. And the device to be networked configures the IP addresses corresponding to all domain names of the DNS service as the IP address of the virtual network card based on the preset DNS service function provided by the DNS server.
In this embodiment, after the device to be networked resolves and determines the URL format of the HTTP request sent by the client, if the URL is in the domain name format, the device to be networked immediately feeds back the IP address of the preconfigured virtual network card to the client as the currently received intermediate response data of the HTTP request.
For example, as shown in the application scenario of fig. 4, assuming that the device to be networked is an IPC (thermal imaging device), if the URL of an HTTP request sent to the IPC by the above communication connection by a client (PC or user mobile phone) is in the format of HTTP:// domain name/resource path, after receiving the HTTP request sent in the form of a DNS request message, the IPC immediately resolves the domain name by using a DNS service to further send the IP address of a preconfigured virtual network card wlan0:1 as intermediate response data to the client.
Step S2013, if the URL format is a protocol address format, determining whether an Internet protocol address carried by the resource request message is the same as the virtual network service address;
step S2014, if the internet protocol address is different from the virtual network service address, sending the virtual network service address to the client.
In this embodiment, after the device to be networked resolves and determines the URL format of the HTTP request sent by the client, if the URL is in the protocol address format, the device to be networked further immediately determines whether the IP address carried by the HTTP request is the same as the IP address of the virtual network card, so that when it is determined that the IP address carried by the HTTP request is different from the IP address of the virtual network card, the IP address of the virtual network card is immediately fed back to the client as the currently received intermediate response data of the HTTP request.
For example, as shown in the application scenario shown in fig. 4, if the URL of the HTTP request sent by the client (PC or user mobile phone) to the device to be networked IPC through the communication connection is in the format of HTTP:// IP/resource path, after receiving the HTTP request, the IPC immediately processes the currently used HTTP protocol through its own web service to determine whether the IP address carried by the HTTP request is the IP address of the virtual network card wlan0:1, and further, when determining that the IP address of the HTTP request is not the IP address of the virtual network card wlan0:1, the IPC returns the IP address of the virtual network card wlan0:1 as intermediate response data to the client in a manner of returning to the response code of the client 302.
In addition, in some possible embodiments, after the step of "determining whether the internet protocol address carried in the resource request message is the same as the virtual network service address" in the step S2013, the network access method of the device of the present invention may further include:
step S2014 is to send the distribution network page corresponding to the virtual network service address to the client if the internet protocol address is the same as the virtual network service address.
In this embodiment, when the device to be networked further determines that the IP address carried in the HTTP request is the same as the IP address of the virtual network card, the device to be networked may directly feed back the network deployment page as response data to the client.
Exemplarily, as shown in the application scenario of fig. 4, if the URL of the HTTP request sent by the client (PC or user mobile phone) to the device to be networked IPC through the communication connection is in the HTTP:// IP/resource path format, after receiving the HTTP request, the IPC immediately processes the currently used HTTP protocol through its own web service to determine whether the IP address carried by the HTTP request is the IP address of the virtual network card wlan0:1, and further, if the IPC determines that the currently received HTTP request IP address is the IP address of the virtual network card wlan0:1, the IPC feeds back the distribution network page for configuring the relevant network access parameters of the accessed target wireless network as final response data to the client.
Step S202, receiving an access request initiated by the client based on the virtual network service address;
in this embodiment, after receiving the virtual network service address, which is the intermediate response data fed back by the device to be networked, the client further sends an access based on the virtual network service address to the device to be networked, which is the device to be networked, so that the device to be networked feeds back the distribution network page based on the access request.
Exemplarily, after receiving the IP address of the virtual network card fed back by the IPC of the device to be networked, the client further sends an access request (a new HTTP request) carrying the IP address of the virtual network card to the device to be networked based on the currently running browser, so that the IPC feeds back the distribution network page based on the IP address of the virtual network card.
Step S203, responding to the access request to send the distribution network page corresponding to the virtual network service address to the client.
In this embodiment, after receiving an access request initiated by a client based on a virtual network service address, a device to be networked immediately responds to the access request to extract the virtual network service address from the access request, so that the device to be networked directly feeds back the distribution network page as response data to the client when determining that the virtual network service address is the IP address of the virtual network card configured in advance.
In addition, a first embodiment of the network access system of the device of the present invention is proposed based on the first embodiment and/or the second embodiment of the network access method of the device of the present invention.
In this embodiment, the device to be networked system of the present invention includes a device to be networked and a client, where the device to be networked is in communication connection with the client, for example, after the device to be networked starts a hotspot function by operating a wireless access point mode, the client immediately accesses a device hotspot of the device to be networked to establish communication connection with the device to be networked. Wherein:
the equipment to be accessed in the equipment access system is used for: receiving a resource request message sent by the client through the communication connection; redirecting the resource request message to a virtual network service address of the equipment to be networked, wherein the virtual network service address is preset with a corresponding distribution network page; receiving wireless network configuration data submitted by the client through the distribution network page, and accessing a corresponding target wireless network by using the wireless network configuration data;
in addition, the client of the device networking system of the present invention is configured to: sending a resource request message to the equipment to be networked through the communication connection; receiving a virtual network service address fed back by the equipment to be networked in response to the resource request message, and determining wireless network configuration data according to a distribution network page corresponding to the virtual network service address; and sending the wireless network configuration data to the equipment to be networked.
In this embodiment, the device to be networked starts the hotspot function by operating the wireless access point mode, so that the client establishes a communication connection between the device to be networked and the client after accessing based on the hotspot function. Then, the device to be networked may perform data communication with the client based on the communication connection, that is, the device to be networked receives, based on the communication connection, a resource request message sent by the client through the communication connection. And then, the device to be networked immediately performs a resource redirection operation on the resource request message to redirect the resource request message to a pre-configured virtual network service address of the device to be networked, so that the client further obtains a distribution network page preset by the virtual network service address after obtaining the virtual network service address, and thus, the client can obtain wireless network configuration data configured by a user to enable the device to be networked to access a target wireless network based on the distribution network page, and further sends the wireless network configuration data to the device to be networked through communication connection with the device to be networked. And finally, the to-be-networked device is further switched from the currently running wireless access point mode to the running WIFI access mode, so that the to-be-networked device is added into a target wireless network corresponding to the wireless network configuration data through the wireless network configuration data request.
In some possible embodiments, the client of the device networking system of the present invention is configured to: sending a resource request message with a URL format in a domain name format to the equipment to be accessed through the communication connection; or, the client is further configured to send a resource request message in a protocol address format in a URL format to the device to be networked through the communication connection.
In this embodiment, the client may perform data communication based on the communication connection with the device to be networked, so as to send the resource request message in the URL format in the domain name format or the protocol address format to the device to be networked. Namely, the client sends an HTTP request in a URL format of a domain name format or an IP format to the device to be networked based on the communication connection by starting up and running a browser.
For example, in this embodiment, after establishing a communication connection with the IPC of the device to be networked, the client may automatically send the HTTP request with the URL format being the domain name format or the URL format being the IP format to the device to be networked by starting and running the browser of the client in the above-mentioned wireless access point mode of the IPC.
It should be noted that, in this embodiment, the domain name format of the URL may specifically be: http:// domain name/resource path, and the IP format of URL may specifically be: http:// IP/resource Path.
In some possible embodiments, the client of the device networking system of the present invention is configured to: initiating an access request to the equipment to be accessed according to the virtual network service address fed back by the equipment to be accessed; and receiving a distribution network page corresponding to the virtual network service address fed back by the device to be networked responding to the access request.
In this embodiment, after receiving the above-mentioned resource request message, i.e. the HTTP request, sent by the client, the device to be networked immediately resolves and determines whether the URL format of the HTTP request is the domain name format or the IP format. If the URL is in a domain name format, the device to be networked immediately feeds back the IP address of the pre-configured virtual network card to the client as the intermediate response data of the currently received HTTP request. Or after the URL format of the HTTP request sent by the client is determined by analysis, if the URL is in the IP format, the device to be networked immediately further determines whether the IP address carried by the HTTP request is the same as the IP address of the virtual network card, so that when the IP address carried by the HTTP request is determined to be different from the IP address of the virtual network card, the IP address of the virtual network card is immediately fed back to the client as the currently received intermediate response data of the HTTP request.
In this way, the client further sends an access request (a new HTTP request) carrying the IP address of the virtual network card to the device to be networked based on the browser. And then, the equipment to be accessed to the network responds to the access request, so that when the IP address carried in the access request is determined to be the IP address of the virtual network card which is configured in advance, the network distribution page is immediately fed back to the client as response data.
It should be noted that, in this embodiment, the preset virtual network card is a virtual network card of a different network segment generated by the device to be networked through the original network card in advance. For example, in this embodiment, the device to be networked may be connected to an operating system of the device to be networked in advance, so that a design and development worker of the device to be networked generates a virtual network card wlan0:1 in a different network segment through an original network card wlan0 of the device to be networked by using the operating system. And the device to be networked also configures the IP addresses corresponding to all domain names of the DNS service as the IP addresses of the virtual network card based on the preset DNS service function provided by the DNS server.
For example, as shown in the application scenario of fig. 4, assuming that the device to be networked is an IPC (thermal imaging device), if a URL of an HTTP request sent by a client (a PC or a user mobile phone) to the IPC through the above communication connection is in a format of HTTP:// domain name/resource path, after receiving the HTTP request sent in the form of a DNS request message, the IPC immediately resolves the domain name through a DNS service to further send an IP address of a preconfigured virtual network card — wlan0:1 as intermediate response data to the client. Or, if the URL of the HTTP request sent by the client (PC or user mobile phone) to the IPC through the communication connection is in the format of HTTP:// IP/resource path, the IPC immediately processes the currently used HTTP protocol through its own web service after receiving the HTTP request to determine whether the IP address carried by the HTTP request is the IP address of the virtual network card wlan0:1, and further, when determining that the IP address of the HTTP request is not the IP address of the virtual network card wlan0:1, the IPC returns the IP address of the virtual network card wlan0:1 as intermediate response data to the client in a manner of returning to the response code of the client 302. On the contrary, if the IPC determines that the IP address of the currently received HTTP request is the IP address of the virtual network card wlan0:1, the IPC feeds back the distribution network page for configuring the relevant network access parameters of the accessed target wireless network as final response data to the client.
In some feasible embodiments, after receiving the distribution network page fed back by the device to be networked according to the URL format of the HTTP request, the client further obtains, based on the distribution network page, the wireless network configuration parameter of the target wireless network configured by the user and enabling the device to be networked to access, and further sends the wireless network configuration parameter to the device to be networked through the communication connection.
In addition, in this embodiment, the client of the device networking system of the present invention is configured to: and when a user starting instruction is detected, sending the resource request message to the equipment to be networked, visually outputting and displaying the distribution network page, receiving network configuration interactive operation based on the distribution network page, and determining the wireless network configuration data based on the network configuration interactive operation.
In this embodiment, in a scene of actual operation of a user, the user only controls the client to initiate a user start instruction for controlling the browser of the client to start and operate, so that the client can respond to the user start instruction to perform a series of data interaction operations with the device to be networked to receive the distribution network page fed back by the device to be networked. Then, the client can visually output and display the distribution network page to the user through the currently running browser, so that the user can perform configuration operation of relevant network access parameters (such as the name, SSID and password of the wireless network) of the target wireless network based on the distribution network page, and further, the client can obtain the network access parameters to serve as wireless network configuration data of the target wireless network and further send the wireless network configuration data to the equipment to be networked. And after receiving the wireless network configuration data, the device to be networked can be switched from the currently running wireless access point mode to the running WIFI access mode, so that the device to be networked requests to be added into a target wireless network corresponding to the wireless network configuration parameters through the wireless network configuration parameters.
In this embodiment, the device to be networked operates the wireless access point mode first to communicate with the client, so that the client can obtain the wireless network configuration data by only operating the browser to perform communication data interaction with the device to be networked, and then the device to be networked can access the wireless network based on the wireless network configuration data. Therefore, compared with the traditional equipment network access mode of carrying out network access parameter configuration by other clients or only forming a local area network with other terminals, the method does not need to support a wired network by the equipment to be accessed, does not need to install special client software by the client and provide corresponding matching support by the equipment to be accessed, and can realize the network access of the equipment by the client based on a browser only after the connection is established with the client through the hotspot function of the equipment, namely, the equipment can be stably accessed to the wireless network only through the design of the software layer of the equipment under the condition of not increasing the integral production and manufacturing cost of the equipment to be accessed.
In addition, for the actual operation that the user specifically controls the client to control the device to be networked to access the wireless network, the user only needs to trigger a starting instruction based on the client, and then the client can automatically perform a series of data interaction with the device to be networked and directly output and display a distribution network page to the user, so that the user can start the configuration of the related data of the wireless network. Therefore, the technical scheme of the invention further simplifies the operation of the user on the equipment access to the wireless network, and greatly improves the use experience of the user. The starting instruction in this embodiment includes, but is not limited to: the method comprises the steps of opening a client application program and creating a new window in the client application program, and is characterized in that a user does not need to input information of access targets such as specific network addresses or IP addresses, and the resource request message is automatically sent to the equipment to be networked by operating some original operations of the client, so that the network access configuration of the equipment to be networked can be opened noninductively, and the user experience is improved.
In addition, the embodiment of the invention also provides a device for accessing the network.
Referring to fig. 5, the device networking apparatus of the present invention includes:
the system comprises a receiving module 10, a resource request message sending module and a resource request sending module, wherein the receiving module is used for establishing communication connection between equipment to be networked and a preset client and receiving the resource request message sent by the client based on the communication connection;
a message redirection module 20, configured to redirect the resource request message to a virtual network service address of the device to be networked, where the virtual network service address is preset with a corresponding distribution network page;
and the network access module 30 is configured to receive the wireless network configuration data submitted by the client through the distribution network page, and access a corresponding target wireless network by using the wireless network configuration data.
As a possible real-time manner, the message redirection module 20 includes:
a virtual address sending unit, configured to send a virtual network service address of the device to be networked to the client according to the resource request message;
a request receiving unit, configured to receive an access request initiated by the client based on the virtual network service address;
and the page sending unit is used for responding to the access request so as to send the distribution network page corresponding to the virtual network service address to the client.
As a feasible real-time manner, the virtual address sending unit includes:
a first sending subunit, configured to determine a URL format of the resource request message; if the URL format is the domain name format, sending the virtual network service address of the equipment to be accessed to the network to the client;
a second sending subunit, configured to determine whether an internet protocol address carried by the resource request message is the same as the virtual network service address if the URL format is a protocol address format; and if the internet protocol address is different from the virtual network service address, sending the virtual network service address to the client.
As a feasible real-time manner, the page sending unit is further configured to send a distribution network page corresponding to the virtual network service address to the client if the internet protocol address is the same as the virtual network service address.
The specific implementation of the device networking apparatus of the present invention is basically the same as the embodiments of the device networking method, and is not described herein again.
In addition, an embodiment of the present invention further provides a computer-readable storage medium, where the storage medium stores a device networking program, and the device networking program, when executed by a processor, implements the steps of the device networking method described below.
The embodiments of the device network access device and the computer-readable storage medium of the present invention may refer to the embodiments of the device network access method of the present invention, and are not described herein again.
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, an element defined by the phrases "comprising a component of' 8230; \8230;" does not exclude the presence of another like element in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are only for description, and do not represent the advantages and disadvantages 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 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, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention, and all equivalent structures or equivalent processes performed by the present invention or directly or indirectly applied to other related technical fields are also included in the scope of the present invention.

Claims (11)

1. A method for accessing a network by a device, the method comprising:
establishing communication connection between a device to be accessed to a network and a preset client, and receiving a resource request message sent by the client based on the communication connection;
redirecting the resource request message to a virtual network service address of the equipment to be networked, wherein the virtual network service address is preset with a corresponding distribution network page;
and receiving wireless network configuration data submitted by the client through the distribution network page, and accessing a corresponding target wireless network by using the wireless network configuration data.
2. The device networking method of claim 1, wherein the step of redirecting the resource request message to the virtual network service address of the device to be networked comprises:
sending the virtual network service address of the equipment to be networked to the client according to the resource request message;
receiving an access request initiated by the client based on the virtual network service address;
and responding to the access request to send a distribution network page corresponding to the virtual network service address to the client.
3. The device networking method according to claim 2, wherein the step of sending the virtual network service address of the device to be networked to the client according to the resource request message comprises:
determining a URL format of the resource request message;
if the URL format is a domain name format, sending the virtual network service address of the equipment to be accessed to the network to the client; or,
if the URL format is a protocol address format, determining whether an Internet protocol address carried by the resource request message is the same as the virtual network service address;
and if the Internet protocol address is different from the virtual network service address, sending the virtual network service address to the client.
4. The device networking method of claim 3, wherein after the step of determining whether the internet protocol address carried by the resource request message is the same as the virtual network service address, the method further comprises:
and if the internet protocol address is the same as the virtual network service address, sending a distribution network page corresponding to the virtual network service address to the client.
5. The equipment network access system is characterized by comprising equipment to be networked and a client, wherein the equipment to be networked is in communication connection with the client; wherein,
the equipment to be networked is used for receiving the resource request message sent by the client through the communication connection; redirecting the resource request message to a virtual network service address of the equipment to be networked, wherein the virtual network service address is preset with a corresponding distribution network page; receiving wireless network configuration data submitted by the client through the distribution network page, and accessing a corresponding target wireless network by using the wireless network configuration data;
the client is used for sending a resource request message to the equipment to be networked through the communication connection; receiving a virtual network service address fed back by the equipment to be networked in response to the resource request message, and determining wireless network configuration data according to a distribution network page corresponding to the virtual network service address; and sending the wireless network configuration data to the equipment to be networked.
6. The device networking system of claim 5, wherein the client is configured to send a resource request message in a URL format of a domain name format to the device to be networked through the communication connection; or, the client is further configured to send a resource request message in a protocol address format in a URL format to the device to be networked through the communication connection.
7. The device networking system of claim 5, wherein the client is configured to initiate an access request to the device to be networked according to the virtual network service address fed back by the device to be networked; and receiving a distribution network page corresponding to the virtual network service address fed back by the device to be networked responding to the access request.
8. The device networking system according to any one of claims 5 to 7, wherein the client is configured to send the resource request message to the device to be networked when detecting a user start instruction, and visually output and display the network distribution page.
9. An apparatus for accessing a network for a device, the apparatus comprising:
the system comprises a receiving module, a sending module and a receiving module, wherein the receiving module is used for establishing communication connection between equipment to be networked and a preset client and receiving a resource request message sent by the client based on the communication connection;
a message redirection module, configured to redirect the resource request message to a virtual network service address of the device to be networked, where the virtual network service address is preset with a corresponding distribution network page;
and the network access module is used for receiving the wireless network configuration data submitted by the client through the distribution network page and accessing the corresponding target wireless network by using the wireless network configuration data.
10. The device networking apparatus of claim 9, wherein the message redirection module comprises:
a virtual address sending unit, configured to send a virtual network service address of the device to be networked to the client according to the resource request message;
a request receiving unit, configured to receive an access request initiated by the client based on the virtual network service address;
the page sending unit is used for responding to the access request so as to send the distribution network page corresponding to the virtual network service address to the client;
the virtual address sending unit includes:
the first sending subunit is used for determining the URL format of the resource request message; if the URL format is the domain name format, sending the virtual network service address of the equipment to be accessed to the network to the client;
a second sending subunit, configured to determine whether an internet protocol address carried by the resource request message is the same as the virtual network service address if the URL format is a protocol address format; if the internet protocol address is different from the virtual network service address, the virtual network service address is sent to the client;
the page sending unit is further configured to send a distribution network page corresponding to the virtual network service address to the client if the internet protocol address is the same as the virtual network service address.
11. A terminal device, characterized in that the terminal device comprises: a memory, a processor, and a device networking program stored on the memory and executable on the processor, the device networking program when executed by the processor implementing the steps of the device networking method of any of claims 1 to 4.
CN202211053271.4A 2022-08-31 2022-08-31 Equipment network access method, system and device and terminal equipment Pending CN115442871A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211053271.4A CN115442871A (en) 2022-08-31 2022-08-31 Equipment network access method, system and device and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211053271.4A CN115442871A (en) 2022-08-31 2022-08-31 Equipment network access method, system and device and terminal equipment

Publications (1)

Publication Number Publication Date
CN115442871A true CN115442871A (en) 2022-12-06

Family

ID=84243828

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211053271.4A Pending CN115442871A (en) 2022-08-31 2022-08-31 Equipment network access method, system and device and terminal equipment

Country Status (1)

Country Link
CN (1) CN115442871A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014194580A1 (en) * 2013-06-06 2014-12-11 中兴通讯股份有限公司 Browser redirection method and device
KR101518472B1 (en) * 2014-06-16 2015-05-07 주식회사 플랜티넷 Method for detecting a number of the devices of a plurality of client terminals selected by a web server with additional non-specified domain name from the internet request traffics sharing the public IP address and System for detecting selectively the same
WO2015127833A1 (en) * 2014-02-26 2015-09-03 Tencent Technology (Shenzhen) Company Limited Method and system for facilitating wireless network access
CN106658659A (en) * 2016-11-15 2017-05-10 贝斯拓欧洲控股有限公司 Method and device for intelligent terminal equipment to access Internet
JP2018196113A (en) * 2017-05-19 2018-12-06 株式会社ナビック Radio access point device and radio communication method
CN109041062A (en) * 2018-07-03 2018-12-18 阿里巴巴集团控股有限公司 A kind of method for network access and device
CN110248364A (en) * 2019-06-27 2019-09-17 杭州博联智能科技股份有限公司 IOT equipment distribution method, apparatus, equipment and medium
CN112702328A (en) * 2020-12-18 2021-04-23 迈普通信技术股份有限公司 Network access method, system and electronic equipment

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014194580A1 (en) * 2013-06-06 2014-12-11 中兴通讯股份有限公司 Browser redirection method and device
WO2015127833A1 (en) * 2014-02-26 2015-09-03 Tencent Technology (Shenzhen) Company Limited Method and system for facilitating wireless network access
KR101518472B1 (en) * 2014-06-16 2015-05-07 주식회사 플랜티넷 Method for detecting a number of the devices of a plurality of client terminals selected by a web server with additional non-specified domain name from the internet request traffics sharing the public IP address and System for detecting selectively the same
CN106658659A (en) * 2016-11-15 2017-05-10 贝斯拓欧洲控股有限公司 Method and device for intelligent terminal equipment to access Internet
JP2018196113A (en) * 2017-05-19 2018-12-06 株式会社ナビック Radio access point device and radio communication method
CN109041062A (en) * 2018-07-03 2018-12-18 阿里巴巴集团控股有限公司 A kind of method for network access and device
CN110248364A (en) * 2019-06-27 2019-09-17 杭州博联智能科技股份有限公司 IOT equipment distribution method, apparatus, equipment and medium
CN112702328A (en) * 2020-12-18 2021-04-23 迈普通信技术股份有限公司 Network access method, system and electronic equipment

Similar Documents

Publication Publication Date Title
AU2019300978B2 (en) Method and electronic device for edge computing service
EP3640849B1 (en) Electronic device and method of registering personal cloud apparatus in user portal server thereof
CN110248364B (en) IOT equipment network distribution method, device, equipment and medium
US8156564B2 (en) Discovering network services
US7805504B2 (en) Network device allowing easy setup and computer program therefor
CN112399130B (en) Processing method and device of cloud video conference information, storage medium and communication equipment
EP3177041B1 (en) Method for transmitting content between terminals through service control device link
US10911378B2 (en) System and method for providing conversational contents
EP3934191A1 (en) Method for edge computing service and electronic device therefor
US7275092B2 (en) Method and system for controlling the operation of a peripheral device in a network
CN105049340A (en) Method and device for accessing intelligent equipment based on instant communication
JP2017501517A (en) Method, apparatus, and system for pushing an application program, and device
WO2012106647A2 (en) System and method for interaction between e-mail/web browser and communication devices
CN112448873A (en) Equipment binding method and device and computer readable storage medium
US9203704B2 (en) Discovering a server device, by a non-DLNA device, within a home network
CN106921675B (en) Method and device for accessing intelligent hardware to limited network
US20160234320A1 (en) System, device, and method for accessing cross-platform service
CN105657055A (en) Local area network equipment finding method and device oriented to WEB page
KR20100000267A (en) Mobile terminal unit for providing integrated web browsing service, mobile communication system, local area wireless communication system and method thereof
CN107979655A (en) Access control method, access control apparatus and access device
CN115442871A (en) Equipment network access method, system and device and terminal equipment
US20170070403A1 (en) User terminal, operator server, remote support method, and program for user terminal
CN110856145A (en) IOT device and user binding method, device and medium based on near field authentication
CN113285920B (en) Service access method, device, equipment and storage medium
CN112565458B (en) Platform remote control method and device, storage medium and electronic equipment

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