Summary of the invention
Based on this, it is necessary to for general networking communication failure regrouping process low efficiency and the low problem of availability, provide
A kind of high-efficient and high availability network failure processing method and system.
A kind of network failure processing method, comprising steps of
When there are when data acquisition equipment to be restored, search all of data acquisition equipment to be restored in data acquisition network
Adjacent data acquires equipment;
The adjacent data in communications status, which is searched, from all adjacent datas acquisition equipment acquires equipment;
It generates and sends and searches for control instruction to the adjacent data for being in communications status of data acquisition equipment to be restored and adopt
Collect equipment, data acquisition equipment to be restored is searched for by the adjacent data acquisition equipment in communications status;
The feedback that equipment searches data acquisition equipment to be restored is acquired when receiving the adjacent data in communications status
When message, sends connection control instruction to the adjacent data for being in communications status and acquire equipment, by adjacent in communications status
Data acquisition equipment and data acquisition equipment to be restored, which are established, to be communicated to connect.
A kind of dealing with network breakdown system, comprising:
First searching module, for when, there are when data acquisition equipment to be restored, lookup is to be restored in data acquisition network
All adjacent datas of data acquisition equipment acquire equipment;
Second searching module is adopted for searching the adjacent data in communications status from all adjacent datas acquisition equipment
Collect equipment;
Search instruction sending module searches for the control instruction of data acquisition equipment to be restored to being in for generating and sending
The adjacent data of communications status acquires equipment, searches for data to be restored by the adjacent data acquisition equipment in communications status and acquires
Equipment;
Link order sending module is searched for that ought receive the adjacent data acquisition equipment in communications status to extensive
When complex data acquires the feedback message of equipment, sends connection control instruction to the adjacent data for being in communications status and acquires equipment,
By adjacent data acquisition equipment and data acquisition equipment to be restored foundation communication connection in communications status.
Inventive network fault handling method and system, in the case where data acquisition equipment non-occurrence of equipment failure, energy
Equipment quickly networking again is enough acquired by adjacent data, will not long-time suspension, this kind of dealing with network breakdown mode do not need
Network structure is rebuild, existing network structure is able to retain and inherit, and reduces the traffic of a large amount of group-net communication, subtracts
The time for having lacked each network operation, since neighbours' quantity of each equipment is much smaller than whole network equipment quantity, so traversal completely
The time of the time specific gravity network forming of primary all neighbours is short very much, so that equipment contracts significantly because of the time that network communication failure falls net
It is short, substantially increase dealing with network breakdown efficiency, it is ensured that the availability of network.
Specific embodiment
As shown in Figure 1, a kind of network failure processing method, comprising steps of
S200: when, there are when data acquisition equipment to be restored, searching data acquisition equipment to be restored in data acquisition network
All adjacent datas acquire equipment.
Entire data acquisition network includes more (at least two) data acquisition equipments, can be adopted between data acquisition equipment
It is communicated with wirelessly or non-wirelessly mode.When data acquisition equipment carries out group-net communication using wireless mode, data acquisition is set
Standby is wireless data collection device.In the entire data acquisition network course of work, it is possible that some data acquisition equipment
There is communication abnormality (communication failure) to need to restore, needs to carry out recovery operation.When this happens, this is found to extensive
Complex data acquires equipment, and searches all adjacent datas acquisition equipment of the data acquisition equipment to be restored.Herein, adjacent
The equipment that data acquisition equipment refers to connection adjacent with data acquisition equipment to be restored, i.e., data acquisition equipment to be restored are right with it
It is connected between the adjacent data acquisition equipment answered and there is no other data acquisition equipments between the two line.
S400: the adjacent data in communications status is searched from all adjacent datas acquisition equipment and acquires equipment.
Adjacent data acquisition equipment may have equipment to be not in communications status, and this kind of equipment can not carry out data forwarding, because
This needs to be excluded.The adjacent data in communications status is searched from all adjacent datas acquisition equipment and acquires equipment, is
Subsequent operation is ready.
S600: it generates and sends and searches for the control instruction of data acquisition equipment to be restored to the consecutive number for being in communications status
According to acquisition equipment, data acquisition equipment to be restored is searched for by the adjacent data acquisition equipment in communications status.
There are communication abnormalities between data acquisition equipment and server to be restored, therefore the instruction of server in many cases
It can not be accurately sent to data acquisition equipment to be restored, in this regard, server generates and sends search data acquisition equipment to be restored
Control instruction to the adjacent data for being in communications status acquires equipment, by the adjacent data acquisition equipment search in communications status
Data acquisition equipment to be restored.It is assumed that the adjacent data acquisition equipment of data acquisition equipment A to be restored is B, data acquisition equipment C
And data acquisition equipment D, then the instruction of server transmission search data acquisition equipment A to be restored to data acquisition equipment B, number
According to acquisition equipment C and data acquisition equipment D.
S800: data acquisition equipment to be restored is searched when receiving the adjacent data acquisition equipment in communications status
When feedback message, sends connection control instruction to the adjacent data for being in communications status and acquire equipment, by being in communications status
Adjacent data acquires equipment and data acquisition equipment to be restored is established and communicated to connect.
Adjacent data acquisition equipment B or adjacent data acquisition equipment C again or adjacent data acquisition equipment D search it is to be restored
When data acquisition equipment A, the feedback message for searching target (data acquisition equipment A to be restored) can be sent to server, serviced
Device sends connection control instruction to the adjacent data for sending feedback message and acquires equipment, by this when receiving the feedback message
Adjacent data acquires equipment and data acquisition equipment A to be restored is established and communicated to connect.
Inventive network fault handling method can pass through in the case where data acquisition equipment non-occurrence of equipment failure
Adjacent data acquires equipment quickly networking again, will not long-time suspension, this kind of dealing with network breakdown mode do not need structure again
Establishing network structure, existing network structure are able to retain and inherit, and reduce the traffic of a large amount of group-net communication, reduce every
The time of secondary network operation, since neighbours' quantity of each equipment is much smaller than whole network equipment quantity, so traversing primary institute completely
There is the time of the time specific gravity network forming of neighbours short very much, so that equipment is because the time that network communication failure falls net greatly shortens, greatly
Dealing with network breakdown efficiency is improved greatly, it is ensured that the availability of network.
As shown in Fig. 2, in one of the embodiments, before step S200 further include:
S120: data acquisition equipment and the communication failure time point of communication failure are recorded.
S140: the data acquisition equipment that the continuous communiction frequency of failure is greater than preset threshold is determined as that data to be restored acquire
Equipment.
There is the data acquisition equipment of communication failure and corresponding communication failure time in server record.Based on record
The communication failure time obtains each data acquisition equipment for communication failure occur and the continuous communiction frequency of failure occurs, will continuously lead to
The data acquisition equipment that the letter frequency of failure is greater than preset threshold is determined as data acquisition equipment to be restored.It may be noted that when, and
It is not to decide that it for data acquisition equipment to be restored, nor some data when communication failure occurs in some data acquisition equipment
The time interior multiple communication failure of appearance decides that it is data acquisition equipment to be restored to acquisition equipment at one end, but needs continuous lead to
The data acquisition equipment that the letter frequency of failure is greater than preset threshold is determined as data acquisition equipment to be restored.Due to data acquisition equipment
May influence to cause due to factors such as external environments single or it is of short duration occur communication failure between server, in use
Misinterpretation can effectively be avoided by stating data acquisition equipment decision procedure to be restored.
Further, the step of recording data acquisition equipment and the communication failure time point of communication failure include:
Step 1: data are obtained from least two data acquisition equipments according to the first prefixed time interval.
Step 2: the data acquisition equipment for failing to get data in the first prefixed time interval is recorded as communication failure
Data acquisition equipment, the time point for failing to get data is recorded as to the time point of communication failure.
In a wherein example, the quantity of the adjacent data acquisition equipment in communications status is multiple;
As shown in Fig. 2, step S600 includes randomly choosing from all adjacent datas acquisition equipment in communications status
One adjacent data acquires equipment, issues search instruction to the adjacent data of selection acquisition equipment, is adopted by the adjacent data selected
Collect equipment and searches for data acquisition equipment to be restored.
Step S800 includes:
S820: judge whether that the adjacent data acquisition equipment for receiving selection searches the anti-of data acquisition equipment to be restored
Present message.
S842: if not receiving, one is reselected from all adjacent datas acquisition equipment in communications status
Adjacent data acquires equipment, and returns to S820.
S844: if receiving, sending the adjacent data acquisition equipment in communications status of connection control instruction to selection,
By the adjacent data acquisition equipment and data acquisition equipment to be restored foundation communication connection in communications status selected.
All adjacent data acquisition equipment constitute a set, and every adjacent data acquisition equipment is respectively in the set
Element.By taking collection is combined into { B, C, D, F } as an example, adjacent data acquisition equipment (element B) of choosing random first, to adjacent data
It acquires equipment B and sends search instruction, data acquisition equipment A to be restored is searched for by adjacent data acquisition equipment B, server is sentenced later
The disconnected feedback message for whether receiving adjacent data acquisition equipment B and searching data acquisition equipment A to be restored, when not receiving,
An element (adjacent data acquires equipment C) is reselected from set, and returns to judgment step, re-starts judgement;When connecing
It when receiving, sends connection control instruction to adjacent data and acquires equipment B, adopted by adjacent data acquisition equipment B in data to be restored
Collect equipment A and establishes communication connection.
As shown in Fig. 2, after step S800 further include:
S900: according to the second prefixed time interval, by establishing the adjacent data communicated with data acquisition equipment to be restored
Equipment is acquired, the collected data of data acquisition equipment to be restored are obtained.
It is establishing between adjacent data acquisition equipment and data acquisition equipment to be restored after communication connection, by number to be restored
According to the data of acquisition equipment acquisition server, server can be uploaded to by establishing the adjacent data acquisition equipment of communication connection
Data can also be issued to data acquisition equipment to be restored by establishing the adjacent data acquisition equipment of communication connection, lead to realizing
During letter, the adjacent data acquisition equipment for establishing communication connection is understood that a bridge tie equipment, plays data and turns
Send out function.
In order to further explain in detail the technical solution and its bring effect of inventive network fault handling method, under
Face will be illustrated in conjunction with Fig. 3.
1, in networking stage, the neighbours of each equipment are recorded.
2, in acquisition phase (application stage), the facility information of communication failure each time is recorded.
3, when the continuous frequency of failure is more than preset value, starting self- recoverage.
4, selection needs the faulty equipment restored, finds its corresponding neighbor table
5, the neighbours for capableing of normal communication are selected, the equipment is allowed to search for faulty equipment.
If 6, searched for successfully, networking order is sent, makes faulty equipment that network be added by the neighbours, is communicated.
If 7, search failure, the next neighbours for changing faulty equipment attempt.Until having used faulty equipment
All neighbours.
As shown in figure 4, a kind of dealing with network breakdown system, comprising:
First searching module 200, for when, there are when data acquisition equipment to be restored, lookup is to extensive in data acquisition network
All adjacent datas that complex data acquires equipment acquire equipment.
Second searching module 400, for searching the consecutive number for being in communications status from all adjacent datas acquisition equipment
According to acquisition equipment.
Search instruction sending module 600 searches for the control instruction of data acquisition equipment to be restored extremely for generating and sending
Adjacent data in communications status acquires equipment, searches for data to be restored by the adjacent data acquisition equipment in communications status
Acquire equipment.
Link order sending module 800 is searched for that ought receive the adjacent data acquisition equipment in communications status
When the feedback message of data acquisition equipment to be restored, sends connection control instruction to the adjacent data acquisition for being in communications status and set
It is standby, by adjacent data acquisition equipment and data acquisition equipment to be restored foundation communication connection in communications status.
Inventive network fault processing system can pass through in the case where data acquisition equipment non-occurrence of equipment failure
Adjacent data acquires equipment quickly networking again, will not long-time suspension, this kind of dealing with network breakdown mode do not need structure again
Establishing network structure, existing network structure are able to retain and inherit, and reduce the traffic of a large amount of group-net communication, reduce every
The time of secondary network operation, since neighbours' quantity of each equipment is much smaller than whole network equipment quantity, so traversing primary institute completely
There is the time of the time specific gravity network forming of neighbours short very much, so that equipment is because the time that network communication failure falls net greatly shortens, greatly
Dealing with network breakdown efficiency is improved greatly, it is ensured that the availability of network.
As shown in figure 5, dealing with network breakdown system in one of the embodiments, further include:
Communication failure logging modle 120, for recording data acquisition equipment and the communication failure time point of communication failure.
Determination module 140, for by the continuous communiction frequency of failure be greater than preset threshold data acquisition equipment be determined as to
Restore data acquisition equipment.
Communication failure records 120 modules in one of the embodiments:
Test data acquiring unit, for obtaining number from least two data acquisition equipments according to the first prefixed time interval
According to.
Recording unit, for the data acquisition equipment for failing to get data in the first prefixed time interval to be recorded as leading to
The time point for failing to get data is recorded as the time point of communication failure by the data acquisition equipment for believing failure.
The quantity of the adjacent data acquisition equipment in communications status is multiple in one of the embodiments,;
As shown in figure 5, search instruction sending module 600 from communications status all adjacent datas acquisition equipment in
Machine selects an adjacent data to acquire equipment, issues search instruction to the adjacent data of selection acquisition equipment, adjacent by what is selected
Data acquisition equipment searches for data acquisition equipment to be restored.
Link order sending module 800 includes:
Judging unit 820, for judging whether that the adjacent data acquisition equipment for receiving selection searches data to be restored
Acquire the feedback message of equipment.
First processing units 842, for acquiring equipment from all adjacent datas in communications status when not receiving
In reselect adjacent data acquisition equipment, control judging unit re-executes the consecutive number for judging whether to receive selection
The operation of the feedback message of data acquisition equipment to be restored is searched according to acquisition equipment.
The second processing unit 844 is used for when received, and what transmission connection control instruction extremely selected is in communications status
Adjacent data acquires equipment, is built by the adjacent data acquisition equipment in communications status selected with data acquisition equipment to be restored
Vertical communication connection.
As shown in figure 5, dealing with network breakdown system in one of the embodiments, further include:
Data acquisition module 900 is used for according to the second prefixed time interval, by establishing with data acquisition equipment to be restored
The adjacent data of communication acquires equipment, obtains the collected data of data acquisition equipment to be restored.
The embodiments described above only express several embodiments of the present invention, and the description thereof is more specific and detailed, but simultaneously
It cannot therefore be construed as limiting the scope of the patent.It should be pointed out that coming for those of ordinary skill in the art
It says, without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to protection of the invention
Range.Therefore, the scope of protection of the patent of the invention shall be subject to the appended claims.