A kind of data processing method and device
Technical field
The present invention relates to technical field of electric automation, more particularly to a kind of data processing method and device.
Background technology
To ensure the communication quality between electric power dispatching systems at different levels and each plant stand in power system, generally adopt now
Communicated with binary channels or multichannel redundant configuration mode standby each other.Wherein, it is active and standby logical under binary-channel redundancy configuration
Road is simultaneously online to carry out real-time Communication for Power (i.e. stand-by heat each other), and main website uploads data using main channel, and by under passage on duty
Hair is ordered remote measurement, remote control etc..When main channel is broken down or be abnormal, system can automatically switch to alternate channel, to protect
Demonstrate,prove communication quality.
But in actual use, primary channel may use different types of passage and different stipulations, such as main channel
Using power dispatch data network, alternate channel uses special line passage or traditional analog passage.According to spot dispatch automated system
Practical operation situation, when primary channel uses different types of passage, generally exist primary channel transmission data it is different
Problem, the phenomenon that can cause some data exceptions during the switching of above-mentioned passage is being performed, transmitted so as to reduce during power scheduling
The reliability of data, it reduce further communication system of power grids quality.
Based on this, need badly it is a kind of find to transmit in primary channel in time data it is abnormal so as to improve power scheduling during
Transmit the reliability of data, the method for further improving communication system of power grids quality.
The content of the invention
In view of this, the invention provides a kind of data processing method and device, found in time in primary channel with reaching
The exception of data is transmitted, and then improves the reliability of transmission data during power scheduling, further improves communication system of power grids quality
Purpose.
In order to solve the above technical problems, the present invention provides a kind of data processing method, including:
Determine this enter compare passage comparison queue new data time point, and with the new data enter when
Between start time point of the point as time window;
Wherein, it is described comparison passage be main channel or any one for passage, the time window is the initial time
A preset time period before point;
Check that the comparison passage of the corresponding time window and remaining participation are compared in the comparison queue of passage
The state of total data;
If normal, operation is marked to the new data.
Preferably, the comparison passage for checking the corresponding time window and remaining participation compare the ratio of passage
After the state of the total data in queue, in addition to:
If data to be checked, then it is abnormal data to mark the data to be checked;
Delete the legacy data compared in queue of the comparison passage;
Judge whether there is new data in the comparison passage, this is operated if so, then performing that the new data is marked
One step;If nothing, enter data processing next time;
Wherein, the legacy data includes:The normal data and abnormal data marked during preceding execution flag operation.
Preferably, operation the new data is marked, including:
Optional one it is default judge region, judge with it is selected preset judge region it is corresponding it is described participate in comparing in passage whether
There are data;Wherein, the default judgement region includes:The time zone of a late time window on the basis of the start time point
Domain, the time zone of an early time window on the basis of the time window, and one time window of the morning is previous
Individual time location;
When selected preset judges there is data, and the new data and institute in the participation comparison passage corresponding to region
State it is default judge the data for participating in comparing in passage corresponding to region preset matched in the range of error value when, then mark
The new data is normal data, and enters data processing next time;Otherwise, it is optional one pre- in remaining default judgement region
If judging region, return to perform and judge to judge that region is corresponding with selected default and described participate in comparing in passage whether there are data;
When it is described it is selected default judge corresponding to region it is described participate in comparing have data in passage, and selected preset is sentenced
Disconnected region for last it is default judge region when, the new data default judges the corresponding participation in region with described
Whether the data compared in passage match in the range of default error value, if it is, it is normal number to mark the new data
According to, and enter data processing next time;If it is not, then it is abnormal data to mark the new data, and enter next time at data
Reason;
Participate in there is no data in comparison passage when described corresponding to the default judgement region, then mark the new data
For data to be checked, and enter data processing next time.
Preferably, the scope of the preset time period is 30s~80s.
Preferably, mark the new data be abnormal data after, in addition to:
Generate the warning message for the data that note abnormalities.
Preferably, in addition to:
When being introduced into new data beyond comparing the comparison queue in passage described in a time window, then when will be described
Between all data markers for comparing corresponding to window in the comparison queue of this passage be abnormal data.
A kind of data processing equipment, including:
Determining unit, for determining this time point for entering the new data for the comparison queue for comparing passage;
Unit is checked, the comparison passage and remaining participation for checking the corresponding time window compare passage
Compare the state of the total data in queue;
Indexing unit, for operation to be marked to the new data.
Preferably, the indexing unit includes:
First judge module, preset for optional one and judge region, judge to judge that region is corresponding described with selected preset
Participate in comparing in passage whether there are data;Wherein, the default judgement region includes:The evening one on the basis of the time window
The time zone of time window, the time zone of an early time window on the basis of the time window, and the morning one
The previous time location of individual time window;
First mark module, for judging there is number in the participation comparison passage corresponding to region when selected preset
According to, and the new data default judges that the corresponding participation in region compares data in passage in default error value with described
In the range of when matching, then it is normal data to mark the new data, and enters data processing next time;Otherwise based on remaining pre-
If judging that region returns performs first judge module;
Second mark module, for judging there is number in the participation comparison passage corresponding to region when selected preset
According to, and it is described it is selected default judge that region is preset for last when judging region, the new data is sentenced with described preset
Whether the data for participating in comparing in passage match in the range of default error value corresponding to disconnected region, if it is, mark
It is normal data to remember the new data, and enters data processing next time;If it is not, then it is abnormal number to mark the new data
According to, and enter data processing next time;
3rd mark module, for participating in not counting in comparison passage when described corresponding to the default judgement region
According to it is data to be checked then to mark the new data, and enters data processing next time.
Preferably, the device also includes:
Alarm unit, for sending alarm after the indexing unit marks abnormal data.
Preferably, the alarm unit is buzzer and/or light emitting diode.
Prior art is compared, the present invention has the advantages that:
A kind of data processing method and device provided by the present invention, this method compare passage by determining that this enters
The time point of the new data of queue is compared, and using the time point as the start time point of time window, wherein, described compare is led to
Road be main channel or any one for passage, the time window be the start time point before a preset time period;Connect
, check that the comparison passage of the corresponding time window and remaining participation compare the whole numbers compared in queue of passage
According to state, if the total data is normal data, operation is marked to the new data.The present invention passes through above-mentioned side
Method to the new data be marked operation with distinguish the state of the data in passage realize in time find primary channel in pass
The abnormal side that the reliabilities of data is transmitted during power scheduling so as to improve, further improves communication system of power grids quality of transmission of data
The purpose of method.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
There is the required accompanying drawing used in technology description to be briefly described, it should be apparent that, drawings in the following description are only this
The embodiment of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can also basis
The accompanying drawing of offer obtains other accompanying drawings.
Fig. 1 is the flow chart for the data processing method that the embodiment of the present invention one provides;
Fig. 2 is the flow chart for the data processing method that the embodiment of the present invention two provides;
Fig. 3 is the flow chart for the implementation process for new data being marked operation that the embodiment of the present invention three provides;
Fig. 4 is the flow chart for new data being marked operation based on Fig. 3 that the embodiment of the present invention four provides;
Fig. 5 is the comparison schematic diagram provided in an embodiment of the present invention based on time window.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, rather than whole embodiments.It is based on
Embodiment in the present invention, those of ordinary skill in the art are obtained every other under the premise of creative work is not made
Embodiment, belong to the scope of protection of the invention.
The core of the present invention is to provide a kind of data processing method and device, by the way that behaviour is marked to the data in passage
Make, with reach in time find primary channel in transmit data exception, and then improve power scheduling during transmit data can
By the purpose of property, further raising communication system of power grids quality.
In order that those skilled in the art more fully understand the present invention program, with reference to the accompanying drawings and detailed description
The present invention is described in further detail.
Embodiment one
Refer to Fig. 1, Fig. 1 is the flow chart for the data processing method that the embodiment of the present invention one provides, this method include with
Lower step:
Step 100, this time point for entering the new data for the comparison queue for comparing passage is determined, and with the new data
Start time point of the time point of entrance as time window;
Wherein, the passage that compares refers to the passage for currently having that data change in new data entrance or passage, the passage
Do not limit, be both probably main channel, it is also possible to any one for passage, the time window be the start time point it
A preceding preset time period;
Herein it should be noted that the present embodiment provide data processing method mainly to telemetry intelligence (TELINT) data at
Reason, the explanation is applied to other embodiments of the present invention.
During the channel transmission data of reality, the data transfer of interchannel can not possibly accomplish complete synchronization, this hair
It is bright by setting the time window, i.e., the maximum time deviation allowed when data are asynchronous, avoid what ought be compared
Because propagation delay time has influence on the accuracy of data processed result when the running situation of interchannel is slightly different, this method ensure that
Result dependable with function.Certainly, in order to ensure the order of interchannel data transfer and reliability, this place
Necessarily within the specific limits, this scope is the preset time period to the propagation delay time said, the preset time period compares
Practical scope is 30s~80s, it is preferable that the embodiment of the present invention is using 60s as the preset time period, the other realities of the present invention
It is also such to apply example.
Step 101, the comparison passage for checking the corresponding time window and remaining comparison for participating in comparing passage
The state of total data in queue;
Wherein, the data include:Normal data, abnormal data or data to be checked, when the data are normal data,
Its state is normal, and when the data are abnormal data, its state is abnormal, when the data are data to be checked, its state
Indefinite, it may also be normally abnormal that may be.
If step 102, normal, operation is marked to the new data.
In a step 102, in the range of the time window, if described compare passage and remaining participation comparison passage
The total data compared in queue is normal condition, based on this, new data is marked operation, the marking operation is specific
Implementation procedure is compared, so as to confirm the shape of new data to compare by the way that new data is compared into the data in passage with participation
State is simultaneously marked accordingly, understands to transmit data by the mark in current comparison passage with the presence or absence of exception, that is,
Say, whether current channel meets the condition switched over other passages.
A kind of data processing method that the above embodiment of the present invention one is provided, by the way that behaviour is marked to the new data
Make to realize the exception for finding to transmit data in primary channel in time to distinguish the state of data, so as to improve power scheduling process
The reliability of middle transmission data, further improve the purpose of the method for communication system of power grids quality.
Embodiment two
Based on the method disclosed in above-described embodiment one, it performs step 101, checks the described of the corresponding time window
After the state for comparing the total data in queue for comparing passage and remaining participation comparison passage, in addition to as shown in Figure 2
Following steps:
Step 200, if data to be checked, then it is abnormal data to mark the data to be checked;
Step 201, delete the legacy data compared in queue for comparing passage;
In step 201, the legacy data compared in queue of the comparison passage why is deleted, that is, is carrying out new one
Queue is emptied before wheel comparing, is to compare effect to not influence a new round.
Step 202, judge whether there is new data in the comparison passage, rower is entered to the new data if so, then performing
The step for note operation;If nothing, enter data processing next time;
Explanation is needed exist for, " if nothing " refers to working as the situation that telemetry remains unchanged for a long period of time in passage herein, though this
It is so a kind of rare situation, but including also being included for the preciseness of ensuring method.
Wherein, the legacy data includes:The normal data and abnormal data marked during preceding execution flag operation.
The present embodiment two with the addition of when the corresponding time on the basis of the data processing method disclosed in embodiment one
The state that the comparison passage of window and remaining participation compare the total data in the comparison queue of passage is shape to be checked
Processing step during state, and what the data for occurring state to be checked in practical application compares labeling process were possible to, with this
The data processing method that the present embodiment two is provided compares embodiment one and copes with the more data cases of processing, also has more
Practicality.
Embodiment three
Based on the method disclosed in above-described embodiment one and embodiment two, it performs in step 102, the new data is entered
The detailed process of line flag operation is as shown in figure 3, specifically comprise the following steps:
Step 300, optional one it is default judges region, judge with it is selected preset judge region it is corresponding it is described participate in comparing it is logical
Whether there are data in road;
Wherein, the default judgement region includes:The time of a late time window on the basis of the start time point
Region, the time zone of an early time window on the basis of the time window, and before one time window of the morning
One time location;
Step 301, when it is described it is selected default judge corresponding to region it is described participate in comparing have data in passage, and it is described newly
Data default judge that the corresponding participation in region compares data in passage in the range of default error value and matched with described
When, then it is normal data to mark the new data, and enters data processing next time;Otherwise, in remaining default judgement region
Interior optional one it is default judge region, return perform judge with it is selected preset judge region it is corresponding it is described participate in comparing in passage be
It is no to have data;
Wherein, the default error value can be by those skilled in the art's sets itself, such as fixed according to the actual requirements
The justice error value is 0.1%, represents that two values all judge that two values match in 0.1% error range, certainly, this
Only be merely citing, it is just as stated above can be by those skilled in the art's sets itself according to the actual requirements, this has no effect on
The realization of the present invention;
Need exist for illustrating, in step 301, the new data and the default judgement region are corresponding described
When the data that participation compares in passage match in the range of default error value, wherein, it is described to participate in comparing the data in passage
Refer to that the participation compares all data in passage, i.e., when the new data default judges the corresponding ginseng in region with described
When being matched with comparing all data in passage in the range of default error value, it is normal data just to mark the new data,
And enter data processing next time, equally, in other embodiments of the present invention carry out with new data judging whether the participation ratio matched
Refer to the data in the passage and participation compares all data in passage.
Step 302, when described selected default judge described corresponding to region to participate in having data, and the choosing in comparison passage
Fixed default to judge that region is preset for last when judging region, the new data default judges that region is corresponding with described
Whether the data for participating in comparing in passage match in the range of default error value, if it is, marking the new data
For normal data, and enter data processing next time;If it is not, then it is abnormal data to mark the new data, and enter next
Secondary data processing;
Wherein, when it is described it is selected default judge region preset for last judge region when, i.e., except when preceding presets
Judge that all default data for judging regions beyond region have been involved in judging whether the execution step that matches with new data.
Step 303, when it is described it is default judgement region corresponding to it is described participate in compare passage in there is no data, then mark institute
It is data to be checked to state new data, and enters data processing next time.
Why the step of marking the new data to be data to be checked be present above, allow in practical application
In, there is no data in the participation comparison passage corresponding to the default judgement region be present, run into this so as to work as
There can be corresponding processing method during situation, it is clear that the embodiment of the present invention three has significant preciseness.
The present embodiment three, which provides, performs step 102, the new data is marked the detailed process of operation, by right
The mark that the new data carries out normal data, abnormal data or data to be checked obtains type to distinguish data in queue, so as to
Find the exception of transmission data in time, referred to herein as the exceptions of transmission data refer to when the mark new data is abnormal number
According to when think that the new data in transmitting procedure is abnormal;In the case where transmitting data in understanding passage and whether having exception,
Invention significantly improves the availability of channel data so that the hot stand-by duty of alternate channel indeed is in ready-to-use shape
State, so as to improve the reliability that data are transmitted during power scheduling, further improve the purpose of the method for communication system of power grids quality.
Example IV
Based on the method disclosed in the various embodiments described above particularly embodiment three, it is performed in step 102, to the new number
Detailed process is operated as shown in figure 4, specifically comprising the following steps according to being marked:
Step 400, judge that the participation is compared in passage corresponding to a late time window compared with the time window
Whether data are had, if so, then enter step 401, if it is not, into step 402;
Step 401, compare into the new data in the comparison queue of the comparison passage and a late time window
Whether the corresponding all data for participating in comparing in passage match in the range of default error value, if matching, is marked
The new data is normal data, and enters data processing next time, if mismatching, into step 402;
Step 402, judge that the participation is compared in passage corresponding to an early time window compared with the time window
Whether data are had, if so, then enter step 403, if it is not, into step 404;
Step 403, compare into the new data in the comparison queue of the comparison passage and an early time window
Whether the corresponding all data for participating in comparing in passage match in the range of default error value, if matching, is marked
The new data is normal data, and enters data processing next time, if mismatching, into step 404;
Step 404, judge that the participation is compared outside passage corresponding to an early time window compared with the time window
Whether data are had, if so, then enter step 405, if it is not, it is status data to be checked to mark the new data, and
Into data processing next time;
Step 405, compare into the new data in the comparison queue of the comparison passage and an early time window
Whether corresponding first data for participating in comparing outside passage match in the range of default error value;
If matching, it is normal data to mark the new data, and enters data processing next time;
If mismatching, it is abnormal data to mark the new data, and enters data processing next time.
The detailed process of operation is marked to the new data for above example four and other embodiment, ties here
Close Fig. 5 and provide an example, wherein, Fig. 5 concrete meaning is:Following data and curves represent that new data X leads in described compare
In road A, following data and curves represent that any one for participating in comparing in passage participates in comparing passage B, and exist with
The new data X enters the time window defined as start time point at the time point of the comparison queue tail of the queue of the comparison passage
Mouthful, wherein the time zone of a late time window on the basis of the start time point is defined as very first time window 51,
The time zone of an early time window on the basis of the start time point is defined as the second time window 52, also, it is right
Should there are data Y and data Z in the participation comparison passage B of the second time window 52 and be matched with data X, remaining time window
Participate in comparing in passage B there is no data corresponding to mouthful;
With reference to Fig. 4 and Fig. 5, new data X is marked the detailed process of operation includes:
The judgement participation corresponding with very first time window 51, which is compared in passage B, does not have data;
Judge to compare with the 52 corresponding participation of the second time window and there are data in passage B, i.e. data Y and data Z;
It is respectively compared the new data X participations corresponding with the second time window 52 and compares data Y and data in passage
Z, whether matched in the range of default error value, result is to match, then it is normal data to mark the new data, and is entered
Data processing next time.
Certainly, only it is citing herein, for convenience skilled artisan understands that technical scheme, not office
The content being limited in above-mentioned example.
The embodiment of the present invention four is open to performing step 102 in embodiment three, and operation is marked to the new data
On the basis of detailed process, further disclose such as the method for above-mentioned content, need exist for special instruction, in the present embodiment
Involved execution sequence of steps is only intended merely to those skilled in the art and technology provided by the present invention is more clearly understood
Scheme and illustrated example, in fact and are not present obvious sequencing, as long as the substance in above-mentioned execution step can be realized
The order of content is all desirable, has no effect on the realization of technical solution of the present invention, and this is also method institute disclosed in embodiment three
Embody and require;The present embodiment three plays a part of in data processing method provided by the invention such as embodiment three, here
Repeat no more.
Need exist for illustrating, in the various embodiments described above, it performs step, and it is abnormal number to mark the new data
According to afterwards, in addition to:
Generate the warning message for the data that note abnormalities.
Wherein, warning message comprises at least:Transmission channel residing for the abnormal data.
(realize from the angle of the purpose of the invention to be realized and find to transmit the different of data in primary channel in time
The reliabilities of data is often transmitted during power scheduling so as to improve, further improves communication system of power grids quality), it is described new marking
After data are abnormal data, include generating the warning message of data of noting abnormalities, to pass in this reminding technology personnel channel
There is exception in transmission of data, is then handled accordingly by technical staff, it is clear that this is more beneficial for realizing the purpose of the present invention.
Also need to illustrate, in the various embodiments described above, it is determined that this enters the comparison queue of comparison passage
It is further comprising the steps of before the time point of new data, or during data processing is carried out:
When being introduced into new data beyond comparing the comparison queue in passage described in a time window, then when will be described
Between all data markers for comparing corresponding to window in the comparison queue of this passage be abnormal data.
It is because just described above beyond described in one there is many indefinite implementations in the data transmission procedure of reality
The situation that the comparison queue in passage is introduced into new data is compared described in time window, is directed in data processing method of the present invention
The reply step of the above situation so that the present invention has more practicality.
Embodiment five
Based on the data processing method disclosed in the various embodiments described above of the present invention, the embodiment of the present invention five also corresponds to above-mentioned side
Method provides a kind of data processing equipment, including:
Determining unit, for determining this time point for entering the new data for the comparison queue for comparing passage;
Unit is checked, the comparison passage and remaining participation for checking the corresponding time window compare passage
Compare the state of the total data in queue;
Indexing unit, for operation to be marked to the new data.
Wherein, the indexing unit specifically includes:
First judge module, preset for optional one and judge region, judge to judge that region is corresponding described with selected preset
Participate in comparing in passage whether there are data;Wherein, the default judgement region includes:The evening one on the basis of the time window
The time zone of time window, the time zone of an early time window on the basis of the time window, and the morning one
The previous time location of individual time window;
First mark module, for judging there is number in the participation comparison passage corresponding to region when selected preset
According to, and the new data default judges that the corresponding participation in region compares data in passage in default error value with described
In the range of when matching, then it is normal data to mark the new data, and enters data processing next time;Otherwise based on remaining pre-
If judging that region returns performs first judge module;
Second mark module, for judging there is number in the participation comparison passage corresponding to region when selected preset
According to, and it is described it is selected default judge that region is preset for last when judging region, the new data is sentenced with described preset
Whether the data for participating in comparing in passage match in the range of default error value corresponding to disconnected region, if it is, mark
It is normal data to remember the new data, and enters data processing next time;If it is not, then it is abnormal number to mark the new data
According to, and enter data processing next time;
3rd mark module, for participating in not counting in comparison passage when described corresponding to the default judgement region
According to it is data to be checked then to mark the new data, and enters data processing next time.
Data processing method embodiment before the data processing equipment that the present embodiment provides corresponds to, at the data
Reason device by the new data be marked operation with distinguish the state of data realize in time find primary channel in pass
The exception of transmission of data, so as to improve the reliability that data are transmitted during power scheduling, further improve communication system of power grids quality
The purpose of method.
Embodiment six
Based on above-described embodiment five and disclosed data processing equipment, the device also includes:
Alarm unit, for sending alarm after the indexing unit marks abnormal data;
Wherein, the alarm unit is buzzer and/or light emitting diode.
Alarm unit is only merely citing using buzzer and/or light emitting diode in the embodiment of the present invention six, as long as energy
Enough realizations send alarm when occurring abnormal to transmission data and can used, and have no effect on the realization of the present invention.
Explanation is needed exist for, it is public that the data processing method disclosed in embodiment one to five is applied to embodiment five to six
The data processing equipment opened.
Data processing method and device provided by the present invention are described in detail above.It is used herein specifically
Individual example is set forth to the principle and embodiment of the present invention, and the explanation of above example is only intended to help and understands the present invention
Method and its core concept.It should be pointed out that for those skilled in the art, original of the invention is not being departed from
On the premise of reason, some improvement and modification can also be carried out to the present invention, these are improved and modification also falls into right of the present invention and wanted
In the protection domain asked.