Summary of the invention
The object of the invention is to propose a kind of method of multiwindow frame synchronous flicker, reduce the data interaction between processor node and synchronization server, the practicality of requirement, raising system reliability and the raising system of reduction to network.
A kind of multi-window-frame synchronous-twinkling method, comprises step:
Preset frame displaying time length and frame and hide time span;
The system time of synchronous each processor node;
Obtain the current system time of described each processor node;
Hide time span according to described current system time, described frame displaying time length and described frame, judge whether the window border that each processor node is corresponding showed in the described current system time; If so, show the window border that described each processor node is corresponding and return described in obtain the step of system time; If not, hide the window border that described each processor node is corresponding and return described in obtain the step of system time.
Time span and the hiding time span of frame that the present invention shows by set in advance frame in each processor node; By the system time of synchronous each processor node of synchronization server, time span and the hiding time span judgement of frame that each processor node shows according to current system time, the frame that sets in advance are display bezel or hiding frame; In the present invention program, each processor node does not interfere with each other, and compared with traditional scheme, has improved practicality and the reliability of system, and the interactive quantity of data is little in the present invention, less demanding to network.
The present invention also aims to propose a kind of device of multiwindow frame synchronous flicker, reduce the data interaction between processor node and synchronization server, the practicality of requirement, raising system reliability and the raising system of reduction to network.
A kind of multiwindow frame synchronous flashing device, comprising:
Initialization unit, hides time span for presetting frame displaying time length and frame;
Lock unit, for the system time of synchronous each processor node;
Acquiring unit, the current system time of obtaining described processor node;
Judging unit, for hiding time span according to described current system time, described frame displaying time length and described frame, judges whether the window border that each processor node is corresponding showed in the described current system time; If so, notify display unit display bezel and notify described acquiring unit to continue to obtain system time; If not, notify hidden unit hide frame and notify described acquiring unit to continue to obtain system time;
Described display unit, for the frame that shows that described processor node is corresponding;
Described hidden unit, for hiding frame corresponding to described processor node.
The present invention sets in advance by initialization unit time span and the hiding time span of frame that frame shows; By the system time of synchronous each processor node of lock unit, time span and the hiding time span judgement of frame that judging unit shows according to current system time, the frame that sets in advance are display bezel or hiding frame; Show if need, display unit display bezel, hides if need, and hidden unit is hidden frame; In the present invention program, each processor node does not interfere with each other, and compared with traditional scheme, has improved practicality and the reliability of system, and the interactive quantity of data is little in the present invention, less demanding to network.
Embodiment
For ease of understanding the present invention, set forth below in conjunction with accompanying drawing.
Paper method of the present invention, please refer to Fig. 1, and a kind of multi-window-frame synchronous-twinkling method, comprises step:
101, initialization;
Preset each window border displaying time length and frame and hide time span.
102, the synchro system time;
The system time of synchronous each processor node; Concrete, processor node can be computing machine.
103, obtain the current system time;
Obtain the current system time of each processor node.
104, judge whether display bezel;
Hide time span according to the current system time of each processor node, frame displaying time length and frame, judge whether the window border that each processor node is corresponding showed in the current system time; If so, carry out step 105; If not, carry out step 106.
105, display bezel;
Show the window border that each processor node is corresponding and return to above-mentioned steps 102.
106, hide frame.
Hide the window border that each processor node is corresponding and return to above-mentioned steps 102.
Time span and the hiding time span of frame that the present invention shows by set in advance frame in each processor node; By the system time of synchronous each processor node of synchronization server, time span and the hiding time span judgement of frame that each processor node shows according to current system time, the frame that sets in advance are display bezel or hiding frame; In the present invention program, each processor node does not interfere with each other, and compared with traditional scheme, has improved practicality and the reliability of system, and the interactive quantity of data is little in the present invention, less demanding to network.
As one preferred embodiment, above-mentioned steps 104 is specially:
Show hiding transformation period according to frame displaying time length and the hiding time span calculating of frame frame; One show equal hiding transformation period frame displaying time length and frame hide time span with;
The system time of each processor node shows and obtains remainder hiding transformation period divided by frame;
Remainder and frame are shown to hiding contrast transformation period, in the time of the current system time, show if remainder, in frame displaying time length, judges the frame that each processor node is corresponding; If remainder, in frame is hidden time span, is hidden frame corresponding to each processor node in the time of system time.
Preferably, can be according to different application scenarioss or user's request, the hiding time span of the displaying time length of window border and window border is arranged to the same length, or, the hiding time span of the displaying time Length Ratio window border of window border is long, or, the hiding time span section of the displaying time Length Ratio window border of window border.
Concrete, in order to reach better flicker effect, the hiding time span of the displaying time length of window border and window border can be arranged to the same length time, please refer to Fig. 4, if one shows that hiding the change-over period is T, represent hide window frame, 1 expression display window frame with 0; The displaying time length of window border and the hiding time span of window border are all T/2 as shown in Figure 4, the current system time of the processor node now obtaining is 5T/4,5T/4 is obtained to remainder T/4 divided by T, comparison diagram 4 is known, remainder T/4 is in window border is hidden time span, so in the time of current system time 5T/4, hide window frame.
In the time that the hiding time span length of displaying time Length Ratio window border of window border is set, please refer to Fig. 5, establish one and show that hiding the change-over period is T, represent hide window frame, 1 expression display window frame with 0; The displaying time length of window border is 3T/4 as shown in Figure 5, the hiding time span of window border is T/4, the current system time of the processor node now obtaining is 5T/2,5T/2 is obtained to remainder T/2 divided by T, comparison diagram 5 is known, remainder T/2 hides in time span in window border, so in the time of current system time 5T/2, display window frame.
When arrange window border displaying time Length Ratio window border hiding time span in short-term, similar with Fig. 4 and Fig. 5 embodiment, repeat no more herein.
Synchronous in order to control flexibly frame flicker, can do further improvement to above embodiment:
Before the step of the system time of synchronous each processor node, comprise step: the standby condition that triggers processor node and enter frame flicker;
After the step that shows the frame that each processor node is corresponding, comprise step: trigger processor node and finish frame flicker;
Or, after the step of the frame that hiding each processor node is corresponding, comprise step: triggering processor node finishes frame and hides.
Preferably, the internal trigger that above-mentioned triggering is carried out for receiving outer triggering signal or the satisfied trigger condition setting in advance.
Because the crystal oscillator of each processor node is not quite similar, when after time synchronized a period of time, again may generation time error, this just needs the system time of each processor node is carried out synchronously repeatedly, based on this object, above-described embodiment is done to further improvement:
Set in advance the working time of synchronous each processor node system time operation; If arrive working time, carry out the step of the system time of synchronous each processor node.
For the better variation of call user's attention window, can, in the time that window border glimmers, send phonic warning simultaneously.
Then introduce device of the present invention, please refer to Fig. 2, a kind of multiwindow frame synchronous flashing device, comprising:
Initialization unit T1, hides time span for presetting frame displaying time length and frame;
Lock unit T2, for the system time of synchronous each processor node;
Acquiring unit T3, the current system time of obtaining processor node;
Judging unit T4, for hiding time span according to current system time, frame displaying time length and frame, judges whether the window border that each processor node is corresponding showed in the current system time; If so, notify display unit T5 display bezel and notify acquiring unit T3 to continue to obtain system time; If not, notify hidden unit T6 hide frame and notify acquiring unit T3 to continue to obtain system time;
Display unit T5, for frame corresponding to video-stream processor node;
Hidden unit T6, for hiding frame corresponding to processor node.
The present invention sets in advance by initialization unit time span and the hiding time span of frame that frame shows; By the system time of synchronous each processor node of lock unit, time span and the hiding time span judgement of frame that judging unit shows according to current system time, the frame that sets in advance are display bezel or hiding frame; Show if need, display unit display bezel, hides if need, and hidden unit is hidden frame; In the present invention program, each processor node does not interfere with each other, and compared with traditional scheme, has improved practicality and the reliability of system, and the interactive quantity of data is little in the present invention, less demanding to network.
In order to control flexibly the operation of frame synchronous flashing device, can make further improvements Fig. 2 embodiment, increase by three trigger elements, please refer to Fig. 3:
The first trigger element T7, carries out triggering synchronous unit T2 and carries out the system time synchronous operation of each processor node for receiving outer triggering signal or the satisfied trigger condition setting in advance;
The second trigger element T8, triggers display unit T5 and finishes frame flicker for receiving outer triggering signal or the satisfied trigger condition setting in advance;
The 3rd trigger element T9, for receiving outer triggering signal or meeting the trigger condition that sets in advance and trigger hidden unit T6 and finish frame and hide.
Preferably, can be according to different application scenarioss or user's request, the hiding time span of the displaying time length of window border and window border is arranged to the same length, or, the hiding time span of the displaying time Length Ratio window border of window border is long, or, the hiding time span section of the displaying time Length Ratio window border of window border.
Particularly, the concrete operations of judging unit T4 are:
(A) show hiding transformation period according to frame displaying time length and the hiding time span calculating of frame frame;
(B) system time of each processor node shows and obtains remainder hiding transformation period divided by frame;
(C) remainder and frame are shown to hiding contrast transformation period, if remainder, in frame displaying time length, notifies display unit T5 to show the window border that each processor node is corresponding; If remainder, in frame is hidden time span, notifies hidden unit T6 to hide window border corresponding to each processor node.
Because the crystal oscillator of each processor node is not quite similar, when after time synchronized a period of time, again may generation time error, this just needs the system time of each processor node is carried out synchronously repeatedly, based on this object, above-described embodiment is done to further improvement:
Initialization unit T1, the working time of also carrying out synchronous each processor node system time operation for setting in advance lock unit T2;
Arrive working time, and lock unit T2 carries out the operation of the system time of synchronous each processor node.
Introduce a concrete application examples of the present invention below, please refer to Fig. 6, comprise time server Q1, computing machine Q21, computing machine Q22 and computing machine Q23; 2 display windows of every computing machine coupling; Computing machine Q21 coupling display window Q31 and Q32; Computing machine Q22 coupling display window Q33 and Q34; Computing machine Q23 coupling display window Q35 and Q36; In each computing machine, set in advance the displaying time length of window border and the hiding time span of window border; When receiving startup system after trigger message, unifiedly calculated the system time of machine Q21, computing machine Q22 and computing machine Q23 by time server Q1, computing machine Q21, computing machine Q22 and computing machine Q23 obtain the current system time of oneself separately, then according to current system time and the default displaying time length of window border and the hiding time span of window border, judgement is display window frame or hide window frame this moment.Display window completes after display bezel or hiding frame, continues to obtain the operation of computing machine current system time, and carries out subsequent step, until receive the work that finishes ends with system after the order of synchronous flashing.
Above-described embodiment of the present invention, does not form limiting the scope of the present invention.Any modification of doing within the spirit and principles in the present invention, be equal to and replace and improvement etc., within all should being included in claim protection domain of the present invention.