I am, by no means, an expert. In fact, if somebody else offers something to contradict me, listen to them. I will just let you know our experience: When we first started taking Booger to the park he was probably about 7 months old. At first, he didn't know what to do, but after the first visit, he quickly became an obsessive sniffer. He only wanted to sniff other dogs, which was a little awkward for us. He wasn't hurting anybody, and no other owners seemed weirded out, so we let him sort it out with the dogs he was sniffing. After the first couple of visits, he wanted to dominate all other dogs, no matter the size. He would find a dog he wanted to hump & obsess until we left the park. We could sometimes distract him, but that didn't always work out. If the other dog held its ground or smacked Booger around, we let them sort it out. We figured as long as Booger wasn't getting hurt, the other dog would tell Booger in his own doggie way "You are NOT dominant." But if the other dog just let Booger hump, we would walk over and remove Booger from the situation if it seemed to bother the other owner. If Booger continued to obsess, we would leave the park & go home. He quickly learned that obsessive humping=going home. We hate to curb his natural behavior, but it was disturbing to others who didn't understand the whole dominance thing.
All this to say, if its a problem, pick him up & remove him from the park & go home. When you're picking him up, use a command to signal going home (I always say, "Booger, we're going home") & if he is anything like our dog, he will learn within 2 or 3 visits.
Again, I stress & emphasize this is just my own personal experience & what we found that works. If anybody else on this forum says we did the wrong thing & just happened to get lucky, listen to them.