The role-based access control model (RBAC) is an access control approach oriented to enterprise security policy, which plays a leading role in the field of access control due to its good applicability and flexibility. However, as the scale of access subjects and access objects expands, it becomes more difficult to develop a role engineering system that meets security requirements. Particle size calculation can reduce or improve the particle size of the problem and improve efficiency on the premise of obtaining satisfactory solutions. In this study, the granularity calculation method was introduced into the role formulation process of RBAC, which can effectively reduce the complexity of the problem and improve the efficiency of the RBAC role engineer. At the same time, the concept lattice reduction method was used to reduce the role concept lattice and reduce the workload of the system security administrator.