According to the availability and interference conditions of spectrum allocation, it is a major feature of the existing re-search to abstract the network composed of cognitive users into a graph, and promote the study of spectrum allocation by graph theo-ry. The final spectrum allocation strategy is usually recorded in the non-interference allocation matrix, but the problem of high cod-ing dimension often exists when it is encoded directly. In order to simulate and model cognitive radio spectrum allocation more effi-ciently, the availability matrix is extracted and encoded and reduced to one-dimensional matrix. After optimization, the availabilitymatrix is restored according to the original corresponding relationship, so as to better reduce the coding dimension and the spatial di-mension of understanding. Experimental results show that this method can complete simulation modeling of radio spectrum alloca-tion more efficiently and quickly.