This probably depends on whether you use the company's materials, facilities and equipment in your spare time. If it is entirely working time and does not use any of the company's materials, facilities and equipment. It should be your own invention patent, and the benefits belong to you. If the company's relevant materials, facilities and equipment are used during working hours, then negotiation with the unit is required. It seems that the company cannot fully keep the benefits for itself. In addition, whether there was any relevant contract or agreement concluded at the beginning. Also, this is not the job assignment assigned to the researcher by the unit. It is necessary to make a judgment based on the above circumstances.