As seems to inflammation of the finger. may be you had a unnoticed trauma of the finger. nothing to worry much.
Wrap a gauze dipped in cold
water around the finger for few hours it helps in reducing the swelling. start taking antiinflammatory tbs. look out for the relief. if things worsen then need to consult an orthopaedician to rule out if any fracture
line in the finger.