The need for efficient and accurate identification of pathogens in seafood and the environment has become increasingly urgent, given the current global pandemic. Traditional methods are not only time consuming but also lead to sample wastage. Here, we have proposed two new methods that involve Raman spectroscopy combined with a long short-term memory (LSTM) neural network and compared them with a method using a normal convolutional neural network (CNN). We used eight strains isolated from the marine organism Urechis unicinctus, including four kinds of pathogens. After the models were configured and trained, the LSTM methods that we proposed achieved average isolation-level accuracies exceeding 94%, not only meeting the requirement for identification but also indicating that the proposed methods were faster and more accurate than the normal CNN models. Finally, through a computational approach, we designed a loss function to explore the mechanism reflected by the Raman data, finding the Raman segments that most likely exhibited the characteristics of nucleic acids. These novel experimental results provide insights for developing additional deep learning methods to accurately analyze complex Raman data.