For a future scenario where everything is connected, cognitive technology can be used for spectrum sensing and access, and emerging coding technologies can be used to address the erasure of packets caused by dynamic spectrum access and realize cognitive spectrum collaboration among users in mass connection scenarios. Machine learning technologies are being increasingly used in the implementation of smart networks. In this paper, after an overview of several key technologies in the cognitive spectrum collaboration, a joint optimization algorithm of dynamic spectrum access and coding is proposed and implemented using reinforcement learning, and the effectiveness of the algorithm is verified by simulations, thus providing a feasible research direction for the realization of cognitive spectrum collaboration.