The present invention discloses a data processing method and a storage device, in order to at least solve the problem that the current administrator has low efficiency in querying the log data of thesession. The method comprises that: a storage device receives a log storage request, wherein the log storage request carries log data of a session; an index value of a first-level directory of the logdata is determined, wherein the index value of the first-level directory is represented by E0; an index value of a second-level directory of the log data is determined, wherein the index value of thesecond-level directory is represented by B0; an index value of a third-level directory of the log data is determined, wherein the index value of the third-level directory is represented by (X0,Y0), and the (X0,Y0) represents a coordinate which takes the X0 as the abscissa, and the Y0 as the ordinate in a first coordinate system with the (E0, B0) as the origin, the end time of the session as the abscissa system, and the start time of the session as the ordinate system; and according to the E0, B0, and (X0, Y0), the log data is stored. The technical scheme of the present invention is applicableto the technical field of storage.