CN111918236A - Internet of things security sensor network searching method, device, equipment and storage medium - Google Patents
Internet of things security sensor network searching method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN111918236A CN111918236A CN202010796806.1A CN202010796806A CN111918236A CN 111918236 A CN111918236 A CN 111918236A CN 202010796806 A CN202010796806 A CN 202010796806A CN 111918236 A CN111918236 A CN 111918236A
- Authority
- CN
- China
- Prior art keywords
- network
- searching
- network searching
- successful
- interval
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 45
- 230000002159 abnormal effect Effects 0.000 claims abstract description 16
- 230000003993 interaction Effects 0.000 claims description 58
- 238000004590 computer program Methods 0.000 claims description 11
- 230000001960 triggered effect Effects 0.000 claims description 6
- 230000006855 networking Effects 0.000 claims 2
- 230000003287 optical effect Effects 0.000 description 6
- 238000010586 diagram Methods 0.000 description 5
- 230000006870 function Effects 0.000 description 3
- 238000013524 data verification Methods 0.000 description 2
- 239000013307 optical fiber Substances 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 230000002035 prolonged effect Effects 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 238000012360 testing method Methods 0.000 description 2
- 230000005856 abnormality Effects 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 230000009545 invasion Effects 0.000 description 1
- 230000008707 rearrangement Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/30—Services specially adapted for particular environments, situations or purposes
- H04W4/38—Services specially adapted for particular environments, situations or purposes for collecting sensor information
-
- G—PHYSICS
- G16—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
- G16Y—INFORMATION AND COMMUNICATION TECHNOLOGY SPECIALLY ADAPTED FOR THE INTERNET OF THINGS [IoT]
- G16Y10/00—Economic sectors
- G16Y10/80—Homes; Buildings
-
- G—PHYSICS
- G16—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
- G16Y—INFORMATION AND COMMUNICATION TECHNOLOGY SPECIALLY ADAPTED FOR THE INTERNET OF THINGS [IoT]
- G16Y30/00—IoT infrastructure
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W48/00—Access restriction; Network selection; Access point selection
- H04W48/16—Discovering, processing access restriction or access information
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W52/00—Power management, e.g. Transmission Power Control [TPC] or power classes
- H04W52/02—Power saving arrangements
- H04W52/0209—Power saving arrangements in terminal devices
- H04W52/0261—Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W76/00—Connection management
- H04W76/10—Connection setup
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE 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/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computing Systems (AREA)
- Civil Engineering (AREA)
- Architecture (AREA)
- Computer Security & Cryptography (AREA)
- Structural Engineering (AREA)
- Business, Economics & Management (AREA)
- Accounting & Taxation (AREA)
- Development Economics (AREA)
- Economics (AREA)
- General Business, Economics & Management (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The embodiment of the invention discloses a network searching method, device, equipment and storage medium for a security sensor of the Internet of things. The method comprises the following steps: triggering one-time network searching when the network connection is detected to be abnormal, wherein the network searching comprises sending at least one-time beacon request to a target network node; if the network searching fails, repeatedly executing the operation of entering the sleep state and searching the network again after the first network searching interval until the network searching is successful before the first time node; if not, the operation of entering the sleep state and searching the network again after the second network searching interval is repeatedly executed until the network searching is successful before the second time node; if not, the operation of entering the sleep state and searching the network again after the third network searching interval is repeatedly executed until the network searching is successful or the network searching request is detected. According to the embodiment of the invention, the security sensor can achieve the purpose of successfully searching the network with higher success rate, the problems of overlarge power consumption of the security sensor and shortened battery service cycle are avoided, and the user experience is improved.
Description
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a network searching method, device, equipment and storage medium for a security sensor of the Internet of things.
Background
The intelligent home security system based on the zigbee protocol (zigbee) is divided into three parts: security sensor equipment, intelligent gateway and customer end. The security sensor equipment collects home environment information, processes the monitored information and sends the processed information to the intelligent gateway through the zigbee wireless network security sensor; the intelligent gateway judges whether the home environment is safe or not after receiving the data, and simultaneously sends the reported data to the client through the intelligent gateway wide area network; the client end receives the data information sent by the wide area network, then completes the storage and display of the data, and gives an alarm when finding abnormal conditions (external invasion, fire, gas leakage and the like).
In the prior art, when an intelligent gateway or a zigbee wireless network routing node is in a power failure, a fault or a poor signal, a security sensor can be in a state of continuously searching for a network for a long time, so that the power consumption of a battery is large, the service cycle of the battery is shortened, the user experience is influenced, even the security sensor equipment can be accidentally caused to work abnormally, and serious potential safety hazards are brought.
Disclosure of Invention
The embodiment of the invention provides a network searching method, device, equipment and storage medium for a security sensor of the Internet of things, so that the security sensor does not need to be in a continuous network searching state, the purpose of successful network searching is achieved with a higher success rate, the problems of overlarge power consumption of the security sensor and shortened battery service cycle are solved, and the user experience is improved.
In a first aspect, an embodiment of the present invention provides a network searching method for a security sensor of an internet of things, including:
when network connection abnormity is detected, one network searching is triggered, wherein the network searching comprises sending at least one beacon request to a target network node;
if the network searching fails, repeatedly executing the operation of entering a sleep state and starting timing, and searching the network again after the first network searching interval until the network searching is successful before the first time node;
if the network searching is not successful before the first time node, repeatedly executing the operation of entering a sleep state and starting timing after the last network searching is failed before the first time node, and searching the network again after a second network searching interval until the network searching is successful before the second time node, wherein the second network searching interval is larger than the first network searching interval, and the second time node is later than the first time node;
if the network searching is not successful before the second time node, after the last network searching fails before the second time node, repeatedly executing the operation of entering a sleep state and starting timing, and searching the network again after a third network searching interval until the network searching is successful or a network searching again request is detected, wherein the third network searching interval is not less than the second network searching interval.
In a second aspect, an embodiment of the present invention further provides a network searching device for a security sensor of an internet of things, including:
the network searching triggering module is used for triggering one-time network searching when the network connection is detected to be abnormal, wherein the network searching comprises the step of sending at least one-time beacon request to a target network node;
the first network searching module is used for repeatedly executing the operation of entering a dormant state and starting timing if network searching fails, and searching the network again after a first network searching interval until network searching succeeds in front of a first time node;
the second network searching module is used for repeatedly executing the operation of entering a dormant state and starting timing after the last network searching fails before the first time node if the network searching is not successful before the first time node, and searching the network again after a second network searching interval until the network searching is successful before a second time node, wherein the second network searching interval is greater than the first network searching interval, and the second time node is later than the first time node;
and the third network searching module is used for repeatedly executing the operation of entering a dormant state and starting timing after the last network searching fails before the second time node if the network searching is not successful before the second time node, and searching the network again after a third network searching interval until the network searching is successful or a network searching request is detected, wherein the third network searching interval is not less than the second network searching interval.
In a third aspect, an embodiment of the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor, when executing the computer program, implements the internet-of-things security sensor network searching method according to the embodiment of the present invention.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the internet of things security sensor network searching method according to the embodiment of the present invention.
According to the technical scheme of the embodiment of the invention, the network searching of the security sensor is carried out at a higher frequency within a shorter time at the initial stage of abnormal network connection by reasonably setting the stepped interval time between every two network searching, so that the network connection is recovered as soon as possible, when the network searching is not successful within the shorter time at the initial stage of abnormal network connection, the network searching frequency is reduced, the security sensor does not need to be in a continuous network searching state, the purpose of successful network searching is achieved at a higher success rate, and therefore the problems of overlarge power consumption and shortened battery service cycle caused by the fact that the network searching is carried out at a higher frequency under the condition that the network connection is difficult to recover when the network connection is short are avoided, and the user experience is improved.
Drawings
Fig. 1 is a flowchart of a network searching method for a security sensor of the internet of things according to an embodiment of the present invention.
Fig. 2 is a flowchart of a network searching method for a security sensor of the internet of things according to a second embodiment of the present invention.
Fig. 3 is a schematic structural diagram of a network searching device of a security sensor of the internet of things according to a third embodiment of the present invention.
Fig. 4 is a schematic structural diagram of a computer device according to a fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention.
It should be further noted that, for the convenience of description, only some but not all of the relevant aspects of the present invention are shown in the drawings. Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the operations (or steps) as a sequential process, many of the operations can be performed in parallel, concurrently or simultaneously. In addition, the order of the operations may be re-arranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figure. The processes may correspond to methods, functions, procedures, subroutines, and the like.
Example one
Fig. 1 is a flowchart of a network searching method for a security sensor of the internet of things according to an embodiment of the present invention. The embodiment of the invention is suitable for the condition that the security sensor detects abnormal network connection and needs to search a network efficiently, and the method can be executed by the network searching device of the security sensor of the internet of things provided by the embodiment of the invention, and the device can be realized in a software and/or hardware mode and can be generally integrated in computer equipment. Such as a security sensor device. As shown in fig. 1, the method of the embodiment of the present invention specifically includes:
The network connection abnormity comprises the conditions of network disconnection, low signal strength, unstable signals or incapability of data interaction and the like, and the detection standard of the network connection abnormity can be determined according to the requirements of normal operation of the security sensor on the network signal quality and the data interaction quantity, without limitation. The Beacon request (Beacon request) is a request sent by the zigbee network for requesting network searching in the Beacon mode. The target network node can be an intelligent gateway or a zigbee wireless network routing node, and the security sensor can automatically judge the target network node according to the connection requirement.
Optionally, the sending at least one beacon request to the target network node includes: sending a first beacon request to the target network node; receiving a beacon reply corresponding to the first beacon request, and judging whether the receiving is successful; if the receiving is successful, establishing network connection with the target network node and carrying out data interaction, and judging whether the data interaction is successful; and if the data interaction is successful, determining that the network searching is successful, and finishing the network searching.
And sending out a beacon reply corresponding to the first beacon request after the target network node receives the first beacon request. And receiving the beacon reply is executed in a mode of grabbing the wireless empty packet, if the grabbing is successful, the receiving is judged to be successful, and if the grabbing is failed, namely the packet is lost, the receiving is judged to be failed. If the receiving is successful, network connection can be established and data interaction can be carried out with the target network node according to the first beacon request and the beacon reply corresponding to the first beacon request. When the data volume sent to and/or received from the target network node is detected to be enough, the network connection quality can meet the requirement of normal work of the security sensor, data interaction is judged to be successful, and otherwise, data interaction is judged to be failed.
Optionally, after receiving the beacon reply corresponding to the first beacon request and determining whether the receiving is successful, the method further includes: if the receiving fails or the data interaction fails, timing is started, and a second beacon request is sent to the target network node after a first request interval; receiving a beacon reply corresponding to the second beacon request, and judging whether the receiving is successful; if the receiving is successful, establishing network connection with the target network node and carrying out data interaction, and judging whether the data interaction is successful; and if the data interaction is successful, determining that the network searching is successful, and finishing the network searching.
And sending out a beacon reply corresponding to the second beacon request after the target network node receives the second beacon request. The method for determining whether the receiving is successful and whether the data interaction is successful is the same as the embodiment in the previous step. The first request interval is a preset time interval. When the reception fails or the data interaction fails after the first beacon request is sent, the second beacon request is sent after the first request interval, the probability of successful network searching can be increased, and meanwhile, compared with the case of continuously sending beacon requests, the packet loss rate is reduced.
Optionally, after receiving the beacon reply corresponding to the second beacon request and determining whether the receiving is successful, the method further includes: if the receiving fails or the data interaction fails, timing is started, and a third beacon request is sent to the target network node after a second request interval; receiving a beacon reply corresponding to the third beacon request, and judging whether the receiving is successful; if the receiving is successful, establishing network connection with the target network node and carrying out data interaction, and judging whether the data interaction is successful; if the data interaction is successful, determining that the network searching is successful, and finishing the network searching; and if the receiving fails or the data interaction fails, determining that the network searching fails, and ending the network searching.
And sending out a beacon reply corresponding to the third beacon request after the target network node receives the third beacon request. The method for determining whether the receiving is successful and whether the data interaction is successful is the same as the embodiment in the previous step. The second request interval is a preset time interval. When the reception or the data interaction fails after the second beacon request is sent, the third beacon request is sent after the second request interval, so that the probability of successful network searching can be increased, and meanwhile, compared with the case of continuously sending beacon requests, the packet loss rate is reduced.
Optionally, the second request interval is greater than the first request interval.
When the reception still fails after the first beacon request and the second beacon request are sent or the data interaction fails, it can be determined that the packet loss rate is higher within a period of time, and then the second request interval is set to be larger than the first request interval, so that the probability of network searching success after the third beacon request is sent can be improved.
Optionally, the first request interval is 240 milliseconds, and the second request interval is 520 milliseconds.
And 102, if the network searching fails, repeatedly executing the operation of entering a sleep state and starting timing, and searching the network again after the first network searching interval until the network searching is successful before the first time node.
Wherein the network searching includes sending a beacon request to the target network node at least once, which has the same implementation manner as the network searching in step 101. The network searching failure is the condition that the network searching cannot obtain network connection or the network connection quality obtained by the network searching cannot meet the normal work of the security sensor. The dormant state is a low-power consumption standby state of the security sensor. The first network searching interval may be a preset time interval in the security sensor, or a time interval determined according to a preset rule and according to factors such as the current electric quantity of the security sensor, and is not limited herein. The first time node is a time point after the first network searching failure, and may be a preset time point, or a time point determined according to a preset rule, according to factors such as the current electric quantity of the security sensor, and the like, and is not limited herein. The network searching success obtains the condition of network connection required by normal work of the security sensor for network searching.
Illustratively, the first network searching interval is 0.5 second, and the first time node is 1 minute after the first network searching fails, the security sensor enters a sleep state and starts to count time after the first network searching fails, and network searching is performed once every 0.5 second until network searching is successful within 1 minute. For example, if it is detected that the current power of the security sensor is low, the first network searching interval may be increased to 1 second.
The second network searching interval may be a preset time interval in the security sensor, or a time interval determined according to a preset rule and according to factors such as the current electric quantity of the security sensor, which is not limited herein. The second time node is a time point after the first time node, and may be a preset time point, or a time point determined according to a preset rule, according to factors such as the current electric quantity of the security sensor, and the like, and is not limited herein. The network-seeking includes sending a beacon request to a target network node at least once, which has the same implementation as the network-seeking in step 101.
When the network searching is not successful before the first time node, the network connection can be judged to be difficult to recover in a short time, and unnecessary power consumption waste can be caused by the network searching with the frequency of once network searching every first network searching interval. The second network searching interval is larger than the first network searching interval, so that the network searching frequency of the security sensor can be reduced, the network searching is realized with lower power consumption, and the service cycle of the battery is prolonged.
For example, when the first network searching interval is 0.5 second, the first time node is 1 minute after the first network searching fails, the second network searching time is 1 minute, and the second time node is 15 minutes after the first time node, if the security sensor does not successfully search for a network within 1 minute after the first network searching fails, the security sensor enters a sleep mode after the last network searching fails and starts to time, and network searching is performed every 1 minute until network searching is successful within 15 minutes.
And step 104, if the network searching is not successful before the second time node, after the last network searching fails before the second time node, repeatedly executing the operation of entering the sleep state and starting timing, and performing network searching again after a third network searching interval until the network searching is successful or a network searching again request is detected, wherein the third network searching interval is not less than the second network searching interval.
The third network searching interval may be a preset time interval in the security sensor, or a time interval determined according to a preset rule and according to factors such as the current electric quantity of the security sensor, which is not limited herein. The network-seeking includes sending a beacon request to a target network node at least once, which has the same implementation as the network-seeking in step 101.
When the network searching is not successful before the second time node, the situation that the network connection is difficult to recover in a short time, or the situations that the security sensor, the intelligent gateway or the zigbee wireless network routing node is powered off or fails and the like can be judged. When the third network searching interval is equal to the second network searching interval, the security sensor keeps the current frequency for searching the network, and when the third network searching interval is larger than the second network searching interval, the network searching frequency of the security sensor can be further reduced, so that the power consumption is further reduced, and the service cycle of the battery is prolonged.
The re-network searching request can be triggered from the outside of the security sensor, or can be automatically triggered by the security sensor according to a predetermined rule. After detecting the network searching request again, the security sensor triggers one network searching and starts to execute the steps 102 to 104 again.
Illustratively, when the first network searching interval is 0.5 second, the first time node is 1 minute after the first network searching failure, the second network searching interval is 1 minute, and the second time node is 15 minutes after the first time node, and the third network searching interval is 30 minutes, if the security sensor does not successfully search for a network within 16 minutes after the first network searching failure, the security sensor enters a sleep mode after the last network searching failure and starts to count time, and network searching is performed once every 30 minutes until network searching is successful or a network searching request is detected.
The embodiment of the invention provides a network searching method for a security sensor of the Internet of things, which comprises the steps of reasonably setting the stepped interval time between every two network searching, searching the network by the security sensor at a higher frequency within a shorter time at the initial stage of abnormal network connection so as to recover the network connection as soon as possible, and reducing the network searching frequency when the network cannot be searched successfully within the shorter time at the initial stage of abnormal network connection, so that the security sensor does not need to be in a continuous network searching state, and the purpose of successfully searching the network is achieved with a higher success rate, thereby avoiding the problems of overlarge power consumption and shortened battery service cycle caused by network searching at the higher frequency under the condition that the security sensor is difficult to recover when the network connection is short, and improving the user experience.
Example two
Fig. 2 is a flowchart of a network searching method for a security sensor of the internet of things according to a second embodiment of the present invention. In this embodiment, the first network searching interval is 0.5 second, the first time node is 1 minute after the first network searching, the second network searching interval is 1 minute, the second time node is 15 minutes after the first time node, and the third network searching interval is 30 minutes.
As shown in fig. 2, the method of the embodiment of the present invention specifically includes:
And 203, if the network searching is not successful within 1 minute after the first network searching, repeatedly executing the operation of entering a dormant state and starting timing after the last network searching fails within 1 minute after the first network searching, and searching the network again within 1 minute until the network searching is successful within 16 minutes after the first network searching.
And step 204, if the network searching is not successful within 16 minutes after the first network searching, repeatedly executing the operation of entering a dormant state and starting timing after the last network searching is failed within 16 minutes after the first network searching, and searching for the network again after 30 minutes until the network searching is successful or a network searching request is detected.
The specific implementation of the above steps may refer to the implementation of the corresponding steps provided in the first embodiment, which is not described herein again.
The embodiment of the invention provides a method for searching a network of an Internet of things security sensor, which provides specific time data of stepped interval time between every two network searching, so that the security sensor searches the network at a higher frequency within 1 minute of the initial stage of abnormal network connection, thereby restoring the network connection as soon as possible, reducing the network searching frequency to continue searching the network when the network searching is not successful within 1 minute of the initial stage of abnormal network connection, and reducing the network searching frequency again to continue searching the network when the network searching is still not successful within 16 minutes of the initial stage of abnormal network connection, so that the security sensor does not need to be in a continuous network searching state, and the purpose of successfully searching the network is achieved at a higher success rate, thereby avoiding the problems of overlarge power consumption and shortened battery service cycle caused by the fact that the security sensor searches the network at a higher frequency under the condition that the network connection is difficult to restore, and improving the user experience. According to the embodiment provided by the embodiment, through a large amount of tests and data verification, the optimal balance state of the network searching speed and the power consumption of the security sensor can be realized, and the maximization of the network searching success rate is achieved.
Optionally, in step 201 to step 204, the network searching includes sending at least one beacon request to the target network node, where the sending at least one beacon request to the target network node includes: sending a first beacon request to the target network node; receiving a beacon reply corresponding to the first beacon request, and judging whether the receiving is successful; if the receiving is successful, establishing network connection with the target network node and carrying out data interaction, and judging whether the data interaction is successful; and if the data interaction is successful, determining that the network searching is successful, and finishing the network searching.
Optionally, in step 201 to step 204, the network searching includes sending at least one beacon request to the target network node, where the sending at least one beacon request to the target network node further includes: if the receiving fails or the data interaction fails, timing is started, and a second beacon request is sent to the target network node after 240 milliseconds; receiving a beacon reply corresponding to the second beacon request, and judging whether the receiving is successful; if the receiving is successful, establishing network connection with the target network node and carrying out data interaction, and judging whether the data interaction is successful; and if the data interaction is successful, determining that the network searching is successful, and finishing the network searching.
Optionally, in step 201 to step 204, the network searching includes sending at least one beacon request to the target network node, where the sending at least one beacon request to the target network node further includes: if the receiving fails or the data interaction fails, timing is started, and a third beacon request is sent to the target network node after 520 milliseconds; receiving a beacon reply corresponding to the third beacon request, and judging whether the receiving is successful; if the receiving is successful, establishing network connection with the target network node and carrying out data interaction, and judging whether the data interaction is successful; if the data interaction is successful, determining that the network searching is successful, and finishing the network searching; and if the receiving fails or the data interaction fails, determining that the network searching fails, and ending the network searching.
The embodiment provides a network searching method for the security sensor of the internet of things, provides a specific network searching embodiment and time data, increases the number of times of sending beacon requests for network searching for each time to three times, improves the probability of success for network searching for each time, sets the stepped beacon request sending intervals, avoids continuously sending beacon requests in a short time, and reduces the packet loss rate of the beacon requests. The implementation mode provided by the implementation mode can achieve the maximization of the success rate of single network searching through a large number of tests and data verification.
EXAMPLE III
Fig. 3 is a schematic structural diagram of a network searching device of a security sensor of the internet of things according to a third embodiment of the present invention, and as shown in fig. 3, the device includes: a network searching triggering module 301, a first network searching module 302, a second network searching module 303 and a third network searching module 304.
The network searching triggering module 301 is configured to trigger one network searching when network connection is detected to be abnormal, where the network searching includes sending at least one beacon request to a target network node; the first network searching module 302 is configured to, if network searching fails, repeatedly perform operations of entering a sleep state and starting timing, and searching for a network again after a first network searching interval until network searching succeeds before a first time node; a second network searching module 303, configured to, if network searching is not successful before a first time node, repeatedly perform operations of entering a sleep state and starting timing after a last network searching fails before the first time node, and network searching again after a second network searching interval until network searching is successful before a second time node, where the second network searching interval is greater than the first network searching interval, and the second time node is later than the first time node; a third network searching module 304, configured to, if the network searching is not successful before the second time node, repeatedly perform, after the last network searching fails before the second time node, an operation of entering a sleep state and starting timing, and performing network searching again after a third network searching interval until the network searching is successful or a network searching request is detected, where the third network searching interval is not less than the second network searching interval.
The embodiment of the invention provides a network searching device for a security sensor of the Internet of things, which is characterized in that the network searching device is used for searching a network with higher frequency in a shorter time at the initial stage of abnormal network connection by reasonably setting the stepped interval time between every two network searching, so that the network connection is recovered as soon as possible, and when the network searching is not successful in the shorter time at the initial stage of abnormal network connection, the network searching frequency is reduced, so that the security sensor does not need to be in a continuous network searching state, the purpose of successful network searching is achieved with higher success rate, the problems of overlarge power consumption and shortened battery service cycle caused by network searching with higher frequency under the condition that the network connection is difficult to recover are solved, and the user experience is improved.
In an optional implementation manner of the embodiment of the present invention, optionally, the network searching triggering module 301, the first network searching module 302, the second network searching module 303, and the third network searching module 304 further include: a first request submodule, configured to send a first beacon request to the target network node; the first receiving submodule is used for receiving the beacon reply corresponding to the first beacon request and judging whether the receiving is successful; the first judgment submodule is used for establishing network connection with the target network node and carrying out data interaction if the receiving is successful, and judging whether the data interaction is successful or not; and the first determining submodule is used for determining that the network searching is successful if the data interaction is successful, and finishing the network searching.
In an optional implementation manner of the embodiment of the present invention, optionally, the network searching triggering module 301, the first network searching module 302, the second network searching module 303, and the third network searching module 304 further include: the second request submodule is used for starting timing if the receiving fails or the data interaction fails, and sending a second beacon request to the target network node after the first request interval; the second receiving submodule is used for receiving the beacon reply corresponding to the second beacon request and judging whether the receiving is successful; the second judgment submodule is used for establishing network connection with the target network node and carrying out data interaction if the receiving is successful, and judging whether the data interaction is successful or not; and the second determining submodule is used for determining that the network searching is successful if the data interaction is successful, and finishing the network searching.
In an optional implementation manner of the embodiment of the present invention, optionally, the network searching triggering module 301, the first network searching module 302, the second network searching module 303, and the third network searching module 304 further include: a third request submodule, configured to start timing if reception fails or data interaction fails, and send a third beacon request to the target network node after a second request interval; a third receiving submodule, configured to receive a beacon reply corresponding to the third beacon request, and determine whether the receiving is successful; the third judgment submodule is used for establishing network connection with the target network node and carrying out data interaction if the receiving is successful, and judging whether the data interaction is successful or not; the third determining sub-module is used for determining that the network searching is successful and finishing the network searching if the data interaction is successful; and the network searching ending sub-module is used for determining that the network searching fails and ending the network searching if the receiving fails or the data interaction fails.
In an optional implementation manner of the embodiment of the present invention, optionally, the second request interval is greater than the first request interval.
In an optional implementation manner of the embodiment of the present invention, optionally, the first request interval is 240 milliseconds, and the second request interval is 520 milliseconds.
In an optional implementation manner of the embodiment of the present invention, optionally, the first network searching interval is 0.5 second, the first time node is 1 minute after the first network searching, the second network searching interval is 1 minute, the second time node is 15 minutes after the first time node, and the third network searching interval is 30 minutes.
The network searching device for the security sensor of the internet of things can execute the network searching method for the security sensor of the internet of things provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects for executing the network searching method for the security sensor of the internet of things.
Example four
Fig. 4 is a schematic structural diagram of a computer device according to a fourth embodiment of the present invention. FIG. 4 illustrates a block diagram of an exemplary computer device 12 suitable for use in implementing embodiments of the present invention. The computer device 12 shown in FIG. 4 is only one example and should not bring any limitations to the functionality or scope of use of embodiments of the present invention.
As shown in FIG. 4, computer device 12 is in the form of a general purpose computing device. The components of computer device 12 may include, but are not limited to: one or more processors 16, a memory 28, and a bus 18 that connects the various system components (including the memory 28 and the processors 16).
Computer device 12 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by computer device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
The memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)30 and/or cache memory 32. Computer device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 4, and commonly referred to as a "hard drive"). Although not shown in FIG. 4, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally carry out the functions and/or methodologies of the described embodiments of the invention.
Computer device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), with one or more devices that enable a user to interact with computer device 12, and/or with any devices (e.g., network card, modem, etc.) that enable computer device 12 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22. Also, computer device 12 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the Internet) via network adapter 20. As shown, network adapter 20 communicates with the other modules of computer device 12 via bus 18. It should be appreciated that although not shown in FIG. 4, other hardware and/or software modules may be used in conjunction with computer device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processor 16 executes various functional applications and data processing by running the program stored in the memory 28, so as to implement the network searching method for the security sensor of the internet of things provided by the embodiment of the present invention: when network connection abnormity is detected, one network searching is triggered, wherein the network searching comprises sending at least one beacon request to a target network node; if the network searching fails, repeatedly executing the operation of entering a sleep state and starting timing, and searching the network again after the first network searching interval until the network searching is successful before the first time node; if the network searching is not successful before the first time node, repeatedly executing the operation of entering a sleep state and starting timing after the last network searching is failed before the first time node, and searching the network again after a second network searching interval until the network searching is successful before the second time node, wherein the second network searching interval is larger than the first network searching interval, and the second time node is later than the first time node; if the network searching is not successful before the second time node, after the last network searching fails before the second time node, repeatedly executing the operation of entering a sleep state and starting timing, and searching the network again after a third network searching interval until the network searching is successful or a network searching again request is detected, wherein the third network searching interval is not less than the second network searching interval.
EXAMPLE five
The fifth embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the network searching method for the security sensor of the internet of things provided by the embodiments of the present invention is implemented as follows: when network connection abnormity is detected, one network searching is triggered, wherein the network searching comprises sending at least one beacon request to a target network node; if the network searching fails, repeatedly executing the operation of entering a sleep state and starting timing, and searching the network again after the first network searching interval until the network searching is successful before the first time node; if the network searching is not successful before the first time node, repeatedly executing the operation of entering a sleep state and starting timing after the last network searching is failed before the first time node, and searching the network again after a second network searching interval until the network searching is successful before the second time node, wherein the second network searching interval is larger than the first network searching interval, and the second time node is later than the first time node; if the network searching is not successful before the second time node, after the last network searching fails before the second time node, repeatedly executing the operation of entering a sleep state and starting timing, and searching the network again after a third network searching interval until the network searching is successful or a network searching again request is detected, wherein the third network searching interval is not less than the second network searching interval.
Any combination of one or more computer-readable media may be employed. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or computer device. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims (10)
1. A network searching method for a security sensor of the Internet of things is characterized by comprising the following steps:
when network connection abnormity is detected, one network searching is triggered, wherein the network searching comprises sending at least one beacon request to a target network node;
if the network searching fails, repeatedly executing the operation of entering a sleep state and starting timing, and searching the network again after the first network searching interval until the network searching is successful before the first time node;
if the network searching is not successful before the first time node, repeatedly executing the operation of entering a sleep state and starting timing after the last network searching is failed before the first time node, and searching the network again after a second network searching interval until the network searching is successful before the second time node, wherein the second network searching interval is larger than the first network searching interval, and the second time node is later than the first time node;
if the network searching is not successful before the second time node, after the last network searching fails before the second time node, repeatedly executing the operation of entering a sleep state and starting timing, and searching the network again after a third network searching interval until the network searching is successful or a network searching again request is detected, wherein the third network searching interval is not less than the second network searching interval.
2. The method of claim 1, wherein sending at least one beacon request to a target network node comprises:
sending a first beacon request to the target network node;
receiving a beacon reply corresponding to the first beacon request, and judging whether the receiving is successful;
if the receiving is successful, establishing network connection with the target network node and carrying out data interaction, and judging whether the data interaction is successful;
and if the data interaction is successful, determining that the network searching is successful, and finishing the network searching.
3. The method of claim 2, wherein after receiving the beacon reply corresponding to the first beacon request and determining whether the receiving is successful, further comprising:
if the receiving fails or the data interaction fails, timing is started, and a second beacon request is sent to the target network node after a first request interval;
receiving a beacon reply corresponding to the second beacon request, and judging whether the receiving is successful;
if the receiving is successful, establishing network connection with the target network node and carrying out data interaction, and judging whether the data interaction is successful;
and if the data interaction is successful, determining that the network searching is successful, and finishing the network searching.
4. The method of claim 3, wherein after receiving the beacon reply corresponding to the second beacon request and determining whether the receiving is successful, further comprising:
if the receiving fails or the data interaction fails, timing is started, and a third beacon request is sent to the target network node after a second request interval;
receiving a beacon reply corresponding to the third beacon request, and judging whether the receiving is successful;
if the receiving is successful, establishing network connection with the target network node and carrying out data interaction, and judging whether the data interaction is successful;
if the data interaction is successful, determining that the network searching is successful, and finishing the network searching;
and if the receiving fails or the data interaction fails, determining that the network searching fails, and ending the network searching.
5. The method of claim 4, wherein the second request interval is greater than the first request interval.
6. The method of claim 4, wherein the first request interval is 240 milliseconds and the second request interval is 520 milliseconds.
7. The method of claim 1, wherein the first hunting interval is 0.5 seconds, the first time node is 1 minute after the first hunting, the second hunting interval is 1 minute, the second time node is 15 minutes after the first time node, and the third hunting interval is 30 minutes.
8. The utility model provides a thing networking security protection sensor seeks net device which characterized in that includes:
the network searching triggering module is used for triggering one-time network searching when the network connection is detected to be abnormal, wherein the network searching comprises the step of sending at least one-time beacon request to a target network node;
the first network searching module is used for repeatedly executing the operation of entering a dormant state and starting timing if network searching fails, and searching the network again after a first network searching interval until network searching succeeds in front of a first time node;
the second network searching module is used for repeatedly executing the operation of entering a dormant state and starting timing after the last network searching fails before the first time node if the network searching is not successful before the first time node, and searching the network again after a second network searching interval until the network searching is successful before a second time node, wherein the second network searching interval is greater than the first network searching interval, and the second time node is later than the first time node;
and the third network searching module is used for repeatedly executing the operation of entering a dormant state and starting timing after the last network searching fails before the second time node if the network searching is not successful before the second time node, and searching the network again after a third network searching interval until the network searching is successful or a network searching request is detected, wherein the third network searching interval is not less than the second network searching interval.
9. A computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor when executing the computer program implements the internet of things security sensor networking method of any of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored, wherein the computer program, when executed by a processor, implements the internet of things security sensor network searching method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010796806.1A CN111918236B (en) | 2020-08-10 | 2020-08-10 | Internet of things security sensor network searching method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010796806.1A CN111918236B (en) | 2020-08-10 | 2020-08-10 | Internet of things security sensor network searching method, device, equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111918236A true CN111918236A (en) | 2020-11-10 |
CN111918236B CN111918236B (en) | 2021-08-31 |
Family
ID=73283554
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010796806.1A Active CN111918236B (en) | 2020-08-10 | 2020-08-10 | Internet of things security sensor network searching method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111918236B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112565012A (en) * | 2020-12-01 | 2021-03-26 | 重庆芯讯通无线科技有限公司 | Automatic test method, system, medium and equipment for module first network finding time |
CN116456436A (en) * | 2023-04-13 | 2023-07-18 | 中集运载科技有限公司 | Networking method, device, electronic device and storage medium of Internet of things equipment |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102739681A (en) * | 2012-06-29 | 2012-10-17 | 奇智软件(北京)有限公司 | Method and device for login control to log in server |
CN103379585A (en) * | 2012-04-23 | 2013-10-30 | 上海晨兴希姆通电子科技有限公司 | USB wireless network device and network searching method thereof |
CN106304143A (en) * | 2015-06-12 | 2017-01-04 | 中兴通讯股份有限公司 | Network resource optimization method based on terminal and device |
CN106332159A (en) * | 2016-08-10 | 2017-01-11 | 深圳市奥尼电子工业有限公司 | WIFI abnormity automatic reconnection device, system and method |
CN108337301A (en) * | 2018-01-24 | 2018-07-27 | 深圳乐信软件技术有限公司 | Network request processing method, device, server and the storage medium of application program |
CN109982417A (en) * | 2019-01-24 | 2019-07-05 | 深圳绿米联创科技有限公司 | Sensor control method, sensor control, sensor and storage medium |
-
2020
- 2020-08-10 CN CN202010796806.1A patent/CN111918236B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103379585A (en) * | 2012-04-23 | 2013-10-30 | 上海晨兴希姆通电子科技有限公司 | USB wireless network device and network searching method thereof |
CN102739681A (en) * | 2012-06-29 | 2012-10-17 | 奇智软件(北京)有限公司 | Method and device for login control to log in server |
CN106304143A (en) * | 2015-06-12 | 2017-01-04 | 中兴通讯股份有限公司 | Network resource optimization method based on terminal and device |
CN106332159A (en) * | 2016-08-10 | 2017-01-11 | 深圳市奥尼电子工业有限公司 | WIFI abnormity automatic reconnection device, system and method |
CN108337301A (en) * | 2018-01-24 | 2018-07-27 | 深圳乐信软件技术有限公司 | Network request processing method, device, server and the storage medium of application program |
CN109982417A (en) * | 2019-01-24 | 2019-07-05 | 深圳绿米联创科技有限公司 | Sensor control method, sensor control, sensor and storage medium |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112565012A (en) * | 2020-12-01 | 2021-03-26 | 重庆芯讯通无线科技有限公司 | Automatic test method, system, medium and equipment for module first network finding time |
CN116456436A (en) * | 2023-04-13 | 2023-07-18 | 中集运载科技有限公司 | Networking method, device, electronic device and storage medium of Internet of things equipment |
Also Published As
Publication number | Publication date |
---|---|
CN111918236B (en) | 2021-08-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110581852A (en) | Efficient mimicry defense system and method | |
US9330049B2 (en) | Method and apparatuses for monitoring system bus | |
US20190372804A1 (en) | Method and apparatus for operating smart network interface card | |
CN114338464B (en) | Fault diagnosis method, device, equipment and computer readable storage medium | |
CN111918236B (en) | Internet of things security sensor network searching method, device, equipment and storage medium | |
CN112260366B (en) | Charging method, charging device and charger | |
CN113612659B (en) | Device networking test method and device, electronic device and storage medium | |
CN114357495B (en) | Prediction machine under-chain aggregation method, device, equipment and medium based on block chain | |
CN110795261B (en) | Virtual disk fault detection method and device | |
CN112769652A (en) | Node service monitoring method, device, equipment and medium | |
US20090138757A1 (en) | Failure recovery method in cluster system | |
CN116881913A (en) | Staged malicious file detection method, device, equipment and medium | |
US11930292B2 (en) | Device state monitoring method and apparatus | |
CN110502399B (en) | Fault detection method and device | |
CN112965799A (en) | Task state prompting method and device, electronic equipment and medium | |
CN101971562B (en) | Method, device and system for controlling automatic running process performance | |
CN112000579A (en) | Software interface testing method, system, equipment and medium | |
CN114168947B (en) | Attack detection method and device, electronic equipment and storage medium | |
CN113612756B (en) | Shared login method and device, computer readable storage medium and electronic equipment | |
WO2022228012A1 (en) | Exception handling method, apparatus and system, and electronic device | |
CN108648298B (en) | Message processing method and device, storage medium and electronic equipment | |
CN111522718A (en) | Server power supply system and server | |
CN113859155B (en) | Power-off method and device for vehicle controller, electronic equipment and storage medium | |
CN110912839B (en) | Main and standby switch detection method, system, terminal and storage medium | |
CN103813366B (en) | A kind of abnormal restoration methods of processor and mobile terminal |
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 |