With the rapid development of technology in the automotive field in recent years,the traditional approach to software architecture is facing challenges.Microservice architecture has become a popular architecture in software engineering because of its agility,scalability,flexibility,and other characteristics.However,there is a lack of effective partition criteria for splitting the automotive service system from the traditional architecture into multiple microservices.In order to solve this problem,this paper proposes a microservice partitioning method based on DDD(domain-driven design)and K-Means algorithm for automotive service system.According to the characteristics of microservices and the functional architecture of automotive service business,the mapping relationship between business logic and service is determined,and then a weighted graph is constructed,and the optimal microservice partition scheme is obtained through the K-Means algorithm.Experiments have shown that microservices partitioned using this method have certain advantages in reliability,coupling,fault tolerance,autonomy,and other aspects.