I think the easiest way to continue the Anglo-Japanese Alliance is to prevent US entry into the Great War. The alliance was dropped by the British largely in the hope that an alliance of sorts could be formed with the US in future wars; the US was obviously a more powerful ally. But the US was not offering an alliance, as after the war it returned to isolationism. If the US never enters the war, and stays isolationist, then I doubt the UK would agree to drop the treaty. It is one thing to drop one ally in hopes of picking up another. No matter how rich the US is, though, the UK will not drop an ally that fought with them in the war in order to please a US that did not fight and seems likely to fight alongside the UK in the future.
As to the Sino-German Alliance... well, it's not to hard to create a more lasting one, but towards what end? I think a lot of people who grew up in the current period of a rising China forget just how poor, backwards, and fractured China was then. An alliance with Japan offered, at a minimum, a powerful navy to distract the Anglo-Americans. China offers no navy, and a army with basically no power projection capabilities. The IJA, basically a pre-WWI light infantry force, was able to inflict devastating defeats on much larger Chinese armies. While China could distract the Allies (perhaps by attacking the Concessions?), to be frank I don't think it would take a very large British or French force to defeat China (defeat, not conquer).
I am at a event right now, but when I get home later I will try to post about the factors that lead to the militarists taking over in Japan, and what can be done to avoid it.