The application provides an API behavior prediction and
security policy management method based on
machine learning, relates to the field of
computer network security, and comprises the following steps: acquiring API
original data in real time, preprocessing the
original data to obtain preprocessed
original data, acquiring API dimension features in real
time based on the preprocessed original data, and fusing to obtain
unstructured data; a dynamic characteristic validity
verification rule is established to preprocess the
unstructured data, and a unified dimension
standardization feature
tensor is obtained; the joint modeling of API
behavior space-time features is performed through the collaborative architecture of a multi-head time attention mechanism and a dynamic graph neural network, API behavior prediction is performed, API dynamic
security management and control strategies are generated in real time through a strategy engine,
strategy execution is performed, the security
strategy execution effect is monitored in real time, and iterative optimization is performed. The application solves the problems of fixed and rigid
security management and control strategies of a traditional API gateway, and the difficulty in dynamically adjusting security strategies according to real-time access conditions and behaviors.