CROSS-REFERENCE TO RELATED APPLICATION(S)

This application claims priority to Chinese Patent Application No. 201711271300.3, filed on Dec. 5, 2017, which is hereby incorporated by reference in its entirety.

TECHNICAL FIELD

The present disclosure relates to the field of cloud computing, and in particular to a multi-index method and a multi-index apparatus for a cloud database, a cloud system, and a computer-readable storage medium.

BACKGROUND

In a cloud computing system, a cloud database plays an important role. Similar to a traditional database, the cloud database also stores several tables, each of which includes rows and columns. However, unlike a traditional database, the cloud database divides a table into multiple sections, each section being placed at a different node of the cloud system. For the convenience of query, multiple indexes are created for each table. However, in the cloud database, it is difficult to implement multiple indexes since data are distributed at different nodes.

In view of this, it is desirable to provide a multi-index mechanism for the cloud database.

SUMMARY

According to embodiments of the present disclosure, there are provided a multi-index method, a multi-index apparatus, a cloud system, and a computer-readable storage medium for solving at least one of the above technical problems in the existing technology.

In a first aspect, a multi-index method for a cloud database is provided according to an embodiment of the present disclosure, wherein the cloud database includes an index unit, the multi-index method includes: storing multiple data values in a storage unit and acquiring storage address information of each of the data values in the storage unit; and storing a value of each of multiple index keywords corresponding to each data value in the index unit in association with the storage address information of the data value, so that the cloud database is indexed according to at least two of the multiple index keywords.

In a second aspect, a multi-index apparatus for a cloud database is provided according to an embodiment of the present disclosure, wherein the cloud database includes an index unit, the multi-index apparatus includes: an acquiring means configured for storing multiple data values in a storage unit and acquiring storage address information of each of the data values in the storage unit; and a storing means configured for storing a value of each of multiple index keywords corresponding to each data value in the index unit in association with the storage address information of the data value, so that the cloud database is indexed according to at least two of the multiple index keywords.

The functions may be implemented by hardware, or also by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.

In a third aspect, a cloud system is provided according to an embodiment of the present disclosure, the cloud system includes: a storage unit configured for storing multiple data values written by a client device, and feeding storage address information of the multiple data values back to the client device; and a cloud database configured for storing a value of each of the multiple index keywords for each data value received from the client device in an index unit of the cloud database in association with the storage address information of the data value, so that the cloud database is indexed according to at least two of the multiple index keywords.

In a fourth aspect, a computer-readable storage medium is provided according to an embodiment of the present disclosure, the computer-readable storage medium stores a computer program, which, when executed by a processor, implements the information processing method as described above.

One of the above technical solutions has at least one of the following advantages or advantageous effects: data values and values of index keywords are stored respectively, such that an index table no longer contains data values, thereby reducing the size of a table stored in the database. The speed of searching for a data value is increased and the pressure of storage space is reduced. The multi-index mechanism of the cloud database can be supported. All the index tables can be updated simultaneously when a row is updated, and a transaction are used to ensure consistency.

The above summary is provided only for illustration, and is not intended to limit the disclosure in any way. In addition to the illustrative aspects, embodiments and features described above, further aspects, embodiments and features of the present disclosure may be readily understood from the following detailed description with reference to the accompanying drawings.

