DATA INDEX QUERY METHOD, APPARATUS AND SYSTEM
First Claim
1. A data query method, comprising:
- receiving a query request from a user end, wherein the query request comprises query condition information, and the query condition information comprises an index attribute and an index attribute value that the index attribute needs to satisfy;
generating an index key value set corresponding to the query condition information according to the index attribute and the index attribute value, wherein the index key value set comprises one or more index key values, and the one or more index key values are generated by shuffling and encoding a Gray code corresponding to the index attribute value according to a preset rule;
obtaining an indicator set that is used for indicating data and is corresponds to the index key value set according to the index key value set;
generating an intermediate data set corresponding to the indicator set;
obtaining, from the intermediate data set, a target data set corresponding to the query condition information according to the query condition information carried in the query request of the user end; and
sending the target data set to the user end.
1 Assignment
0 Petitions
Accused Products
Abstract
Embodiments of the present invention disclose a data index query method including: after performing Gray encoding on an index attribute, shuffling and encoding, by a server side, a Gray code corresponding to the index attribute to generate at least one index key value and storing the index key value; generating, by the server side according to query condition information carried in a query request, an index key value set or interval corresponding to the query condition information; obtaining an indicator set or interval used for indicating data and corresponding to the index key value set or interval according to the index key value set or interval; generating an intermediate data set corresponding to the indicator set or interval; and finally obtaining, from the intermediate data set, a target data set corresponding to the query condition information according to the query condition information carried in the query request.
8 Citations
15 Claims
-
1. A data query method, comprising:
-
receiving a query request from a user end, wherein the query request comprises query condition information, and the query condition information comprises an index attribute and an index attribute value that the index attribute needs to satisfy; generating an index key value set corresponding to the query condition information according to the index attribute and the index attribute value, wherein the index key value set comprises one or more index key values, and the one or more index key values are generated by shuffling and encoding a Gray code corresponding to the index attribute value according to a preset rule; obtaining an indicator set that is used for indicating data and is corresponds to the index key value set according to the index key value set; generating an intermediate data set corresponding to the indicator set; obtaining, from the intermediate data set, a target data set corresponding to the query condition information according to the query condition information carried in the query request of the user end; and sending the target data set to the user end. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A method for establishing a data index, comprising:
-
after performing Gray encoding on an index attribute, shuffling and encoding a Gray code corresponding to the index attribute according to a preset rule; and generating at least one index key value from the shuffled and encoded Gray code and storing the index key value in a memory. - View Dependent Claims (8)
-
-
9. A data query apparatus, comprising:
-
a query request receiving unit, configured to receive a query request from a user end, wherein the query request comprises query condition information, and the query condition information comprises an index attribute and an index attribute value that the index attribute needs to satisfy; a generating unit, configured to generate an index key value set corresponding to the query condition information according to the index attribute and the index attribute value, wherein the index key value set comprises one or more index key values, and the index key value is generated by shuffling and encoding a Gray code corresponding to the index attribute value according to a preset rule; a first obtaining unit, configured to obtain an indicator set that is used for indicating data and corresponds to the index key value set according to the index key value set generated by the generating unit; the generating unit is further configured to generate an intermediate data set corresponding to the indicator set obtained by the first obtaining unit; a second obtaining unit, configured to obtain, from the intermediate data set generated by the generating unit, a target data set corresponding to the query condition information according to the query condition information carried in the query request of the user end; and a sending unit, configured to send the target data set obtained by the second obtaining unit to the user end. - View Dependent Claims (10, 11, 12, 13, 14)
-
-
15. A storage system, comprising an apparatus for establishing a data index and a data query apparatus, wherein
the apparatus for establishing the data index is configured to, after Gray encoding is performed on an index attribute, shuffle and encode a Gray code corresponding to the index attribute according to a preset rule, generate at least one index key value from the shuffled and encoded Gray code, and store the index key value; - and
the data query apparatus is configured to receive a query request from a user end, and according to query condition information carried in the query request, generate an index key value set corresponding to the query condition information, wherein the index key value is from the apparatus for establishing the data index;
obtain an indicator set that is used for indicating data and corresponds to the index key value set according to the index key value set;
generate an intermediate data set corresponding to the indicator set;obtain, from the intermediate data set, a target data set corresponding to the query condition information according to the query condition information carried in the query request of the user end; and
send the target data set to the user end.
- and
Specification