- 专利标题: Data updating method and device for a distributed database system
-
申请号: US16089949申请日: 2016-11-04
-
公开(公告)号: US11176110B2公开(公告)日: 2021-11-16
- 发明人: Huadong Huang , Wei Wang , Qiqian Lin
- 申请人: HANGZHOU HIKVISION DIGITAL TECHNOLOGY CO., LTD.
- 申请人地址: CN Zhejiang
- 专利权人: HANGZHOU HIKVISION DIGITAL TECHNOLOGY CO., LTD.
- 当前专利权人: HANGZHOU HIKVISION DIGITAL TECHNOLOGY CO., LTD.
- 当前专利权人地址: CN Zhejiang
- 代理机构: Meunier Carlin & Curfman LLC
- 优先权: CN201610191763.8 20160330
- 国际申请: PCT/CN2016/104690 WO 20161104
- 国际公布: WO2017/166815 WO 20171005
- 主分类号: G06F16/21
- IPC分类号: G06F16/21 ; G06F16/18 ; G06F16/22 ; G06F16/27 ; G06F16/182
摘要:
A method and an apparatus for updating data for a distributed database system are disclosed. The method includes: obtaining a data table stored in each of servers in the distributed database system, and for each obtained data table, reading each row of data in this obtained data table (S101); determining, for each row of data read, whether a key for this row of data exists in the hash table stored in the server (S102); if the key for this row of data does not exist in the hash table, writing the row of data into the hash table, and writing the key and version information for the row of data into the hash table (S105); if the key for this row of data exists in the hash table, reading a first version number of the row of data in the data table, and determining whether the first version number is greater than a second version number for the row of data stored in the hash table (S103); if the first version number is greater than the second version number, updating the row of data into the hash table and updating version information for the row of data (S104); sending the hash table to a master server so as to cause each of servers in the distributed database system to perform data recovery based on the hash table received by the master server (S106). The method can recover the latest data in a distributed database system.
公开/授权文献
信息查询