EDIT:
[N.B: I fully replaced the original question which was not a very good statement of the problem (see comments) with a more apt one.]
I have records that contain - among other things - the location of users and their ID (it is a big stream of data). I need to provide a 3rd party the location of users. (The stream is also filtered based on other criteria in the stream and perhaps even merged with some other data sources that all contain user IDs - if it is of any interest here and now.)
I must not pass the user IDs to the 3rd party.
The records a output have to enable the 3rd party to build up "routes" and/or time-variant location maps of users over a period of time (say a day but much longer than one hour). To this end they must be able to identify records that belong to the same user. Thus some key has to be passed.
An important restriction that constitutes the core of the problem:
For the discussion let me define "anonymized user ID" an attribute that is is derived from the attributes of the input records such that it is (nearly) uniquely derivable from the user ID (e.g. a hashed salted user ID or a fixed random mapping), and placed in the records of the output stream so that records that belong to the same user can be identified.
Legal regulations and internal rules are such that I must make sure that the "anonymized user ID" can be reproduced for no more than one hour. (Just as an illustrative example: if I would happen to use a salted hash of the user ID as "anonymized user ID" I would have to use a new salt hourly.)
(Note: As mentioned above the 3rd party has to map locations to users for longer. They still don't care about the identity of the user but they have to know that it is the same user all along.)
And the questions are: Is there a way to do this at all? If yes, how?