CN113890839B - Method and device for determining network connection state of Internet of things equipment - Google Patents

Method and device for determining network connection state of Internet of things equipment Download PDF

Info

Publication number
CN113890839B
CN113890839B CN202111250888.0A CN202111250888A CN113890839B CN 113890839 B CN113890839 B CN 113890839B CN 202111250888 A CN202111250888 A CN 202111250888A CN 113890839 B CN113890839 B CN 113890839B
Authority
CN
China
Prior art keywords
internet
network connection
target
target application
equipment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111250888.0A
Other languages
Chinese (zh)
Other versions
CN113890839A (en
Inventor
胡锦浩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Huacheng Software Technology Co Ltd
Original Assignee
Hangzhou Huacheng Software Technology 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 Huacheng Software Technology Co Ltd filed Critical Hangzhou Huacheng Software Technology Co Ltd
Priority to CN202111250888.0A priority Critical patent/CN113890839B/en
Publication of CN113890839A publication Critical patent/CN113890839A/en
Application granted granted Critical
Publication of CN113890839B publication Critical patent/CN113890839B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0811Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The embodiment of the invention provides a method and a device for determining a network connection state of Internet of things equipment, wherein the method comprises the following steps: acquiring a network connection state between the Internet of things equipment and the target routing equipment, which are monitored by the server through the target port, and a network connection state between the Internet of things equipment and the server so as to generate a state code; and under the condition that the network connection with the target application is maintained, sending a status code to the target application to instruct the target application to prompt the network connection status of the Internet of things equipment. According to the invention, the problem of network connection of the Internet of things equipment is solved, and the effect of rapidly resetting the Internet of things equipment and improving the network distribution progress is achieved.

Description

Method and device for determining network connection state of Internet of things equipment
Technical Field
The embodiment of the invention relates to the field of communication, in particular to a method and a device for determining a network connection state of internet of things equipment.
Background
There are two network distribution modes of the mainstream implementation of the current internet of things wireless fidelity (Wireless Fidelity, abbreviated as WiFi) device, one network distribution mode is a traditional wireless Access Point (AP) network distribution mode, namely, a mobile phone Application program (Application, abbreviated as APP) fills in router information (name and password), then a wireless local area network (Wireless Local Area Network, abbreviated as WLAN) is switched to a hot spot emitted by the device, the router information is emitted in a broadcast mode, after the device receives the router information, the hot spot is closed, the router receiving the information is connected, the device is registered by the platform, the APP is circularly detected from the platform, if the device is registered successfully, APP prompt binding is successful, and the network distribution flow of the device is ended.
The other is a one-key smartconf network distribution mode, the mobile phone APP fills in router information (name and password), then the APP encodes the router information (length code or address code), the router information is broadcasted in a form of a user data protocol (User Date Protocol, abbreviated as UDP), the Internet of things equipment is in a hybrid mode, all air packets are received, then reverse decoding is carried out, the router information is analyzed, the router receiving the information is connected, the platform registration equipment is removed, the APP circularly detects whether the equipment is registered or not, the APP prompts that the binding is successful if the registration is successful, and the equipment network distribution flow is ended.
The current network distribution mode has the following problems:
because the mobile phone and the Internet of things equipment are not in the same position in space, and the signal searching capability of the mobile phone is far greater than that of the current low-cost Internet of things equipment, part of the mobile phones can search routes on the connection, but the Internet of things equipment cannot search the connection, or the equipment is unstable due to poor signal on the connection. The route information displayed by the mobile phone terminal is also information scanned by the mobile phone, and is inaccurate for the equipment terminal of the Internet of things.
In view of the above technical problems, no effective solution has been proposed in the related art.
Disclosure of Invention
The embodiment of the invention provides a method and a device for determining the network connection state of Internet of things equipment, which are used for at least solving the problem of network connection of the Internet of things equipment in the related technology.
According to an embodiment of the present invention, there is provided a method for determining a network connection state of an internet of things device, including: acquiring a network connection state between the Internet of things equipment and the target routing equipment, which are monitored by a server through a target port, and the network connection state between the Internet of things equipment and the server so as to generate a state code; and under the condition that the network connection with the target application is maintained, sending a status code to the target application to instruct the target application to prompt the network connection status of the Internet of things equipment.
According to another embodiment of the present invention, there is provided a method for determining a network connection state of an internet of things device, including: receiving a status code sent by the internet of things device, wherein the status code is determined based on a network connection state between the internet of things device and the target routing device monitored through the target port and a network connection state between the internet of things device and the server; prompting the network connection state.
According to another embodiment of the present invention, there is provided a device for determining a network connection state of an internet of things device, including: the first determining module is used for obtaining the network connection state between the Internet of things equipment and the target routing equipment, which are monitored by the server through the target port, and the network connection state between the Internet of things equipment and the server so as to generate a state code; the first sending module is used for sending the state code to the target application under the condition that the network connection with the target application is kept, so as to indicate the target application to prompt the network connection state of the Internet of things equipment.
In an exemplary embodiment, the apparatus further comprises one of: the first establishing module is used for establishing network connection with the target application through the hot spot of the Internet of things equipment and the hot spot of the terminal equipment provided with the target application before the state code is generated; the second establishing module is used for responding to the two-dimensional code image scanned by the target application and establishing network connection with the target application, wherein the two-dimensional code image is integrated with the hot spot information of the Internet of things equipment; and the third establishing module is used for responding to a user instruction received by the target application so as to establish network connection with the target application, wherein the user instruction comprises triggering of hot spot information of the Internet of things equipment.
In an exemplary embodiment, the above apparatus further includes: and the second sending module is used for sending networking data to the target application through the target port before sending the state code to the target application under the condition that the network connection with the target application is ensured to be maintained, so as to ensure that the network connection with the target application is ensured to be maintained.
In an exemplary embodiment, the above apparatus further includes: the second determining module is used for determining a routing information list before generating the status code, wherein the routing information list comprises attribute information of N routing devices, the N routing devices comprise target routing devices, and N is a natural number greater than or equal to 1; and the third sending module is used for sending the route information list to the target application so as to instruct the target application to display the route information list.
In an exemplary embodiment, the above apparatus further includes: the second receiving module is used for receiving the attribute information of the target routing equipment sent by the target application after the routing information list is sent to the target application; and the first connection module is used for connecting to the target routing equipment based on the attribute information of the target routing equipment.
In an exemplary embodiment, the first sending module includes: the first sending unit is used for sending the state code to the target application through the target port under the condition that the network connection with the target application is kept, so as to indicate the target application to prompt the network connection state of the Internet of things equipment.
In an exemplary embodiment, the above apparatus further includes: the second processing unit is used for acquiring the network connection state between the Internet of things equipment and the target routing equipment through the wireless fidelity wifi chip; and generating a state code of the network connection state.
According to still another embodiment of the present invention, there is further provided a device for determining a network connection state of an internet of things device, including: the first receiving module is used for receiving a state code sent by the Internet of things equipment, wherein the state code is determined based on a network connection state between the Internet of things equipment and the target routing equipment monitored through the target port and a network connection state between the Internet of things equipment and the server; the first prompting module is used for prompting the network connection state.
In an exemplary embodiment, the apparatus further comprises one of: a fourth establishing module, configured to establish a connection between the internet of things device and the target application through a hotspot of the internet of things device and a hotspot of the terminal device installed with the target application before receiving the status code sent by the internet of things device; a fifth establishing module, configured to establish a network connection with the internet of things device through the scanned two-dimensional code image, where hotspot information of the internet of things device is integrated in the two-dimensional code image; and the sixth establishing module is used for receiving a user instruction to establish network connection with the Internet of things equipment, wherein the user instruction comprises triggering of hot spot information of the Internet of things equipment.
In an exemplary embodiment, the above apparatus further includes: the third receiving module is used for receiving a routing information list sent by the internet of things device before receiving the state code sent by the internet of things device, wherein the routing information list comprises attribute information of N routing devices, the N routing devices comprise target routing devices, and N is a natural number which is greater than or equal to 1; and the first display module is used for displaying the route information list.
In an exemplary embodiment, the above apparatus further includes: and the fourth sending module is used for sending the attribute information of the target routing equipment to the internet of things equipment after the routing information list is displayed so as to indicate the internet of things equipment to be connected with the target routing equipment.
In an exemplary embodiment, the first prompting module includes: the first analysis unit is used for analyzing the state code so as to convert the state code into text information; and the first display unit is used for displaying the text information.
According to a further embodiment of the invention, there is also provided a computer readable storage medium having stored therein a computer program, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
According to a further embodiment of the invention, there is also provided an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
According to the method and the device, the state code is generated by acquiring the network connection state between the Internet of things equipment and the target routing equipment and the network connection state between the Internet of things equipment and the server, wherein the network connection state is monitored by the server through the target port; and under the condition that the network connection with the target application is maintained, sending a status code to the target application to instruct the target application to prompt the network connection status of the Internet of things equipment. The Internet of things equipment and the target application are always kept connected, the networking state of the Internet of things equipment can be obtained at any time, the Internet of things equipment can be quickly reset, and the effect of network allocation progress is improved.
Drawings
Fig. 1 is a hardware block diagram of a mobile terminal of a method for determining a network connection state of an internet of things device according to an embodiment of the present invention;
fig. 2 is a flowchart (one) of a method for determining a network connection state of an internet of things device according to an embodiment of the present invention;
Fig. 3 is a flowchart (second) of a method for determining a network connection state of an internet of things device according to an embodiment of the present invention;
FIG. 4 is an overall flow chart according to an embodiment of the invention;
fig. 5 is a block diagram (a) of a network connection state determining apparatus of an internet of things device according to an embodiment of the present invention;
fig. 6 is a block diagram (ii) of a network connection state determining apparatus of an internet of things device according to an embodiment of the present invention.
Detailed Description
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings in conjunction with the embodiments.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order.
The method embodiments provided in the embodiments of the present application may be performed in a mobile terminal, a computer terminal or similar computing device. Taking the operation on a mobile terminal as an example, fig. 1 is a hardware structural block diagram of the mobile terminal of a method for determining a network connection state of an internet of things device according to an embodiment of the present invention. As shown in fig. 1, a mobile terminal may include one or more (only one is shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a microprocessor MCU or a processing device such as a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 for communication functions and an input-output device 108. It will be appreciated by those skilled in the art that the structure shown in fig. 1 is merely illustrative and not limiting of the structure of the mobile terminal described above. For example, the mobile terminal may also include more or fewer components than shown in fig. 1, or have a different configuration than shown in fig. 1.
The memory 104 may be used to store a computer program, for example, a software program of application software and a module, such as a computer program corresponding to a method for determining a network connection state of an internet of things device in an embodiment of the present invention, and the processor 102 executes the computer program stored in the memory 104 to perform various functional applications and data processing, that is, implement the method described above. Memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory remotely located relative to the processor 102, which may be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission means 106 is arranged to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, simply referred to as NIC) that can connect to other network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used to communicate with the internet wirelessly.
In this embodiment, a method for determining a network connection state of an internet of things device is provided, fig. 2 is a flowchart (a) of a method for determining a network connection state of an internet of things device according to an embodiment of the present invention, and as shown in fig. 2, the flowchart includes the following steps:
step S202, acquiring a network connection state between the Internet of things equipment and the target routing equipment, which are monitored by the server through the target port, and a network connection state between the Internet of things equipment and the server, so as to generate a state code;
step S204, under the condition that the network connection with the target application is kept, the state code is sent to the target application to instruct the target application to prompt the network connection state of the Internet of things device.
The main execution body of the steps may be, but not limited to, an internet of things device.
Through the steps, the network connection state between the Internet of things equipment and the target routing equipment and the network connection state between the Internet of things equipment and the server, which are monitored by the server through the target port, are obtained to generate a state code; and under the condition that the network connection with the target application is maintained, sending a status code to the target application to instruct the target application to prompt the network connection status of the Internet of things equipment. The Internet of things equipment and the target application are always kept connected, the networking state of the Internet of things equipment can be obtained at any time, the Internet of things equipment can be quickly reset, and the effect of network allocation progress is improved.
In one exemplary embodiment, the method further comprises, prior to listening for the destination port and generating the status code, one of:
establishing network connection with a target application through a hot spot of the Internet of things device and a hot spot of terminal equipment provided with the target application;
responding to a two-dimensional code image scanned by a target application, and establishing network connection with the target application, wherein the two-dimensional code image is integrated with hot spot information of Internet of things equipment;
responding to a user instruction received by the target application to establish network connection with the target application, wherein the user instruction comprises triggering of hot spot information of the Internet of things equipment.
In this embodiment, in order for the target application to automatically connect to the hotspot of the internet of things device, the same hotspot name and password must be defined. The automatic connection default hot spot name can be set to scan equipment information in a two-dimensional code mode, and the hot spot name and the password are obtained to be automatically connected. The automatic connection default hot spot name can be set as the hot spot name of equipment nearby the App scan, the hot spot name meeting the requirements is screened out, and the user manually selects the hot spot connection of the equipment.
In an exemplary embodiment, monitoring a target port, in a case of determining to maintain a network connection with a target application, before sending the status code to the target application, includes:
S1, networking data is sent to a target application through a target port so as to ensure that network connection is kept between the networking data and the target application;
the target port is used for sending information of a networking interface to the target application, and the networking interface is used for transmitting networking data between the target application and the Internet of things device.
In this embodiment, the network allocation system of the device end of the internet of things may integrate an http server (or a map, a tcp, etc.), where the http server may be used for the network allocation, the data size is smaller, and the number of interfaces is smaller.
In this embodiment, by continuously monitoring the target port, interfaces such as setting the configuration network information (set_wifi_config), querying the configuration network state (get_wifi_status) and the like are provided for the connected target application.
In one exemplary embodiment, before generating the status code, the method further comprises:
s1, determining a routing information list, wherein the routing information list comprises attribute information of N routing devices, the N routing devices comprise target routing devices, and N is a natural number greater than or equal to 1;
and S2, sending the route information list to the target application to instruct the target application to display the route information list.
In this embodiment, the target application requests the router information list (including name, signal strength, encryption mode, etc.) scanned by the device from the internet of things device.
In one exemplary embodiment, after sending the routing information list to the target application, it includes:
s1, receiving attribute information of target routing equipment sent by a target application;
s2, connecting to the target routing equipment based on the attribute information of the target routing equipment.
In this embodiment, the target application sends the router name, the password, the encryption mode, the platform authorization information, and the like, which need to be connected, to the internet of things device. And after receiving the data, the Internet of things equipment starts to connect with the designated router, and after success, the Internet of things equipment is connected with the platform registration equipment.
In one exemplary embodiment, in the event that it is determined to maintain a network connection with a target application, sending a status code to the target application includes:
s1, under the condition that network connection is kept between the target application and the target application, sending a state code to the target application through the target port to instruct the target application to prompt the network connection state of the Internet of things equipment.
In this embodiment, the internet of things device may define various normal conditions and abnormal conditions as corresponding status codes, and send the status codes to the target application in real time through the connection established by the previous hot spot.
In an exemplary embodiment, the above method further comprises:
Acquiring a network connection state between the Internet of things equipment and the target routing equipment and a network connection state between the Internet of things equipment and the server through the wireless fidelity wifi chip; a status code is generated.
In this embodiment, the internet of things device uses a wifi chip, adopts a time division multiplexing mode, maintains connection with the target application App in a hotspot mode on one side, continuously broadcasts hotspot packets periodically, and can actively connect the routing device on the other side, so that the state of the connected routing device and the platform can be saved, and the state is transmitted to the App for App display through the maintained App connection.
In this embodiment, a method for determining a network connection state of an internet of things device is provided, and fig. 3 is a flowchart (second) of a method for determining a network connection state of an internet of things device according to an embodiment of the present invention, as shown in fig. 3, where the flowchart includes the following steps:
step S302, receiving a status code sent by the Internet of things equipment, wherein the status code is determined based on a network connection state between the Internet of things equipment and the target routing equipment monitored through the target port and a network connection state between the Internet of things equipment and the server;
step S304, prompting the network connection state.
The execution subject of the above steps may be a target application or the like, but is not limited thereto.
Through the steps, the state code sent by the Internet of things equipment is received, wherein the state code is determined based on the network connection state between the Internet of things equipment and the target routing equipment monitored through the target port and the network connection state between the Internet of things equipment and the server; prompting the network connection state. The Internet of things equipment and the target application are always kept connected, the networking state of the Internet of things equipment can be obtained at any time, the Internet of things equipment can be quickly reset, and the effect of network allocation progress is improved.
In an exemplary embodiment, before receiving the status code sent by the internet of things device, the method further comprises one of:
s1, establishing connection between the Internet of things equipment and a target application through a hot spot of the Internet of things equipment and a hot spot of terminal equipment provided with the target application;
s2, establishing network connection with the Internet of things equipment through the scanned two-dimensional code image, wherein hot spot information of the Internet of things equipment is integrated in the two-dimensional code image;
s3, receiving a user instruction to establish network connection with the Internet of things equipment, wherein the user instruction comprises triggering of hot spot information of the Internet of things equipment.
In an exemplary embodiment, before receiving the status code sent by the internet of things device, the method further includes:
s1, receiving a routing information list sent by Internet of things equipment, wherein the routing information list comprises attribute information of N routing equipment, the N routing equipment comprises target routing equipment, and N is a natural number which is greater than or equal to 1;
s2, displaying a route information list.
In one exemplary embodiment, after displaying the routing information list, the method includes:
s1, attribute information of the target routing equipment is sent to the Internet of things equipment to indicate that the Internet of things equipment is connected with the target routing equipment.
In the present embodiment, the attribute information includes, but is not limited to, information such as a name, a password, and the like of the router device.
In one exemplary embodiment, prompting the network connection state includes:
s1, analyzing the status code to convert the status code into text information;
s2, displaying the text information.
In this embodiment, the network connection state may be displayed through the mobile phone terminal.
The invention is illustrated below with reference to specific examples:
in this embodiment, an internet of things device distribution network is illustrated as an example, and as shown in fig. 4, the internet of things device distribution network in this embodiment includes the following steps:
S401, the Internet of things device is powered on, the Internet of things device is triggered to enter a station+ap mode (the device hot spot can be started in the mode and other routing devices can be connected at the same time), and the Internet of things device emits the device hot spot with a default name.
S402, a target application App enters an Internet of things equipment distribution network interface and automatically connects with a hot spot of Internet of things equipment with a default name; in addition, app can also connect with hotspots of internet of things devices by:
mode one: integrating a hot spot name and a password of the Internet of things device into a two-dimensional code image, and acquiring the hot spot name and the password by the APP through scanning the two-dimensional code image to connect the Internet of things device;
mode two: the App scans the hot spot names of nearby devices, screens out hot spot names meeting the requirements, and responds to the hot spot connection of the devices manually selected by the user.
S403, the App establishes reliable connection with the Internet of things equipment through a hot spot of the Internet of things equipment (including tcp, http, coap and other modes).
S404, app requests the internet of things device for a route information list scanned by the internet of things device (the route information list includes a name of the route device, signal strength, encryption mode, etc.).
S405, the Internet of things device sends a routing information list to the APP.
And S406, the App arranges and displays an available route list (similar to a wireless connection interface of a mobile phone) on the interface.
S407, selecting the routing equipment to be connected by the user, and if the routing equipment is connected with a certain name for the first time, inputting the connection password of the routing equipment; if a certain routing device is connected before, the password input can be skipped to directly connect.
And S408, the App sends the name, the password, the encryption mode, the platform authorization information and the like of the routing equipment to be connected to the Internet of things equipment.
S409, after receiving the data of the routing equipment, the Internet of things equipment starts to connect the designated routing equipment, and after successful connection, the platform registration equipment is connected.
In S409, the progress information of the internet of things device connecting the routing device and the internet of things device connecting the registration platform (for example, the information that the routing device is already connected, the password of the routing device is wrong, the registration platform is successful, the connection platform is failed, etc.) will appear, the internet of things device will define various normal conditions and abnormal conditions as corresponding status codes, and the status codes will be sent to the App through the connection established by the previous hot spot in real time.
S411, the App can convert the state code into corresponding text display on the connection interface, and if other error conditions such as password error occur, the process can return to the S407 for continuous setting without starting from the head.
S412, when the App detects that the registration platform is successful, the Internet of things equipment feeds back the registration progress to the APP in real time;
s413, the APP displays successful network allocation, the network allocation of the Internet of things equipment is finished, so that the App can disconnect the connection established through the hot spot, and the Internet of things equipment can also close the hot spot.
In the network configuration process of the internet of things device, the internet of things device end is in the station+ap mode, on one hand, the http server can be integrated, the target port between the internet of things device and the APP can be continuously monitored, the connected APP is provided with network configuration information (set_wifi_config), the network configuration state (get_wifi_status) is queried, and the like; on the other hand, the networking cloud client can be integrated, the network connection state is stored locally and is used for the App to inquire through the target port so as to display the network distribution process, the network distribution result and the failure reason. The network connection status includes at least one of: wifi setting is successful, the routing equipment is connected successfully, the routing equipment has wrong passwords, routing equipment signals are weak, the connection platform is connected in a platform, the connection platform is successful, the connection platform fails (error codes) and the like.
In addition, the internet of things device can also use a wifi chip, and adopts a time division multiplexing mode, one side maintains connection with an App in a hot spot mode, periodically continuously broadcasts hot spot packets, and the other side can be actively connected with the routing device, so that the state of the connected routing device and the platform can be stored, and the state is transmitted to the App through the maintained App connection for App display.
In this embodiment, the App distribution network interface automatically connects to the hotspot of the internet of things device, generates an interface similar to a wireless connection of a mobile phone, and can repeatedly set the internet of things device until the distribution network is successful. The App can also display the detailed distribution network flow state and immediately display the reason under the error state to prompt the user to conduct error checking. Because the device maintains the connection of the App, the device configuration information can be directly reset without manually triggering the device to reenter the configuration in the event of a failure.
In summary, the embodiment can realize an App automatic connection hotspot function (call a mobile phone bottom network api interface), and the device specific station+ap mode can enable the internet of things device to be always connected with the App. The whole process of AP distribution network is simplified, the App and the mobile phone are not required to be switched mutually, the App can be automatically connected with the equipment hot spot signal meeting the requirements, the list information of the router can be displayed on the App interface, and the network distribution operation can be completed only on the same interface for a new user, so that the network distribution operation is as simple as the connection of the mobile phone with a wireless network.
In addition, in the embodiment, the internet of things device can integrate the distribution network server and the networking cloud client at the same time, and the App end can display a nearby router information list (name, signal strength and the like) scanned by the device. The internet of things device returns the scanned router list to the App, so that the problem that the internet of things device cannot be connected due to the fact that a 5G signal router is sent to the internet of things device, the sent router signal is too weak and the like possibly occurs in the prior art can be solved.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The embodiment also provides a device for determining a network connection state of an internet of things device, which is used for implementing the foregoing embodiment and a preferred implementation manner, and is not described in detail. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
Fig. 5 is a block diagram (a) of a network connection status determining apparatus of an internet of things device according to an embodiment of the present invention, as shown in fig. 5, the apparatus includes:
a first determining module 52, configured to obtain a network connection state between the internet of things device and the target routing device monitored by the server through the target port, and a network connection state between the internet of things device and the server, so as to generate a status code;
the first sending module 54 is configured to send a status code to the target application to instruct the target application to prompt the network connection status of the internet of things device, where the status code is determined to keep the network connection with the target application.
In an exemplary embodiment, the apparatus further comprises one of: the first establishing module is used for establishing network connection with the target application through the hot spot of the Internet of things equipment and the hot spot of the terminal equipment provided with the target application before the state code is generated; the second establishing module is used for responding to the two-dimensional code image scanned by the target application and establishing network connection with the target application, wherein the two-dimensional code image is integrated with the hot spot information of the Internet of things equipment; and the third establishing module is used for responding to a user instruction received by the target application so as to establish network connection with the target application, wherein the user instruction comprises triggering of hot spot information of the Internet of things equipment.
In an exemplary embodiment, the above apparatus further includes: and the second sending module is used for sending networking data to the target application through the target port before sending the state code to the target application under the condition that the network connection with the target application is ensured to be maintained, so as to ensure that the network connection with the target application is ensured to be maintained.
In an exemplary embodiment, the above apparatus further includes: the second determining module is used for determining a routing information list before generating the status code, wherein the routing information list comprises attribute information of N routing devices, the N routing devices comprise target routing devices, and N is a natural number greater than or equal to 1; and the third sending module is used for sending the route information list to the target application so as to instruct the target application to display the route information list.
In an exemplary embodiment, the above apparatus further includes: the second receiving module is used for receiving the attribute information of the target routing equipment sent by the target application after the routing information list is sent to the target application; and the first connection module is used for connecting to the target routing equipment based on the attribute information of the target routing equipment.
In an exemplary embodiment, the first sending module includes: the first sending unit is used for sending the state code to the target application through the target port under the condition that the network connection with the target application is kept, so as to indicate the target application to prompt the network connection state of the Internet of things equipment.
In an exemplary embodiment, the above apparatus further includes: the second processing unit is used for acquiring the network connection state between the Internet of things equipment and the target routing equipment and the network connection state between the Internet of things equipment and the server through the wireless fidelity wifi chip; a status code is generated.
Fig. 6 is a block diagram (two) of a network connection status determining apparatus of an internet of things device according to an embodiment of the present invention, and as shown in fig. 6, the apparatus includes:
a first receiving module 62, configured to receive a status code sent by the internet of things device, where the status code is determined based on a network connection status between the internet of things device and the target routing device monitored through the target port, and a network connection status between the internet of things device and the server;
the first prompting module 64 is configured to prompt a network connection state.
In an exemplary embodiment, the apparatus further comprises one of:
a fourth establishing module, configured to establish a connection between the internet of things device and the target application through a hotspot of the internet of things device and a hotspot of the terminal device installed with the target application before receiving the status code sent by the internet of things device;
a fifth establishing module, configured to establish a network connection with the internet of things device through the scanned two-dimensional code image, where hotspot information of the internet of things device is integrated in the two-dimensional code image;
And the sixth establishing module is used for receiving a user instruction to establish network connection with the Internet of things equipment, wherein the user instruction comprises triggering of hot spot information of the Internet of things equipment.
In an exemplary embodiment, the above apparatus further includes:
the third receiving module is used for receiving a routing information list sent by the internet of things device before receiving the state code sent by the internet of things device, wherein the routing information list comprises attribute information of N routing devices, the N routing devices comprise target routing devices, and N is a natural number which is greater than or equal to 1;
and the first display module is used for displaying the route information list.
In an exemplary embodiment, the above apparatus further includes:
and the fourth sending module is used for sending the attribute information of the target routing equipment to the internet of things equipment after the routing information list is displayed so as to indicate the internet of things equipment to be connected with the target routing equipment.
In an exemplary embodiment, the first prompting module includes:
the first analysis unit is used for analyzing the state code so as to convert the state code into text information;
and the first display unit is used for displaying the text information.
It should be noted that each of the above modules may be implemented by software or hardware, and for the latter, it may be implemented by, but not limited to: the modules are all located in the same processor; alternatively, the above modules may be located in different processors in any combination.
Embodiments of the present invention also provide a computer readable storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
In the present embodiment, the above-described computer-readable storage medium may be configured to store a computer program for executing the above steps.
In one exemplary embodiment, the computer readable storage medium may include, but is not limited to: a usb disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing a computer program.
An embodiment of the invention also provides an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
In an exemplary embodiment, the electronic apparatus may further include a transmission device connected to the processor, and an input/output device connected to the processor.
In an exemplary embodiment, the above processor may be arranged to perform the above steps by means of a computer program.
Specific examples in this embodiment may refer to the examples described in the foregoing embodiments and the exemplary implementation, and this embodiment is not described herein.
It will be appreciated by those skilled in the art that the modules or steps of the invention described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may be implemented in program code executable by computing devices, so that they may be stored in a storage device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than that shown or described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the present invention, but various modifications and variations can be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (16)

1. The method for determining the network connection state of the Internet of things equipment is characterized by comprising the following steps of:
determining the network connection state between the network connection device and the target routing equipment, and generating a state code;
under the condition that the network connection with the target application is kept, the state code is sent to the target application to indicate the target application to prompt the network connection state of the Internet of things equipment;
the internet of things equipment actively connects the target routing equipment while maintaining the connection of a hot spot mode with the target application in a time division multiplexing mode and continuously broadcasting hot spot packets periodically, stores the network connection state with the target routing equipment and sends the network connection state to the target application.
2. The method of claim 1, wherein prior to determining the status of the network connection with the target routing device to generate the status code, the method further comprises one of:
establishing network connection with the target application through the hot spot of the Internet of things device and the hot spot of the terminal device provided with the target application;
responding to a two-dimensional code image scanned by the target application, and establishing network connection with the target application, wherein the two-dimensional code image is integrated with hot spot information of the Internet of things equipment;
And responding to a user instruction received by the target application to establish network connection with the target application, wherein the user instruction comprises triggering of hot spot information of the Internet of things equipment.
3. The method of claim 1, wherein in the event that it is determined that a network connection is maintained with a target application, prior to sending the status code to the target application, the method further comprises:
networking data is sent to the target application through a target port to determine that a network connection is maintained with the target application.
4. The method of claim 1, wherein determining a status of a network connection with a target routing device, prior to generating a status code, further comprises:
determining a routing information list, wherein the routing information list comprises attribute information of N routing devices, the N routing devices comprise the target routing device, and N is a natural number greater than or equal to 1;
and sending the route information list to the target application to instruct the target application to display the route information list.
5. The method of claim 4, wherein after sending the list of routing information to the target application, the method further comprises:
Receiving attribute information of the target routing equipment sent by the target application;
and connecting to the target routing equipment based on the attribute information of the target routing equipment.
6. The method of claim 1, wherein transmitting the status code to the target application if it is determined that a network connection is maintained with the target application comprises:
and under the condition that the network connection with the target application is kept, sending the state code to the target application through a target port so as to instruct the target application to prompt the network connection state of the Internet of things equipment.
7. The method of claim 1, wherein determining the status of the network connection with the target routing device, generating the status code, comprises one of:
acquiring a network connection state between the Internet of things equipment and the target routing equipment, wherein the network connection state is monitored by a server through a target port; generating a state code of the network connection state;
acquiring a network connection state between the Internet of things equipment and the target routing equipment through a wireless fidelity wifi chip; and generating a state code of the network connection state.
8. The method for determining the network connection state of the Internet of things equipment is characterized by comprising the following steps of:
Receiving a status code sent by an internet of things device, wherein the status code is used for representing a network connection status between the internet of things device and a target routing device;
prompting the network connection state;
the internet of things equipment actively connects the target routing equipment while maintaining the connection of a hot spot mode with the target application in a time division multiplexing mode and broadcasting hot spot packets continuously periodically, stores the network connection state with the target routing equipment and sends the network connection state to the target application.
9. The method of claim 8, wherein prior to receiving the status code sent by the internet of things device, the method further comprises one of:
establishing connection between the Internet of things equipment and the target application through the hot spot of the Internet of things equipment and the hot spot of the terminal equipment provided with the target application;
establishing network connection with the Internet of things equipment through the scanned two-dimensional code image, wherein the two-dimensional code image is integrated with hot spot information of the Internet of things equipment;
and receiving a user instruction to establish network connection with the Internet of things equipment, wherein the user instruction comprises triggering of hot spot information of the Internet of things equipment.
10. The method of claim 8, wherein prior to receiving the status code sent by the internet of things device, the method further comprises:
receiving a routing information list sent by the internet of things device, wherein the routing information list comprises attribute information of N routing devices, the N routing devices comprise the target routing device, and N is a natural number greater than or equal to 1;
and displaying the route information list.
11. The method of claim 10, wherein after displaying the routing information list, the method further comprises:
and sending the attribute information of the target routing equipment to the Internet of things equipment to indicate that the Internet of things equipment is connected with the target routing equipment.
12. The method of claim 8, wherein prompting the network connection state comprises:
analyzing the status code to convert the status code into text information;
and displaying the text information.
13. The device for determining the network connection state of the internet of things equipment is characterized by comprising the following components:
the first determining module is used for determining the network connection state between the first determining module and the target routing equipment and generating a state code;
The first sending module is used for sending the state code to the target application under the condition that the network connection with the target application is kept, so as to indicate the target application to prompt the network connection state of the Internet of things equipment;
the internet of things device is used for actively connecting the target routing device while maintaining the connection of the hotspot mode with the target application in a time division multiplexing mode and broadcasting the hotspot packet periodically, storing the network connection state with the target routing device and sending the network connection state to the target application.
14. The device for determining the network connection state of the internet of things equipment is characterized by comprising the following components:
the system comprises a first receiving module, a second receiving module and a third receiving module, wherein the first receiving module is used for receiving a status code sent by the internet of things equipment through a target port, the target port is used for determining connection between the internet of things equipment and a target application, and the status code is used for representing a network connection status between the internet of things equipment and a target router equipment;
the first prompting module is used for prompting the network connection state;
the internet of things device is used for actively connecting the target routing device while maintaining the connection of the hotspot mode with the target application in a time division multiplexing mode and broadcasting the hotspot packet periodically, storing the network connection state with the target routing device and sending the network connection state to the target application.
15. A computer readable storage medium, characterized in that a computer program is stored in the computer readable storage medium, wherein the computer program, when executed by a processor, implements the method of any one of claims 1 to 7 or implements the method of any one of claims 8-12.
16. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to run the computer program to perform the method of any of the claims 1 to 7 or to perform the method of any of the claims 8-12.
CN202111250888.0A 2021-10-26 2021-10-26 Method and device for determining network connection state of Internet of things equipment Active CN113890839B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111250888.0A CN113890839B (en) 2021-10-26 2021-10-26 Method and device for determining network connection state of Internet of things equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111250888.0A CN113890839B (en) 2021-10-26 2021-10-26 Method and device for determining network connection state of Internet of things equipment

Publications (2)

Publication Number Publication Date
CN113890839A CN113890839A (en) 2022-01-04
CN113890839B true CN113890839B (en) 2023-06-13

Family

ID=79013640

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111250888.0A Active CN113890839B (en) 2021-10-26 2021-10-26 Method and device for determining network connection state of Internet of things equipment

Country Status (1)

Country Link
CN (1) CN113890839B (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104917632B (en) * 2015-04-16 2018-11-02 小米科技有限责任公司 The detection method and device for channel status of networking, electronic equipment
CN109905259B (en) * 2017-12-08 2022-02-15 中国电信股份有限公司 Communication connection maintaining method, system and related equipment
CN111741509A (en) * 2019-03-25 2020-10-02 珠海格力电器股份有限公司 Network distribution method and device, storage medium and processor
CN111901162A (en) * 2020-07-16 2020-11-06 宁波方太厨具有限公司 Internet of things equipment, network distribution method thereof and internet of things system

Also Published As

Publication number Publication date
CN113890839A (en) 2022-01-04

Similar Documents

Publication Publication Date Title
CN110798493B (en) Network configuration method, device, terminal equipment and storage medium
CN109792287B (en) Method and device for transmitting response message
CN111314864B (en) Network distribution method, device and equipment
US10588074B2 (en) Core network selection method, apparatus and system
EP3107349A1 (en) Communication method and device
US11452156B2 (en) Configuration system, client device, embedded device configuration method, and storage medium
CN111885594B (en) Equipment binding method and device
JP2020533816A5 (en)
US10149134B2 (en) Near field discovery method, user equipment, and storage medium
CN110290570A (en) Wireless network access method and relevant device, storage device
WO2023005410A1 (en) Information synchronization method and system, storage medium, and electronic device
WO2018196463A1 (en) Method and apparatus for network access, storage medium, and processor
CN114902703A (en) D2D communication method, device and system
CN113890839B (en) Method and device for determining network connection state of Internet of things equipment
CN113596792A (en) Binding method and device of electronic equipment, storage medium and electronic device
CN111465083B (en) Hotspot connection result feedback method and device, storage medium and electronic device
CN114598598A (en) Network distribution method and device of Internet of things equipment
CN111182265B (en) Video monitoring equipment cascading method and device
CN110460995A (en) A kind of wireless connection method, internet of things equipment and client device
CN111447105A (en) Vehicle machine testing method and readable storage medium
CN111884938A (en) Router information acquisition method and device
CN114401507A (en) Data transmission method, device and storage medium
CN111294414A (en) Message processing method, device and system
CN111294314A (en) Message processing method, device and system
CN112312435B (en) Configuration method and device for connection data of wireless access network 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
GR01 Patent grant
GR01 Patent grant