A standard graphical representative of a Bayesian network structure is a special chain graph, known as an essential graph. An alternative algebraic approach to the mathematical description of this statistical model uses instead a certain integer-valued vector, known as a standard imset. We give a direct formula for the translation of any chain graph describing a Bayesian network structure into the standard imset. Moreover, we present a two-stage algorithm which makes it possible to reconstruct the essential graph on the basis of the standard imset. The core of this paper is the proof of the correctness of the algorithm.