Understand representations of c*-algebras from a categorical point of view

In my lecture on von Neumann algebras we have defined a representation of a c*-algebra A\mathcal{A} as a *-homomorphism π\pi into B(H)\mathcal{B}(\mathcal{H}) for some Hilbert space H\mathcal{H}. Then we have defined subrepresentations as the restriction of π\pi to invariant subspaces, i.e.: If K\mathcal{K} is a closed subspace of H\mathcal{H} such that for every a∈Aa\in\mathcal{A} we have π(a)(K)⊆K\pi(a)(\mathcal{K}) \subseteq \mathcal{K}, then π|K:A→B(K),a↦π(a)|K\pi|_\mathcal{K}: \mathcal{A}\to\mathcal{B}(\mathcal{K}), a\mapsto \pi(a)|_\mathcal{K} is a subrepresentation of π\pi on K\mathcal{K}.

My question is: How can we understand this from a categorical point of view. First I thought that just a morphism is a representation of one object of a category as another. However in this generality it wouldn’t be obvious to extend the term of a subrepresentation to this larger context.

I did some research and figured out that the aim of a representation is indeed to represent a structure as linear maps on a vector space, in this case as a subalgebra of B(H)\mathcal{B}(\mathcal{H}), in the case of groups as a subgroup of Aut(X)\mathrm{Aut}(X) for some vector space XX.

In the case of groups I have found two ways to obtain representations: First via a group action φ:G×X→X\varphi: G \times X \to X, then π(g)=φ(g,⋅)\pi(g)=\varphi(g,\cdot) is a representation. Secondly if one considers a group as a category with one object ∗*, then G=Mor(∗)G=\mathrm{Mor}(*) and a functor from this one object category into Vect\mathrm{Vect} yields a representation.

However, both constructions didn’t enlighten me in such a way that I would see how the c*-algebra case fits into this construction or how one could express the idea of representations in a larger class of categories uniformly.

Disclaimer: I have no deep knowledge in category theory. I am totally convinced that thinking in categories is essential to really understand mathematics, otherwise I wouldn’t rise such questions, nevertheless it would be nice to get an answer on a level that I am able to understand 😉

Kind regards,