Knocking is related to basically fuel octane rating (to put it crudely, octane = quality). Lower octane fuels work with car having lower compression ratio. High compression ratio cars need a higher octane fuel. If the octane and compression ratios are suited to each other and the car is still knocking, then there is a timing issue - the timing is too far advanced.
If the timing and octane and compression ratio are all OK, then there is a very rare possibility of EXCESSIVE carbon build up on the piston crowns and/or exhaust valves. This carbon glows red hot with the combustion process and begins to act like a spark plug burning the air/fuel mixture prematurely as soon as it enters the combustion chamber much like an advanced ignition scenario.
If your car does not knock in the morning when it is cold and begins to knock once it reaches operating temperature, then, in addition the above cause, there is even a rarer possibility that oil starvation is occurring at the cylinder walls and the engine is near seizure mode. But I don't think that is happening since your engine is still running and has not become spoilt.
You will have to investigate the cause elliminatinating them one by one.