The invention relates to a heterogeneous
resource scheduling adaptive strategy generation method and
system based on
reinforcement learning, and belongs to the field of
cloud computing security. The
system comprises a container module, a CVSS
database utilization module, a state mapping module and a defense environment. The method comprises the steps that all container instances in a current cloud environment are obtained and stored in a container
pool, heterogeneous attributes and the number of copies of each container instance are recorded, and the heterogeneous attributes comprise an
operating system, a
CPU architecture, container runtime and the type of
application software; calculating
vulnerability utilization difficulty and multi-dimensional heterogeneous indexes of the current container
pool; and utilizing a
reinforcement learning model to decide a defense strategy, inputting the state of the current container
pool into the model, deciding the defense strategy, and performing weighted summation on the
vulnerability utilization difficulty and the isomerism index of the container pool to calculate a
reward value. According to the method, the multi-dimensional heterogeneous attribute and the real-time state information of the container are comprehensively considered, and the optimal defense strategy is adaptively selected, so that the defense cost is reduced, and the real-
time response capability and the defense effect of the
system are improved.