Data processing method and system of establishing input recommendation
AssigneeAlibaba Group Holding Limited
InventorsFan Dong, Yinan Zhang
Life of this patent
Estimating the term…
Abstract
A data processing method of establishing an input recommendation is provided. The method establishes an inverted index having a variable prefix length based on entry number distribution, thus preventing the established inverted index from generating a number of index entries that are rarely used, and reducing the redundancy of the input recommendation index that is created.
Claims20
A method implemented by one or more computing devices, the method comprising:
- generating a prefix which length is less than or equal to a first length for each entry, taking the prefix as a current prefix and the first length as a current length;
- combining prefixes having a same content in a plurality of current prefixes and generating an inverted index for the combined prefixes and corresponding entries;
- determining whether a respective number of entries pointed by each prefix in the inverted index is greater than a preset value N:
- if a prefix that points to more than N number of entries exists in the inverted index, truncating entries for the prefix which number of entries is greater than N in the inverted index,
- updating the current prefix and the current length based on a prefix which prefix length is equal to the current length and which number of entries is (N+1) in the inverted index, and
- returning the current prefix and the current length that have been updated to the step of combining the prefixes for reprocessing again;
- and
- outputting the inverted index as an input recommendation index if the respective number of entries pointed by each prefix is less than or equal to N.
A system comprising:
- one or more processors;
- one or more memories stored thereon computer-readable instructions that, when executed by the one or more processors, cause the one or more processors to perform acts including:
- generating a prefix which length is less than or equal to a first length for each entry, and take the prefix as a current prefix and the first length as a current length;
- combining prefixes having a same content in current prefixes and generate an inverted index for the combined prefixes and corresponding entries;
- determining whether a number of entries that are pointed by each prefix in the generated inverted index is greater than N, shift to a truncating for processing if the number of entries is greater than N, and output the inverted index as an input recommendation index that is created if the number of entries that are pointed by each prefix is less than or equal to N;
- truncating entries for a prefix which number of entries is greater than N in the inverted index;
- and
- updating the current prefix and the current length based on a prefix which prefix length is equal to the current length and which number of entries is (N+1) in the inverted index, and return the current prefix and the current length that are updated to the act of combining prefixes for reprocessing again.
One or more computer-readable media storing executable instructions that, when executed by one or more processors, cause the one or more processors to perform acts comprising:
- setting up a first length, determining whether a length of a received query string is greater than the first length, and taking an inverted index corresponding to a query string which length is less than or equal to the first length as an input recommendation result;
- truncating a query string which length is greater than the first length based on the first length;
- determining whether a number of entries in the inverted index corresponding to the truncated query string is greater than N, updating the first length if the number of entries is greater than N;
- returning the updated first length for repeating the truncating until the number of entries corresponding to the truncated query string is less than or equal to N;
- filtering unmatched entries if the length of the query string is greater than the first length and the number of entries corresponding to the query string truncated is less than or equal to N;
- and
- outputting the input recommendation result of the query string.
Dependencies are inferred from the claim text.