Data sharding technology is a method of dividing complete data into several slices to protect its security during transmission and reorganization. In order to further ensure the security of data and improve the robustness of transmission, a data security transmission scheme based on sharding technology is proposed by combining error correction code technology. This scheme first segments the complete data and encodes it using Reed Solomon code. Then, the sliced data is encrypted using RSA public key cryptography algorithm. The target node decrypts the data using a private key and performs aggregation and summation. After decoding, the original data is restored. The experimental results show that this scheme can solve the problem of data transmission in which a small portion of data shards are lost or damaged due to poor network environment or attacks, fully restoring the original data, ensuring data security and transmission robustness, and reducing the impact of attacks or damages on data transmission.