Is it a trademark infringement to open a shop online with the same name as opening a shop in reality?
That depends on whether the other party's name is registered as a trademark. If it has been registered, it is regarded as infringement. Not registered, not counted. According to China's laws, trademarks can be used without registration (there are exceptions, such as cigarettes, which must be registered), but they cannot be exclusively protected by the state without registration. That is, under normal circumstances, you can't stop others from using your trademark, but if someone else registers the trademark, you can ask you to stop using it. So if you want your logo to be protected by the state, you must apply for a registered trademark.