Summary of the invention
In view of this, the embodiment of the present invention is designed to provide a kind of Network Fault Detecting method and device, to improve
Wireless data collection device networking failure is directly handled by way of networking in the prior art, time-consuming, low efficiency, reduces
The problem of network availability.
To achieve the goals above, technical solution used in the embodiment of the present invention is as follows:
The embodiment of the invention provides a kind of Network Fault Detecting methods, are applied to main control device, which is used for
It establishes and wirelessly communicates with multiple wireless data collection devices, to form wireless data acquisition network, which comprises
Detect and record the wireless data collection device of communication failure and the time point of communication failure;
It judges whether there is the continuous communiction frequency of failure and reaches the wireless data collection device of the first preset threshold, if deposited
Then counting the wireless data collection device that the continuous communiction frequency of failure within the same period reaches first preset threshold
Total amount;
Judge whether the wireless data collection device total amount reaches the second preset threshold, if it is default to reach described second
Threshold value, then detection continuous communiction frequency of failure within the same period reaches each data acquisition of first preset threshold
In equipment with the presence or absence of for critical path by wireless data collection device, if there is for critical path by data acquisition set
It is standby, then be detected as critical path by the wireless data collection device whether failure.
Preferably, the method also includes:
If each wireless data that the continuous communiction frequency of failure reaches first preset threshold within the same period is adopted
Integrate in equipment there is no for critical path by wireless data collection device, then determine that continuous communiction failure is secondary within the same period
Each wireless data collection device that number reaches first preset threshold does not break down.
Preferably, the method also includes:
If the wireless data collection device total amount is lower than second preset threshold, continuous communiction is detected respectively and is lost
It loses number and reaches each wireless data collection device of first preset threshold and whether break down.
Preferably, each wireless data that the continuous communiction frequency of failure of detection respectively reaches first preset threshold is adopted
Collect that the step of whether equipment breaks down includes:
Find out the institute that every continuous communiction frequency of failure reaches the wireless data collection device of first preset threshold
There is adjacent wireless data collection device;
Control instruction is issued to every adjacent wireless data collection device, makes every adjacent wireless data collection device successively
The wireless data collection device for reaching first preset threshold with the continuous communiction frequency of failure is communicatively coupled;
It judges whether there is adjacent wireless data collection device and the continuous communiction frequency of failure reaches the described first default threshold
The wireless data collection device of value is successfully established communication connection, if it does not exist, then determining that the continuous communiction frequency of failure reaches
The wireless data collection device to first preset threshold is failure wireless data collection device.
Preferably, the method also includes:
Reach first preset threshold if there is adjacent wireless data collection device and the continuous communiction frequency of failure
The wireless data collection device is successfully established communication connection, then determines that the continuous communiction frequency of failure reaches the described first default threshold
The wireless data collection device generation of value can recovery-type network communication failure.
The embodiment of the invention also provides a kind of Network Fault Detecting devices, are applied to main control device, which uses
It is wirelessly communicated in being established with multiple wireless data collection devices, to form wireless data acquisition network, the Network Fault Detecting
Device includes:
Detection and recording unit, for detect and record communication failure wireless data collection device and communication failure when
Between point;
Judging unit, the wireless data that the first preset threshold is reached for judging whether there is the continuous communiction frequency of failure are adopted
Collect equipment, if it is present statistics continuous communiction frequency of failure within the same period reaches the nothing of first preset threshold
Line data acquisition equipment total amount;For judging whether the wireless data collection device total amount reaches the second preset threshold, if
Reach second preset threshold, then detection continuous communiction frequency of failure within the same period reaches first preset threshold
Each wireless data collection device in the presence or absence of for critical path by wireless data collection device, if there is for critical path by
Wireless data collection device, then be detected as critical path by the wireless data collection device whether failure.
Preferably, the judging unit is also used to the continuous communiction frequency of failure within the same period and reaches described first
In each wireless data collection device of preset threshold there is no for critical path by wireless data collection device when, determine same
Each wireless data collection device that the continuous communiction frequency of failure reaches first preset threshold in period does not break down.
Preferably, the Network Fault Detecting device further include:
Processing unit, for obtaining the wireless data collection device total amount lower than described the in judging unit judgement
When two preset thresholds, each wireless data collection device that the continuous communiction frequency of failure reaches first preset threshold is detected respectively
Whether break down.
Preferably, the processing unit includes:
Search subelement, for find out every continuous communiction frequency of failure reach first preset threshold without line number
According to all adjacent wireless data collection devices of acquisition equipment;
Control subelement, for issuing control instruction to every adjacent wireless data collection device, make every it is adjacent wireless
Data acquisition equipment successively reaches the wireless data collection device of first preset threshold with the continuous communiction frequency of failure
It is communicatively coupled;
Judgment sub-unit reaches for judging whether there is adjacent wireless data collection device with the continuous communiction frequency of failure
The wireless data collection device of first preset threshold is successfully established communication connection, if it does not exist, then determining continuous
The wireless data collection device that communication failure number reaches first preset threshold is failure wireless data collection device.
Preferably, the judgment sub-unit is also used to there are adjacent wireless data collection device and continuous communictions to fail
When the wireless data collection device that number reaches first preset threshold is successfully established communication connection, continuous communiction is determined
The wireless data collection device generation that the frequency of failure reaches first preset threshold can recovery-type network communication failure.
Network Fault Detecting method and device provided in the embodiment of the present invention, malfunction monitoring mechanism are adopted in wireless data
The collection equipment continuous communiction frequency of failure starts after reaching the first preset threshold, without with the wireless data collection device of communication failure
The judgement of shared population proportion, as long as there is any wireless data collection device that can not communicate, can startup separator monitoring mechanism, rather than
Recombination net is just carried out until there are enough wireless data collection device communication failures as the prior art.On this basis, originally
Scheme in inventive embodiments can also count the nothing that the continuous communiction frequency of failure within the same period reaches the first preset threshold
Whether line data acquisition equipment total amount confirms rapidly the type of failure, does not need more than the second preset threshold by inferring mechanism
Again networking.
Further, Network Fault Detecting method and device provided in the embodiment of the present invention, for individually without line number
According to the network failure of acquisition equipment, too small amount of neighboring communication traversal can be led to confirm whether wireless data collection device is former
Barrier, neighbours' quantity of single wireless data collection device is far fewer than the number of devices in network, thus fault location speed is faster.
To enable the above objects, features and advantages of the present invention to be clearer and more comprehensible, preferred embodiment is cited below particularly, and cooperate
Appended attached drawing, is described in detail below.
Specific embodiment
Network Fault Detecting method and device provided by the embodiment of the present invention can be applied to application environment as shown in Figure 1
In.It is communicated to connect as shown in Figure 1, main control device 200, wireless data collection device 100 can be established by network 300, makes winner
Control equipment 200 and wireless data collection device 100 can carry out data communication and interaction between each other.The network 300 is preferably
Wireless network.
In the embodiment of the present invention, main control device 200 is the equipment that can be obtained data and be stored and handled, can be with
Including concentrator (Concentrator device), data processor etc..Fig. 2 shows the master controls in a kind of embodiment
The structural block diagram of equipment 200.As shown in Fig. 2, main control device 200 may include: memory 201, processor 202 and network mould
Block 203.
Memory 201 can be used for storing software program and module, such as the Network Fault Detecting side in the embodiment of the present invention
Method and the corresponding program instruction/unit of device, processor 202 by the software program that is stored in memory 201 of operation and
Unit, thereby executing various function application and data processing, such as Network Fault Detecting method provided in an embodiment of the present invention.It deposits
Reservoir 201 may include high speed random access memory, may also include nonvolatile memory, as one or more magnetic storage fills
It sets, flash memory or other non-volatile solid state memories.Software program and module in above-mentioned memory 201 include network
Fault monitoring device 500 may also include that operating system 221 and service module 222.Wherein operating system 221 can for LINUX,
UNIX, WINDOWS, may include it is various for management system task (such as memory management, storage wireless data collection device control
System, power management etc.) component software and/or driving, and can mutually be communicated with various hardware or component software, to provide it
The running environment of his component software.Service module 222 operates on the basis of operating system 221, and passes through operating system 221
The request for carrying out automatic network is monitored in network service, completes corresponding data processing according to request, and return to processing result to client.
That is, service module 222 can be used for providing network service to client.
Network module 203 is used for the communication established between main control device 200 and external communications terminals by the network 300
The transmitting-receiving operation of network signal and data is realized in connection.
It is appreciated that structure shown in Fig. 2 is only to illustrate, main control device 200 may also include it is more than shown in Fig. 2 or
Less component, or with the configuration different from shown in Fig. 2.Each component shown in Fig. 2 can using hardware, software or its
Combination is realized.
Network Fault Detecting method and device provided in the embodiment of the present invention, for main control device 200 and no line number
According to the wireless data acquisition network that acquisition equipment 100 forms, it can be monitored in the application stage and record each wireless data collection device
The information of 100 each communication failures and time, it is default to reach first in the 100 continuous communiction frequency of failure of wireless data collection device
Startup separator diagnosis mechanism after threshold value counts the nothing that the continuous communiction frequency of failure within the same period reaches the first preset threshold
Whether 100 total amount of line data acquisition equipment when same period has more wireless data collection device more than the second preset threshold
When 100 communication failure, the type of failure can be confirmed rapidly, does not need networking again by inferring mechanism.Such as: with for the moment
Between section have more 100 communication failure of wireless data collection device may be because a certain section occur have a power failure etc. failures, cause this
All 100 communication failures of wireless data collection device in section.It may also is that for critical path by wireless data collection device
100 break down, cause by this for critical path by other wireless datas that are communicated of wireless data collection device 100 adopt
Collect 100 communication failure of equipment, wherein for critical path by wireless data collection device 100 refer to the relaying section that transmits as data
The wireless data collection device 100 of point.Based on above-mentioned analysis, first carry out with the presence or absence of for critical path by data acquisition set
Standby 100 judgement, when exist for critical path by wireless data collection device 100 when, be detected as critical path by wireless data
Acquire equipment 100 whether failure, when there is no for critical path by wireless data collection device 100 when, can directly infer hair
The events such as large-area power-cuts are given birth to, each wireless data collection device 100 does not break down.
This kind of Network Fault Detecting mode can effectively improve 300 availability of malfunction monitoring efficiency and network.
Below in conjunction with attached drawing in the embodiment of the present invention, technical solution in the embodiment of the present invention carries out clear, complete
Ground description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.Usually exist
The component of the embodiment of the present invention described and illustrated in attached drawing can be arranged and be designed with a variety of different configurations herein.Cause
This, is not intended to limit claimed invention to the detailed description of the embodiment of the present invention provided in the accompanying drawings below
Range, but it is merely representative of selected embodiment of the invention.Based on the embodiment of the present invention, those skilled in the art are not doing
Every other embodiment obtained under the premise of creative work out, shall fall within the protection scope of the present invention.
As shown in figure 3, it is applied to main control device 200 the embodiment of the invention provides a kind of Network Fault Detecting method, it should
Main control device 200 is used to establish with multiple wireless data collection devices 100 and wirelessly communicate, to form wireless data acquisition network,
It the described method comprises the following steps.
Step S401: detecting and records wireless data collection device 100 and the time point of communication failure of communication failure.
Wherein, the wireless data collection device 100 of communication failure refers to fail and carries out the wireless data of data interaction and adopt
Collect equipment 100.
In practical applications, each wireless data collection device 100 can be set and periodically carry out data interaction, then, it is setting
Time fails to complete the wireless data collection device 100 of the as communication failure of wireless data collection device 100 of data interaction, should
Setting time is the time point of communication failure.Also it may be set under certain condition, refer to as administrative staff issue data acquisition
Each wireless data collection device 100 carries out data interaction under conditions of order, then, after administrative staff issue data acquisition instruction
The wireless data collection device 100 for failing completion data interaction is the wireless data collection device 100 of communication failure, administrator
Member issues the time point that the time point that data acquisition instructs is communication failure.
Step S402: it judges whether there is the continuous communiction frequency of failure and reaches the data acquisition of the first preset threshold and set
Standby 100, if it is present executing step S403: statistics continuous communiction frequency of failure within the same period reaches described first
100 total amount of wireless data collection device of preset threshold.
In the present embodiment, show that the wireless data for reaching the first preset threshold there are the continuous communiction frequency of failure is adopted in judgement
When collecting equipment 100, that is, startup separator diagnosis mechanism, this care diagnostic mechanism abandoned in the prior art only one in network 300
The direct processing mode of networking again when the device fails of certainty ratio, can effectively improve the timeliness of troubleshooting.
Wherein, fault diagnosis mechanism includes above-mentioned steps S403: statistics continuous communiction frequency of failure within the same period
Reach 100 total amount of wireless data collection device and step S404 of first preset threshold: judging that the wireless data is adopted
Whether collection 100 total amount of equipment reaches the second preset threshold, if reaching second preset threshold, thens follow the steps step
S405: detection each data acquisition that the continuous communiction frequency of failure reaches first preset threshold within the same period is set
In standby 100 with the presence or absence of for critical path by wireless data collection device 100, if there is for critical path by wireless data adopt
Collect equipment 100, then follow the steps S406: be detected as critical path by the wireless data collection device 100 whether failure.
Wherein, the first preset threshold and the second preset threshold can with flexible setting, such as: if main control device 200 and multiple
Wireless data acquisition network composed by wireless data collection device 100 is smaller, such as unit of cell, in order to improve failure prison
Timeliness is surveyed, the first preset threshold can be set as 3, then, in each wireless data collection device 100 being set in cell
There are the communication failure numbers of any wireless data collection device 100 to reach 3 times, i.e. startup separator diagnosis mechanism.Assuming that cell
In a minimum of 3 wireless data collection devices 100 in each family, the second preset threshold can be set as 3, then, master control is set
The continuous communiction frequency of failure reaches 3 wireless data collection devices 100 always within the same period in the standby 200 detection cell
Whether amount reaches 3 or more, may be a certain family or multiple family's integrated communications in the cell if reaching 3 or more
It goes wrong or some communication relay node goes wrong, at this point, first detecting whether that there are communication relay nodes, i.e. master control
Equipment 200 detect communication failure 3 wireless data collection devices 100 in the presence or absence of for critical path by data acquisition
Equipment 100, if there is for critical path by wireless data collection device 100, then be detected as critical path by the no line number
According to acquisition equipment 100 whether failure.
A kind of completely new fault diagnosis mechanism is provided in above scheme, it can be in more wireless data collection devices 100
Specific aim diagnosis is carried out when concentration breaks down, and exists for key in the wireless data collection device 100 of more communication failures
When the wireless data collection device 100 of routing, directly to for critical path by wireless data collection device 100 diagnose, and
It is non-that networking again directly is carried out to all wireless data collection devices 100 such as the prior art, so that being diagnosed to be as critical path
By wireless data collection device 100 break down when, only need to for critical path by wireless data collection device 100 carry out again
Failure can be solved in new connection, will not improve available to the networking again of wireless data collection device 100 that remaining is worked normally
Property.
If each wireless data that the continuous communiction frequency of failure reaches first preset threshold within the same period is adopted
Integrate in equipment 100 there is no for critical path by wireless data collection device 100, then follow the steps S407: judgement is in same a period of time
Between the continuous communiction frequency of failure reaches first preset threshold in section each wireless data collection device 100 do not break down.
Equally by among the above by taking wireless data acquisition network 300 composed as unit of cell as an example, the first preset threshold
It is 3, there are the communications of any wireless data collection device 100 in each wireless data collection device 100 being set in cell
The frequency of failure reaches 3 times, i.e. startup separator diagnosis mechanism.A minimum of 3 wireless data collection devices in each family in cell
100, the second preset threshold is set as 3, then, main control device 200 detects the continuous communiction mistake within the same period in the cell
It loses number and reaches 3 100 total amounts of wireless data collection device and whether reach 3 or more, it, may if reaching 3 or more
It is that a certain family or multiple family's integrated communications go wrong in the cell or some communication relay node goes wrong, this
When, first detect whether that there are communication relay nodes, i.e. 3 wireless data collection devices of the detection of main control device 200 communication failure
In 100 with the presence or absence of for critical path by wireless data collection device 100, if there is no for critical path by wireless data adopt
Collect equipment 100, then it is believed that certain families may occur to concentrate power-off in cell, communication failure, which is powered off, to be caused, rather than because of nothing
Line data acquisition equipment 100 breaks down, at this point, being then not necessarily to networking again.
It should be noted that the wireless data collection device 100 of outage area can communicate mistake in occurrence of large-area power-off
Lose, at this point, may include in the wireless data collection device 100 of communication failure for critical path by wireless data collection device
100, in that case, it can be determined that with the presence or absence of it is multiple for critical path by wireless data collection device 100 in same a period of time
Between section communication failure, if it is multiple for critical path by wireless data collection device 100 also may be used in same period communication failure
Determining that power cut-off incident occurs, communication failure, which is powered off, to be caused, rather than because wireless data collection device 100 breaks down, at this point, then
Without networking again.
If the same period continuous communiction frequency of failure reaches the wireless data collection device of the first preset threshold
100 total amounts are lower than second preset threshold, then follow the steps S408: detecting the continuous communiction frequency of failure respectively and reach described the
Whether each wireless data collection device 100 of one preset threshold breaks down.
When implementing, the second preset threshold is preferably set as 300 unit of minimal network in wireless data acquisition network,
Such as: among the above as unit of cell in composed wireless data acquisition network 300, if family is minimum unit in cell,
A minimum of 3 wireless data collection devices 100 in each family, that second preset threshold are 3.If small within the same period
It is 2 that the continuous communiction frequency of failure, which reaches 3 wireless data collection devices 100, in area, then illustrates it is not centainly for critical path
By wireless data collection device 100 break down or some family have a power failure, then 2 wireless datas of communication failure are adopted at this time
Collection equipment 100 is detected respectively.
The embodiment of the invention provides the realization sides whether one of detection wireless data collection device 100 breaks down
Case, as shown in figure 4, the continuous communiction frequency of failure of detection respectively reaches each data acquisition of first preset threshold
The step of whether equipment 100 breaks down includes the following steps.
Step S501: the data acquisition that every continuous communiction frequency of failure reaches first preset threshold is found out
All adjacent wireless data collection devices 100 of equipment 100.
Wherein, the adjacent wireless data collection device 100 of wireless data collection device 100 is preferably without being relayed i.e.
The equipment that data interaction directly can be carried out with the wireless data collection device 100.When implementation, preferably control device is in networking stage
Record 100 information of adjacent wireless data collection device of each wireless data collection device 100.
Step S502: control instruction is issued to every adjacent wireless data collection device 100, makes every adjacent wireless data
Acquisition equipment 100 successively reaches the wireless data collection device of first preset threshold with the continuous communiction frequency of failure
100 are communicatively coupled.
Step S503: adjacent wireless data collection device 100 is judged whether there is with the continuous communiction frequency of failure and reaches institute
The wireless data collection device 100 for stating the first preset threshold is successfully established communication connection, if it does not exist, then executing step
S504: the wireless data collection device 100 for determining that the continuous communiction frequency of failure reaches first preset threshold is failure
Wireless data collection device 100.Reach described with the continuous communiction frequency of failure if there is adjacent wireless data collection device 100
The wireless data collection device 100 of first preset threshold is successfully established communication connection, thens follow the steps S505: determining continuous
The generation of the wireless data collection device 100 that communication failure number reaches first preset threshold can recovery-type network 300
Communication failure wireless data collection device 100.
The implementation whether above-mentioned detection wireless data collection device 100 breaks down is not only suitable for a small number of communication failures
Wireless data collection device 100 fault detection, also be suitable for for critical path by wireless data collection device 100 inspection
It surveys.
In the present embodiment, when 100 communication failure of wireless data collection device, it can be adopted using the wireless data of communication failure
The adjacent wireless data collection device 100 of collection equipment 100 establishes communication connection therewith, reacquires the wireless data of communication failure
Acquire equipment 100 data collected, in this way can detection communication failure wireless data collection device 100 whether failure
It is completed at the same time 300 self- recoverage of network, efficiency is higher, can effectively ensure 300 availability of network.
On the basis of the above, it the embodiment of the invention also provides a kind of Network Fault Detecting device 500, is set applied to master control
Standby 200, which is used to establish with multiple wireless data collection devices 100 and wirelessly communicate, and is adopted with forming wireless data
Collect network, as shown in figure 5, the Network Fault Detecting device 500 includes detection and recording unit 601 and judging unit 602.
Wherein, detection and recording unit 601 are used to detect and record the wireless data collection device 100 of communication failure and lead to
Believe the time point of failure.The description as described in the detection and recording unit 601 can specifically join the description to step S401 in Fig. 3.
That is, the step S401 can be executed by the detection and recording unit 601.
Judging unit 602 is for judging whether there is the wireless data that the continuous communiction frequency of failure reaches the first preset threshold
Equipment 100 is acquired, if it is present statistics continuous communiction frequency of failure within the same period reaches first preset threshold
100 total amount of wireless data collection device;For judging it is default whether 100 total amount of wireless data collection device reaches second
Threshold value, if reaching second preset threshold, detection continuous communiction frequency of failure within the same period reaches described the
In each wireless data collection device 100 of one preset threshold with the presence or absence of for critical path by wireless data collection device 100, such as
Fruit exist for critical path by wireless data collection device 100, then be detected as critical path by the wireless data collection device
100 whether failure.The description as described in the judging unit 602 can specifically be joined to step S402~step S408 description in Fig. 3.
That is, the step S402~step S408 can be executed by the judging unit 602.
Preferably, the judging unit 602 is also used to the continuous communiction frequency of failure within the same period and reaches described
In each wireless data collection device 100 of one preset threshold there is no for critical path by wireless data collection device 100 when, sentence
It is scheduled on the continuous communiction frequency of failure in the same period and reaches each wireless data collection device 100 of first preset threshold not
It breaks down.
The Network Fault Detecting device 500 further includes processing unit 603.The processing unit 603 described for sentencing
When the disconnected judgement of unit 602 obtains 100 total amount of wireless data collection device lower than second preset threshold, detection connects respectively
Whether each wireless data collection device 100 that continuous communication failure number reaches first preset threshold breaks down.
Further, the processing unit 603 includes: to search subelement 604, control subelement 605 and judgment sub-unit
606。
Wherein, it searches subelement 604 and reaches first preset threshold for finding out every continuous communiction frequency of failure
Wireless data collection device 100 all adjacent wireless data collection devices 100.
Subelement 605 is controlled to be used to issue control instruction to every adjacent wireless data collection device 100, make every it is adjacent
The wireless data that wireless data collection device 100 successively reaches first preset threshold with the continuous communiction frequency of failure is adopted
Collection equipment 100 is communicatively coupled.
Judgment sub-unit 606 is for judging whether there is adjacent wireless data collection device 100 and continuous communiction failure time
The wireless data collection device 100 that number reaches first preset threshold is successfully established communication connection, if it does not exist, then
Determining that the continuous communiction frequency of failure reaches the wireless data collection device 100 of first preset threshold is failure without line number
According to acquisition equipment 100.The judgment sub-unit 606 is also used to there are adjacent wireless data collection device 100 and continuous communictions
When the wireless data collection device 100 that the frequency of failure reaches first preset threshold is successfully established communication connection, determine
The generation of the wireless data collection device 100 that the continuous communiction frequency of failure reaches first preset threshold can recovery-type network
300 communication failure wireless data collection devices 100.
The particular technique of Network Fault Detecting device 500 provided by the embodiment of the present invention, implementation and generation is imitated
Fruit is similar with preceding method content, and the realization principle in Network Fault Detecting device 500 can refer to preceding method content, because without
Make more explanations.
The foregoing is only a preferred embodiment of the present invention, is not intended to restrict the invention, for the skill of this field
For art personnel, the invention may be variously modified and varied.All within the spirits and principles of the present invention, made any to repair
Change, equivalent replacement, improvement etc., should all be included in the protection scope of the present invention.It should also be noted that similar label and letter exist
Similar terms are indicated in following attached drawing, therefore, once being defined in a certain Xiang Yi attached drawing, are then not required in subsequent attached drawing
It is further defined and explained.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any
Those familiar with the art in the technical scope disclosed by the present invention, can easily think of the change or the replacement, and should all contain
Lid is within protection scope of the present invention.Therefore, protection scope of the present invention should be based on the protection scope of the described claims.