In the evolution of the Internet from Web 1.0 to Web 3.0, algorithms have played an irreplaceable role, enabling information technology to functionally realize the transmission of one-way content to decentralized interaction. Algorithms have a subtle impact on people's lives, work, and learning, and this impact is so great that it has produced the idea of algorithmic society and algorithmic era. Algorithms belong to the basic category of digital law and are an important tool for digital rule of law. In existing research, scholars are more concerned about how to regulate algorithms, and less concerned about the legal nature of algorithms. There has been a brief discussion on this issue. However, how the legal nature of algorithms should be defined is still inconclusive. This article aims to answer this question. To this end, this paper sorts out the existing theoretical schemes of the legal nature of algorithms and their interrelationships, including speech, due process, patents, and trade secrets, and analyzes the sources and arguments of these theoretical schemes. There are internal and external reasons why the legal nature of algorithms has formed many disputes. These reasons are also difficult to define the legal nature of algorithms, including: the algorithm ontology and carrier are easy to confuse, the algorithm and the program are indiscriminate, the algorithm and data, the result mix, and the limitation of governance rules. When seeking justification for various theoretical claims, one logical premise is easily overlooked, that is, the criteria for determining the legal nature of algorithms. This paper puts forward these standards, namely the principle of legality, the principle of respecting the fruits of labor, the principle of maintaining public safety, the principle of promoting innovation, and the principle of maximizing social benefits. On this basis, this paper examines various theoretical schemes, and finally proves that the legal nature of the algorithm is a trade secret, not something else. In terms of methodology, this paper uses the method of identification analysis to discuss various scenarios one by one. Compared with previous literature, this paper makes contributions in the following aspects: first, this paper sorts out the existing debates on the legal nature of algorithms in detail, grasps the arguments of these theoretical schemes, and specifically examines them. Second, this paper analyzes the reasons for many disputes over the legal nature of algorithms. The widespread use of algorithms has also caused heated debates about algorithms. Algorithms have been in the field of legal science for a long time, but there are frequent misunderstandings about how their legal nature should be defined, and the reasons behind them deserve careful analysis. Third, this paper clarifies the criteria for defining the legal nature of algorithms, and argues that algorithms are trade secrets on this basis. Algorithms cannot be called speech, nor are they due process. The argument that algorithms are patents is also untenable, and although algorithms have the possibility of patentability in the current legal system, algorithm patenting is not a good solution. [ABSTRACT FROM AUTHOR]