Invention content
The main purpose of the present invention is to provide a kind of method and devices of displaying data in real-time, to solve in the related technology
The problem of end display point of real-time display system is frequently shaken when displaying data in real-time.
To achieve the goals above, according to an aspect of the invention, there is provided a kind of method of displaying data in real-time.
The method of displaying data in real-time according to the present invention includes:Real-time display system acquisition is more in acquisition preset time
A data point, wherein real-time display system is used for displaying data in real-time, and a display point correspondence in real-time display system is multiple
Data point;Determine display point newly-generated in real-time display system;And newly-generated display point is determined according to multiple data points
Value.
Further, determine that the value of newly-generated display point includes according to multiple data points:Calculate the flat of multiple data points
Mean value;And using the average value of multiple data points as the value of newly-generated corresponding first data point of display point, wherein newborn
At corresponding first data point of display point be the data point not generated.
Further, using the average value of multiple data points as the value of newly-generated corresponding first data point of display point
Later, method further includes:Calculate the number of newly-generated corresponding first data point of display point;Judge newly-generated display point pair
Whether the number for the first data point answered is more than zero;And in for judging newly-generated corresponding first data point of display point
When number is more than zero, the value of the data point newly obtained is replaced to the value of the corresponding data point of display point.
Further, using the average value of multiple data points as the value of newly-generated corresponding first data point of display point
Later, method further includes:Calculate the number of newly-generated corresponding first data point of display point;Calculate the data point newly obtained
Number;Judge whether the number of the data point newly obtained reaches the number of newly-generated corresponding first data point of display point;With
It, will be new and when judging that the number of the data point newly obtained reaches the number of newly-generated corresponding first data point of display point
The value of the data point of acquisition replaces the value of newly-generated corresponding first data point of display point.
Further, obtaining multiple data points that real-time display system acquires in preset time includes:Acquisition is shown in real time
Show the display point of the preceding preset number of display point newly-generated on the real-time display curve of system, wherein the display point of preset number
In each display point correspond to multiple data points respectively, determine that the value that newly-generated display is put includes according to multiple data points:
Calculate the average value of the display point of preset number;And using the average value of the display of preset number point as newly-generated display point
Value.
To achieve the goals above, according to another aspect of the present invention, a kind of device of displaying data in real-time is provided.
The device of displaying data in real-time according to the present invention includes:Acquiring unit is shown in real time for obtaining in preset time
Show multiple data points of system acquisition, wherein real-time display system is used for displaying data in real-time, one in real-time display system
The corresponding multiple data points of display point;First determination unit, for determining display point newly-generated in real-time display system;And the
Two determination units, the value for determining newly-generated display point according to multiple data points.
Further, the second determination unit includes:First computing module, the average value for calculating multiple data points;With
And first determining module, for using the average value of multiple data points as newly-generated corresponding first data point of display point
Value, wherein newly-generated corresponding first data point of display point is the data point not generated.
Further, using the average value of multiple data points as the value of newly-generated corresponding first data point of display point
Later, device further includes:First computing unit, the number for calculating newly-generated corresponding first data point of display point;The
One judging unit, for judging whether the number of newly-generated corresponding first data point of display point is more than zero;And first replace
Unit is changed, the number for when judging that the number of newly-generated corresponding first data point of display point is more than zero, will newly obtain
The value at strong point replaces the value of the corresponding data point of display point.
Further, using the average value of multiple data points as the value of newly-generated corresponding first data point of display point
Later, device further includes:Second computing unit, the number for calculating newly-generated corresponding first data point of display point;The
Three computing units, the number for calculating the data point newly obtained;Second judgment unit, data point for judging newly to obtain
Whether number reaches the number of newly-generated corresponding first data point of display point;And second replacement unit, for judging
When going out the number of the data point newly obtained and reaching the number of corresponding first data point of newly-generated display point, the number that will newly obtain
The value at strong point replaces the value of newly-generated corresponding first data point of display point.
Further, acquiring unit is additionally operable to obtain newly-generated display on the real-time display curve of real-time display system
The display point of preset number before point, wherein each display point in the display point of preset number corresponds to multiple data points respectively,
Second determination unit includes:Second computing module, the average value of the display point for calculating preset number;And second determine mould
Block, for using the average value of the display of preset number point as the value of newly-generated display point.
Through the invention, using the multiple data points for obtaining real-time display system acquisition in preset time, wherein aobvious in real time
Show that system is used for displaying data in real-time, the corresponding multiple data points of display point in real-time display system;Determine real-time display
Newly-generated display point in system;And the value of newly-generated display point is determined according to multiple data points.By that will obtain in advance
Multiple data points determine the value of newly-generated display point so that value value as relative proximity of newly-generated display point fills out
It fills, solves the problems, such as the end display point frequently shake of real-time display system when displaying data in real-time in the related technology, in turn
The flatness of the end display point display of real-time display system when having achieved the effect that improve displaying data in real-time.
Specific implementation mode
It should be noted that in the absence of conflict, the features in the embodiments and the embodiments of the present application can phase
Mutually combination.The present invention will be described in detail below with reference to the accompanying drawings and embodiments.
In order to make those skilled in the art more fully understand application scheme, below in conjunction in the embodiment of the present application
Attached drawing, technical solutions in the embodiments of the present application are clearly and completely described, it is clear that described embodiment is only
The embodiment of the application part, instead of all the embodiments.Based on the embodiment in the application, ordinary skill people
The every other embodiment that member is obtained without making creative work should all belong to the model of the application protection
It encloses.
It should be noted that term " first " in the description and claims of this application and above-mentioned attached drawing, "
Two " etc. be for distinguishing similar object, without being used to describe specific sequence or precedence.It should be appreciated that using in this way
Data can be interchanged in the appropriate case, so as to embodiments herein described herein.In addition, term " comprising " and " tool
Have " and their any deformation, it is intended that cover it is non-exclusive include, for example, containing series of steps or unit
Process, method, system, product or equipment those of are not necessarily limited to clearly to list step or unit, but may include without clear
It is listing to Chu or for these processes, method, product or equipment intrinsic other steps or unit.
According to embodiments of the present invention, a kind of method of displaying data in real-time is provided, Fig. 1 is according to the ... of the embodiment of the present invention
The flow chart of the method for displaying data in real-time.
As shown in Figure 1, this method includes following step S102 to step S106:
Step S102:Obtain multiple data points of real-time display system acquisition in preset time, wherein real-time display system
For displaying data in real-time, the corresponding multiple data points of display point in real-time display system.
Real-time display system is used for displaying data in real-time, therefore, in order to realize the real-time display of data, real-time display system
Need real-time data collection, the data that data point as sometime acquires.In general, shown in real-time display system
Point is display point, and a display point corresponds to multiple data points, for example, during real-time display system displaying data in real-time,
Real-time display system acquired a data point every 1 second, and a new display point was generated every 5 seconds, at this point, one shows point
Value is formed by stacking by the value of 5 data points.It is aobvious in a data since the display interface of real-time display system is usually limited
The data of a period of time are only able to display when showing, for example, collected data in nearest 15 minutes of display.Preset time can be with
It is configured according to actual conditions, for example, being set as shown in the display interface of real-time display system first display point pair
To this period of time at current time at the time of answering.
Step S104:Determine display point newly-generated in real-time display system.
Realize that display system usually can generate a new display point every preset time, for example, generating one every 5 seconds
New display point.After obtaining newly-generated display point, usually its corresponding multiple data point is all or part does not generate also,
The value of display point newly-generated at this time is not its final value, for the newly-generated corresponding data point not generated of display point
It needs to be filled with value, for example, 0.
Step S106:The value of newly-generated display point is determined according to multiple data points.
After obtaining multiple data points, operation can be carried out according to certain operation rule and determines newly-generated display point
Value, for example, it may be seeking the square root of multiple data point and being multiplied by the number of the corresponding data point of each display point as new
The value of the display point of generation, can also be to calculate the average value of multiple data point and be multiplied by the corresponding data point of each display point
Value of the number as newly-generated display point, can also be to determine new life by predicting the variation tendency of multiple data point
At display point value etc..Preferably, in order to improve the real-time that data are shown, newly-generated show is determined according to multiple data points
Show that value a little includes:Calculate the average value of multiple data points;And using the average value of multiple data points as newly-generated display
The value of corresponding first data point of point, wherein newly-generated corresponding first data point of display point is the data point not generated.
The data point that first data point does not generate as.Since when real-time display system generates new display point, this is new
The corresponding multiple data points of display point may not generate also completely or partially, for example, real-time display system every 1 second acquire one
A data point, every one new display point of generation in 5 seconds, it is assumed that 20:00:01 moment real-time display system generates one newly
Display point, and collect a new data point, there was only a data point corresponding to the newly-generated display point at this time, in addition
4 data points do not generate also, are in the prior art taken as the value of 4 data points not generated also (i.e. the value of the first data point)
0.The embodiment of the present invention is using the average value of multiple data points of above-mentioned acquisition as newly-generated corresponding first data of display point
The value of point so that the value of the newly-generated display point is approximately worth by more to be filled, and is generally close to collect
Data point so that real-time display system end display point display it is relatively smooth.Further, since average value
Calculate it is relatively simple quickly, help to improve the real-time that data are shown.
Preferably, using the average value of multiple data points as the value of corresponding first data point of newly-generated display point it
Afterwards, method further includes:Calculate the number of newly-generated corresponding first data point of display point;Judge that newly-generated display point corresponds to
The first data point number whether be more than zero;And in the number for judging newly-generated corresponding first data point of display point
When more than zero, the value of the data point newly obtained is replaced to the value of corresponding first data point of display point.
After using the average value of multiple data points as the value of newly-generated corresponding first data point of display point, due to
Real-time display system is constantly acquiring new data point, by the way that the data point newly obtained is constantly replaced the first data point,
So that the value of newly-generated display point increasingly approaches the actual value of the newly-generated display point, until the number of the first data point
When being 0, the value stabilization of the newly-generated display point, the correspondingly newly-generated display point also stable display.It will newly obtain
Can replace any one first data point when data point replaces the first data point.Since the embodiment of the present invention is using successively
The data point newly obtained is replaced to newly-generated corresponding first data point of display point so that the new life in each replacement process
At display point jitter amplitude it is smaller.
Preferably, using the average value of multiple data points as the value of corresponding first data point of newly-generated display point it
Afterwards, method further includes:Calculate the number of newly-generated corresponding first data point of display point;Calculate of the data point newly obtained
Number;Judge whether the number of the data point newly obtained reaches the number of newly-generated corresponding first data point of display point;And
When judging that the number of the data point newly obtained reaches the number of newly-generated corresponding first data point of display point, will newly obtain
The value of the data point taken replaces the value of newly-generated corresponding first data point of display point.
The embodiment of the present invention is using the average value of multiple data points as newly-generated corresponding first data point of display point
Value after, calculate separately the number of the first data point and calculate the number of data point newly obtained, newly obtained until calculating
It is unified to carry out the data point newly obtained to the first all data points when the number of data point reaches the number of the first data point
It replaces, obtains the actual value of the newly-generated display point, due to from the newly-generated display point production to the newly-generated display
Point is stablized, which only shakes once, reduces the frequency of the newly-generated display point shake, due to the first number
Strong point is filled by the average value of multiple data points, thus, the jitter amplitude of the newly-generated display point is compared with the prior art
It reduces.
Preferably, obtaining multiple data points that real-time display system acquires in preset time includes:It obtains in real-time display
The display point of the newly-generated preceding preset number of display point on the real-time display curve of system, wherein in the display point of preset number
Each display point correspond to multiple data points respectively, determine that the value that newly-generated display is put includes according to multiple data points:Meter
Calculate the average value of the display point of preset number;And using the average value of the display of preset number point as newly-generated display point
Value.
Since the value of display point adjoining on the real-time display curve of real-time display system is often closer to, because
This should by obtaining the display point of the newly-generated preceding preset number of display point on the real-time display curve of real-time display system
Preset number can be setting, for example, 10 display points before newly-generated display point.By being averaged for the display point of the preset number
It is worth the value as newly-generated display point, multiple data points are more efficient compared to directly acquiring.
It can be seen from the above description that the present invention realizes following technique effect:
The embodiment of the present invention is determined newly-generated by multiple data points of acquisition preset time according to multiple data point
Show the value of point, compared with the prior art the middle value that the newly-generated corresponding data point not generated of display point is filled with 0, it should
Newly-generated display point jitter amplitude is reduced, and shows more smooth, the end of real-time display system when solving displaying data in real-time
The problem of end display point is frequently shaken.
It should be noted that step shown in the flowchart of the accompanying drawings can be in such as a group of computer-executable instructions
It is executed in computer system, although also, logical order is shown in flow charts, and it in some cases, can be with not
The sequence being same as herein executes shown or described step.
Another aspect according to the ... of the embodiment of the present invention provides a kind of device of displaying data in real-time, the real-time display number
According to device can be used for execute the embodiment of the present invention displaying data in real-time method, the real-time display number of the embodiment of the present invention
According to method can also be through the embodiment of the present invention the device of displaying data in real-time execute.
As shown in Fig. 2, the device of the displaying data in real-time includes:Acquiring unit 10, the first determination unit 20 and second are true
Order member 30.
Acquiring unit 10, for obtaining multiple data points that real-time display system acquires in preset time, wherein aobvious in real time
Show that system is used for displaying data in real-time, the corresponding multiple data points of display point in real-time display system.
Real-time display system is used for displaying data in real-time, therefore, in order to realize the real-time display of data, real-time display system
Need real-time data collection, the data that data point as sometime acquires.In general, shown in real-time display system
Point is display point, the corresponding multiple data points of display point.
First determination unit 20, for determining display point newly-generated in real-time display system.
Realize that display system usually can generate a new display point every preset time, for example, generating one every 5 seconds
New display point.After obtaining newly-generated display point, usually its corresponding multiple data point is all or part does not generate also,
The value of display point newly-generated at this time is not its final value.
Second determination unit 30, the value for determining newly-generated display point according to multiple data points.
After obtaining multiple data points, operation can be carried out according to certain operation rule and determines newly-generated display point
Value, for example, it may be seeking the square root of multiple data point and being multiplied by the number of the corresponding data point of each display point as new
The value of the display point of generation, can also be to calculate the average value of multiple data point and be multiplied by the corresponding data point of each display point
Value of the number as newly-generated display point, can also be to determine new life by predicting the variation tendency of multiple data point
At display point value etc..
Preferably, the second determination unit 30 includes:First computing module, the average value for calculating multiple data points;With
And first determining module, for using the average value of multiple data points as newly-generated corresponding first data point of display point
Value, wherein newly-generated corresponding first data point of display point is the data point not generated.
The embodiment of the present invention obtains multiple data points of real-time display system acquisition in preset time by acquiring unit 10,
First determination unit 20 determines that display point newly-generated in real-time display system, the second determination unit 30 are true according to multiple data points
The value of fixed newly-generated display point.The embodiment of the present invention determines newly-generated display point using the multiple data points obtained in advance
Value solves the problems, such as the end display point frequently shake of real-time display system when displaying data in real-time.
Preferably, using the average value of multiple data points as the value of corresponding first data point of newly-generated display point it
Afterwards, which further includes:First computing unit, the number for calculating newly-generated corresponding first data point of display point;The
One judging unit, for judging whether the number of newly-generated corresponding first data point of display point is more than zero;And first replace
Unit is changed, the number for when judging that the number of newly-generated corresponding first data point of display point is more than zero, will newly obtain
The value at strong point replaces the value of the corresponding data point of display point.
After using the average value of multiple data points as the value of newly-generated corresponding first data point of display point, due to
Real-time display system is constantly acquiring new data point, by the way that the data point newly obtained is constantly replaced the first data point,
So that the value of newly-generated display point increasingly approaches the actual value of the newly-generated display point, until the number of the first data point
When being 0, the value stabilization of the newly-generated display point, the correspondingly newly-generated display point also stable display.It will newly obtain
Can replace any one first data point when data point replaces the first data point.Since the embodiment of the present invention is using successively
The data point newly obtained is replaced to newly-generated corresponding first data point of display point so that the new life in each replacement process
At display point jitter amplitude it is smaller.
Preferably, using the average value of multiple data points as the value of corresponding first data point of newly-generated display point it
Afterwards, which further includes:Second computing unit, the number for calculating newly-generated corresponding first data point of display point;The
Three computing units, the number for calculating the data point newly obtained;Second judgment unit, data point for judging newly to obtain
Whether number reaches the number of newly-generated corresponding first data point of display point;And second replacement unit, for judging
When going out the number of the data point newly obtained and reaching the number of corresponding first data point of newly-generated display point, the number that will newly obtain
The value at strong point replaces the value of newly-generated corresponding first data point of display point.
Preferably, acquiring unit is additionally operable to obtain newly-generated display point on the real-time display curve of real-time display system
The display point of preceding preset number, wherein each display point in the display point of preset number corresponds to multiple data points respectively, the
Two determination units 30 include:Second computing module, the average value of the display point for calculating preset number;And second determine mould
Block, for using the average value of the display of preset number point as the value of newly-generated display point.
Obviously, those skilled in the art should be understood that each module of the above invention or each step can be with general
Computing device realize that they can be concentrated on a single computing device, or be distributed in multiple computing devices and formed
Network on, optionally, they can be realized with the program code that computing device can perform, it is thus possible to which they are stored
Be performed by computing device in the storage device, either they are fabricated to each integrated circuit modules or by they
In multiple modules or step be fabricated to single integrated circuit module to realize.In this way, the present invention is not limited to any specific
Hardware and software combines.
The foregoing is only a preferred embodiment of the present invention, is not intended to restrict the invention, for the skill of this field
For art personnel, the invention may be variously modified and varied.All within the spirits and principles of the present invention, any made by repair
Change, equivalent replacement, improvement etc., should all be included in the protection scope of the present invention.