Self-adaptive software technology provides the ability of the software system to adjust its behavior to adapt to environmental changes,greatly improving the usability and stability of the software system.The self-adaptive software system is easy to maintain,adaptable to changes in the environment and needs,and has good fault tolerance.But while introducing self-adaptive control logic,it also adds extra complexity to the original business logic of the software system.Execution,analysis,planning,and execution of loops in self-adaptive control logic consume a lot of system resources.In addition,the timeliness of the self-adaptive adjustment depends largely on the execution frequency of the self-adaptive control loop.The frequently running self-adaptive control logic seriously slows down the business logic of the software itself.In order to solve these problems,this article mainly works from the following aspects:(1)Provide a self-adaptive software running framework based on MAPE-K loop is proposed.In terms of information acquisition,log file analysis is mainly used,and dynamic proxy technology is supplemented to achieve non-intrusive information perception.By using Aspect Oriented Programming,the software system can perform fine-grained function adjustment and structural reorganization at the cost of minimal code intrusion.The non-intrusive design greatly reduces the impact of self-adaptive control logic on the execution efficiency of the target system's business logic,while enabling developers to focus on the target system's business logic,reducing software system update and maintenance costs.(2)Provide a self-adaptive decision method based on dynamic strategy.Self-adaptive software needs to constantly monitor its own attributes and changes in the surrounding environment to evaluate the software's operating status.In this paper,an adjustable time automaton model and software quality of service indicators arc provided to provide a self-assessment method for runtime software systems.This method can quantitatively analyze and evaluate the requirements of software systems,including functional and non-functional requirements.In addition,this paper designs a dynamic strategy by combining Event-Condition-Action(ECA)rules and reinforcement learning algorithms.This strategy has both the efficiency of action strategy and the high availability of target strategy.The self-adaptive control logic based on this strategy can retrieve knowledge and make quick decisions in the face of known anomalies.In the face of unknown anomalies,you can also try and learn towards the goal.This method improves the adaptability of the self-adaptive software system to complex environments.(3)To verify the method proposed in this paper,design experiment verifies the method proposed in this paper.Experimental results show that non-intrusive software self-adaptive technology can better reduce the degree of intrusion of self-adaptive control logic into software business logic and improve the efficiency of self-adaptive software operation.The decision-making method combined with ECA rules and reinforcement learning algorithm has good applicability to complex environments. |