The invention belongs to the technical field of information application, and particularly discloses a
file management method and device based on Redis, and the method comprises the steps that a file is published, a subsystem uploads the file and stores the file in a Redis
database in a
slicing mode, and file information is published to a channel; message subscription and index maintenance: receiving file information by a sub-
system subscription channel, and updating a local file index table; and file asking and checking: asking the file blocks by the subsystem according to the file index table, and integrating and checking the file integrity. A publishing and subscribing mechanism of the Redis
database serves as a core, service nodes do not need to be newly added, use of resources is reduced, the method is a lightweight
file management mode, file consistency of subsystems under a distributed architecture is guaranteed, file blocks are cached through the Redis
database, a plurality of systems are allowed to acquire and upload a plurality of files at the same time, and the
file management efficiency is improved. The
file transmission efficiency is guaranteed, and the file exclusive problem is solved.