CPC G06F 16/148 (2019.01) [G06F 16/134 (2019.01); G06N 20/00 (2019.01)] | 18 Claims |
1. A mass file retrieval method based on an artificial intelligence training platform, comprising:
S1, acquiring, by the artificial intelligence training platform, a retrieval task issued by a user;
S2, generating, by the artificial intelligence training platform, a retrieval thread flow based on the retrieval task, and controlling service logic of a retrieval process based on the retrieval thread flow; and
S3, performing, by the artificial intelligence training platform, sequential encoding on files in a database in units of folders to generate ordered queue folders, extracting a retrieval keyword from the retrieval task, and performing keyword retrieval on each ordered queue folder by a combination of binary search and depth-first traversal,
wherein step S2 comprises:
S21, starting, by the artificial intelligence training platform, a retrieval thread;
S22, determining, upon completion of each retrieval, whether a retrieval times threshold is met;
in response to the retrieval times threshold being met, performing step S23; and
in response to the retrieval times threshold being not met, performing step S24;
S23, determining whether the retrieval task is completed;
in response to the retrieval task being completed, performing step S28; and
in response to the retrieval task being not completed, performing step S25;
S24, continuing retrieval, and returning to step S22;
S25, returning retrieval content, pausing the retrieval, and determining whether a total retrieval duration exceeds a retrieval duration threshold;
in response to the total retrieval duration exceeding the retrieval duration threshold, performing step S26; and
in response to the total retrieval duration not exceeding the retrieval duration threshold, performing step S27;
S26, determining that the retrieval times out, and ending the retrieval;
S27, waking up the retrieval, and returning to the step S24; and
S28, returning the retrieval content, and ending the retrieval.
|