The invention discloses a
data redundancy protection method for
adaptive switching of erasure codes and multiple copies. The method comprises the following steps: dividing a to-be-processed file into a plurality of to-be-processed data segments according to a preset length; determining a to-be-coded
data segment based on the operation type of each to-be-processed
data segment, judging whether the to-be-coded
data segment is a standard data segment, if the to-be-coded data segment is the standard data segment, coding by using an
erasure code mode, and if the to-be-coded data segment is a non-standard data segment, carrying out redundancy by using a multi-copy mode to obtain a data block
list; and assembling the data in the data block
list to obtain an
assembly packet, sending the
assembly packet to a
storage pool based on the storage node
list, and storing the data in the
assembly packet in a storage node corresponding to the
storage pool. According to the embodiment of the invention, the advantages of multiple copies and coding are fused through the self-
adaptive switching of the
erasure code mode and the multi-copy mode, the disadvantages of the
modes are overcome, and efficient data updating is ensured on the premise of high
storage efficiency.