摘要 |
A data processing method, data query method in a database, and corresponding device. A data processing, wherein a query request for data records includes information indicating a source and destination IP address, the source IP address including N sections, the destination IP address including M sections, both M and N being positive integers, the method including: determining an index encoding manner for the database, wherein the index is an one-dimensional index including N+M sections, the encoding manner specifying a variation sequence of various sections for the index, at least one of the source IP address and the destination address indicated by the information contained in the possible query request including at least one section having a wildcard character, wherein according to the index, for any possible query requests, successive data records can be obtained as a query result; according to the encoding manner, establishing the index for the data records. |