With the development of generative artificial intelligence, text and data mining has been put into more applications. However, as a technology for collecting and processing a large number of other works, it faces copyright infringement under the current legal system. As a step in the operation of artificial intelligence, text and data mining is to collect and process existing works and information to realize the behavior of knowledge "reproduction", thus promoting the utilization of knowledge and social innovation. Meanwhile, copyright exemption should be provided for its fair use system. The fair use system in the United States can give full play to the autonomy of judges in specific cases and flexibly identify fair use exemptions, while the copyright exception in Europe clarifies that text and data mining activities should be exempted under specific circumstances. Learning from both, China can not only break the closed fair use system, but also build an evaluation system of artificial intelligence infringement and benefit-sharing mechanism, so as to provide scientific norms for fair use and improve the development of artificial intelligence and big data industry in China.