Rolling bearings are crucial components in rotating machinery and often operate under high speeds and heavy loads for extended periods of time. If a bearing fails, it can disrupt the normal functioning of the machinery and lead to economic losses and even casualties. As a result, diagnosing faults in rolling bearings is critical and urgent. Currently, traditional fault diagnosis methods and deep learning-based methods are used for rolling bearing fault diagnosis. However, traditional methods require knowledge of signal processing techniques and selecting fault features through artificial algorithms. On the other hand, deep learning-based methods require a large number of labeled samples, but fault samples are often limited in practice. Additionally, there can be a problem of insufficient generalization ability when bearing working conditions change, which limits the application of deep learning in bearing fault diagnosis. To address this issue, a novel method is proposed in this paper that involves few-shot transfer learning and meta-learning. The method consists of four stages: using genetic algorithm to determine penalty factor and modal numbers adaptively in variational modal decomposition (GAVMD), combining correlation coefficient to eliminate useless modes, obtaining the instantaneous frequency characteristics of useful modes through Pseudo Wigner-Ville Distribution (PWVD), and using GAVMD with PWVD to obtain time-frequency images of the vibration signals of the rotating bearing. Finally, an improved relational network with deep coding ability and attention mechanism (AM) is constructed based on meta-transfer-learning and original relational network (MTLRN-AM). The experiments in this paper are based on the benchmark dataset of bearing fault diagnosis, and the results show that the proposed method has better multi-task learning ability in meta-learning and better classification performance in few-shot scenarios for bearing fault diagnosis. The average recognition rate reached 96.53% and 98% in 10-way 1-shot and 10-way 5-shot, respectively.