Software copyright is an intellectual property right, but it is not a patent right.
Intellectual property rights include: patent right (invention patent, utility model patent and design patent), trademark right, copyright and other intellectual property rights (new plant variety right, integrated circuit layout design right and computer software copyright).
In the first paragraph of Article 2 of the Patent Law of People's Republic of China (PRC), "Invention refers to a new technical scheme for a product, method or its improvement", and the computer software obviously does not conform to the description.
Computer software is more in line with the description in The Works. According to the computer software protection regulations. The software copyright owner may apply to the copyright administrative department for registration.
In fact, if it's non-commercial software and you don't intend to sell it for profit, I suggest you open source it and put it in github. However, judging from the degree of protection of independent developers and the awareness of domestic users to respect copyright, software copyright is useless.