CN113890839A - 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
CN113890839A
CN113890839A CN202111250888.0A CN202111250888A CN113890839A CN 113890839 A CN113890839 A CN 113890839A CN 202111250888 A CN202111250888 A CN 202111250888A CN 113890839 A CN113890839 A CN 113890839A
Authority
CN
China
Prior art keywords
internet
network connection
equipment
target application
things
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.)
Granted
Application number
CN202111250888.0A
Other languages
Chinese (zh)
Other versions
CN113890839B (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

Landscapes

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

Abstract

The embodiment of the invention provides a method and a device for determining a network connection state of equipment of the Internet of things, wherein the method comprises the following steps: acquiring a network connection state between the Internet of things equipment and the target routing equipment, which is monitored by the server through the target port, and a network connection state between the Internet of things equipment and the server to generate a state code; and under the condition that the network connection with the target application is determined, the state code is sent to the target application so as to indicate the target application to prompt the network connection state of the equipment of the Internet of things. According to the invention, the problem of network connection of the Internet of things equipment is solved, so that the effects of realizing quick resetting of the Internet of things equipment and improving the distribution network progress are 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 equipment of the Internet of things.
Background
The Network distribution mode that present thing networking Wireless Fidelity (wiFi for short) equipment mainstream realized has two kinds, one kind is traditional Wireless Access Point (AP for short) and joins in marriage the Network mode, cell-phone Application (Application for short) fills in router information (name, password), then with Wireless Local Area Network (WLAN for short) switch to the hot spot that equipment sent out, send out router information with the form of broadcasting, after equipment received router information, close the hot spot, go to connect the router that receives the information, and go to platform registration equipment, APP circulation is followed the platform and is detected, whether equipment registers, the APP suggestion is successful if registering, equipment joins in marriage the Network flow and ends.
The other type is a one-key type smartconfig distribution network mode, router information (name and password) is filled in by a mobile phone APP, then the APP encodes the router information (length coding or address coding), the router information is broadcasted in a User Data Protocol (UDP) form, the Internet of things equipment is in a hybrid mode, all empty packages are received, then reverse decoding is carried out, the router information is analyzed, the router receiving the information is connected, the platform registering equipment is removed, the APP is circularly detected from the platform, whether the equipment is registered or not is judged, the APP is prompted to be bound successfully if the registering is successful, and the equipment distribution network flow is finished.
The current distribution network mode has the following problems:
because the mobile phone and the internet of things device are not at the same position in space, and the signal searching capability of the mobile phone is far higher than that of the current low-cost internet of things device, part of the mobile phones can search for the route on the connection, but the internet of things device cannot search for the connection, or the connection signal is poor, so that the device is unstable. The routing information displayed by the mobile phone end is also information scanned by the mobile phone and is inaccurate for the equipment end 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 a 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 art.
According to an embodiment of the present invention, a method for determining a network connection status of an internet of things device is provided, including: acquiring a network connection state between the Internet of things equipment and target routing equipment monitored by a server through a target port and a network connection state between the Internet of things equipment and the server to generate a state code; and under the condition that the network connection with the target application is determined, the state code is sent to the target application so as to indicate the target application to prompt the network connection state of the equipment of the Internet of things.
According to another embodiment of the present invention, a method for determining a network connection status of an internet of things device is provided, including: 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 a target routing equipment monitored through a target port and a network connection state between the Internet of things equipment and a server; and prompting the network connection state.
According to another embodiment of the present invention, there is provided an apparatus for determining a network connection status of an internet of things device, including: the first determining module is used for acquiring a network connection state between the Internet of things equipment and the target routing equipment, which is monitored by the server through the target port, and a network connection state between the Internet of things equipment and the server 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 determined to be kept, so that the target application is indicated 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 a hotspot of the Internet of things device and a hotspot of the terminal device provided with the target application before generating the state code; the second establishing module is used for responding to the two-dimension code image scanned by the target application and establishing network connection with the target application, wherein the two-dimension code image is integrated with 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 trigger on hotspot information of the Internet of things equipment.
In an exemplary embodiment, the apparatus further includes: and the second sending module is used for sending the networking data to the target application through the target port to confirm that the network connection with the target application is kept under the condition that the network connection with the target application is confirmed and before the status code is sent to the target application.
In an exemplary embodiment, the apparatus further includes: a second determining module, configured to determine a routing information list before generating the status code, where the routing information list includes attribute information of N routing devices, the N routing devices include a target routing device, and N is a natural number greater than or equal to 1; and the third sending module is used for sending the routing information list to the target application so as to indicate the target application to display the routing information list.
In an exemplary embodiment, the 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 connecting 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: and 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 determined to be kept, so as to indicate the target application to prompt the network connection state of the equipment of the Internet of things.
In an exemplary embodiment, the 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 a wireless fidelity wifi chip; and generating a state code of the network connection state.
According to another embodiment of the present invention, there is also provided an apparatus for determining a network connection status of an internet of things device, including: the first receiving module is used for receiving a status code sent by the Internet of things equipment, wherein the status code is determined based on the network connection status between the Internet of things equipment and the target routing equipment monitored through the target port and the network connection status 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: the fourth establishing module is used for establishing connection between the internet of things equipment and the target application through the hotspot of the internet of things equipment and the hotspot of the terminal equipment provided with the target application before receiving the state code sent by the internet of things equipment; the fifth establishing module is used for 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 hotspot information of the Internet of things equipment; and the sixth establishing module is used for receiving a user instruction so as to establish network connection with the internet of things equipment, wherein the user instruction comprises triggering of hotspot information of the internet of things equipment.
In an exemplary embodiment, the apparatus further includes: the third receiving module is used for receiving a routing information list sent by the internet of things equipment before receiving the status code sent by the 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 greater than or equal to 1; and the first display module is used for displaying the routing information list.
In an exemplary embodiment, the 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 character information; the first display unit is used for displaying the text information.
According to a further embodiment of the present invention, there is also provided a computer-readable storage medium having a computer program stored thereon, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
According to yet another embodiment of the present invention, there is also provided an electronic device, including a memory in which a computer program is stored and a processor configured to execute the computer program to perform the steps in any of the above method embodiments.
According to the invention, the state code is generated by acquiring the network connection state between the Internet of things equipment and the target routing equipment, which is monitored by the server through the target port, and the network connection state between the Internet of things equipment and the server; and under the condition that the network connection with the target application is determined, the state code is sent to the target application so as to indicate the target application to prompt the network connection state of the equipment of the Internet of things. 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 reset quickly, and the distribution network progress effect is improved.
Drawings
Fig. 1 is a block diagram of a hardware structure 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 status of an internet of things device according to an embodiment of the present invention;
fig. 3 is a flowchart (ii) of a method for determining a network connection status of an internet-of-things device according to an embodiment of the present invention;
FIG. 4 is an overall flow diagram according to an embodiment of the invention;
fig. 5 is a block diagram (one) of the structure of the apparatus for determining the network connection status of the internet of things device according to the embodiment of the present invention;
fig. 6 is a block diagram (ii) of the structure of the apparatus for determining the network connection status of the internet-of-things device according to the embodiment of the present invention.
Detailed Description
Hereinafter, embodiments of the present invention will be described in detail 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 claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
The method embodiments provided in the embodiments of the present application may be executed in a mobile terminal, a computer terminal, or a similar computing device. Taking an example of the method running on a mobile terminal, fig. 1 is a hardware structure block diagram of the mobile terminal of the method for determining the network connection state of the internet of things device according to the embodiment of the present invention. As shown in fig. 1, the mobile terminal may include one or more (only one shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), and a memory 104 for storing data, wherein the mobile terminal may further include a transmission device 106 for communication functions and an input-output device 108. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration, and does not limit the structure of the mobile terminal. For example, the mobile terminal may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 104 may be used to store computer programs, for example, software programs and modules of application software, such as a computer program corresponding to the method for determining the network connection status of the internet of things device in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, so as to implement the method described above. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the mobile terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a Network adapter (NIC), which can be connected to other Network devices through a base station so as to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
In this embodiment, a method for determining a network connection state of an internet of things device is provided, and 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, 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 is monitored by the server through the target port, and a network connection state between the Internet of things equipment and the server to generate a state code;
and step S204, under the condition that the network connection with the target application is ensured, the state code is sent to the target application so as to indicate the target application to prompt the network connection state of the Internet of things equipment.
The executing subject of the above steps may be an internet of things device, but is not limited thereto.
Through the steps, the state code is generated by acquiring the network connection state between the Internet of things equipment and the target routing equipment, which is monitored by the server through the target port, and the network connection state between the Internet of things equipment and the server; and under the condition that the network connection with the target application is determined, the state code is sent to the target application so as to indicate the target application to prompt the network connection state of the equipment of the Internet of things. 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 reset quickly, and the distribution network progress effect is improved.
In an exemplary embodiment, the method further comprises one of the following before listening to the target port and generating the status code:
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 a target application, and establishing network connection with the target application, wherein hot spot information of the Internet of things equipment is integrated in the two-dimensional code image;
and responding to a user instruction received by the target application to establish network connection with the target application, wherein the user instruction comprises trigger on hotspot information of the equipment of the Internet of things.
In this embodiment, to implement automatic connection to a hotspot of the internet of things device, a same hotspot name and password must be agreed. The automatic connection default hotspot name can be set to scan the equipment information in a two-dimensional code mode, and the hotspot name and the password are obtained to carry out automatic connection. Or the automatic connection default hotspot name can be set as the hotspot name of the device nearby scanned by the App, the hotspot name meeting the requirement is screened out, and the user manually selects the device hotspot connection.
In an exemplary embodiment, listening to the target port, before sending the status code to the target application in case that it is determined that the network connection with the target application is maintained, includes:
s1, sending the networking data to the target application through the target port to confirm that the network connection is kept with the target application;
the target port is used for sending information of the 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 equipment.
In this embodiment, the network distribution system at the device end of the internet of things may integrate an http server (or a coach, a tcp, etc.), and the http server may be used for a network distribution, and has a small data volume and a small number of interfaces.
In the embodiment, by continuously monitoring the target port, interfaces for setting distribution network information (set _ wifi _ config), querying a distribution network state (get _ wifi _ status), and the like are provided for the connected target application.
In an 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;
s2, sending the routing information list to the target application to instruct the target application to display the routing information list.
In this embodiment, the target application requests the device to scan a router information list (including a name, signal strength, encryption method, and the like) from the internet of things device.
In one exemplary embodiment, after sending the routing information list to the target application, the method includes:
s1, receiving the attribute information of the target routing device sent by the target application;
and S2, connecting to the target routing device based on the attribute information of the target routing device.
In this embodiment, the target application sends the name of the router to be connected, the password, the encryption mode, the platform authorization information, and the like to the internet of things device. And after receiving the data, the Internet of things equipment starts to be connected with the designated router, and after the data is successfully connected with the platform registration equipment.
In one exemplary embodiment, sending the status code to the target application upon determining that the network connection is maintained with the target application comprises:
and S1, under the condition that the network connection with the target application is determined, the state code is sent to the target application through the target port so as to indicate the target application to prompt the network connection state of the Internet of things equipment.
In this embodiment, the internet of things device defines various normal conditions and abnormal conditions as corresponding status codes, and sends the status codes to the target application through the connection established by the hotspot in real time.
In an exemplary embodiment, the method further includes:
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, and adopts a time division multiplexing mode, one side of the internet of things device maintains the connection with the target application App in a hotspot mode, and broadcasts a hotspot packet periodically and continuously, and the other side of the internet of things device can be actively connected with the routing device, so that the state of the routing device and the platform can be saved, and the state is transmitted to the App through the maintained connection of the App for App display.
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 (ii) 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. 3, 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 the network connection status between the Internet of things equipment and the target routing equipment monitored through the target port and the network connection status between the Internet of things equipment and the server;
and step S304, prompting the network connection state.
The execution subject of the above steps may be a target application, 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; and 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 reset quickly, and the distribution network progress effect is improved.
In an exemplary embodiment, before receiving the status code sent by the internet of things device, the method further includes one of:
s1, 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;
s2, 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 S3, receiving a user instruction to establish network connection with the Internet of things equipment, wherein the user instruction comprises trigger on hotspot 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 the 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 greater than or equal to 1;
s2, displaying the routing information list.
In an exemplary embodiment, after displaying the routing information list, the method includes:
s1, sending the attribute information of the target routing device to the Internet of things device to indicate that the Internet of things device is connected with the target routing device.
In the present embodiment, the attribute information includes, but is not limited to, the name, password, and the like of the router device.
In one exemplary embodiment, prompting the network connection status comprises:
s1, analyzing the status code to convert the status code into text information;
and S2, displaying character 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, a network of the internet of things device is taken as an example for description, and as shown in fig. 4, the network of the internet of things device in this embodiment includes the following steps:
s401, the Internet of things equipment is powered on, the Internet of things equipment is triggered to enter a station + ap mode (the equipment hotspot can be opened in the mode, and meanwhile, other routing equipment can be connected), and the Internet of things equipment emits the equipment hotspot with the default name.
S402, enabling the target application App to enter a distribution network interface of the Internet of things equipment and automatically connecting with a hotspot of the Internet of things equipment with a default name; in addition, the App can also be connected with the hot spot of the internet of things device in the following way:
the first method is as follows: integrating a hotspot name and a password of the Internet of things equipment into a two-dimensional code image, and scanning the two-dimensional code image by the APP to acquire the hotspot name and the password to connect the Internet of things equipment;
the second method comprises the following steps: and the App scans the hot spot names of the nearby devices, screens out the hot spot names meeting the requirements, and responds to the device hot spot connection manually selected by the user.
S403, the App establishes reliable connection (including tcp, http, and coach modes) with the Internet of things equipment through the hotspot of the Internet of things equipment.
S404, the App requests, from the internet of things device, a routing information list scanned by the internet of things device (the routing information list includes a name, signal strength, and encryption manner of the routing device).
S405, the Internet of things equipment sends a routing information list to the APP.
S406, the App arranges and displays an available routing list (similar to a wireless connection interface of a mobile phone) on the interface.
S407, the user selects the routing device to be connected, and if the routing device is connected with a certain name for the first time, the connection password of the routing device needs to be input; if a certain routing device is connected before, the password input can be skipped and the connection can be directly carried out.
And S408, the App sends the name, the password, the encryption mode, the platform authorization information and the like of the routing equipment needing to be connected to the Internet of things equipment.
And S409, after the Internet of things equipment receives the data of the routing equipment, starting to connect the specified routing equipment, and after the connection is successful, connecting the platform registration equipment.
S410, in S409, the internet of things device is connected to the routing device and the progress information of the internet of things device connected to the registration platform (for example, information that the routing device has been connected, the password of the routing device is incorrect, the registration platform is successful, the connection platform is failed, etc.) occurs, the internet of things device defines various normal conditions and abnormal conditions as corresponding status codes, and sends the status codes to the App through the connection established by the previous hotspot in real time.
S411, App will convert the status code into corresponding text display on the connection interface, and if other error conditions such as password error occur, the method can return to the above S407 to continue the setting without starting from the beginning.
S412, when the App detects that the state is successful, the Internet of things equipment feeds the registration progress back to the APP in real time;
and S413, the APP displays that the network distribution is successful, the network distribution of the Internet of things equipment is finished, the App can disconnect the connection established by the hotspot, and the Internet of things equipment can also close the hotspot.
In the process of the network distribution of the internet of things equipment, the end of the internet of things equipment is in a station + ap mode, so that on one hand, an http server can be integrated, a target port between the internet of things equipment and an APP can be continuously monitored, and network distribution information (set _ wifi _ config), a network distribution state (get _ wifi _ status) and the like are provided for the connected App; on the other hand, the networking cloud client can be integrated, the network connection state is stored locally for the App to inquire through the target port, and therefore the network distribution process, the network distribution result and the failure reason are displayed. The network connection status includes at least one of: wifi setting is successful, routing equipment is connected successfully, routing equipment password is wrong, routing equipment signals are weak, the routing equipment is connected in a platform, the routing equipment is connected successfully, and the routing equipment fails (error codes).
In addition, thing networking device can also use the wifi chip, adopts time division multiplex's mode, on one hand maintains being connected with the App under the hot mode, and the cycle lasts the broadcast hot packet, and routing equipment can be initiatively connected to the another side to this can save the state of connecting routing equipment and platform, and connect through the App who maintains, transmits the state for the App show.
In this embodiment, the App distribution network interface is automatically connected to the hot spot of the internet of things device, an interface similar to the wireless connection of a mobile phone is generated, and the internet of things device can be set repeatedly until the distribution network is successful. The App can also display detailed distribution network flow state and immediately display reasons in error state to prompt users to carry out error troubleshooting. Because the device maintains the connection of the App, the device distribution network information can be directly reset without manually triggering the device to enter the distribution network again under the condition of failure.
In summary, the embodiment can realize that the App automatically connects the hotspot function (calls the api interface of the mobile phone underlying network), and the special station + ap mode of the device can enable the internet of things device to be always connected with the App. The AP network distribution method has the advantages that the overall process of AP network distribution is simplified, the App and a mobile phone do not need to be switched with each other on the setting interfaces, the App can be automatically connected with equipment hotspot signals meeting requirements, the list information of the router can be displayed on the App interface, for a new user, the network distribution operation can be completed only on the same interface, and the method is as simple as the mode that the mobile phone is connected with a wireless network.
In addition, in this 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 router list that thing networking device scanned oneself returns to App, can solve and send 5G signal router to thing networking device that probably appears among the prior art, the router signal of sending is too weak etc. leads to thing networking device not to scan the unable circumstances of connecting.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
The present embodiment further provides a device for determining a network connection state of an internet of things device, where the device is used to implement the foregoing embodiments and preferred embodiments, and details of the description are omitted. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 5 is a block diagram (a) of a device for determining a network connection status of an internet of things device according to an embodiment of the present invention, and as shown in fig. 5, the device includes:
the first determining module 52 is configured to obtain a network connection state between the internet of things device and the target routing device, which is 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;
and the first sending module 54 is configured to send the status code to the target application to instruct the target application to prompt the network connection status of the internet of things device, if it is determined that the network connection with the target application is maintained.
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 a hotspot of the Internet of things device and a hotspot of the terminal device provided with the target application before generating the state code; the second establishing module is used for responding to the two-dimension code image scanned by the target application and establishing network connection with the target application, wherein the two-dimension code image is integrated with 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 trigger on hotspot information of the Internet of things equipment.
In an exemplary embodiment, the apparatus further includes: and the second sending module is used for sending the networking data to the target application through the target port to confirm that the network connection with the target application is kept under the condition that the network connection with the target application is confirmed and before the status code is sent to the target application.
In an exemplary embodiment, the apparatus further includes: a second determining module, configured to determine a routing information list before generating the status code, where the routing information list includes attribute information of N routing devices, the N routing devices include a target routing device, and N is a natural number greater than or equal to 1; and the third sending module is used for sending the routing information list to the target application so as to indicate the target application to display the routing information list.
In an exemplary embodiment, the 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 connecting 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: and 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 determined to be kept, so as to indicate the target application to prompt the network connection state of the equipment of the Internet of things.
In an exemplary embodiment, the 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 (ii) of a structure of an apparatus 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. 6, the apparatus includes:
the first receiving module 62 is 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 used for prompting the network connection state.
In an exemplary embodiment, the apparatus further comprises one of:
the fourth establishing module is used for establishing connection between the internet of things equipment and the target application through the hotspot of the internet of things equipment and the hotspot of the terminal equipment provided with the target application before receiving the state code sent by the internet of things equipment;
the fifth establishing module is used for 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 hotspot information of the Internet of things equipment;
and the sixth establishing module is used for receiving a user instruction so as to establish network connection with the internet of things equipment, wherein the user instruction comprises triggering of hotspot information of the internet of things equipment.
In an exemplary embodiment, the apparatus further includes:
the third receiving module is used for receiving a routing information list sent by the internet of things equipment before receiving the status code sent by the 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 greater than or equal to 1;
and the first display module is used for displaying the routing information list.
In an exemplary embodiment, the 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 character information;
the first display unit is used for displaying the text information.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program is arranged to perform the steps of any of the above-mentioned method embodiments when executed.
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 an exemplary embodiment, the computer-readable storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
In an exemplary embodiment, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
In an exemplary embodiment, the processor may be configured to execute the above steps by a computer program.
For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary embodiments, and details of this embodiment are not repeated herein.
It will be apparent to those skilled in the art that the various modules or steps of the invention described above may be implemented using a general purpose computing device, they may be centralized on a single computing device or distributed across a network of computing devices, and they may be implemented using program code executable by the computing devices, such that they may be stored in a memory device and executed by the computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into various integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (16)

1. A method for determining a network connection state of an Internet of things device is characterized by comprising the following steps:
acquiring a network connection state between the Internet of things equipment and target routing equipment monitored by a server through a target port and a network connection state between the Internet of things equipment and the server to generate a state code;
and under the condition that the network connection with the target application is determined, the state code is sent to the target application so as to indicate the target application to prompt the network connection state of the equipment of the Internet of things.
2. The method of claim 1, wherein prior to generating 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 hotspot information of the Internet of things equipment is integrated in the two-dimensional code image;
responding to a user instruction received by the target application to establish network connection with the target application, wherein the user instruction comprises trigger on hotspot information of the Internet of things equipment.
3. The method of claim 1, wherein prior to sending the status code to the target application in the event that a network connection with the target application is determined to be maintained, the method further comprises:
sending networking data to the target application through the target port to determine to maintain a network connection with the target application.
4. The method of claim 1, wherein prior to generating the status code, the method 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 routing information list to the target application to instruct the target application to display the routing 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 sending the status code to the target application upon determining that a network connection is maintained with the target application comprises:
and under the condition that the network connection with the target application is determined, the state code is sent to the target application through the target port so as to indicate the target application to prompt the network connection state of the Internet of things equipment.
7. The method of claim 1, further comprising: 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 a wireless fidelity wifi chip;
generating the status code.
8. A method for determining a network connection state of an Internet of things device is characterized by comprising the following steps:
receiving a status code sent by an internet of things device, wherein the status code is determined based on a network connection status between the internet of things device and a target routing device monitored through a target port and a network connection status between the internet of things device and a server;
and prompting the network connection state.
9. The method of claim 8, wherein before 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 a target application through a hotspot of the Internet of things equipment and a hotspot of a terminal device provided with the target application;
establishing network connection with the Internet of things equipment through the scanned two-dimensional code image, wherein hotspot information of the Internet of things equipment is integrated in the two-dimensional code image;
receiving a user instruction to establish network connection with the Internet of things equipment, wherein the user instruction comprises trigger on hotspot information of the Internet of things equipment.
10. The method of claim 8, wherein before 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 routing information list.
11. The method of claim 10, wherein after displaying the list of routing information, the method further comprises:
and sending the attribute information of the target routing equipment to the Internet of things equipment so as to indicate the Internet of things equipment to be connected with the target routing equipment.
12. The method of claim 8, wherein prompting the network connection status comprises:
analyzing the state code to convert the state code into text information;
and displaying the text information.
13. An apparatus for determining a network connection status of an internet of things device, comprising:
the first determining module is used for acquiring a network connection state between the Internet of things equipment and a target routing equipment, which is monitored by a server through a target port, and a network connection state between the Internet of things equipment and the server 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 determined to be kept, so that the target application is indicated to prompt the network connection state of the Internet of things equipment.
14. An apparatus for determining a network connection status of an internet of things device, comprising:
the first receiving module is used for receiving a status code sent by the internet of things equipment, wherein the status code is determined based on a network connection status between the internet of things equipment and a target routing equipment monitored through a target port and a network connection status between the internet of things equipment and a server;
and the first prompting module is used for prompting the network connection state.
15. A computer-readable storage medium, in which a computer program is stored, which computer program, when being executed by a processor, carries out the method of any one of claims 1 to 7, or carries out the method of any one of claims 8 to 12.
16. An electronic apparatus comprising a memory and a processor, wherein the memory has stored therein a computer program, and wherein the processor is arranged to execute the computer program to perform the method of any of claims 1 to 7, or to perform the method of any of claims 8 to 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 true CN113890839A (en) 2022-01-04
CN113890839B 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)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160308972A1 (en) * 2015-04-16 2016-10-20 Xiaomi Inc. Method and device for detecting state of networking channel
CN109905259A (en) * 2017-12-08 2019-06-18 中国电信股份有限公司 Communicate to connect maintenance method, system and relevant device
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

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160308972A1 (en) * 2015-04-16 2016-10-20 Xiaomi Inc. Method and device for detecting state of networking channel
CN109905259A (en) * 2017-12-08 2019-06-18 中国电信股份有限公司 Communicate to connect maintenance method, system and relevant device
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
CN113890839B (en) 2023-06-13

Similar Documents

Publication Publication Date Title
US20190191367A1 (en) Network slice selection method and apparatus
CN109792287B (en) Method and device for transmitting response message
CN111885594B (en) Equipment binding method and device
CN111885115B (en) Device binding changing method and device
CN111314864B (en) Network distribution method, device and equipment
JP2020533816A5 (en)
CN111224792B (en) Conference access method and device
CN105453615A (en) Wireless terminal, search process method for wireless terminal, and wireless communication system
CN112566078A (en) Device connection method and apparatus, storage medium, and electronic apparatus
KR101893965B1 (en) Near field discovery method, user equipment, and storage medium
CN113595992B (en) Secure binding method and system, storage medium and electronic device
CN114902703A (en) D2D communication method, device and system
CN112532712B (en) Protocol transmission method and device, storage medium, and electronic device
CN111465083B (en) Hotspot connection result feedback method and device, storage medium and electronic device
CN111884938B (en) Router information acquisition method and device
CN112637221A (en) Equipment control method and device
CN113890839B (en) Method and device for determining network connection state of Internet of things equipment
CN114598598A (en) Network distribution method and device of Internet of things equipment
CN111447105A (en) Vehicle machine testing method and readable storage medium
CN114125023B (en) Method and device for determining data connection, storage medium and electronic device
CN113596792A (en) Binding method and device of electronic equipment, storage medium and electronic device
CN114401507A (en) Data transmission method, device and storage medium
CN113891419A (en) Policy routing establishing method and related device
CN111294314A (en) Message processing method, device and system
CN111294414A (en) Message processing method, device and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant