dialectical materialism is, in a very condensed and simplified summary:
dialectics: a form of logic originating in German philosophy (Marx's predecessors); it's a way of conceptualizing and understanding the world, centered on change; the world is constantly changing because of an innumerable number of social/economic/political forces acting upon it, and with the dialectical framework you seek to try to identify these forces and how they interact, and how their interaction creates change, if you've heard of thesis-antithesis-synthesis, that's a simple statement of it: a force, an opposing force, and the result of the clash of these forces; of course you cannot identify every single force of change and you may incorrectly identify them, so one seeks evidence via history and current events; essentially it's a way of trying to understand how the world works, it's like a formulation of something akin to the scientific method to social sciences; you observe, create hypotheses, test hypotheses, then you create falsifiable theories from your results
because the dialectical method places a strong emphasis on creating testable hypotheses and seeking evidence to create falsifiable theories, it necessarily requires these hypotheses to be strongly grounded in the material world and history to draw valid, applicable conclusions that are useful; the theory is just a way of trying to explain the world as it is, but the world and the world's change exists prior to the theory; theory is a human/philosophical invention to try to understand the world; if a theory is proven wrong by history and current events you should reject it, understand why it is wrong and try to revise and adapt it to new evidence
dialectical materialism is, in the shortest summary: an adaptation/formulation of the scientific method to social sciences
And it absolutely precedes the Stalin era, and was used by people decades before Stalin came to power.