Okey. Just reading Rfid tags ought to give result searching topics.
Suppose a tag is just only a 13 number of digits. Then comparing that 13 digit number with the table of other defined 13 digit Ids would not be that hard.
I use a Dutch system named iTrain to control 30 trains on some 100-150 sections. That system uses other technichs....
Have a look! Link: iTrain - Layout control for Windows, macOS and Linux (berros.eu)