Summary of the invention
The embodiment of the present invention provides a kind of starting method and device of fault detection, to realize in field of traffic quicklyThe process for starting terminal equipment failure detection, accurately determines the failure of terminal device.
A kind of starting method of fault detection provided in an embodiment of the present invention, comprising:
Server obtains the historical time intervals of the upload data of terminal device in set period of time;
The server optimizes the historical time intervals, and determines the of the historical time intervals after optimizationOne average value and first variance;
The server determines event according to the first average value and first variance of the historical time intervals after the optimizationHinder the time interval threshold value of detection;
The server is if it is determined that the time interval that terminal device currently uploads data is greater than the time of the fault detectionInterval threshold then carries out the fault detection of the terminal device.
Optionally, first average value and first variance for determining the historical time intervals after optimization, comprising:
First average value of the historical time intervals after the server calculation optimization, and based on the history after the optimizationFirst average value of time interval, the first variance of the historical time intervals after determining the optimization.
Optionally, the server optimizes the historical time intervals, comprising:
The server deletes maximum and minimum in the historical time intervals, and calculates between remaining historical timeEvery the second average value and second variance;
Second average value and second variance of the server according to the remaining historical time intervals, delete the residueException history time interval in historical time intervals, the historical time intervals after being optimized.
Optionally, the server carries out the fault detection of the terminal device, including
By network adapter, the all-network equipment into network sends inspection instruction to the server, if all-network is setStandby communication is normal, it is determined that the network apparatus in networks does not break down, server data Layer into the networkAll data communication services adapters send test instruction, if the non-returned data of data communication services adapter, it is determined that describedData link breaks down, if the data communication services adapter returned data, it is determined that the terminal device breaks down;
If the network device communications in the network are abnormal, the server determines the net to break down in the networkNetwork equipment.
Optionally, the server determines the network equipment to break down in the network, comprising:
For any bar network link in network, the terminal device with the bottom of the network link is the serverStarting point, each network equipment in Xiang Suoshu network link sends inspection instruction, until receiving feedback command;
The network equipment of the next stage of the corresponding network equipment of the feedback command is determined as to be confirmed by the serverThe network equipment of failure;
If the network equipment that the server does not receive the next stage of the network equipment corresponding with the feedback command is connectedThe feedback command of the all-network equipment connect then sets the network that the network equipment of the failure to be confirmed is determined as breaking downIt is standby.
Correspondingly, the embodiment of the invention also provides a kind of starters of fault detection, comprising:
Acquiring unit, the historical time intervals of the upload data for obtaining terminal device in set period of time;
Processing unit for optimizing to the historical time intervals, and determines the historical time intervals after optimizationThe first average value and first variance;And according to the first average value and first variance of the historical time intervals after the optimization,Determine the time interval threshold value of fault detection;
Start unit, for determine terminal device currently upload data time interval be greater than the fault detection whenBetween interval threshold when, carry out the fault detection of the terminal device.
Optionally, the processing unit is also used to:
First average value of the historical time intervals after the server calculation optimization, and based on the history after the optimizationFirst average value of time interval, the first variance of the historical time intervals after determining the optimization.
Optionally, the processing unit is specifically used for:
The maximum and minimum in the historical time intervals are deleted, and calculates the second flat of remaining historical time intervalsMean value and second variance;
According to the second average value and second variance of the remaining historical time intervals, between the deletion remaining historical timeException history time interval in, the historical time intervals after being optimized.
Optionally, the start unit is specifically used for:
By network adapter, into network, all-network equipment sends inspection instruction, if the communication of all-network equipment is justOften, it is determined that the network apparatus in networks does not break down, and all data communication services of data Layer are suitable in Xiang Suoshu networkOrchestration sends test instruction, if the non-returned data of data communication services adapter, it is determined that and the data link breaks down, ifThe data communication services adapter returned data, it is determined that the terminal device breaks down;
If the network device communications in the network are abnormal, it is determined that the network equipment to break down in the network.
Optionally, the start unit is specifically used for:
For any bar network link in network, using the terminal device of the bottom of the network link as starting point, toEach network equipment in the network link sends inspection instruction, until receiving feedback command;
The network equipment of the next stage of the corresponding network equipment of the feedback command is determined as to the network of failure to be confirmedEquipment;
If all nets that the network equipment for not receiving the next stage of the network equipment corresponding with the feedback command is connectedThe network equipment of the failure to be confirmed is then determined as the network equipment to break down by the feedback command of network equipment.
The embodiment of the present invention shows that server obtains in set period of time between the historical time of the upload data of terminal deviceEvery, the historical time intervals are optimized, and determine optimization after historical time intervals the first average value and firstVariance determines the time of fault detection according to the first average value and first variance of the historical time intervals after the optimizationInterval threshold, however, it is determined that the time interval that terminal device currently uploads data is greater than the time interval threshold value of the fault detection,Then carry out the fault detection of the terminal device.It is automatic to transport by the historical time intervals of the upload data by terminal deviceThe time interval threshold value for generating fault detection is calculated, and is more than the time in the time interval for determining that terminal device currently uploads dataThe process of automatic startup separator detection after interval threshold, may be implemented quick startup separator detection, improves fault detectionEfficiency.
Specific embodiment
To make the objectives, technical solutions, and advantages of the present invention clearer, below in conjunction with attached drawing to the present invention make intoIt is described in detail to one step, it is clear that described embodiments are only a part of the embodiments of the present invention, rather than whole implementationExample.Based on the embodiments of the present invention, obtained by those of ordinary skill in the art without making creative effortsAll other embodiment, shall fall within the protection scope of the present invention.
In embodiments of the present invention, server is O&M server, the i.e. server of field of traffic operation management.
Fig. 1 illustratively shows the process of a kind of starting method of fault detection, which can be by fault detectionStarter executes, which can be located in O&M server, can be the O&M server.
As shown in Figure 1, the specific steps of the process include:
Step 101, server obtains the historical time intervals of the upload data of terminal device in set period of time.
Step 102, the server optimizes the historical time intervals, and determines the historical time after optimizationFirst average value and first variance at interval.
Step 103, the server is according to the first average value and first variance of the historical time intervals after the optimization,Determine the time interval threshold value of fault detection;
Step 104, the server is if it is determined that the time interval that terminal device currently uploads data is examined greater than the failureThe time interval threshold value of survey, then carry out the fault detection of the terminal device.
In a step 101, since terminal device needs often to upload data to server, the available terminal of server is setThe standby time interval for uploading data judge the terminal device whether failure, therefore the available terminal device of server uploads numberAccording to time interval.
After the time interval for obtaining terminal device upload data, server is just it needs to be determined that the terminal device uploads numberAccording to time interval whether be greater than time interval threshold value.
Server can automatic maintenance terminal device threshold table and terminal device information table, terminal device and serverAlways linking status is maintained, using the adaptive operation production method of terminal device data acquiring frequency feature is based on, is arranged automaticallyTime interval threshold value.Specifically, server obtains the historical time intervals of the upload data of terminal device in set period of time.It shouldSet period of time can be empirically configured.Server is gone through according to the historical data in terminal device measurement period, extractionThe time interval that history data upload, it is assumed that collect N+1 data, calculate the time interval between data, generate data sequence, noteFor { Ti| i=1,2,3 ... N }, N is positive integer.
In a step 102, by step 101 obtain historical time intervals after, server to the historical time intervals intoRow optimization, and the first average value of the historical time intervals after calculation optimization.Specifically, in server deleting history time intervalMaximum and minimum, and the second average value and second variance of remaining historical time intervals are calculated, when according to remaining historyBetween the second average value for being spaced and second variance, delete the exception history time interval in remaining historical time intervals, complete pairThe optimization of historical time intervals.If Min-max is respectively T in the data sequence of above-mentioned historical time intervalsmin、Tmax, deleteAverage value is calculated after maximum and minimum, is denoted as TM.The following formula of calculation (1):
Wherein, TMFor the second average value of remaining historical time intervals, TiFor i-th of historical time intervals, TminFor historyMinimum in time interval, TmaxFor the maximum in historical time intervals.
Remove Tmin, TmaxAfterwards, the data sequence for reorganizing historical time intervals is { Ti| i=1,2,3 ... (N-2) }.The variance for calculating the data sequence of N-2 historical time intervals, is denoted as Tσ.Calculation formula is as follows:
Wherein, TσFor the second variance of remaining historical time intervals, TMFor the second average value of remaining historical time intervals,TiFor i-th of historical time intervals.
Calculate TσLater, according to the TσAnd TMDetermine data deviation, rejecting abnormalities data.Wherein k is coefficient, in programMiddle dynamic setting, to determine the ratio for rejecting data.Exception history time interval can be determined by formula (3).
|Ti-TM|≥k·Tσ…………………………(3)
Wherein, TσFor the second variance of remaining historical time intervals, TMFor the second average value of remaining historical time intervals,TiFor i-th of historical time intervals, k is coefficient, which is set by system dynamic.
First average value of the server based on the historical time intervals after optimization determines the historical time intervals after optimizingFirst variance.Last server determines that failure is examined according to the first average value and first variance of the historical time intervals after optimizationThe time interval threshold value of survey.
Specifically, assuming that the number for the historical time intervals deleted is m, the data sequence of historical time intervals is reorganizedIt is classified as { Ti| i=1,2,3 ... N-m-2 }, it is recalculated respectively according to formula (4) and formula (5) between the historical time after optimizingEvery the first average value and first variance.
Wherein, TM' for optimization after historical time intervals the first average value, TiFor i-th of historical time intervals.
Wherein, Tσ' for optimization after historical time intervals first variance, TM' it is the of the historical time intervals after optimizationOne average value, TiFor i-th of historical time intervals.
According to the Tσ' and TM' available fault detection time interval threshold value, specifically can be according to formula (6)To the time interval threshold value of the fault detection.
The formula (6) are as follows:
TG=Tm'+k'×Tσ'…………………………(6)
Wherein, TGFor the time interval threshold value of fault detection, Tσ' for optimization after historical time intervals first variance,TM' for the first average value of the historical time intervals after optimization, k' is coefficient, can be set according to data variance value dynamic.
Assuming that not uploading the time interval T of the terminal device of data currentlyd, work as TdWhen meeting formula (7), that is, determineWhen the time interval that terminal device currently uploads data is greater than the time interval threshold value of fault detection, the failure of terminal device is carried outDetection.
Td≥TM'+k'·Tσ'…………………………(7)
Wherein, TdThe time interval of data, T are currently uploaded for terminal deviceσ' it is the of the historical time intervals after optimizationOne variance, TM' for optimization after historical time intervals the first average value, k' is coefficient.
At step 104, server server carry out terminal device fault detection before, server also it needs to be determined thatThe detailed trouble information code of the terminal device whether active upload itself, if so, the terminal device itself can be determinedFailure no longer needs to the fault detection for carrying out terminal device.
If not receiving the detailed trouble information code of itself of terminal device active upload, server needs to carry out eventuallyThe fault detection of end equipment, specific:
Whether the server detection network equipment breaks down, and mainly by network adapter, into network, all-network is setPreparation send inspection to instruct, if the communication of all-network equipment is normal, it is determined that network apparatus in networks does not break down, otherwise, reallyDetermine the network equipment to break down in network.That is, server by utilizing network adapter, timing all-network device broadcastsInspection instruction is sent, the all-network equipment in network is detected.If the communication of all-network equipment is normal, it is determined that networkThe middle network equipment does not break down, otherwise, it determines the network equipment to break down in network.
Specifically, server, for any bar network link in network, the terminal device with the bottom of network link isStarting point, each network equipment into network link sends inspection instruction, until receiving feedback command.Server willThe network equipment of the next stage of the corresponding network equipment of feedback command is determined as the network equipment of failure to be confirmed.Server laterIf the feedback for the all-network equipment that the network equipment for not receiving the next stage of the network equipment corresponding with feedback command is connectedInstruction, then be determined as the network equipment to break down for the network equipment of failure to be confirmed.From the terminal device of bottom-layer network byLayer retrospect network state, diagnostic instruction is sent in a manner of poll, identification judgement is carried out to returning the result, traces back to always without reasonThe network equipment of barrier.
For example, as illustrated in fig. 2, it is assumed that network totally 5 layers of structure, it is assumed that network equipment C0 failure, under the network equipmentFor all-network equipment all in abnormal communication states, detection method is as follows:
First link: inspection sequence is E0, D0, C0, B0.Terminate after to normal network equipment B0.
Article 2 link: inspection sequence is E1, D0, C0, B0.Terminate after to normal network equipment B0.
Article 3 link: inspection sequence is E2, D1, C0, B0.Terminate after to normal network equipment B0.
Then other chain circuit detecting methods are same as above.
All communication abnormality network equipments under network equipment C0 reversely trace back to network equipment B0, and network equipment C0 is trueIt is set to the network link of failure to be confirmed.Each of the links testing result can navigate to network equipment C0 and break down, and meet allIt, i.e., can be with the net of failure to be confirmed after the mutual verifying of the normal network equipment of polyisocyanate after the breakdown judge state consistency of the network equipmentNetwork equipment is determined as the network equipment to break down.If the network equipment quantity under failed network device is greater than 100, to improveSpeed is traversed, then only judges the interlocking proofing state of 100 network equipments, shields the fault message of other network equipments.
By the above method reversely layer-by-layer multichannel diagnosis, parallel multi-thread various dimensions are counter to be deduced, with network equipment eventBarrier positioning is mutually authenticated, and shields the network equipment lower layer network equipment failure letter for having obtained verifying.
If network equipment failure reparation is completed, or is broken down without the network equipment, still can not receive on terminal deviceData are passed, then the source of failure may be data link failure or terminal equipment failure.
Server continues to determine whether data link breaks down, specifically, server into network data Layer it is allData communication services adapter sends test instruction, if the non-returned data of data communication services adapter, it is determined that data linkIt breaks down.Server is after judging no network link failure, the communication test thread of log-on data link, carries out data linkTroubleshooting.Test instruction is issued by server, sequentially returns to return data in each service adapter program of data plane.Such asFruit is abnormal, and the abnormal mark of modification data link table identifies the data communication services adapter fails of this data link, reportedBarrier.By the diagnostic method, failure can be accurately positioned to data communication services adapter, determine that data link breaks down.
If above-mentioned data link reparation is completed or no data link layer breaks down, and still can not be received terminal and be setIt is standby to upload data, then show the terminal device itself fail, can determine that the terminal device breaks down, notifies work peopleMember overhauls the terminal device.
Embodiment in order to preferably explain the present invention will describe the stream of fault detection by specific implement scene belowJourney.
In embodiments of the present invention, server is O&M server, the i.e. server of field of traffic operation management.
As shown in figure 3, the specific steps of the process comprises:
Step 301, O&M server obtains the time interval that terminal device uploads data.
Step 302, whether the time interval that O&M server judges that the terminal device obtained uploads data is more than between the timeEvery threshold value, if so, step 303 is transferred to, if it is not, being then transferred to step 301.
Step 303, whether O&M server judges terminal device active reporting fault code, if so, being transferred to step308, if it is not, being then transferred to step 304.
Step 304, the O&M server starting network equipment diagnoses thread.
Step 305, O&M server judge the network equipment whether failure, if so, step 309 is transferred to, if it is not, being then transferred toStep 306.
Step 306, O&M server log-on data Diagnosis of Links thread.
Step 307, O&M server judge data link whether failure, if so, step 310 is transferred to, if it is not, being then transferred toStep 308.
Step 308, O&M server determines that the terminal device breaks down.
Step 309, network equipment failure is handled.
Step 310, data link troubleshooting.
Step 311, terminal equipment failure is handled.
The specific embodiment of above-mentioned steps describes in the above-described embodiments, repeats no more.
Above-described embodiment shows that server obtains in set period of time between the historical time of the upload data of terminal deviceEvery, the historical time intervals are optimized, and determine optimization after historical time intervals the first average value and firstVariance determines the time of fault detection according to the first average value and first variance of the historical time intervals after the optimizationInterval threshold, however, it is determined that the time interval that terminal device currently uploads data is greater than the time interval threshold value of the fault detection,Then carry out the fault detection of the terminal device.It is automatic to transport by the historical time intervals of the upload data by terminal deviceThe time interval threshold value for generating fault detection is calculated, and is more than the time in the time interval for determining that terminal device currently uploads dataThe process of automatic startup separator detection after interval threshold, may be implemented quick startup separator detection, improves fault detectionEfficiency
The embodiment of the present invention is that the upload frequencies based on device history data automatically generate time interval data sequence, is rejectedAfter abnormal data, by statistical average method, the data uplink time separation standard value of equipment is obtained, on the basis of weighted varianceOn, adaptive operation generation time interval threshold is more than automatic startup separator diagnostic process after threshold value.By opening up lattice chainRoad monitors thread and data link monitors thread, carries out precise positioning to intelligent transportation system total failure state.It can differentiateFault message includes: terminal equipment failure (hardware), network equipment failure (hardware), communication service adapter (software) failure.Wherein terminal device can navigate to certain equipment;The network equipment can navigate to certain equipment in network structure;Communication service journeySequence can navigate to some routine interface in software architecture.According to network link structure and number of terminals, setting various dimensions network eventBarrier detection thread.According to detection return information, carry out that failure is counter deduces positioning.It successively detects, navigates to since network bottom layerTerminal equipment failure information source, in conjunction with faulty equipment address information has been reported, carries out fault message interlocking if there is multiple impaired report informationsVerifying.The accurate positioning of intelligent Transportation Terminal equipment can be realized by this method.
Based on the same technical idea, Fig. 4 illustratively shows a kind of fault detection provided in an embodiment of the present inventionStarter, the device can execute the process of the starting of fault detection, which can be located in O&M server, can also be withIt is the O&M server.
As described in Figure 4, which specifically includes:
Acquiring unit 401, the historical time intervals of the upload data for obtaining terminal device in set period of time;
Processing unit 402, for being optimized to the historical time intervals, and determine optimization after historical time betweenEvery the first average value and first variance;And according to the first average value and first party of the historical time intervals after the optimizationDifference determines the time interval threshold value of fault detection;
Start unit 403, for determine terminal device currently upload data time interval be greater than the fault detectionTime interval threshold value when, carry out the fault detection of the terminal device.
Optionally, the processing unit 402 is also used to:
First average value of the historical time intervals after the server calculation optimization, and based on the history after the optimizationFirst average value of time interval, the first variance of the historical time intervals after determining the optimization.
Optionally, the processing unit 402 is specifically used for:
The maximum and minimum in the historical time intervals are deleted, and calculates the second flat of remaining historical time intervalsMean value and second variance;
According to the second average value and second variance of the remaining historical time intervals, between the deletion remaining historical timeException history time interval in, the historical time intervals after being optimized.
Optionally, the start unit 403 is specifically used for:
By network adapter, into network, all-network equipment sends inspection instruction, if the communication of all-network equipment is justOften, it is determined that the network apparatus in networks does not break down, and all data communication services of data Layer are suitable in Xiang Suoshu networkOrchestration sends test instruction, if the non-returned data of data communication services adapter, it is determined that and the data link breaks down, ifThe data communication services adapter returned data, it is determined that the terminal device breaks down;
If the network device communications in the network are abnormal, it is determined that the network equipment to break down in the network.
Optionally, the start unit 403 is specifically used for:
For any bar network link in network, using the terminal device of the bottom of the network link as starting point, toEach network equipment in the network link sends inspection instruction, until receiving feedback command;
The network equipment of the next stage of the corresponding network equipment of the feedback command is determined as to the network of failure to be confirmedEquipment;
If all nets that the network equipment for not receiving the next stage of the network equipment corresponding with the feedback command is connectedThe network equipment of the failure to be confirmed is then determined as the network equipment to break down by the feedback command of network equipment.
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program productFigure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructionsThe combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programsInstruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produceA raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for realThe device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spyDetermine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram orThe function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that countingSeries of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer orThe instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram oneThe step of function of being specified in a box or multiple boxes.
Although preferred embodiments of the present invention have been described, it is created once a person skilled in the art knows basicProperty concept, then additional changes and modifications may be made to these embodiments.So it includes excellent that the following claims are intended to be interpreted asIt selects embodiment and falls into all change and modification of the scope of the invention.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the artMind and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologiesWithin, then the present invention is also intended to include these modifications and variations.