"Representing Judah" or "Belonging to Judah". God will unite the two kingdoms of Israel and Judah and the Messiah will rule over them. This will come in a prophesied day of restoration.
Joseph was Ephraim's father. The tribe of Ephraim lived in the northern kingdom of Israel. Here the names are used to represent the whole northern kingdom.