-
公开(公告)号:US20210224225A1
公开(公告)日:2021-07-22
申请号:US16967660
申请日:2018-02-05
Applicant: Huawei Technologies Co., Ltd.
Inventor: Xiang GAO , Wei DU , CHUN YEN CHEN , Ning WANG
Abstract: A data query method and apparatus are disclosed. The method includes: determining a target directory block including m directory entries and m file names, where the m directory entries one-to-one correspond to the m file names, and the m directory entries and the m file names are sequentially arranged according to a preset rule; determining a current first set and a current second set based on a binary search algorithm and the target directory block; determining a first common prefix between a to-be-accessed file name and a file name in the current second set; comparing the to-be-accessed file name with a third file name character by character from a first character after the first common prefix; and if the to-be-accessed file name is the same as the third file name, obtaining data of a to-be-accessed file based on a directory entry corresponding to the third file name.