Device Internet Access Method, System, Device and Terminal Device

By establishing a communication connection in a wireless network device and redirecting the client's resource request message, the problem of supporting wired networks or dedicated APPs during the device's network access process is solved, and the effect of stable access to wireless networks is achieved.

CN115442871BActive Publication Date: 2025-05-27HANGZHOU MICROIMAGE SOFTWARE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211053271.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-31
Publication Date
2025-05-27
Estimated Expiration
2042-08-31

AI Technical Summary

Technical Problem

During the process of accessing the network, existing wireless network equipment needs to support wired networks or install dedicated APPs, resulting in increased production costs and the equipment cannot access the public network and its functions are limited.

Method used

By establishing a communication connection between the device to be entered and the client, receiving the client's resource request message and redirecting it to the device's virtual network service address. The client submits wireless network configuration data through the distribution page, and the device can use this data to access the target wireless network.

Benefits of technology

It realizes that wireless network equipment can be stably connected to wireless networks through software-level design without increasing production costs, avoiding the limitations of equipment functions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115442871B_ABST
    Figure CN115442871B_ABST
Patent Text Reader

Abstract

The present invention discloses a device access method, a device access system, a device access device and a terminal device. The device access method includes the following steps: establishing a communication connection between the device to be accessed 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 the virtual network service address of the device to be accessed, wherein the virtual network service address is preset with a corresponding network configuration page; receiving wireless network configuration data submitted by the client through the network configuration page, and using the wireless network configuration data to access the corresponding target wireless network. The technical solution of the present invention can be used to enable the device to access the wireless network only through the design of the device software level without increasing the production cost of the device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of network connection, and particularly to a device network access method, a device network access system, a device network access device, and a terminal device. Background Art

[0002] Currently, small-sized wireless network devices such as thermal imaging sensors often do not have a wired network port, so such devices access the wireless network through an internally integrated wireless module. However, since such devices do not have a display screen like a smart phone and thus cannot provide a human-computer interaction interface externally, such devices themselves cannot configure network access-related parameters through the screen. Based on this, wireless network devices have to rely on other clients to configure network access parameters or only form a local area network with other terminals that have already accessed the wireless network.

[0003] However, nowadays, when wireless network devices rely on other clients to configure network access parameters, either the device itself must first support the wired network, so that other clients log in to the device through the wired network and then enter the configuration interface to configure network access parameters, or the device needs to cooperate with a dedicated APP (Application) installed on the client to configure network access parameters in the way of transmitting UDP (User Datagram Protocol) packets. Whether the device supports the wired network or the device can receive UDP packets requires special designs in terms of software and hardware for the device, thus inevitably increasing the production and manufacturing cost of the device. In addition, although forming a local area network with other clients does not require special design for the device, in this case, the device itself can only act as an AP access point and cannot access the public network, which will greatly limit the functions of the device. Summary of the Invention

[0004] The main object of the present invention is to provide a device network access method, a device network access system, a device network access device, and a terminal device, aiming to enable a device to access a wireless network only through software-level design of the device without increasing the production and manufacturing cost of the device.

[0005] To achieve the above object, the present invention provides a device network access method, and the method includes the following steps:

[0006] Establish a communication connection between a device to be networked and a preset client, and receive a resource request message sent by the client based on the communication connection;

[0007] Redirect the resource request message to the virtual network service address of the device to be networked, where a corresponding network configuration page is preset for the virtual network service address;

[0008] Receive the wireless network configuration data submitted by the client through the network configuration page, and use the wireless network configuration data to access the corresponding target wireless network.

[0009] In a feasible embodiment, the step of redirecting the resource request message to the virtual network service address of the device to be networked includes:

[0010] Send the virtual network service address of the device to be networked to the client according to the resource request message;

[0011] Receive the access request initiated by the client based on the virtual network service address;

[0012] Respond to the access request to send the network configuration page corresponding to the virtual network service address to the client.

[0013] In a feasible 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:

[0014] Determine the URL format of the resource request message;

[0015] If the URL format is a domain name format, send the virtual network service address of the device to be networked to the client; or,

[0016] If the URL format is a protocol address format, determine whether the Internet protocol address carried in the resource request message is the same as the virtual network service address;

[0017] If the Internet protocol address is different from the virtual network service address, send the virtual network service address to the client.

[0018] In a feasible embodiment, 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, the method further includes:

[0019] If the Internet protocol address is the same as the virtual network service address, send the network configuration page corresponding to the virtual network service address to the client.

[0020] In addition, to achieve the above object, the present invention provides a device networking system, the device networking system includes a device to be networked and a client, the device to be networked is communicatively connected to the client; wherein,

[0021] The device to be networked is used to receive the resource request message sent by the client through the communication connection; redirect the resource request message to the virtual network service address of the device to be networked, where a corresponding network configuration page is preset for the virtual network service address; and receive the wireless network configuration data submitted by the client through the network configuration page, and access the corresponding target wireless network by using the wireless network configuration data.

[0022] The client is used to send a resource request message to the device to be networked through the communication connection; receive the virtual network service address feedback by the device to be networked in response to the resource request message, and determine the wireless network configuration data according to the network configuration page corresponding to the virtual network service address; and send the wireless network configuration data to the device to be networked.

[0023] In a feasible embodiment, the client is used to send a resource request message with a URL format of domain name format to the device to be networked through the communication connection; or, the client is further used to send a resource request message with a URL format of protocol address format to the device to be networked through the communication connection.

[0024] In a feasible embodiment, the client is used to initiate an access request to the device to be networked according to the virtual network service address feedback by the device to be networked; and receive the network configuration page corresponding to the virtual network service address feedback by the device to be networked in response to the access request.

[0025] In a feasible embodiment, the client is used to send the resource request message to the device to be networked when detecting a user startup instruction, and visually output and display the network configuration page, so as to receive a network configuration interaction operation based on the network configuration page, and determine the wireless network configuration data based on the network configuration interaction operation.

[0026] In addition, to achieve the above object, the present invention further provides a device network access device, a receiving module, configured to establish a communication connection between a device to be networked and a preset client, and receive the resource request message sent by the client based on the communication connection;

[0027] A message redirection module, configured to redirect the resource request message to the virtual network service address of the device to be networked, where a corresponding network configuration page is preset for the virtual network service address;

[0028] An access module, configured to receive the wireless network configuration data submitted by the client through the network configuration page, and access the corresponding target wireless network by using the wireless network configuration data.

[0029] In a feasible embodiment, the message redirection module includes:

[0030] A virtual address sending unit, configured to send the virtual network service address of the device to be networked to the client according to the resource request message;

[0031] A request receiving unit, configured to receive an access request initiated by the client based on the virtual network service address;

[0032] A page sending unit, configured to send the network configuration page corresponding to the virtual network service address to the client in response to the access request;

[0033] The virtual address sending unit includes:

[0034] A first sending subunit, configured to determine the URL format of the resource request message; and if the URL format is a domain name format, send the virtual network service address of the device to be networked to the client;

[0035] A second sending subunit, configured to if the URL format is a protocol address format, determine whether the Internet protocol address carried in the resource request message is the same as the virtual network service address; and if the Internet protocol address is not the same as the virtual network service address, send the virtual network service address to the client;

[0036] The page sending unit is further configured to if the Internet protocol address is the same as the virtual network service address, send the network configuration page corresponding to the virtual network service address to the client.

[0037] Each functional module of the device network access device of the present invention implements the steps of the device network access method as described above during operation.

[0038] In addition, to achieve the above object, the present invention further provides a terminal device, where the terminal device includes: a memory, a processor, and a device network access program stored on the memory and executable on the processor, and when the device network access program is executed by the processor, the steps of the device network access method as described above are implemented.

[0039] In addition, to achieve the above object, the present invention further proposes a computer storage medium, where a device network access program is stored on the computer storage medium, and when the device network access program is executed by a processor, the steps of the device network access method as described above are implemented.

[0040] In an embodiment of the present invention, during the process of a wireless network device connecting to a wireless network, first, the device to be networked establishes a communication connection with a preset client, thereby receiving a resource request message sent by the client based on this communication connection. After that, the device redirects the resource request message to the virtual network service address of the device to be networked, and the client determines and submits wireless network configuration data based on the network configuration page corresponding to this virtual network service address. Thus, the device can access the corresponding target wireless network by receiving the wireless network configuration data submitted by the client and using this wireless network configuration data.

[0041] In this way, compared with the traditional method of configuring network access parameters by relying on other clients or only forming a local area network with other terminals for device network access, the present invention not only does not require the wireless network device to support a wired network, nor does it require the client to install dedicated client software and the wireless network device to provide corresponding cooperation and support. Instead, only after establishing a connection with the client, data interaction is carried out by the client based on this communication connection to achieve device network access. That is, without increasing the overall production and manufacturing cost of the wireless network device, the device can be stably connected to the wireless network only through the design at the device software level. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 It is a schematic structural diagram of the hardware operating environment related to the solution of the embodiment of the present invention;

[0043] Figure 2 It is a schematic flowchart of an embodiment of the device network access method of the present invention;

[0044] Figure 3 It is a schematic application flowchart related to an embodiment of the device network access method of the present invention;

[0045] Figure 4 It is a schematic application scenario diagram related to an embodiment of the device network access method of the present invention;

[0046] Figure 5 It is a schematic diagram of functional modules related to an embodiment of the device network access apparatus of the present invention.

[0047] The realization, functional characteristics and advantages of the object of the present invention will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0048] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0049] As Figure 1 shown, Figure 1 is a schematic diagram of the device structure of the hardware operating environment of the terminal device related to the solution of the embodiment of the present invention.

[0050] It should be noted that, in the embodiments of the present invention, the terminal device is a web server (website server) for controlling a wireless network device to perform operations related to accessing a wireless network. Currently, the three most mainstream web servers are Apache, Nginx, and IIS. Alternatively, the terminal device may also be a client that forms a local area network with the wireless network device to communicate with the wireless network device. The client may specifically be a device such as a smart phone, a personal computer, a server, etc., and no specific limitation is made here.

[0051] As Figure 1 shown, the terminal device may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display) and an input unit such as a keyboard (Keyboard). Optionally, the user interface 1003 may further include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0052] Those skilled in the art can understand that Figure 1 the device structure shown in

[0053] does not constitute a limitation on the terminal device, and may include more or fewer components than shown in the figure, or combine some components, or have different component arrangements. Figure 1 shown, the memory 1005, as a computer storage medium, may include an operating system, a network communication module, a user interface module, and a device network access program. The operating system is a program for managing and controlling the hardware and software resources of the device, and supports the operation of the device network access program and other software or programs. In the Figure 1 device shown, the user interface 1003 is mainly used for data communication with the client; the network interface 1004 is mainly used for establishing a communication connection with the server; and the processor 1001 may be used to call the device network access program stored in the memory 1005 and perform the following operations:

[0054] Establish a communication connection between the device to be networked and a preset client, and receive a resource request message sent by the client based on the communication connection;

[0055] Redirect the resource request message to the virtual network service address of the device to be networked, where a corresponding network configuration page is preset for the virtual network service address;

[0056] Receive the wireless network configuration data submitted by the client through the network configuration page, and use the wireless network configuration data to access the corresponding target wireless network.

[0057] As a feasible implementation, the processor 1001 can also be used to call the device network access program stored in the memory 1005, and further perform the following operations:

[0058] Send the virtual network service address of the device to be networked to the client according to the resource request message;

[0059] Receive the access request initiated by the client based on the virtual network service address;

[0060] Respond to the access request to send the network configuration page corresponding to the virtual network service address to the client.

[0061] As a feasible implementation, the processor 1001 can also be used to call the device network access program stored in the memory 1005, and further perform the following operations:

[0062] Determine the URL format of the resource request message;

[0063] If the URL format is a domain name format, send the virtual network service address of the device to be networked to the client; or,

[0064] If the URL format is a protocol address format, determine whether the Internet protocol address carried in the resource request message is the same as the virtual network service address;

[0065] If the Internet protocol address is not the same as the virtual network service address, send the virtual network service address to the client.

[0066] As a feasible implementation, the processor 1001 can also be used to call the device network access program stored in the memory 1005, and after performing the step of determining whether the Internet protocol address carried in the resource request message is the same as the virtual network service address, further perform the following operations:

[0067] If the Internet protocol address is the same as the virtual network service address, send the network configuration page corresponding to the virtual network service address to the client.

[0068] Based on the above structure, various embodiments of the device network access method are proposed.

[0069] Reference Figure 2 , Figure 2 is a schematic flowchart of the first embodiment of the device network access method of the present invention.

[0070] The embodiments of the present invention provide an embodiment of the device network access method. It should be noted that although the logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than here. In this embodiment, the execution subject of the device network access method of the present invention may be a device to be networked that needs to access the wireless network. The device to be networked may be a terminal device with a small volume, without a human-computer interaction interface like a mobile phone touch screen, and without a wired network port, and only inherits a small-volume wireless module internally to access the wireless network. For example, the device to be networked may specifically be a thermal imaging human body sensor device and electrical devices such as household appliances. It should be understood that in this embodiment, no specific limitation is imposed on the specific type of the device to be networked. Hereinafter, the device to be networked will be directly used to replace the above-mentioned respective execution subjects for the description of this embodiment.

[0071] In this embodiment, the device network access method of the present invention includes:

[0072] Step S10, establish a communication connection between the device to be networked and a preset client, and receive a resource request message sent by the client based on the communication connection;

[0073] It should be noted that in this embodiment, the preset client is the client that forms a local area network with the device to be networked that currently needs to access the wireless network for data communication with the device to be networked. The client may specifically be devices such as a smart phone, a personal computer, and a server, and no specific limitation is made here.

[0074] In this embodiment, the device to be networked enables the hotspot function by running the wireless access point mode. Thus, after the above-mentioned client accesses based on the hotspot function, a communication connection is established between the device to be networked and the client. After that, the device to be networked can perform data communication with the client based on this communication connection, that is, the device to be networked receives the resource request message sent by the client through this communication connection based on this communication connection.

[0075] Exemplarily, assume that the above-mentioned client is a user's mobile phone, and the resource request message initiated by the client after accessing the hotspot enabled by the device to be networked is specifically an HTTP (Hyper Text Transfer Protocol) request. As Figure 3In the application process shown, when a device to be networked that currently needs to access the wireless network (the "device" shown in the figure) starts to enter the operation process of accessing the wireless network, it first starts running its own wireless access point mode to enable the hotspot function. Thus, the user's mobile phone can access the device hotspot of the device to be networked, and a local area network is formed between the user's mobile phone and the device to be networked for data communication. Furthermore, the smart phone automatically sends an HTTP request to the device to be networked by starting to run its own browser.

[0076] It should be noted that in this embodiment, after the client establishes a communication connection with the device to be networked, it can, under the condition that the device to be networked runs the above-mentioned wireless access point mode, automatically send an HTTP request with a URL format of domain name format or a URL format of IP format to the device to be networked by starting to run its own browser.

[0077] Step S20: Redirect the resource request message to the virtual network service address of the device to be networked, where a corresponding network configuration page is preset for the virtual network service address.

[0078] In this embodiment, after the device to be networked receives the resource request message sent by the client through the above communication connection, it immediately performs an operation of resource redirection for the resource request message to redirect the resource request message to the pre-configured virtual network service address of the device to be networked. After the client obtains the virtual network service address, it further obtains the network configuration page preset for the virtual network service address. In this way, the client can obtain the wireless network configuration data configured by the user to enable the device to be networked to access the target wireless network based on the network configuration page. Moreover, 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.

[0079] It should be noted that in this embodiment, after the device to be networked receives the resource request message sent by the client through the above communication connection, it can use the network configuration page for configuring the wireless network configuration data as the response data for the access request initiated by the client based on the above virtual network service address, and transfer the network configuration page to the client for visual output display. In this way, the client can receive the network configuration interaction operation performed by the user based on the network configuration page to obtain the wireless network configuration data.

[0080] In some feasible embodiments, such as Figure 3In the application process shown, the device to be networked can, based on the IP redirection and DNS hijacking functions, feedback response data to the user's mobile phone according to the resource request message sent by the user's mobile phone - the HTTP request. After the client receives the network configuration page fed back by the device to be networked, it can output and display the network configuration page to the user through the currently running browser. In this way, the user can configure the relevant network access parameters of the target wireless network (such as the name of the wireless network - SSID and password) based on this network configuration page. Furthermore, the client can obtain this network access parameter as the wireless network configuration data of the target wireless network and further send this wireless network configuration data to the device to be networked.

[0081] Step S30: Receive the wireless network configuration data submitted by the client through the network configuration page, and use the wireless network configuration data to access the corresponding target wireless network.

[0082] In this embodiment, after the device to be networked feeds back the network configuration page with the preset virtual network service address by redirecting the resource request message initiated by the redirect client, so that the client obtains the wireless network configuration data based on this network configuration page and returns this wireless network configuration data to the device to be networked, the device to be networked further switches from the currently running wireless access point mode to the running WIFI access mode, and thus requests to join the target wireless network corresponding to this wireless network configuration data through this wireless network configuration data.

[0083] Exemplarily, as Figure 3 shown in the application process, after the device to be networked further receives the wireless network configuration data - SSID and password sent by the client, it immediately stops running the above-mentioned wireless access point mode to turn off the hotspot function, and at the same time turns off the above-mentioned IP redirection and DNS hijacking functions. After that, the device to be networked further starts running the WIFI access mode to turn on the WiFi function, and thus requests to join the target wireless network (i.e., the target SSID network) according to this SSID and password.

[0084] In this embodiment, the device to be networked enables the hotspot function by running in the wireless access point mode. Thus, after the above-mentioned client accesses based on this hotspot function, a communication connection is established between the device to be networked and the client. After that, the device to be networked can perform data communication with the client based on this communication connection, that is, the device to be networked receives the resource request message sent by the client through this communication connection based on this communication connection. After that, the device to be networked immediately performs an operation of resource redirection for this resource request message to redirect this resource request message to the virtual network service address of the device to be networked that has been pre-configured, so that after the client obtains this virtual network service address, it further obtains the network configuration page preset for this virtual network service address. In this way, the client can obtain the wireless network configuration data configured by the user to enable the device to be networked to access the target wireless network based on this network configuration page, and the client further sends this wireless network configuration data to the device to be networked through the communication connection with the device to be networked. Finally, the device to be networked further switches from the currently running wireless access point mode to running in the WIFI access mode, so as to request to join the target wireless network corresponding to this wireless network configuration data through this wireless network configuration data.

[0085] In this way, the present invention enables the device to be networked to obtain the wireless network configuration data by first running in the wireless access point mode to communicate with the client, so that the client can perform communication data interaction with the device to be networked only by running a browser. After that, the device to be networked can access the wireless network based on this wireless network configuration data. Thus, compared with the traditional device networking methods that rely on other clients to configure network access parameters or only form a local area network with other terminals, the present invention not only does not require the device to be networked to support a wired network, nor does it require the client to install dedicated client software and the device to be networked to provide corresponding cooperation and support, but only based on establishing a connection with the client through the device's own hotspot function, the client can achieve device networking based on the browser, that is, it realizes that without increasing the overall production and manufacturing cost of the device to be networked, the device can be stably connected to the wireless network only through the design at the device software level.

[0086] In addition, in this embodiment, the device to be networked uses relatively mature IP redirection and DNS hijacking to feedback an effective IP address to the client for the client to access, and further feedbacks the network configuration page to the client to obtain the wireless network configuration data, realizing device networking in a low-cost manner without considering the impact of performance and environment on the function implementation, and further improving the stability of device networking.

[0087] In addition, based on the first embodiment of the device network access method of the present invention, a second embodiment of the device network access method of the present invention is proposed. In this embodiment, the execution subject of the device network access method of the present invention can still be the device to be networked as described above that is the device to be networked.

[0088] In this embodiment, step S20 above, redirecting the resource request message to the virtual network service address of the device to be networked, may specifically include:

[0089] Step S201, sending the virtual network service address of the device to be networked to the client according to the resource request message;

[0090] In this embodiment, when the device to be networked receives the resource request message initiated by the client and redirects the resource request message to the pre-configured virtual network service address of the device to be networked for the client to obtain the network configuration page preset by the virtual network service address, after receiving the resource request message, the device to be networked immediately feeds back the virtual network service address to the client based on running the DNS hijacking function.

[0091] In some feasible embodiments, step S201 above, sending the virtual network service address of the device to be networked to the client according to the resource request message, may specifically include:

[0092] Step S2011, determining the URL format of the resource request message;

[0093] In this embodiment, after the device to be networked receives the resource request message - HTTP request sent by the client, it immediately parses the HTTP request to determine whether the URL format of the HTTP request is a domain name format or a protocol address format.

[0094] 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.

[0095] Step S2012, if the URL format is the domain name format, sending the virtual network service address of the device to be networked to the client;

[0096] It should be noted that, in this embodiment, the preset virtual network card is a virtual network card with different network segments pre-generated by the device to be networked through its original network card. Exemplarily, in this embodiment, the device to be networked can be pre-connected to the operating system of the device to be networked, so that the design and development staff of the device to be networked can, through this operating system, generate a virtual network card with a different network segment - wlan0:1 through the original network card - wlan0 of the device to be networked. Moreover, the device to be networked also configures all the IP addresses corresponding to the domain names of the DNS service as the IP address of this virtual network card based on the DNS service function provided by the preset DNS server.

[0097] 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 uses the IP address of the pre-configured virtual network card as the intermediate response data of the currently received HTTP request and feeds it back to the client.

[0098] Exemplarily, as Figure 4 shown in the application scenario, assuming that the device to be networked is an IPC (thermal imaging device), if the URL of the HTTP request sent by the client (PC or user mobile phone) to the IPC through the above communication connection is in the format of http: / / domain name / resource path, then after the IPC receives this HTTP request sent in the form of a DNS request message, it immediately resolves the domain name through the DNS service and further sends the IP address of the pre-configured virtual network card - wlan0:1 as the intermediate response data to the client.

[0099] Step S2013, if the URL format is the protocol address format, determine whether the Internet protocol address carried in the resource request message is the same as the virtual network service address;

[0100] Step S2014, if the Internet protocol address is not the same as the virtual network service address, send the virtual network service address to the client.

[0101] 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 immediately further determines whether the IP address carried in this HTTP request is the same as the IP address of the above virtual network card. Thus, when it is determined that the IP address carried in this HTTP request is not the same as the IP address of the virtual network card, the device to be networked immediately uses the IP address of the virtual network card as the intermediate response data of the currently received HTTP request and feeds it back to the client.

[0102] Exemplarily, as Figure 4In the application scenario shown, if the URL of the HTTP request sent by the client (PC or user's mobile phone) to the device to be networked, i.e., IPC, through the above communication connection is in the format of http: / / IP / resource path, then after receiving the HTTP request, IPC will immediately process 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 above virtual network card wlan0:1. Furthermore, when it is determined that the IP address of the HTTP request is not the IP address of the virtual network card wlan0:1, IPC will return the IP address of the virtual network card - wlan0:1 to the client as intermediate response data by returning a 302 response code to the client.

[0103] In addition, in some feasible embodiments, 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" in the above step S2013, the device network access method of the present invention may further include:

[0104] Step S2014, if the Internet protocol address is the same as the virtual network service address, then send the network configuration page corresponding to the virtual network service address to the client.

[0105] In this embodiment, when the device to be networked further determines that the IP address carried by the HTTP request is the same as the IP address of the above virtual network card, it can directly feedback the above network configuration page to the client as response data.

[0106] Exemplarily, as Figure 4 In the application scenario shown, if the URL of the HTTP request sent by the client (PC or user's mobile phone) to the device to be networked, i.e., IPC, through the above communication connection is in the format of http: / / IP / resource path, then after receiving the HTTP request, IPC will immediately process 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 above virtual network card wlan0:1. Furthermore, if IPC determines that the IP address of the currently received HTTP request is the IP address of the virtual network card wlan0:1, then IPC will feedback the network configuration page for configuring the relevant network access parameters of the target wireless network to be accessed to the client as the final response data.

[0107] Step S202, receive the access request initiated by the client based on the virtual network service address;

[0108] In this embodiment, after the client receives the intermediate response data - virtual network service address fed back by the device to be networked, the client further sends an access request based on the virtual network service address to the device to be networked, so that the device to be networked feeds back the above-mentioned network configuration page based on the access request.

[0109] Exemplarily, after the client receives 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 above-mentioned network configuration page based on the IP address of the virtual network card.

[0110] Step S203: Respond to the access request to send the network configuration page corresponding to the virtual network service address to the client.

[0111] In this embodiment, after the device to be networked receives the access request initiated by the client based on the virtual network service address, it immediately responds to the access request to extract the virtual network service address from the access request. In this way, when the device to be networked determines that the virtual network service address is the IP address of the virtual network card that has been pre-configured above, it directly feeds back the above-mentioned network configuration page to the client as response data.

[0112] In addition, based on the first embodiment and / or the second embodiment of the device network access method of the present invention, the first embodiment of the device network access system of the present invention is proposed.

[0113] In this embodiment, the device network access system of the present invention includes a device to be networked and a client, and the device to be networked is communicatively connected to the client. For example, after the device to be networked enables the hotspot function by running the wireless access point mode, the client immediately accesses the device hotspot of the device to be networked to establish a communication connection with the device to be networked. Among them:

[0114] The device to be networked in the device network access system of the present invention is used for: receiving a resource request message sent by the client through the communication connection; redirecting the resource request message to the virtual network service address of the device to be networked, where a corresponding network configuration page is preset for the virtual network service address; and receiving the wireless network configuration data submitted by the client through the network configuration page, and accessing the corresponding target wireless network by using the wireless network configuration data.

[0115] In addition, the client of the device network access system of the present invention is used for: sending a resource request message to the device to be networked through the communication connection; receiving the virtual network service address fed back by the device to be networked in response to the resource request message, and determining the wireless network configuration data according to the network configuration page corresponding to the virtual network service address; and sending the wireless network configuration data to the device to be networked.

[0116] In this embodiment, the device to be networked enables the hotspot function by running in the wireless access point mode. Thus, after the above-mentioned client accesses based on this hotspot function, a communication connection is established between the device to be networked and the client. After that, the device to be networked can perform data communication with the client based on this communication connection, that is, the device to be networked receives the resource request message sent by the client through this communication connection based on this communication connection. After that, the device to be networked immediately performs an operation of resource redirection for this resource request message to redirect this resource request message to the virtual network service address of the device to be networked that has been pre-configured, so that after the client obtains this virtual network service address, it further obtains the network configuration page preset for this virtual network service address. In this way, the client can obtain the wireless network configuration data configured by the user to enable the device to be networked to access the target wireless network based on this network configuration page, and the client further sends this wireless network configuration data to the device to be networked through the communication connection with the device to be networked. Finally, the device to be networked further switches from the currently running wireless access point mode to running in the WIFI access mode, so as to request to join the target wireless network corresponding to this wireless network configuration data through this wireless network configuration data.

[0117] In some feasible embodiments, the client of the device network access system of the present invention is used for: sending a resource request message with a URL format of a domain name format to the device to be networked through the communication connection; or, the client is further used for sending a resource request message with a URL format of a protocol address format to the device to be networked through the communication connection.

[0118] In this embodiment, the client can perform data communication based on the communication connection with the device to be networked to send a resource request message with a URL format of a domain name format or a protocol address format to the device to be networked. That is, the client sends an HTTP request with a URL format of a domain name format or an IP format to the device to be networked based on this communication connection by starting and running a browser.

[0119] Exemplarily, in this embodiment, after the client establishes a communication connection with the device to be networked, i.e., IPC, when the IPC operates in the above-mentioned wireless access point mode, the client can automatically send an HTTP request with a URL in the domain name format or an IP format to the device to be networked by starting its own browser.

[0120] It should be noted that in this embodiment, the domain name format of the URL can specifically be: http: / / domain name / resource path, and the IP format of the URL can specifically be: http: / / IP / resource path.

[0121] In some feasible embodiments, the client of the device networking system of the present invention is used 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 receive the network configuration page corresponding to the virtual network service address fed back by the device to be networked in response to the access request.

[0122] In this embodiment, after the device to be networked receives the above-mentioned resource request message, i.e., the HTTP request sent by the client, it immediately parses and determines whether the URL format of the HTTP request is in the domain name format or the IP format. If the URL is in the domain name format, the device to be networked immediately feeds back the IP address of the pre-configured virtual network card as the intermediate response data of the currently received HTTP request to the client. Or, after parsing and determining the URL format of the HTTP request sent by the client, if the URL is in the IP format, the device to be networked immediately further determines whether the IP address carried in the HTTP request is the same as the IP address of the above virtual network card. Thus, when it is determined that the IP address carried in the HTTP request is different from the IP address of the virtual network card, the device to be networked immediately feeds back the IP address of the virtual network card as the intermediate response data of the currently received HTTP request to the client.

[0123] 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. Then, the device to be networked responds to the access request. Thus, when it is determined that the IP address carried in the access request is the IP address of the above-mentioned pre-configured virtual network card, the device to be networked immediately feeds back the network configuration page as the response data to the client.

[0124] It should be noted that in this embodiment, the preset virtual network card is a virtual network card with different network segments pre-generated by the device to be networked through its original network card. Exemplarily, in this embodiment, the device to be networked can be pre-connected to the operating system of the device to be networked, so that the design and development staff of the device to be networked can use the operating system to generate a virtual network card with a different network segment - wlan0:1 through the original network card - wlan0 of the device to be networked. Moreover, the device to be networked also configures all the IP addresses corresponding to the domain names of the DNS service as the IP address of the virtual network card based on the DNS service function provided by the preset DNS server.

[0125] Exemplarily, as Figure 4 shown in the application scenario, assuming that the device to be networked is an IPC (thermal imaging device), if the URL of the HTTP request sent by the client (PC or user mobile phone) to the IPC through the above communication connection is in the format of http: / / domain name / resource path, then after receiving the HTTP request sent in the form of a DNS request message, the IPC immediately resolves the domain name through the DNS service and further sends the IP address of the pre-configured 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 above communication connection is in the format of http: / / IP / resource path, then 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 above virtual network card wlan0:1. Furthermore, when it is determined 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 by returning a 302 response code to the client. On the contrary, 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 will feedback the network configuration page for configuring the relevant network access parameters of the target wireless network to be accessed as the final response data to the client.

[0126] In some feasible embodiments, after receiving the network configuration page feedback by the device to be networked according to the URL format of the HTTP request, the client further obtains the wireless network configuration parameters of the target wireless network configured by the user for the device to be networked based on the network configuration page. Moreover, the client further sends the wireless network configuration parameters to the device to be networked through the communication connection.

[0127] In addition, in this embodiment, the client of the device network access system of the present invention is used to: send the resource request message to the device to be networked when detecting a user startup instruction, and visually output and display the network configuration page, so as to receive network configuration interaction operations based on the network configuration page, and determine the wireless network configuration data based on the network configuration interaction operations.

[0128] In this embodiment, in the scenario of the user's actual operation, the user only manipulates the client to initiate a user startup instruction that controls the browser of the client to start running. In this way, the client can respond to the user startup instruction to perform a series of data interaction operations with the device to be networked, so as to receive the network configuration page feedback by the device to be networked. After that, the client can visually output and display the network configuration page to the user through the currently running browser. Thus, the user can perform configuration operations on the relevant network access parameters of the target wireless network (such as the name of the wireless network - SSID and the password) based on the network configuration page. Furthermore, the client can obtain the network access parameters as the wireless network configuration data of the target wireless network, and further send the wireless network configuration data to the device to be networked. After receiving the wireless network configuration data, the device to be networked can switch from the currently running wireless access point mode to the WIFI access mode, so as to request to join the target wireless network corresponding to the wireless network configuration parameters through the wireless network configuration parameters.

[0129] In this embodiment, the device to be networked first runs in the wireless access point mode to communicate with the client, so that the client can make the device to be networked obtain the wireless network configuration data only by running the browser to perform communication data interaction with the device to be networked. After that, the device to be networked can access the wireless network based on the wireless network configuration data. Therefore, compared with the traditional device network access methods that rely on other clients to configure network access parameters or only form a local area network with other terminals, the present invention not only does not require the device to be networked to support a wired network, nor does it require the client to install dedicated client software and the device to be networked to provide corresponding cooperation and support. Instead, only after establishing a connection between the device and the client based on the device's own hotspot function, the client can realize the network access of the device based on the browser. That is, without increasing the overall production and manufacturing cost of the device to be networked, the device can be stably connected to the wireless network only through the design at the device software level.

[0130] In addition, for the actual operation of the user to specifically control the client to control the device to be connected to the wireless network, the user only needs to trigger a start instruction based on the client. After that, the client can automatically perform a series of data interactions with the device to be connected to the network, and directly output and display a network configuration page to the user. Then, the user can start to configure the data related to the wireless network. Therefore, the technical solution of the present invention further simplifies the operation of the user to connect the device to the wireless network, and greatly improves the user experience. The start instruction in this embodiment includes, but is not limited to: an instruction to open the client application program, an instruction to create a new window in the client application program. The characteristic of this kind of instruction is that it does not require the user to input information such as a specific network address or IP address of the access target, but automatically sends the resource request message to the device to be connected to the network by operating some original operations of the client, so as to start the network access configuration of the device to be connected to the network without perception and improve the user experience.

[0131] In addition, an embodiment of the present invention also proposes a device network access device.

[0132] Referring to Figure 5 , the device network access device of the present invention includes:

[0133] A receiving module 10, configured to establish a communication connection between the device to be connected to the network and a preset client, and receive a resource request message sent by the client based on the communication connection;

[0134] A message redirection module 20, configured to redirect the resource request message to a virtual network service address of the device to be connected to the network, where a corresponding network configuration page is preset for the virtual network service address;

[0135] A network access module 30, configured to receive wireless network configuration data submitted by the client through the network configuration page, and use the wireless network configuration data to access a corresponding target wireless network.

[0136] As a feasible real-time manner, the message redirection module 20 includes:

[0137] A virtual address sending unit, configured to send the virtual network service address of the device to be connected to the network to the client according to the resource request message;

[0138] A request receiving unit, configured to receive an access request initiated by the client based on the virtual network service address;

[0139] A page sending unit, configured to respond to the access request to send the network configuration page corresponding to the virtual network service address to the client.

[0140] As a feasible real-time manner, the virtual address sending unit includes:

[0141] A first sending subunit, configured to determine the URL format of the resource request message; and if the URL format is a domain name format, send the virtual network service address of the device to be networked to the client.

[0142] A second sending subunit, configured to if the URL format is a protocol address format, determine whether the Internet protocol address carried in the resource request message is the same as the virtual network service address; and if the Internet protocol address is not the same as the virtual network service address, send the virtual network service address to the client.

[0143] As a feasible real-time manner, the page sending unit is further configured to if the Internet protocol address is the same as the virtual network service address, send the network configuration page corresponding to the virtual network service address to the client.

[0144] The extended content of the specific implementation manner of the device network access device of the present invention is basically the same as that of each embodiment of the above device network access method, and will not be described in detail here.

[0145] In addition, an embodiment of the present invention further provides a computer-readable storage medium, on which a device network access program is stored, and when the device network access program is executed by a processor, the steps of the device network access method described below are implemented.

[0146] For each embodiment of the device network access device and the computer-readable storage medium of the present invention, reference may be made to each embodiment of the device network access method of the present invention, which will not be described in detail here.

[0147] It should be noted that in this article, the terms "including", "comprising" or any other variant thereof are intended to cover a non-exclusive inclusion, such that a process, method, article or device including a series of elements not only includes those elements but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article or device including the element.

[0148] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments.

[0149] Through the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions for causing a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in various embodiments of the present invention.

[0150] The above are only the preferred embodiments of the present invention, and do not limit the patent scope of the present invention accordingly. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present invention.

Claims

1. A method for a device to access a network, characterized in that, the method includes: Establish a communication connection between the device to be networked and a preset client, and receive a resource request message sent by the client based on the communication connection; Redirect the resource request message to the virtual network service address of the device to be networked, where the virtual network service address is the IP address of a virtual network card, the network segment of the virtual network card is different from the network segment corresponding to the original network card of the device to be networked, and a corresponding network configuration page is preset for the virtual network service address; Receive the wireless network configuration data submitted by the client through the network configuration page, and use the wireless network configuration data to access the corresponding target wireless network; The step of redirecting the resource request message to the virtual network service address of the device to be networked includes: Send the virtual network service address of the device to be networked to the client according to the resource request message; Receive an access request initiated by the client based on the virtual network service address; Respond to the access request to send the network configuration page corresponding to the virtual network service address to the client; Among them, 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: Determine the URL format of the resource request message; If the URL format is a domain name format, send the virtual network service address of the device to be networked to the client; Or, If the URL format is a protocol address format, determine whether the Internet protocol address carried in 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, send the virtual network service address to the client.

2. The device network access method according to claim 1, characterized in that, 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, the method further includes: If the Internet protocol address is the same as the virtual network service address, send the network configuration page corresponding to the virtual network service address to the client.

3. A device network access system, characterized in that, the device network access system includes a device to be networked and a client, and the device to be networked is communicatively connected to the client; wherein, The device to be networked is configured to receive a resource request message sent by the client through the communication connection; redirect the resource request message to the virtual network service address of the device to be networked, where the virtual network service address is the IP address of a virtual network card, the network segment of the virtual network card is different from the network segment corresponding to the original network card of the device to be networked, and a corresponding network configuration page is preset for the virtual network service address; and receive the wireless network configuration data submitted by the client through the network configuration page, and use the wireless network configuration data to access the corresponding target wireless network; The client is used to send a resource request message to the device to be networked through the communication connection; receive the virtual network service address fed back by the device to be networked in response to the resource request message, and determine the wireless network configuration data according to the network configuration page corresponding to the virtual network service address; and send the wireless network configuration data to the device to be networked; Wherein, the client is used 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 receive the network configuration page corresponding to the virtual network service address fed back by the device to be networked in response to the access request; Wherein, the client is used to send a resource request message with a URL format of a domain name format to the device to be networked through the communication connection; or, the client is further used to send a resource request message with a URL format of a protocol address format to the device to be networked through the communication connection.

4. The device networking system according to claim 3, characterized in that, The client is used to send the resource request message to the device to be networked when detecting a user startup instruction, and visually output and display the network configuration page.

5. A device networking apparatus, characterized in that, The apparatus includes: A receiving module, configured to establish a communication connection between a device to be networked and a preset client, and receive 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 the virtual network service address of the device to be networked, wherein the virtual network service address is the IP address of a virtual network card, the network segment of the virtual network card is different from the network segment corresponding to the original network card of the device to be networked, and a corresponding network configuration page is preset for the virtual network service address; A networking module, configured to receive the wireless network configuration data submitted by the client through the network configuration page, and access the corresponding target wireless network by using the wireless network configuration data; The message redirection module includes: A virtual address sending unit, configured to send the 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; A page sending unit, configured to send the network configuration page corresponding to the virtual network service address to the client in response to the access request; The virtual address sending unit includes: A first sending subunit, configured to determine the URL format of the resource request message; and if the URL format is a domain name format, send the virtual network service address of the device to be networked to the client; A second sending subunit, configured to if the URL format is a protocol address format, determine whether the Internet protocol address carried in 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, send the virtual network service address to the client.

6. The device networking apparatus according to claim 5, characterized in that, The page sending unit is further configured to send the network configuration 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.

7. A terminal device characterized in that the terminal device includes: a memory, a processor, and a device network access program stored on the memory and executable on the processor. When the device network access program is executed by the processor, the steps of the device network access method according to any one of claims 1 to 2 are implemented.

Citation Information

Patent Citations

  • IOT equipment network distribution method and device, equipment and medium

    CN110248364A