Our company is a research and development company. How long is the temporary protection period of patent right?

The protection period of invention patent right is 20 years, and the protection period of utility model patent right and design patent right is 10 year. Take the invention patent application as an example. From the date of application to the date of publication of the application, the application is in the confidential stage. At this stage, the protection of its rights is manifested in that after the application for a patent for invention, the application with the same theme will lose its novelty because of its conflict, and the patent right cannot be granted. The period from the publication of the application to the grant of the patent right is