The invention discloses an AI service intelligent
fault tolerance and degradation method, device and equipment based on a
Java bytecode enhancement technology, a medium and a product, and relates to the technical field of AI service integration. According to the method, in a class loading period of
Java application starting, a loaded class is scanned to identify target methods marked with declarative fault-tolerant annotations, a
bytecode operation framework is utilized to enhance the target methods so as to
implant a unified fault-tolerant logic interception entry, and then in a running period, when the target methods are called, the target methods are subjected to fault-tolerant
annotation processing. And triggering a fault-tolerant interceptor through the interception entrance to analyze the
annotation to obtain a fault-tolerant strategy, allocating an independent fault-tolerant component instance to the fault-tolerant interceptor based on the
unique identifier of the method, constructing and executing an enhanced call chain containing a fusing check and retry mechanism, and finally, if the execution of the call chain fails, executing the fault-tolerant interceptor. And if yes, a preset degradation method in the fault-tolerant strategy is automatically executed, so that complete non-intrusive decoupling of AI service fault-tolerant management and service logic can be realized, and the reliability of the
system is remarkably improved.