The content of the invention
It is a primary object of the present invention to provide a kind of network data methods of exhibiting and device, to solve client displaying
Network data can not embody the variational problem of the True Data of service end collection.
To achieve these goals, according to an aspect of the invention, there is provided a kind of network data methods of exhibiting.
The network according to the invention method for exhibiting data includes:Polling time interval is determined, wherein, polling time interval is
Client sends the time interval of request message to service end, and request message is used to ask service end to send network digital;It is determined that
Numbers show time interval, wherein, numbers show time interval is the time interval for the network digital that client displaying receives;
First network numeral and the second network digital are obtained, wherein, first network numeral and the second network digital service twice to be adjacent
End is sent to the network digital of client, and the digital network digital once to be sent before service end of first network;According to wheel
Ask time interval, numbers show time interval, first network numeral and the second network digital and determine digital rate of change;According to number
Word rate of change carries out network digital displaying in client.
Further, according to polling time interval, numbers show time interval, first network numeral and the second network digital
It is determined that digital rate of change includes:Digital change frequency is calculated according to polling time interval and numbers show time interval;According to
First network numeral and the second network digital calculate digital variable quantity;Numeral is calculated according to digital variable quantity and digital change frequency
Rate of change.
Further, carrying out network digital displaying in client according to digital rate of change includes:Often pass through numbers show
Time interval, network digital displaying is carried out in client, wherein, the network digital shown every time is the last network number shown
Word and digital rate of change sum, the network digital of rollout is first network numeral, and the number for showing network digital is number
Word change frequency adds 1.
Further, according to polling time interval, numbers show time interval, first network numeral and the second network digital
It is determined that digital rate of change includes:Digital change frequency is calculated according to below equation:K=[A/B], wherein, k is numeral change time
Number, A are polling time interval, and B is numbers show time interval, and [A/B] is the maximum integer less than or equal to A/B;According to
Below equation calculates digital variable quantity:Δ C=C2-C1, wherein, Δ C is digital variable quantity, and C1 is first network numeral, and C2 is
Second network digital;Digital rate of change is calculated according to below equation:V=Δ C/k, wherein, V is digital rate of change.
Further, carrying out network digital displaying in client according to digital rate of change includes:According to below equation meter
Calculate client network digital to be presented:M=C1+K*V, wherein, M is client network digital to be presented, and K is to k's by 0
Integer;According to K by 0 to k order, the network digital being calculated is shown in client.
To achieve these goals, according to another aspect of the present invention, there is provided a kind of network data exhibiting device.
The network according to the invention data display device includes:First determining unit, for determining polling time interval, its
In, polling time interval is the time interval that client sends request message to service end, and request message is used to ask service end
Send network digital;Second determining unit, for determining numbers show time interval, wherein, numbers show time interval is visitor
The time interval for the network digital that the displaying of family end receives;Acquiring unit, for obtaining first network numeral and the second network number
Word, wherein, first network numeral and the second network digital are that adjacent service end twice is sent to the network digital of client, and
The digital network digital once to be sent before service end of first network;3rd determining unit, for according to polling time interval, number
Word displaying time interval, first network numeral and the second network digital determine digital rate of change;Display unit, for according to number
Word rate of change carries out network digital displaying in client.
Further, the 3rd determining unit includes:First computing module, for according to polling time interval and numbers show
Time interval calculates digital change frequency;Second computing module, for being calculated according to first network numeral and the second network digital
Digital variable quantity;3rd computing module, for calculating digital rate of change according to digital variable quantity and digital change frequency.
Further, display unit includes:First display module, for often passing through numbers show time interval, in client
End carries out network digital displaying, wherein, the network digital shown every time is the last network digital shown and numeral change speed
Rate sum, the network digital of rollout is first network numeral, shows that the number of network digital adds 1 for digital change frequency.
Further, the 3rd determining unit includes:4th computing module, for calculating numeral change time according to below equation
Number:K=[A/B], wherein, k is digital change frequency, and A is polling time interval, and B is numbers show time interval, and [A/B] is
Maximum integer less than or equal to A/B;5th computing module, for calculating digital variable quantity according to below equation:Δ C=
C2-C1, wherein, Δ C is digital variable quantity, and C1 is first network numeral, and C2 is the second network digital;6th computing module, use
According to the digital rate of change of below equation calculating:V=Δ C/k, wherein, V is digital rate of change.
Further, display unit includes:7th computing module, it is to be presented for calculating client according to below equation
Network digital:M=C1+K*V, wherein, M is client network digital to be presented, and K is by 0 to k integer;Second displaying mould
Block, for, by 0 to k order, the network digital being calculated being shown in client according to K.
By the present invention, using the method comprised the following steps:Polling time interval is determined, wherein, polling time interval
The time interval of request message is sent to service end for client, request message is used to ask service end to send network digital;Really
Determine numbers show time interval, wherein, between the time for the network digital that numbers show time interval receives for client displaying
Every;First network numeral and the second network digital are obtained, wherein, first network numeral and the second network digital take twice to be adjacent
Business end is sent to the network digital of client, and the digital network digital once to be sent before service end of first network;According to
Polling time interval, numbers show time interval, first network numeral and the second network digital determine digital rate of change;According to
Digital rate of change carries out network digital displaying in client, and the network data for solving client displaying can not embody service end
The variational problem of the True Data of collection, and then by carrying out network digital exhibition in client according to digital rate of change
Show so that the network data of client displaying can embody the variability of the True Data of service end collection.
Embodiment
It should be noted that in the case where not conflicting, the feature in embodiment and embodiment in the application can phase
Mutually combination.Describe the present invention in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
In order that those skilled in the art more fully understand application scheme, below in conjunction with the embodiment of the present application
Accompanying drawing, the technical scheme in the embodiment of the present application is clearly and completely described, it is clear that described embodiment is only
The embodiment of the application part, rather than whole embodiments.Based on the embodiment in the application, ordinary skill people
The every other embodiment that member is obtained under the premise of creative work is not made, it should all belong to the model of the application protection
Enclose.
It should be noted that term " first " in the description and claims of this application and above-mentioned accompanying drawing, "
Two " etc. be for distinguishing similar object, without for describing specific order or precedence.It should be appreciated that so use
Data can exchange 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 are not necessarily limited to those steps clearly listed or unit, but may include without clear
It is listing to Chu or for the intrinsic other steps of these processes, method, product or equipment or unit.
According to an embodiment of the invention, there is provided a kind of network data methods of exhibiting.
Fig. 1 is the flow chart of the first embodiment of the network according to the invention method for exhibiting data.As shown in figure 1, the party
Method includes step S102 to step S110:
Step S102, determines polling time interval, wherein, polling time interval is that client disappears to service end transmission request
The time interval of breath, request message are used to ask service end to send network digital.
Client can send request message, service end at interval of fixed time interval (polling time interval) to service end
The time reached according to request message, the network digital that the time collects is sent to client.
Step S104, numbers show time interval is determined, wherein, numbers show time interval is that client displaying receives
Network digital time interval.
For the network digital for coming from service end received, client is at interval of regular time by the numeral of acquisition
Show user.For example, polling time interval is 2 seconds, numbers show time interval is 3 seconds.Service end one net of collection per second
Network numeral, the numeral of collection are as follows:1、2、3、4、5、6、7、8、9、10.Then client receives the network digital of service end transmission
For 1,3,5,7,9 (or 2,4,6,8,10), and client showed a numeral at interval of 3 seconds to user.
Step S106, first network numeral and the second network digital are obtained, wherein, first network numeral and the second network number
Word is that adjacent service end twice is sent to the network digital of client, and first network numeral is once to send before service end
Network digital.
For example, polling time interval is 2 seconds.Then service end sends first network numeral to client and sends the second network
The time interval of numeral is 2 seconds.And service end sends the time of first network numeral prior to being sent to client to client
The time of second network digital.
Step S108, according to polling time interval, numbers show time interval, first network numeral and the second network digital
It is determined that digital rate of change.
Alternatively, it is true according to polling time interval, numbers show time interval, first network numeral and the second network digital
Fixed number word rate of change includes the steps:Numeral change time is calculated according to polling time interval and numbers show time interval
Number;Digital variable quantity is calculated according to first network numeral and the second network digital;According to digital variable quantity and digital change frequency
Calculate digital rate of change.
Here, polling time interval, numbers show time interval are considered when calculating the network digital of client displaying
Inside, the network digital that can show client preferably embodies real-time change possessed by the numeral of service end collection.
Preferably, it is true according to polling time interval, numbers show time interval, first network numeral and the second network digital
Fixed number word rate of change includes the steps:Digital change frequency is calculated according to below equation:K=[A/B], wherein, k is number
Word change frequency, A are polling time interval, and B is numbers show time interval, and [A/B] is maximum whole less than or equal to A/B
Number;Digital variable quantity is calculated according to below equation:Δ C=C2-C1, wherein, Δ C is digital variable quantity, and C1 is first network number
Word, C2 are the second network digital;Digital rate of change is calculated according to below equation:V=Δ C/k, wherein, V is numeral change speed
Rate.
For example, polling time interval is 2s, numbers show time interval is 1s, first network numeral and the second network digital
Respectively 1 and 5.K=2, Δ C=4, V=2 can then be calculated.
Step S110, network digital displaying is carried out in client according to digital rate of change.
Alternatively, carrying out network digital displaying in client according to digital rate of change includes the steps:Often pass through
Numbers show time interval, network digital displaying is carried out in client, wherein, the network digital shown every time shows to be last
Network digital and digital rate of change sum, the network digital of rollout is first network numeral, shows network digital
Number is that digital change frequency adds 1.
Specifically, carrying out network digital displaying in client according to digital rate of change includes the steps:According to
Lower formula calculates client network digital to be presented:M=C1+K*V, wherein, M is client network digital to be presented, and K is
By 0 to k integer;According to K by 0 to k order, the network digital being calculated is shown in client.
For example, polling time interval is 2s, numbers show time interval is 1s, first network numeral and the second network digital
Respectively 1 and 5.K=2, Δ C=4, V=2 can be calculated.It is then 1,3,5 in the network digital of client displaying.
Fig. 2 is the flow chart of the second embodiment of the network according to the invention method for exhibiting data.The embodiment can be made
For a kind of preferred embodiment of embodiment illustrated in fig. 1.As shown in Fig. 2 the method comprising the steps of S201 to step S208:
Step S201, if i=0, determine polling time interval A, the time interval B of display data change.
Determine that client initiates the time interval A of request to service end and client shows the time interval B of numeral, use
In calculating data variation speed.
Step S202, digital change frequency k is calculated according to the time interval B that polling time interval A and display data change,
K=[A/B].
Polling time interval and the time interval of client displaying numeral seek aliquot, and this aliquot is numeral change time
Number.
Step S203, calculate digital rate of change V=(current request return value-preceding once ask return value)/k.
Client is asked after returning to network digital to service end, and number is once returned before the numeral that last time asks to return is designated as
Word, the numeral that this request returns is designated as this and returns to numeral.The difference of this digital and preceding numeral once returned returned
As digital increments value.
By digital increments value divided by digital change frequency, digital rate of change can be obtained, when this is each change interval
Between data variation amount.
Step S204, it is M=M+ numeral rate of changes V to determine client numeral to be presented.
When showing for the first time, M takes C1 (a preceding service end is sent to the numeral of client), i.e. client displaying numeral
For C1+V.
Client data carries out once numeral at interval of time interval B and updated, and the numeral of renewal is the number of last display
Word and variable quantity and, renewal altogether shows that digital number adds 1 for the change frequency that previous step is obtained.
Step S205, M is shown in client.
Step S206, judges whether calculation times exceed digital change frequency k, if calculation times are not above digital change
Change number k, then carry out data renewal again according to above-mentioned steps.
The client that is calculated for the second time numeral to be presented is C1+2V, and the client being calculated for the third time is waited to open up
The numeral shown is C1+3V ... untill digital change frequency k has been traveled through.
Step S207, if calculation times have reached digital change frequency k, wait poll services end return next time
New numeral.
Step S208, when next network digital return client of service end, re-start above-mentioned steps.
The point data that above-mentioned steps return to service end data as a unit, the previous unit with client displaying
Data subtract each other to obtain increment size;Number is calculated using the time interval of the increment size, polling time interval and client displaying numeral
Word rate of change;And then according to rate of change at the uniform velocity change data on a preceding unit data, i.e., at interval of showing digital when
Between interval refresh a data, until reach this polling request return point data value.Pass through above-mentioned steps, client displaying
Data be no longer interruption, but data of consecutive variations.The data that client request obtains are not to be updated directly into view
On, but make data at the uniform velocity change, to be presented to the data with real-time change that user collects closer to service end.It is logical
The data of this method acquisition are crossed on the premise of accuracy is not affected by influence, more intuitively embody the effect of real time data renewal
Fruit.
The embodiment is as a result of following steps:Polling time interval is determined, wherein, polling time interval is client
The time interval of request message is sent to service end, request message is used to ask service end to send network digital;It is determined that digital exhibition
Show time interval, wherein, numbers show time interval is the time interval for the network digital that client displaying receives;Obtain the
One network digital and the second network digital, wherein, first network numeral and the second network digital send for adjacent service end twice
To the network digital of client, and first network numeral is the network digital once sent before service end;According to poll time
Interval, numbers show time interval, first network numeral and the second network digital determine digital rate of change;Changed according to numeral
Speed carries out network digital displaying in client, and the true of service end collection can not be embodied by solving the network data of client displaying
The variational problem of real data, and then by carrying out network digital displaying in client according to digital rate of change, by pulse
Formula change modeling is at the uniform velocity to change so that the network data of client displaying can embody the change of the True Data of service end collection
The property changed, allow users to perceive the consecutive variations of real time data.
It should be noted that can be in such as one group of computer executable instructions the flow of accompanying drawing illustrates the step of
Performed in computer system, although also, show logical order in flow charts, in some cases, can be with not
The order being same as herein performs shown or described step.
According to an embodiment of the invention, there is provided a kind of network data exhibiting device.It should be noted that the present invention is implemented
The network data exhibiting device of example can be used for performing the network data methods of exhibiting that the embodiment of the present invention is provided, and the present invention is real
Applying the network data methods of exhibiting of example can also be performed by network data exhibiting device that the embodiment of the present invention is provided.
Fig. 3 is the schematic diagram of the embodiment of the network according to the invention data display device.As shown in figure 3, the device bag
Include:First determining unit 10, the second determining unit 20, acquiring unit 30, the 3rd determining unit 40 and display unit 50.
First determining unit 10, for determining polling time interval, wherein, polling time interval is client to service end
The time interval of request message is sent, request message is used to ask service end to send network digital.
Second determining unit 20, for determining numbers show time interval, wherein, numbers show time interval is client
Show the time interval of the network digital received.
Acquiring unit 30, for obtaining first network numeral and the second network digital, wherein, first network numeral and second
Network digital is that adjacent service end twice is sent to the network digital of client, and first network numeral be before service end once
The network digital of transmission.
3rd determining unit 40, for according to polling time interval, numbers show time interval, first network numeral and the
Two network digitals determine digital rate of change.
Alternatively, the 3rd determining unit 40 includes:First computing module, for according to polling time interval and numbers show
Time interval calculates digital change frequency;Second computing module, for being calculated according to first network numeral and the second network digital
Digital variable quantity;3rd computing module, for calculating digital rate of change according to digital variable quantity and digital change frequency.
Preferably, the 3rd determining unit 40 includes:4th computing module, for calculating numeral change time according to below equation
Number:K=[A/B], wherein, k is digital change frequency, and A is polling time interval, and B is numbers show time interval, and [A/B] is
Maximum integer less than or equal to A/B;5th computing module, for calculating digital variable quantity according to below equation:Δ C=
C2-C1, wherein, Δ C is digital variable quantity, and C1 is first network numeral, and C2 is the second network digital;6th computing module, use
According to the digital rate of change of below equation calculating:V=Δ C/k, wherein, V is digital rate of change.
Display unit 50, for carrying out network digital displaying in client according to digital rate of change.
Alternatively, display unit 50 includes:First display module, for often passing through numbers show time interval, in client
End carries out network digital displaying, wherein, the network digital shown every time is the last network digital shown and numeral change speed
Rate sum, the network digital of rollout is first network numeral, shows that the number of network digital adds 1 for digital change frequency.
Preferably, display unit 50 includes:7th computing module, it is to be presented for calculating client according to below equation
Network digital:M=C1+K*V, wherein, M is client network digital to be presented, and K is by 0 to k integer;Second displaying mould
Block, for, by 0 to k order, the network digital being calculated being shown in client according to K.
The network data exhibiting device that the present embodiment provides includes:First determining unit 10, the second determining unit 20, obtain
Unit 30, the 3rd determining unit 40 and display unit 50.By the device, solves the network data of client displaying without body of laws
The variational problem of the True Data of existing service end collection, and then utilize display unit 50 according to digital rate of change in client
End carries out network digital displaying so that the network data of client displaying can embody the change of the True Data of service end collection
Property.
Obviously, those skilled in the art should be understood that above-mentioned each module of the invention or each step can be with general
Computing device realize that they can be concentrated on single computing device, or be distributed in multiple computing devices and formed
Network on, alternatively, they can be realized with the program code that computing device can perform, it is thus possible to they are stored
Performed in the storage device by computing device, either they are fabricated to respectively each integrated circuit modules or by they
In multiple modules or step be fabricated to single integrated circuit module to realize.So, the present invention is not restricted to any specific
Hardware and software combines.
The preferred embodiments of the present invention are the foregoing is only, are not intended to limit the invention, for the skill of this area
For art personnel, the present invention can have various modifications and variations.Within the spirit and principles of the invention, that is made any repaiies
Change, equivalent substitution, improvement etc., should be included in the scope of the protection.