In order to improve the accuracy of e-commerce credit risk assessment, this paper suggests utilizing an artificial immune network to upgrade the text mining algorithm. Through this process, a new e-commerce risk assessment model reliant on the improved algorithm can be constructed with the intention of decreasing the likelihood of risk in digital transactions. The results show that the accuracy and loss rate of the improved clustering algorithm are 97.3% and 4.3%, respectively, both of which are better than the comparison algorithm. Then, the empirical analysis of the e-commerce credit risk assessment model proposed in the study shows that the average fitness and accuracy of the model after stability are 0.0022 and 95.63%, respectively, demonstrating superior performance compared to the comparison model. The above results show that the improved algorithm and the risk assessment model have good performance. Therefore, using this model to evaluate the credit risk of e-commerce can not only improve the accuracy of credit evaluation and promote the sustainable development of e-commerce. Furthermore, it can catalyze the adoption of innovative credit evaluation methods and promote the application of artificial intelligence technology in e-commerce.