Based on the body structure and double pair of legs per body segment, this is a millipede.
Based on the small size and spacing between body segments, it could possibly be in the Paradoxosomatidae family. You could check by examining the specimen more closely:
Most species possess a groove or furrow ("sulcus") on the dorsal surface between the keels (paranota) on each segment.
National Geographic ran a story/video on swarming Paradoxosomatidae in Senegal in 2017:
Some species swarm together during mating season or to hunt for food, and some studies have theorized juveniles swarm together for protection from predators.
Bellairs et al. (1983)1 studied a similar swarming species of millipede in India:
The adults of Streptogonopus phipsoni (Pocock), an Indian polydesmoid millipede, emerge from the soil at the onset of the monsoon and mate. Eggs are laid in the soil and the adults die. The larvae leave the soil at stadium III and, apart from moulting periods, remain on the surface until the end of the monsoon. The larvae are aggregated in swarms, usually consisting of several hundred individuals. They are active on open ground, including metalled roads, during daylight, but usually spend the night in an inactive state under cover of stones or vegetation. If a swarm is disturbed, the individuals scatter but later reaggregate.
Source: Bellairs et al. (1983)
I couldn't find any additional reputable (or really much of any) detail about S. phipsoni in English sources online. So I think I'll leave you with this information for you to explore in your native language more closely.
Though, Bellairs et al. cite Hoffman (1980) 2 and Attens (1937) 3 as their identification sources.
Also, Golovatch & Wesener (2016)4 provide a relatively up-to-date species checklist of the millipedes of India, so I'm certain that reference would be a good place to continue learning more.
1 Bellairs, V., Bellairs, R. and Goel, S., 1983. Studies on an Indian polydesmoid millipede Streptogonopus phipsoni Life cycle and swarming behaviour of the larvae. Journal of Zoology, 199(1):31-50.
2 Hoffman, R. L. (1980). Classification of the Diplopoda. Geneve: Musee d’Histoire Naturelle
3 Attems, C. (1937). Myriapoda 3. Polydesmoidea 1 Fam. Strongylosomidae. Tierreich 12:1-300.
4 Golovatch, S.I. and Wesener, T., 2016. A species checklist of the millipedes (Myriapoda, Diplopoda) of India. Zootaxa, 4129(1):1-75.