I don't have a first hand source so I might be getting not 100% accurate data but reading Maffeo Maffii's "Cleopatra versus Rome" he stated that after Gabinius' troops were forcibly recalled (they had families and were seeing themselves as a royal guard of sorts) Ptolemy organized his royal guard along the same lines as the roman legion.

I guess I just made too much of a stretch from a secondary source...