If the attacks continue you'll want to build a wall.
If you're active then you'll want to build lots of offense troops (This includes Axes and Light Cavalry), if you're not too active, build lots of defense troops (Swords and Spears).
If you go the defensive route, take note of what troops they're sending more of: if they're sending more axes, build more swords. If they're sending more Light Cavalry, build more spears.
In some cases, a high wall and a high Hiding Place will deter attackers, because the wall will force them to lose troops, and the hiding place will make sure they get little to no resources from attacking you. However, in the case that they're attacking you just to attack or have fun (which is more than a possibility, since it sounds like, from your post, they didn't start attacking you until you asked for an alliance) a hiding place won't do anything to protect you.
Now, to explain why I suggest offense over defense if you're more active: dodge and counter, aka "backtime". When they send their troops to attack your village, move all your offensive troops out of your village, so they're not at home when the troops land. If you practice sending/cancelling and do some math, you can make your troops land back at home seconds after your attackers attack your village. After awhile of building up a big offensive army, you can backtime their troops. There are three ways to do this, two of which are more effective, but the third method, although less effective, is effective enough, and easier to understand.
Method 1: The easiest, but least effective.
Dodge your troops, and cancel the attack. Send your offense back at the village (has to be the same troop speed, ie if someone is attacking you with spears and axes, attack back with axes) once they get back, that way the attacker only has a few seconds between his troops getting home and your troops attacking---most likely catching his offense at home. Offensive troops suck at defending, so you'll likely (assuming he has little to no defense to support his offensive troops) clear his troops and will have one less person to worry about attacking you.
Method 2 & 3: More effective, but less easier to understand.
Methods 2 and 3 rely on using slower or faster troops, and calculating when to send them so that they land just milliseconds after the attacker's troops return home. This includes, for example, figuring out when to send a sword or ram attack at a village (before the attacker's troops land at your village) when they're attacking with axes, or, figuring out when to send axes (after the attacker's troops land at your village) when they're attacking with swords, rams, or nobles. This takes too much to explain, but I'm sure after awhile of playing the game (or browsing through the forums and reading tutorials) you'll be able to better understand and utilize this tactic.
Good luck with your problem, and I hope you manage to come out on top.
-LA