WO2017096875A1 - 数据更新方法及装置 - Google Patents

数据更新方法及装置 Download PDF

Info

Publication number
WO2017096875A1
WO2017096875A1 PCT/CN2016/089232 CN2016089232W WO2017096875A1 WO 2017096875 A1 WO2017096875 A1 WO 2017096875A1 CN 2016089232 W CN2016089232 W CN 2016089232W WO 2017096875 A1 WO2017096875 A1 WO 2017096875A1
Authority
WO
WIPO (PCT)
Prior art keywords
value
updated
target
current
values
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2016/089232
Other languages
English (en)
French (fr)
Inventor
李文亮
牛盼迎
李国建
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Le Holdings Beijing Co Ltd
LeTV Information Technology Beijing Co Ltd
Original Assignee
Le Holdings Beijing Co Ltd
LeTV Information Technology Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Le Holdings Beijing Co Ltd, LeTV Information Technology Beijing Co Ltd filed Critical Le Holdings Beijing Co Ltd
Priority to US15/241,511 priority Critical patent/US20170168672A1/en
Publication of WO2017096875A1 publication Critical patent/WO2017096875A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/0485Scrolling or panning
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/14Network analysis or design
    • H04L41/142Network analysis or design using statistical or mathematical methods
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/38Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
    • G06F7/48Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices
    • G06F7/50Adding; Subtracting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/04Processing captured monitoring data, e.g. for logfile generation

Definitions

  • the present invention relates to the field of Internet technologies, and in particular, to a data update method and apparatus.
  • the role of statistical online users is self-evident, that is, the website administrator can know the current number of users, and then observe the performance of the server or program according to the number of users, so that the attraction of the website or the efficiency of the website program can be intuitively understood.
  • the statistical results are usually displayed directly, that is, the historical statistics are directly replaced by new statistics, and the number of live online users is displayed as an example.
  • the number of people at the previous moment is 3456.
  • the next time is 3256, the data will be directly converted from 3456 to 3256.
  • managers can't intuitively feel the change of numbers. Even when there are more digits, one of them changes, and the manager can't even observe. To.
  • an embodiment of the present invention provides a data update method and apparatus.
  • a data update method including:
  • the determining the data bits to be updated in the current statistics includes:
  • the data bit whose value is inconsistent is determined as the data bit to be updated.
  • the scrolling the values on each of the current statistical values to the same data bit in the target statistical value one by one including:
  • the scrolling the values on each of the current statistical values to the same data bit in the target statistical value one by one including:
  • the method further includes:
  • the method includes:
  • a data updating apparatus including:
  • a statistical value receiving module configured to receive a statistically obtained target statistical value
  • the statistics obtaining module obtains the current statistical value currently displayed
  • a data bit determining module to be updated configured to determine a data bit to be updated in the current statistical value
  • a value update module configured to: when the value of the data bit to be updated in the current statistic value and the target statistic value are inconsistent, the values of each of the current statistic values in the data bit to be updated are one by one Scrolling to a value on the same data bit in the target statistic to update the currently displayed current statistic to the target statistic.
  • the data bit determining module to be updated includes:
  • a comparison submodule configured to compare values of the current statistical value and the same data bit in the target statistical value respectively
  • the same data bit value determining sub-module is configured to determine whether the current statistical value and the value of the same data bit in the target statistical value are consistent;
  • a determining submodule configured to determine, when the current statistical value and the value of the to-be-updated data bit in the target statistical value are inconsistent, a data bit whose value is inconsistent as the data bit to be updated.
  • the value update module includes:
  • a first difference calculation submodule configured to calculate a difference between the current statistical value and the target statistical value
  • a first difference determining module configured to determine whether the difference is greater than zero
  • a first rolling submodule configured to scroll the values of all the data bits to be updated in the current statistical value one by one to the target statistical value according to a large to small manner when the difference is greater than zero The value on the data bit;
  • a second rolling submodule configured to scroll the values of all the data bits to be updated in the current statistic value to the same data in the target statistic value one by one in a small to large manner when the difference is less than zero The value on the bit.
  • the value update module includes:
  • a second difference calculation submodule configured to calculate a difference between a value in the current statistic value and a value in the target statistic value for the same data bit to be updated
  • a second difference determining sub-module configured to determine whether the difference is greater than zero
  • a third rolling submodule configured to, when the difference is greater than 0, scroll the values in the current statistical value one by one to a value in the target statistical value according to a large to small manner;
  • a fourth rolling submodule configured to, when the difference is less than 0, scroll the values in the current statistic value one by one to the value in the target statistic value in a small to large manner.
  • the device further includes:
  • a first page turning control module configured to scroll the values on the data bits to be updated one by one according to a page turning manner when scrolling in a large to small manner
  • the second page turning control module is configured to scroll the values on the data bits to be updated one by one in a manner of page up when scrolling in a small to large manner.
  • the device further includes:
  • a first value update module configured to scroll the values on the data bits to be updated in a downward scrolling manner when scrolling in a large to small manner
  • the second value updating module is configured to scroll the values on the data bits to be updated one by one in a manner of scrolling up when scrolling in a small to large manner.
  • a computer storage medium is further provided, wherein the computer storage medium can store a program, and when the program is executed, a data update method provided by the first aspect of the embodiment of the present invention can be implemented. Some or all of the steps in each implementation.
  • a server includes: the data update device according to any implementation manner of the second aspect of the foregoing invention.
  • the inconsistent value in the current statistical value may be scrolled one by one to the target statistical value.
  • the user can visually see the change of the value on the currently updated data bit, thereby avoiding directly replacing the target statistical value with the current statistical value, so that the user cannot perceive the Updated question.
  • FIG. 1 is a flowchart of a data update method according to an exemplary embodiment
  • step S103 in FIG. 1 is a detailed flow chart of step S103 in FIG. 1;
  • step S104 in FIG. 1 is a detailed flow chart of step S104 in FIG. 1;
  • step S104 in FIG. 1 is a schematic diagram showing another detailed process of step S104 in FIG. 1;
  • FIG. 5 is a schematic structural diagram of a data updating apparatus according to an exemplary embodiment
  • FIG. 6 is a schematic structural diagram of a data bit determining module to be updated in FIG. 5;
  • FIG. 7 is a schematic structural diagram of a numerical value updating module of FIG. 5;
  • FIG. 8 is another schematic structural diagram of the numerical value updating module of FIG. 5.
  • FIG. 1 is a flowchart of a data update method according to an exemplary embodiment. As shown in FIG. 1, the method may include the following steps:
  • Step S101 Receive a statistically obtained target statistical value.
  • the target statistic value is a value to be displayed at the next moment, that is, a statistic value to be updated, and the target statistic value may be obtained by the server statistics, or may be sent to other servers, for example, after the statistics of the operator. Value.
  • Step S102 Acquire a current statistical value currently displayed.
  • the target statistic value sent by the server itself or the other operator server has an identifier for indicating that the value is the target statistic value. Therefore, in the embodiment of the present invention, after receiving a value, the identifier may be extracted. The identifier corresponding to the value, and then the identifier can be used to determine whether the target statistical value is received.
  • the current statistic value currently displayed needs to be obtained. This is mainly because the target statistic is the value that needs to be displayed at the next moment. If the target statistic is the same as the current statistic, the currently displayed value. You can not make changes. If the target statistic value is different from the current statistic value, the currently displayed value needs to be adjusted so that the adjusted value is the target statistic value, so that the target statistic value can be displayed at the next moment.
  • Step S103 Determine a data bit to be updated in the current statistical value.
  • multiple methods may be used, one of which is: regardless of whether the value of the same bit in the current statistic value and the target statistic value is the same, according to the target statistic value, all of the current statistic value The bits are replaced. The other way is to replace only the bits in the current statistic that have different values from the same bit in the target statistic.
  • the processing may be performed according to the second manner described above. Therefore, in this step, it is necessary to first determine the data bit to be updated in the current statistic value, where the current statistic value on the data bit to be updated and the value on the target statistic value are different, for example, the current data statistic value is 11326, The target statistic is 11427, then the data bits to be updated include: ones and hundreds, and the other bits do not need to be updated because the values are the same.
  • each bit in the current statistic value may be compared with the value on the corresponding bit in the target statistic value, if there is a difference , you can determine the data bit to be updated.
  • the data bits refer to a single digit, a hundred digit, a thousand digit, a tens place, and the like.
  • Step S104 The current statistical value is inconsistent with the value of the data bit to be updated in the target statistical value, and the value of each of the current statistical values is scrolled one by one to the target. The value on the same data bit in the statistic to update the currently displayed current statistic to the target statistic.
  • the value of the data bit to be updated in the current statistic value may be scrolled to the value on the same data bit as the target statistic value one by one according to the order of the Arabic numerals. For example: 1. If the value of the data bit to be updated in the current statistic value is 2, and the value of the same data bit in the target statistic value is 8, then the method of scrolling one by one is, from number 2 to number 3, and then scroll to The number 4, according to this rule until the number 8 is rolled; 2.
  • the value of the data bit to be updated in the current statistical value is 8
  • the value of the same data bit in the target statistical value is 2, and at this time, the number 9 can be determined.
  • the number is 0, then the method of scrolling one by one is, from number 8 to number 9, and then to the number 0, according to this rule until the number 2 is rolled. 3.
  • the value of the data bit to be updated in the current statistical value is 2, the value of the same data bit in the target statistical value is 7.
  • it can be determined that the number after the number 0 is 9, and then the method of scrolling one by one is Roll from number 2 to number 1, then roll to The number 0 follows this rule until it rolls to the number 7.
  • the current statistics can be updated to the target statistics.
  • the inconsistent value in the current statistical value may be scrolled one by one to the target statistical value.
  • the user can visually see the change of the value on the currently updated data bit, thereby avoiding directly replacing the target statistical value with the current statistical value, so that the user cannot perceive the Updated question.
  • step S103 in the foregoing embodiment shown in FIG. 1 may include the following steps:
  • Step S1031 Compare the current statistical value and the value of the same data bit in the target statistical value respectively.
  • values having different numbers of bits may be replaced by zero, for example:
  • the subtraction method can be used for comparison, or the division method can be used for comparison.
  • Step S1032 Determine whether the values of the same data bit in the current statistical value and the target statistical value are consistent.
  • Step S1033 Determine data bits whose values are inconsistent as the data bits to be updated.
  • step S104 in the description shown in FIG. 1 may include:
  • Step S201 Calculate the difference between the current statistical value and the target statistical value.
  • Step S202 determining whether the difference is greater than zero.
  • step S203 is performed; otherwise, step S204 is performed.
  • Step S203 The values on all the data bits to be updated in the current statistical value are scrolled one by one to the value on the same data bit in the target statistical value in a large to small manner.
  • the current statistic is greater than the target statistic.
  • the value in the current statistic is 345
  • the value in the target statistic is 123.
  • the value of each data bit to be updated in the current statistical value is scrolled bit by bit in a large to small manner. Among them, for the number 9, the next number is 0 according to the way from large to small.
  • Step S204 Scroll the values on all the data bits to be updated in the current statistical value one by one to the value on the same data bit in the target statistical value in a small to large manner.
  • the value of the current statistic is less than the value of the target statistic.
  • the value in the current statistic is 123
  • the value in the target statistic is 345.
  • the value of each data bit to be updated in the current statistical value is scrolled bit by bit in a small to large manner. Among them, for the number 0, the next number is 9 in the way from small to large.
  • the value when the value is updated, only the current statistic value and the target statistic value are considered, so that when the target statistic value is greater than the current statistic value, the values of all the data bits to be updated are uniformly downward.
  • the direction is scrolled.
  • the target statistic is less than the current statistic, all values on the data bits to be updated are scrolled in a uniform upward direction. Therefore, the user can determine the magnitude relationship between the target statistical value and the current statistical value as long as the scroll direction of the value is seen.
  • step S104 in the description shown in FIG. 1 may include:
  • Step S301 Calculate a difference between the value in the current statistical value and the value in the target statistical value.
  • Step S302 Determine whether the difference is greater than zero.
  • step S303 is performed; otherwise, step S304 is performed.
  • Step S303 Scroll the values in the current statistical value one by one to the value in the target statistical value in a large to small manner.
  • the difference When the difference is greater than zero, it means that the value in the current statistical value of the data bit to be updated is larger than the value in the target statistical value. For this case, when scrolling, scrolling bit by bit in a large to small manner. Among them, for the number 0, the next number is 9 in the way from large to small.
  • Step S304 Scroll the values in the current statistical value one by one to the value in the target statistical value in a small to large manner.
  • the method may further include the following steps.
  • the method may further include the following steps.
  • FIG. 5 is a schematic structural diagram of a data updating apparatus according to an exemplary embodiment. As shown in FIG. 5, the apparatus may include:
  • the statistical value receiving module 11 is configured to receive the statistically obtained target statistical value.
  • the target statistic value is a value to be displayed at the next moment, that is, a statistic value to be updated, and the target statistic value may be obtained by the server statistics, or may be sent to other servers, for example, after the statistics of the operator. Value.
  • the statistic value obtaining module 12 acquires the current statistic value currently displayed.
  • the target statistic value sent by the server itself or the other operator server has an identifier for indicating that the value is the target statistic value. Therefore, in the embodiment of the present invention, after receiving a value, the identifier may be extracted. The identifier corresponding to the value, and then the identifier can be used to determine whether the target statistical value is received.
  • the current statistic value currently displayed needs to be obtained. This is mainly because the target statistic is the value that needs to be displayed at the next moment. If the target statistic is the same as the current statistic, the currently displayed value can be left unchanged. If the target statistic value is different from the current statistic value, the currently displayed value needs to be adjusted so that the adjusted value is the target statistic value, so that the target statistic value can be displayed at the next moment.
  • the data bit determining module 13 to be updated is configured to determine a data bit to be updated in the current statistical value.
  • multiple methods may be used, one of which is: regardless of whether the value of the same bit in the current statistic value and the target statistic value is the same, according to the target statistic value, all of the current statistic value
  • the bits are replaced, and the other way is: only the value of the same bit in the current statistical value and the target statistical value is different. The bits are replaced.
  • the processing may be performed according to the second manner described above. Therefore, in this step, it is necessary to first determine the data bit to be updated in the current statistic value, where the current statistic value on the data bit to be updated and the value on the target statistic value are different, for example, the current data statistic value is 11326, The target statistic is 11427, then the data bits to be updated include: ones and hundreds, and the other bits do not need to be updated because the values are the same.
  • each bit in the current statistic value may be compared with the value on the corresponding bit in the target statistic value, if there is a difference , you can determine the data bit to be updated.
  • the data bits refer to a single digit, a hundred digit, a thousand digit, a tens place, and the like.
  • the value update module 14 is configured to: when the current statistical value and the value of the to-be-updated data bit in the target statistical value are inconsistent, the value of each of the current statistical values to be updated Scrolling one by one to the value on the same data bit in the target statistic to update the currently displayed current statistic to the target statistic.
  • the value of the data bit to be updated in the current statistic value may be scrolled to the value on the same data bit as the target statistic value one by one according to the order of the Arabic numerals. For example: 1. If the value of the data bit to be updated in the current statistic value is 2, and the value of the same data bit in the target statistic value is 8, then the method of scrolling one by one is, from number 2 to number 3, and then scroll to The number 4, according to this rule until the number 8 is rolled; 2.
  • the value of the data bit to be updated in the current statistical value is 8
  • the value of the same data bit in the target statistical value is 2, and at this time, the number 9 can be determined.
  • the number is 0, then the method of scrolling one by one is, from number 8 to number 9, and then to the number 0, according to this rule until the number 2 is rolled. 3.
  • the value of the data bit to be updated in the current statistical value is 2, the value of the same data bit in the target statistical value is 7.
  • it can be determined that the number after the number 0 is 9, and then the method of scrolling one by one is Roll from number 2 to number 1, then roll to the number 0, follow this rule until you roll to the number 7.
  • the current statistics can be updated to the target statistics.
  • the data updating apparatus may, when receiving the target statistical value, and at least one of the values in the current statistical value, may scroll the inconsistent values in the current statistical value one by one to the target statistics.
  • each scrolling is based on the size of the number, only one value is scrolled, so that for a certain data bit to be updated, when updating, you can see the situation of digital scrolling, and then you can understand that The value on the data bit to be updated is variable.
  • the data update device when used to update the data, the user can visually see the change of the value on the currently updated data bit, thereby avoiding directly replacing the target statistical value with the current statistical value, so that the user cannot perceive the user. Updated question.
  • the data bit determining module 13 to be updated in the embodiment shown in FIG. 5 includes:
  • the comparison sub-module 131 is configured to compare the current statistical value and the value of the same data bit in the target statistical value respectively.
  • values having different numbers of bits may be replaced by zero, for example:
  • the subtraction method can be used for comparison, or the division method can be used for comparison.
  • the same data bit value judging sub-module 132 is configured to determine whether the current statistical value and the value of the same data bit in the target statistical value are consistent.
  • the determining sub-module 133 is configured to determine, when the current statistical value and the value of the to-be-updated data bit in the target statistical value are inconsistent, the data bit whose value is inconsistent as the data bit to be updated.
  • the value update module 14 in the embodiment shown in FIG. 5 includes:
  • the first difference calculation sub-module 21 is configured to calculate a difference between the current statistical value and the target statistical value.
  • the first difference determining module 22 is configured to determine whether the difference is greater than zero.
  • the first rolling sub-module 23 is configured to, when the difference is greater than zero, scroll the values of all the data bits to be updated in the current statistical value one by one into the target statistical value according to a large to small manner. The value on the same data bit.
  • the current statistic is greater than the target statistic.
  • the value in the current statistic is 345
  • the value in the target statistic is 123.
  • the value of each data bit to be updated in the current statistical value is scrolled bit by bit in a large to small manner. Among them, for the number 9, the next number is 0 according to the way from large to small.
  • a second rolling sub-module 24 configured to scroll the values of all the data bits to be updated in the current statistical value one by one to the target statistical value in a small to large manner when the difference is less than zero The value on the data bit.
  • the value of the current statistic is less than the value of the target statistic.
  • the value in the current statistic is 123
  • the value in the target statistic is 345.
  • the value of each data bit to be updated in the current statistical value is scrolled bit by bit in a small to large manner. Among them, for the number 0, the next number is 9 in the way from small to large.
  • the value when the value is updated, only the current statistic value and the target statistic value are considered, so that when the target statistic value is greater than the current statistic value, the values of all the data bits to be updated are uniformly downward.
  • the direction is scrolled.
  • the target statistic is less than the current statistic, all values on the data bits to be updated are scrolled in a uniform upward direction. Therefore, the user can determine the magnitude relationship between the target statistical value and the current statistical value as long as the scroll direction of the value is seen.
  • the value update module 14 in the embodiment shown in FIG. 5 includes:
  • a second difference calculation sub-module 31 configured to calculate a difference between a value in the current statistical value and a value in the target statistical value for the same data bit to be updated;
  • a second difference determining sub-module 32 configured to determine whether the difference is greater than zero
  • a third rolling sub-module 33 configured to: when the difference is greater than 0, scroll the values in the current statistical value one by one to a value in the target statistical value according to a large to small manner;
  • the difference When the difference is greater than zero, it means that the value in the current statistical value of the data bit to be updated is larger than the value in the target statistical value. For this case, when scrolling, scrolling bit by bit in a large to small manner. Among them, for the number 0, the next number is 9 in the way from large to small.
  • the fourth rolling sub-module 34 is configured to, when the difference is less than 0, scroll the values in the current statistical value one by one to the value in the target statistical value in a small to large manner.
  • the embodiment of the present invention further provides a server, where the server includes: the data updating device described in any implementation manner of the foregoing embodiment shown in FIG. 5 to FIG.
  • the embodiment of the present invention further provides a computer storage medium, wherein the computer storage medium can store a program, and when the program is executed, the implementation of a data update method provided by the embodiment shown in FIG. 1 to FIG. Some or all of the steps in the way.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Mathematical Analysis (AREA)
  • Pure & Applied Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Optimization (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Human Computer Interaction (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Algebra (AREA)
  • User Interface Of Digital Computer (AREA)
  • Complex Calculations (AREA)

Abstract

本发明是关于一种数据更新方法及装置,所述方法包括:接收到统计得到的目标统计值;获取当前显示的当前统计值;确定所述当前统计值中的待更新数据位;当所述当前统计值和所述目标统计值中所述待更新数据位上的值不一致时,将所述当前统计值中每个所述待更新数据位上的数值逐一滚动到所述目标统计值中相同数据位上的值,以将当前显示的当前统计值更新为所述目标统计值。当采用该数据更新方法对数据进行更新时,用户可以直观地看到当前更新的数据位上的值的变化,进而可以避免直接将目标统计值全部替换当前统计值而使得用户无法察觉到更新的问题。

Description

数据更新方法及装置
本申请要求于2015年12月10日提交中国专利局、申请号为201510919041.5、发明名称为“数据更新方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及互联网技术领域,尤其涉及一种数据更新方法及装置。
背景技术
统计在线用户的作用不言而喻,就是为了网站管理者可以知道当前用户的多少,然后根据用户数量来观察服务器或者程序的性能,从而可以直观的了解到网站的吸引力或者网站程序的效率。
在统计到在线人数后,现有技术中,通常都是直接将统计结果显示出去,即利用新的统计数字直接替换历史统计数字,以显示直播在线人数为例,上一时刻的人数为3456,下一时刻为3256,数据将直接从3456直接变换为3256,在数字变化过程中,管理人员无法直观地感受到数字的变化,甚至在数字位较多时,更改其中一位,管理人员甚至无法观察到。
发明内容
为克服相关技术中存在的问题,本发明实施例提供一种数据更新方法及装置。
根据本发明实施例的第一方面,提供一种数据更新方法,包括:
接收到统计得到的目标统计值,获取当前显示的当前统计值;
确定所述当前统计值中的待更新数据位;
当所述当前统计值和所述目标统计值中所述待更新数据位上的值不一致时,将所述当前统计值中每个所述待更新数据位上的数值逐一滚动到所述目标统计值中相同数据位上的值,以将所述当前显示的当前统计值更新为所述目标统计值。
可选地,所述确定所述当前统计值中的待更新数据位,包括:
将所述当前统计值和所述目标统计值中的相同数据位的值分别进行比较;
判断所述当前统计值和所述目标统计值中的相同数据位的值是否一致;
当所述当前统计值和所述目标统计值中所述待更新数据位上的值不一致时,将所述值不一致的数据位确定为所述待更新数据位。
可选地,所述将所述当前统计值中每个所述待更新数据位上的数值逐一滚动到所述目标统计值中相同数据位上的值,包括:
计算所述当前统计值减去所述目标统计值的差值;
判断所述差值是否大于零;
当所述差值大于零时,按照从大到小的方式将所述当前统计值中所有待更新数据位上的值均逐一滚动到所述目标统计值中相同数据位上的值;
当所述差值小于零时,按照从小到大的方式将所述当前统计值中所有待更新数据位上的值均逐一滚动到所述目标统计值中相同数据位上的值。
可选地,所述将所述当前统计值中每个所述待更新数据位上的数值逐一滚动到所述目标统计值中相同数据位上的值,包括:
针对同一待更新数据位,计算所述当前统计值中的值减去所述目标统计值中的值的差值;
判断所述差值是否大于零;
当所述差值大于0时,按照从大到小的方式将所述当前统计值中的值逐一滚动到所述目标统计值中的值;
当所述差值小于0时,按照从小到大的方式将所述当前统计值中的值逐一滚动到所述目标统计值中的值。
可选地,所述方法还包括:
当按照从大到小的方式滚动时,所述待更新数据位上的值按照向下翻页的方式进行逐一滚动;
当按照从小到大的方式滚动时,所述待更新数据位上的值按照向上翻页的方式进行逐一滚动。
可选地,所述方法包括:
当按照从大到小的方式滚动时,所述待更新数据位上的值按照向下滚动的方式进行逐一滚动;
当按照从小到大的方式滚动时,所述待更新数据位上的值按照向上滚动的方式进行逐一滚动。
根据本发明实施例的第二方面,提供一种数据更新装置,包括:
统计值接收模块,用于接收到统计得到的目标统计值;
统计值获取模块,获取当前显示的当前统计值;
待更新数据位确定模块,用于确定所述当前统计值中的待更新数据位;
数值更新模块,用于当所述当前统计值和所述目标统计值中所述待更新数据位上的值不一致时,将所述当前统计值中每个所述待更新数据位上的数值逐一滚动到所述目标统计值中相同数据位上的值,以将当前显示的当前统计值更新为所述目标统计值。
可选地,所述待更新数据位确定模块,包括:
比较子模块,用于将所述当前统计值和所述目标统计值中的相同数据位的值分别进行比较;
相同数据位值判断子模块,用于判断所述当前统计值和所述目标统计值中的相同数据位的值是否一致;
确定子模块,用于当所述当前统计值和所述目标统计值中所述待更新数据位上的值不一致时,将值不一致的数据位确定为所述待更新数据位。
可选地,所述数值更新模块,包括:
第一差值计算子模块,用于计算所述当前统计值减去所述目标统计值的差值;
第一差值判断模块,用于判断所述差值是否大于零;
第一滚动子模块,用于当所述差值大于零时,按照从大到小的方式将所述当前统计值中所有待更新数据位上的值均逐一滚动到所述目标统计值中相同数据位上的值;
第二滚动子模块,用于当所述差值小于零时,按照从小到大的方式将所述当前统计值中所有待更新数据位上的值均逐一滚动到所述目标统计值中相同数据位上的值。
可选地,所述数值更新模块,包括:
第二差值计算子模块,用于针对同一待更新数据位,计算所述当前统计值中的值减去所述目标统计值中的值的差值;
第二差值判断子模块,用于判断所述差值是否大于零;
第三滚动子模块,用于当所述差值大于0时,按照从大到小的方式将所述当前统计值中的值逐一滚动到所述目标统计值中的值;
第四滚动子模块,用于当所述差值小于0时,按照从小到大的方式将所述当前统计值中的值逐一滚动到所述目标统计值中的值。
可选地,所述装置还包括:
第一翻页控制模块,用于当按照从大到小的方式滚动时,所述待更新数据位上的值按照向下翻页的方式进行逐一滚动;
第二翻页控制模块,用于当按照从小到大的方式滚动时,所述待更新数据位上的值按照向上翻页的方式进行逐一滚动。
可选地,所述装置还包括:
第一数值更新模块,用于当按照从大到小的方式滚动时,所述待更新数据位上的值按照向下滚动的方式进行逐一滚动;
第二数值更新模块,用于当按照从小到大的方式滚动时,所述待更新数据位上的值按照向上滚动的方式进行逐一滚动。
根据本发明实施例的第三方面,还提供一种计算机存储介质,其中,该计算机存储介质可存储有程序,该程序执行时可实现本发明实施例的第一方面提供的一种数据更新方法的各实现方式中的部分或全部步骤。
根据本发明实施例的第四方面,还提供一种服务器;所述服务器包括:上述发明实施例的第二方面任一种实现方式所述的数据更新装置。
本发明的实施例提供的技术方案可以包括以下有益效果:
本发明实施例提供的该数据更新方法,当接收到目标统计值,和当前统计值中的值存在至少一位不一致时,就可以将当前统计值中不一致的值逐一滚动到与目标统计值中相同数据位上的值。而且无论哪种滚动方式,在每次滚动时均按照数字大小,只滚动一个数值,这样对于某一个待更新数据位而言,在更新时,可以看到数字滚动的情况,进而可以了解到在该待更新数据位上的值是变化的。
因此,当采用该数据更新方法对数据进行更新时,用户可以直观地看到当前更新的数据位上的值的变化,进而可以避免直接将目标统计值全部替换当前统计值而使得用户无法察觉到更新的问题。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本发明的实施例,并与说明书一起用于解释本发明的原理。
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,对于本领域普通技术人员而言,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1是根据一示例性实施例示出的一种数据更新方法的流程图;
图2为图1中步骤S103的详细流程示意图;
图3为图1中步骤S104的一种详细流程示意图;
图4为图1中步骤S104的另一种详细流程示意图;
图5是根据一示例性实施例示出的一种数据更新装置的结构示意图;
图6为图5中待更新数据位确定模块的结构示意图;
图7为图5中数值更新模块的一种结构示意图;
图8为图5中数值更新模块的另一种结构示意图。
具体实施方式
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本发明相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本发明的一些方面相一致的装置和方法的例子。
图1是根据一示例性实施例示出的一种数据更新方法的流程图。如图1所示,该方法可以包括以下步骤:
步骤S101:接收到统计得到的目标统计值。
在本发明实施例中,目标统计值是下一时刻要显示的值,也即要更新的统计值,目标统计值可以是服务器统计后得到数值,也可以为其它例如运营商服务器统计后发送过来的值。
步骤S102:获取当前显示的当前统计值。
无论是服务器自己生成的还是其它运营商服务器发送的目标统计值,均有一个标识用于表示该值为目标统计值,因此在本发明实施例中,当接收到一个值后,可以提取与该值对应的标识,然后通过该标识就可以确定是否接收到目标统计值。
在得到目标统计值后,还需获取当前显示的当前统计值。这主要是由于目标统计值是下一时刻需要显示的值,如果目标统计值和当前统计值相同,那么当前显示的值 就可以不做变化。而如果目标统计值和当前统计值不相同,就需要对当前显示的值进行调整,以使得调整后的值为目标统计值,进而实现下一时刻可以显示目标统计值。
步骤S103:确定所述当前统计值中的待更新数据位。
在对当前统计值进行更新时,可以采用多种方式,其中,一种方式为:不管当前统计值和目标统计值中相同位上的值是否相同,根据目标统计值对当前统计值中的所有位均进行替换,另一种方式为:只对当前统计值中和目标统计值中相同位上值不同的位进行替换。
由于全部替换的方式会使得效率大大降低,所以,在本发明实施例中,可以按照上述第二种方式进行处理。因此,在该步骤中,需要首先确定当前统计值中的待更新数据位,这里待更新数据位上当前统计值和目标统计值上的值是不相同的,例如:当前数据统计值为11326,目标统计值为11427,那么待更新数据位包括:个位和百位,其它位由于数值相同,所以无需进行更新。
在本发明实施例中,在确定当前统计值中的待更新数据位时,可以将当前统计值中的每一位均与目标统计值中对应位上的值进行对比,一旦有不相同的情况,即可确定为待更新数据位。在本发明实施例中,数据位是指个位、百位、千位、万位等。
步骤S104:所述当前统计值和所述目标统计值中所述待更新数据位上的值不一致,将所述当前统计值中每个所述待更新数据位上的数值逐一滚动到所述目标统计值中相同数据位上的值,以将当前显示的当前统计值更新为所述目标统计值。
在上述步骤S103确定出待更新数据位后,即表示当前统计值中,只有待更新数据位上的值需要更新。在该步骤中,可以按照阿拉伯数字的排序方式逐一将当前统计值中待更新数据位上值滚动到与目标统计值中相同数据位上的值。例如:①、如果当前统计值中待更新数据位上的值为2,目标统计值中相同数据位上的值为8,那么逐一滚动的方式为,从数字2滚到数字3,然后滚到数字4,按照此规律直至滚到数字8;②、如果当前统计值中待更新数据位上的值为8,目标统计值中相同数据位上的值为2,此时,可以确定数字9之后的数字为0,那么逐一滚动的方式为,从数字8滚到数字9,然后滚到数字0,按照此规律直至滚到数字2即可。③、如果当前统计值中待更新数据位上的值为2,目标统计值中相同数据位上的值为7,此时,可以确定数字0之后的数字为9,那么逐一滚动的方式为,从数字2滚到数字1,然后滚到 数字0,按照此规律直至滚到数字7即可。
当所有当前统计值中所有待更新数据位上的值全部更新完成后,就可以将当前统计值更新为目标统计值。
本发明实施例提供的该数据更新方法,当接收到目标统计值,和当前统计值中的值存在至少一位不一致时,就可以将当前统计值中不一致的值逐一滚动到与目标统计值中相同数据位上的值。而且无论哪种滚动方式,在每次滚动时均按照数字大小,只滚动一个数值,这样对于某一个待更新数据位而言,在更新时,可以看到数字滚动的情况,进而可以了解到在该待更新数据位上的值是变化的。
因此,当采用该数据更新方法对数据进行更新时,用户可以直观地看到当前更新的数据位上的值的变化,进而可以避免直接将目标统计值全部替换当前统计值而使得用户无法察觉到更新的问题。
在本发明一实施例中,如图2所示,上述图1所示实施例中的步骤S103可以包括以下步骤:
步骤S1031:将所述当前统计值和所述目标统计值中的相同数据位的值分别进行比较。
考虑到两个值的位数可能不一致,在本发明实施例中,位数不同的值可以用零替代,例如:
可以采用相减的方式来进行比较,也可以采用相除的方式进行比较。
步骤S1032:判断所述当前统计值和所述目标统计值中的相同数据位的值是否一致。
当采用相减的方式进行比较时,可以通过判断相减后得到的差是否为零来判断值是否一致,如果差为零,那么说明相减的两个值一致,否则,说明相减的两个值不一致。当采用相除的方式进行比较时,可以通过判断相除后得到的商是否为零来判断值是否一致,如果商为零,那么说明相除的两个值一致,否则,说明相除的两个值不一致。
当所述当前统计值和所述目标统计值中所述待更新数据位上的值不一致时,执行 步骤S1033,否则,结束流程。
步骤S1033:将值不一致的数据位确定为所述待更新数据位。
通过该实施例,可以快速准确地确定出当前统计值中哪些数据位上的值需要进行更新。
在本发明另一实施例中,如图3所示,图1所示所述中的步骤S104可以包括:
步骤S201:计算所述当前统计值减去所述目标统计值的差值。
步骤S202:判断所述差值是否大于零。
当所述差值大于零时,执行步骤S203,否则,执行步骤S204。
步骤S203:按照从大到小的方式将所述当前统计值中所有待更新数据位上的值均逐一滚动到所述目标统计值中相同数据位上的值。
当差值大于零,表示当前统计值大于目标统计值,例如:当前统计值中的值为345,目标统计值中的值为123。对于这种情况,在滚动时,当前统计值中每一个待更新数据位上值均按照从大到小的方式逐位滚动。其中,对于数字9而言,按照从大到小的方式下一个数字为0。
步骤S204:按照从小到大的方式将所述当前统计值中所有待更新数据位上的值均逐一滚动到所述目标统计值中相同数据位上的值。
当差值小于零时,表示当前统计值的值小于目标统计值中值,例如:当前统计值中的值为123,目标统计值中的值为345。对于这种情况,在滚动时,当前统计值中每一个待更新数据位上值均按照从小到大的方式逐位滚动。其中,对于数字0而言,按照从小到大的方式下一个数字为9。
在本发明实施例中,在对数值进行更新时,只考虑当前统计值和目标统计值的大小,使得当目标统计值大于当前统计值时,所有待更新数据位的值均按照统一的向下方向进行滚动,当目标统计值小于当前统计值时,所有待更新数据位上的值均按照统一的向上方向进行滚动。因此,用户只要看到数值的滚动方向就可以确定目标统计值与当前统计值之间的大小关系。
在本发明另一实施例中,如图4所示,针对同一待更新数据位,图1所示所述中的步骤S104可以包括:
步骤S301:计算所述当前统计值中的值减去所述目标统计值中的值的差值。
步骤S302:判断所述差值是否大于零。
当所述差值大于0时,执行步骤S303;否则,执行步骤S304。
步骤S303:按照从大到小的方式将所述当前统计值中的值逐一滚动到所述目标统计值中的值。
当差值大于零,表示待更新数据位中当前统计值中的值大于目标统计值中的值,对于这种情况,在滚动时,按照从大到小的方式逐位滚动。其中,对于数字0而言,按照从大到小的方式下一个数字为9。
步骤S304:按照从小到大的方式将所述当前统计值中的值逐一滚动到所述目标统计值中的值。
当差值小于零,表示待更新数据位中当前统计值中的值小于目标统计值中的值,对于这种情况,在滚动时,按照从小到大的方式逐位滚动。其中,对于数字9而言,按照从小到大的方式下一个数字为0。
有关本发明实施例中的详细滚动方式,详细可以参见图3中的描述,在此不再赘述。
在本发明上述图3和图4所示实施例的基础上,该方法还可以包括以下步骤。
当按照从大到小的方式滚动时,所述待更新数据位上的值按照向下翻页的方式进行逐一滚动。
当按照从小到大的方式滚动时,所述待更新数据位上的值按照向上翻页的方式进行逐一滚动。
通过增加向上翻页或向下翻页的操作,可以使得在数值变化时,提高动态效果,让用户可以更加直观地观察到数字的变化。
在本发明上述图3和图4所示实施例的基础上,该方法还可以包括以下步骤。
当按照从大到小的方式滚动时,所述待更新数据位上的值按照向下滚动的方式进行逐一滚动;
当按照从小到大的方式滚动时,所述待更新数据位上的值按照向上滚动的方式进行逐一滚动。
通过增加向上滚动或向下滚动的操作,可以使得在数值变化时,提高动态效果,让用户可以更加直观地观察到数字的变化。
图5是根据一示例性实施例示出的一种数据更新装置的结构示意图。如图5所示,该装置可以包括:
统计值接收模块11,用于接收到统计得到的目标统计值。
在本发明实施例中,目标统计值是下一时刻要显示的值,也即要更新的统计值,目标统计值可以是服务器统计后得到数值,也可以为其它例如运营商服务器统计后发送过来的值。
统计值获取模块12,获取当前显示的当前统计值。
无论是服务器自己生成的还是其它运营商服务器发送的目标统计值,均有一个标识用于表示该值为目标统计值,因此在本发明实施例中,当接收到一个值后,可以提取与该值对应的标识,然后通过该标识就可以确定是否接收到目标统计值。
在得到目标统计值后,还需获取当前显示的当前统计值。这主要是由于目标统计值是下一时刻需要显示的值,如果目标统计值和当前统计值相同,那么当前显示的值就可以不做变化。而如果目标统计值和当前统计值不相同,就需要对当前显示的值进行调整,以使得调整后的值为目标统计值,进而实现下一时刻可以显示目标统计值。
待更新数据位确定模块13,用于确定所述当前统计值中的待更新数据位。
在对当前统计值进行更新时,可以采用多种方式,其中,一种方式为:不管当前统计值和目标统计值中相同位上的值是否相同,根据目标统计值对当前统计值中的所有位均进行替换,另一种方式为:只对当前统计值中和目标统计值中相同位上值不同 的位进行替换。
由于全部替换的方式会使得效率大大降低,所以,在本发明实施例中,可以按照上述第二种方式进行处理。因此,在该步骤中,需要首先确定当前统计值中的待更新数据位,这里待更新数据位上当前统计值和目标统计值上的值是不相同的,例如:当前数据统计值为11326,目标统计值为11427,那么待更新数据位包括:个位和百位,其它位由于数值相同,所以无需进行更新。
在本发明实施例中,在确定当前统计值中的待更新数据位时,可以将当前统计值中的每一位均与目标统计值中对应位上的值进行对比,一旦有不相同的情况,即可确定为待更新数据位。在本发明实施例中,数据位是指个位、百位、千位、万位等。
数值更新模块14,用于当所述当前统计值和所述目标统计值中所述待更新数据位上的值不一致时,将所述当前统计值中每个所述待更新数据位上的数值逐一滚动到所述目标统计值中相同数据位上的值,以将当前显示的当前统计值更新为所述目标统计值。
当待更新数据位确定模块13确定出待更新数据位后,即表示当前统计值中,只有待更新数据位上的值需要更新。在该步骤中,可以按照阿拉伯数字的排序方式逐一将当前统计值中待更新数据位上值滚动到与目标统计值中相同数据位上的值。例如:①、如果当前统计值中待更新数据位上的值为2,目标统计值中相同数据位上的值为8,那么逐一滚动的方式为,从数字2滚到数字3,然后滚到数字4,按照此规律直至滚到数字8;②、如果当前统计值中待更新数据位上的值为8,目标统计值中相同数据位上的值为2,此时,可以确定数字9之后的数字为0,那么逐一滚动的方式为,从数字8滚到数字9,然后滚到数字0,按照此规律直至滚到数字2即可。③、如果当前统计值中待更新数据位上的值为2,目标统计值中相同数据位上的值为7,此时,可以确定数字0之后的数字为9,那么逐一滚动的方式为,从数字2滚到数字1,然后滚到数字0,按照此规律直至滚到数字7即可。
当所有当前统计值中所有待更新数据位上的值全部更新完成后,就可以将当前统计值更新为目标统计值。
本发明实施例提供的该数据更新装置,当接收到目标统计值,和当前统计值中的值存在至少一位不一致时,就可以将当前统计值中不一致的值逐一滚动到与目标统计 值中相同数据位上的值。而且无论哪种滚动方式,在每次滚动时均按照数字大小,只滚动一个数值,这样对于某一个待更新数据位而言,在更新时,可以看到数字滚动的情况,进而可以了解到在该待更新数据位上的值是变化的。
因此,当采用该数据更新装置对数据进行更新时,用户可以直观地看到当前更新的数据位上的值的变化,进而可以避免直接将目标统计值全部替换当前统计值而使得用户无法察觉到更新的问题。
在本发明另一实施例中,如图6所示,图5所示实施例中的待更新数据位确定模块13,包括:
比较子模块131,用于将所述当前统计值和所述目标统计值中的相同数据位的值分别进行比较。
考虑到两个值的位数可能不一致,在本发明实施例中,位数不同的值可以用零替代,例如:
可以采用相减的方式来进行比较,也可以采用相除的方式进行比较。
相同数据位值判断子模块132,用于判断所述当前统计值和所述目标统计值中的相同数据位的值是否一致。
当采用相减的方式进行比较时,可以通过判断相减后得到的差是否为零来判断值是否一致,如果差为零,那么说明相减的两个值一致,否则,说明相减的两个值不一致。当采用相除的方式进行比较时,可以通过判断相除后得到的商是否为零来判断值是否一致,如果商为零,那么说明相除的两个值一致,否则,说明相除的两个值不一致。
确定子模块133,用于当所述当前统计值和所述目标统计值中所述待更新数据位上的值不一致时,将值不一致的数据位确定为所述待更新数据位。
通过该实施例,可以快速准确地确定出当前统计值中哪些数据位上的值需要进行更新。
在本发明另一实施例中,如图7所示,图5所示实施例中的数值更新模块14,包括:
第一差值计算子模块21,用于计算所述当前统计值减去所述目标统计值的差值。
第一差值判断模块22,用于判断所述差值是否大于零。
第一滚动子模块23,用于当所述差值大于零时,按照从大到小的方式将所述当前统计值中所有待更新数据位上的值均逐一滚动到所述目标统计值中相同数据位上的值。
当差值大于零,表示当前统计值大于目标统计值,例如:当前统计值中的值为345,目标统计值中的值为123。对于这种情况,在滚动时,当前统计值中每一个待更新数据位上值均按照从大到小的方式逐位滚动。其中,对于数字9而言,按照从大到小的方式下一个数字为0。
第二滚动子模块24,用于当所述差值小于零时,按照从小到大的方式将所述当前统计值中所有待更新数据位上的值均逐一滚动到所述目标统计值中相同数据位上的值。
当差值小于零时,表示当前统计值的值小于目标统计值中值,例如:当前统计值中的值为123,目标统计值中的值为345。对于这种情况,在滚动时,当前统计值中每一个待更新数据位上值均按照从小到大的方式逐位滚动。其中,对于数字0而言,按照从小到大的方式下一个数字为9。
在本发明实施例中,在对数值进行更新时,只考虑当前统计值和目标统计值的大小,使得当目标统计值大于当前统计值时,所有待更新数据位的值均按照统一的向下方向进行滚动,当目标统计值小于当前统计值时,所有待更新数据位上的值均按照统一的向上方向进行滚动。因此,用户只要看到数值的滚动方向就可以确定目标统计值与当前统计值之间的大小关系。
在本发明另一实施例中,如图8所示,图5所示实施例中的数值更新模块14,包括:
第二差值计算子模块31,用于针对同一待更新数据位,计算所述当前统计值中的值减去所述目标统计值中的值的差值;
第二差值判断子模块32,用于判断所述差值是否大于零;
第三滚动子模块33,用于当所述差值大于0时,按照从大到小的方式将所述当前统计值中的值逐一滚动到所述目标统计值中的值;
当差值大于零,表示待更新数据位中当前统计值中的值大于目标统计值中的值,对于这种情况,在滚动时,按照从大到小的方式逐位滚动。其中,对于数字0而言,按照从大到小的方式下一个数字为9。
第四滚动子模块34,用于当所述差值小于0时,按照从小到大的方式将所述当前统计值中的值逐一滚动到所述目标统计值中的值。
当差值小于零,表示待更新数据位中当前统计值中的值小于目标统计值中的值,对于这种情况,在滚动时,按照从小到大的方式逐位滚动。其中,对于数字9而言,按照从小到大的方式下一个数字为0。
有关本发明实施例中的详细滚动方式,详细可以参见图7中的描述,在此不再赘述。
本发明实施例还提供一种服务器;所述服务器包括:上述图5至图8所示实施例的任一实现方式中所述的数据更新装置。
此外,本发明实施例还提供一种计算机存储介质,其中,该计算机存储介质可存储有程序,该程序执行时可实现图1至图4所示实施例提供的一种数据更新方法的各实现方式中的部分或全部步骤。
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本发明的其它实施方案。本申请旨在涵盖本发明的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本发明的一般性原理并包括本发明未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本发明的真正范围和精神由下面的权利要求指出。
应当理解的是,本发明并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本发明的范围仅由所附的权利要求来限制。

Claims (12)

  1. 一种数据更新方法,其特征在于,包括:
    接收到统计得到的目标统计值,获取当前显示的当前统计值;
    确定所述当前统计值中的待更新数据位;
    当所述当前统计值和所述目标统计值中所述待更新数据位上的值不一致时,将所述当前统计值中每个所述待更新数据位上的数值逐一滚动到所述目标统计值中相同数据位上的值,以将所述当前显示的当前统计值更新为所述目标统计值。
  2. 根据权利要求1所述的方法,其特征在于,所述确定所述当前统计值中的待更新数据位,包括:
    将所述当前统计值和所述目标统计值中的相同数据位的值分别进行比较;
    判断所述当前统计值和所述目标统计值中的相同数据位的值是否一致;
    当所述当前统计值和所述目标统计值中所述待更新数据位上的值不一致时,将所述值不一致的数据位确定为所述待更新数据位。
  3. 根据权利要求1所述的方法,其特征在于,所述将所述当前统计值中每个所述待更新数据位上的数值逐一滚动到所述目标统计值中相同数据位上的值,包括:
    计算所述当前统计值减去所述目标统计值的差值;
    判断所述差值是否大于零;
    当所述差值大于零时,按照从大到小的方式将所述当前统计值中所有待更新数据位上的值均逐一滚动到所述目标统计值中相同数据位上的值;
    当所述差值小于零时,按照从小到大的方式将所述当前统计值中所有待更新数据位上的值均逐一滚动到所述目标统计值中相同数据位上的值。
  4. 根据权利要求1所述的方法,其特征在于,所述将所述当前统计值中每个所述待更新数据位上的数值逐一滚动到所述目标统计值中相同数据位上的值,包括:
    针对同一待更新数据位,计算所述当前统计值中的值减去所述目标统计值中的值的差值;
    判断所述差值是否大于零;
    当所述差值大于0时,按照从大到小的方式将所述当前统计值中的值逐一滚动到所述目标统计值中的值;
    当所述差值小于0时,按照从小到大的方式将所述当前统计值中的值逐一滚动到所述目标统计值中的值。
  5. 根据权利要求3或4所述的方法,其特征在于,所述方法还包括:
    当按照从大到小的方式滚动时,所述待更新数据位上的值按照向下翻页的方式进行逐一滚动;
    当按照从小到大的方式滚动时,所述待更新数据位上的值按照向上翻页的方式进行逐一滚动。
  6. 根据权利要求3或4所述的方法,其特征在于,所述方法包括:
    当按照从大到小的方式滚动时,所述待更新数据位上的值按照向下滚动的方式进行逐一滚动;
    当按照从小到大的方式滚动时,所述待更新数据位上的值按照向上滚动的方式进行逐一滚动。
  7. 一种数据更新装置,其特征在于,包括:
    统计值接收模块,用于接收到统计得到的目标统计值;
    统计值获取模块,用于获取当前显示的当前统计值;
    待更新数据位确定模块,用于确定所述当前统计值中的待更新数据位;
    数值更新模块,用于当所述当前统计值和所述目标统计值中所述待更新数据位上的值不一致时,将所述当前统计值中每个所述待更新数据位上的数值逐一滚动到所述目标统计值中相同数据位上的值,以将所述当前显示的当前统计值更新为所述目标统计值。
  8. 根据权利要求7所述的装置,其特征在于,所述待更新数据位确定模块,包括:
    比较子模块,用于将所述当前统计值和所述目标统计值中的相同数据位的值分别进行比较;
    相同数据位值判断子模块,用于判断所述当前统计值和所述目标统计值中的相同数据位的值是否一致;
    确定子模块,用于当所述当前统计值和所述目标统计值中所述待更新数据位上的值不一致时,将所述值不一致的数据位确定为所述待更新数据位。
  9. 根据权利要求7所述的装置,其特征在于,所述数值更新模块,包括:
    第一差值计算子模块,用于计算所述当前统计值减去所述目标统计值的差值;
    第一差值判断模块,用于判断所述差值是否大于零;
    第一滚动子模块,用于当所述差值大于零时,按照从大到小的方式将所述当前统计值中所有待更新数据位上的值均逐一滚动到所述目标统计值中相同数据位上的值;
    第二滚动子模块,用于当所述差值小于零时,按照从小到大的方式将所述当前统计值中所有待更新数据位上的值均逐一滚动到所述目标统计值中相同数据位上的值。
  10. 根据权利要求7所述的装置,其特征在于,所述数值更新模块,包括:
    第二差值计算子模块,用于针对同一待更新数据位,计算所述当前统计值中的值减去所述目标统计值中的值的差值;
    第二差值判断子模块,用于判断所述差值是否大于零;
    第三滚动子模块,用于当所述差值大于0时,按照从大到小的方式将所述当前统计值中的值逐一滚动到所述目标统计值中的值;
    第四滚动子模块,用于当所述差值小于0时,按照从小到大的方式将所述当前统计值中的值逐一滚动到所述目标统计值中的值。
  11. 根据权利要求9或10所述的装置,其特征在于,所述装置还包括:
    第一翻页控制模块,用于当按照从大到小的方式滚动时,所述待更新数 据位上的值按照向下翻页的方式进行逐一滚动;
    第二翻页控制模块,用于当按照从小到大的方式滚动时,所述待更新数据位上的值按照向上翻页的方式进行逐一滚动。
  12. 根据权利要求9或10所述的装置,其特征在于,所述装置还包括:
    第一数值更新模块,用于当按照从大到小的方式滚动时,所述待更新数据位上的值按照向下滚动的方式进行逐一滚动;
    第二数值更新模块,用于当按照从小到大的方式滚动时,所述待更新数据位上的值按照向上滚动的方式进行逐一滚动。
PCT/CN2016/089232 2015-12-10 2016-07-07 数据更新方法及装置 Ceased WO2017096875A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US15/241,511 US20170168672A1 (en) 2015-12-10 2016-08-19 Method and electronic device for data updating

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510919041.5 2015-12-10
CN201510919041.5A CN105871650A (zh) 2015-12-10 2015-12-10 数据更新方法及装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US15/241,511 Continuation US20170168672A1 (en) 2015-12-10 2016-08-19 Method and electronic device for data updating

Publications (1)

Publication Number Publication Date
WO2017096875A1 true WO2017096875A1 (zh) 2017-06-15

Family

ID=56624397

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/089232 Ceased WO2017096875A1 (zh) 2015-12-10 2016-07-07 数据更新方法及装置

Country Status (3)

Country Link
US (1) US20170168672A1 (zh)
CN (1) CN105871650A (zh)
WO (1) WO2017096875A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112527538A (zh) * 2020-12-03 2021-03-19 北京奇艺世纪科技有限公司 设备更新方法、装置、电子设备及存储介质

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108874938B (zh) * 2018-06-01 2021-07-27 深圳乐信软件技术有限公司 数据滚动方法、装置、前端设备、后台服务器和介质
CN109240632B (zh) * 2018-09-17 2022-07-26 北京一点网聚科技有限公司 一种多位数字展现方法及装置

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101290746A (zh) * 2008-06-18 2008-10-22 北京工业大学 电子纸屏幕的图像更新方法
US20130080437A1 (en) * 2011-09-23 2013-03-28 Maxime Marcel Rassi System and method for providing statistics for user submissions
CN104093076A (zh) * 2013-06-19 2014-10-08 腾讯科技(深圳)有限公司 翻页方法、装置及终端

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103500170A (zh) * 2013-09-02 2014-01-08 上海淼云文化传播有限公司 一种报表生成方法及系统
CN107197375A (zh) * 2017-04-25 2017-09-22 北京潘达互娱科技有限公司 一种直播间在线人数显示方法及装置

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101290746A (zh) * 2008-06-18 2008-10-22 北京工业大学 电子纸屏幕的图像更新方法
US20130080437A1 (en) * 2011-09-23 2013-03-28 Maxime Marcel Rassi System and method for providing statistics for user submissions
CN104093076A (zh) * 2013-06-19 2014-10-08 腾讯科技(深圳)有限公司 翻页方法、装置及终端

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112527538A (zh) * 2020-12-03 2021-03-19 北京奇艺世纪科技有限公司 设备更新方法、装置、电子设备及存储介质
CN112527538B (zh) * 2020-12-03 2023-07-25 北京奇艺世纪科技有限公司 设备更新方法、装置、电子设备及存储介质

Also Published As

Publication number Publication date
CN105871650A (zh) 2016-08-17
US20170168672A1 (en) 2017-06-15

Similar Documents

Publication Publication Date Title
US10621281B2 (en) Populating values in a spreadsheet using semantic cues
US12086016B2 (en) Anomaly detection and root cause analysis in a multi-tenant environment
JP2020038689A (ja) アプリケーションを推薦するための方法及び装置並びに推薦アプリケーションを表示するための方法及び装置
TW201918050A (zh) 訊息處理方法及裝置
JP2018116688A5 (zh)
CN111967917B (zh) 预测用户流失的方法以及设备
US20170097742A1 (en) Generating dashboards using a mobile computing device
WO2017096875A1 (zh) 数据更新方法及装置
US12086601B2 (en) Dynamic insights extraction and trend prediction
US11012317B2 (en) Visualization for monitoring infrastructure entities
CN108959101A (zh) 测试结果处理方法、装置、设备及存储器软件测试系统
US20150379112A1 (en) Creating an on-line job function ontology
US10572486B2 (en) Data communication in a distributed data grid
US10205813B2 (en) Method and system for detecting abnormal contact information and server
WO2015135469A1 (en) Method and apparatus for placing display information
US10311031B2 (en) Method, apparatus, and storage medium for removing redundant information from terminal
US20200304539A1 (en) Detecting denial of service attacks in serverless computing
CN108614841A (zh) 时间间隔的调整方法和装置
US20170097956A1 (en) Importing data using a mobile computing device
CN106651968A (zh) 游戏异常检测方法及装置
US20160104305A1 (en) Responsive line display
CN109739397B (zh) 一种搜索结果显示的方法和装置
US11995298B1 (en) Method to identify a point intended to be selected on a touch screen
CN106648867B (zh) 基于云数据中心的智能平滑重启方法及装置
CN114827649B (zh) 构建直播对等网络的方法及装置、电子设备和存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16872075

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16872075

Country of ref document: EP

Kind code of ref document: A1