At present, there are differences in the building of information in various career institutions. The degree of implementation of management, teaching and services is uneven, and educational resources are limited and unevenly distributed. The construction of educational resources includes the overall layout, structure and quantity of resources, information mode, service impact, etc, all of which require systematic planning. Under the above background, this paper conducted research on the topic of building a model of co-construction and sharing of digital ideological and political resources for embedded courses based on artificial intelligence algorithms, and considered the insufficiency of the existing digital ideological and political resources in the allocation efficiency and insufficient system sharing, as well as creatively used artificial intelligence algorithms to improve the previous system. In the algorithm, the texture mapping of the system was carried out, and the duty cycle of each columnar area was specified. In the experiment, the number of resources in the digital resource platform was investigated, and the input of different types of colleges and universities in digital ideological and political resources was collected. The explanation of experimental data: 83% of 985/211 colleges and universities used the database designed in this paper, and 17% of them actively built the database; 57% of the general undergraduate schools used the database designed in this paper, and 20% were under construction, as well as 13% were still preparing. This showed that in general undergraduate schools, a small proportion of the digital ideological and political resource sharing model was used, and the 985/211 colleges and universities had relatively good investment in the construction of digital ideological and political resources.