The invention provides a policy scheduling method and
system combining method-level policy encapsulation and pre-compilation execution,
electronic equipment and a storage medium, and relates to the technical field of
software architecture and
operation scheduling optimization. In the method, a small number of policy methods with the same preset generality are encapsulated in each policy large class; class-level packaging is changed into method-level packaging so as to reduce the number of strategy classes from the source, a pre-compiling execution
handle is used for replacing traditional reflection calling so as to optimize calling, a layered concurrent cache structure is constructed, a concurrent index layer and a hot spot cache layer are designed, high-frequency strategies are directly retrieved from the hot spot cache layer, full-amount strategies are dispersed in two
layers of caches, and therefore the high-frequency strategies can be directly retrieved from the hot spot cache layer. Hash conflicts are reduced, caching of a hotspot cache layer for a high-frequency strategy is kept through a hotspot updating mechanism, and retrieval and scheduling efficiency under high
concurrency is improved. Compared with a traditional class-level strategy mode implementation scheme, remarkable performance and resource optimization is achieved in a large-strategy and high-
concurrency scheduling scene.