Let $\A$ be an algebra over a commutative unital ring $\C$. We say that $\A$ is zero product determined if for every $\C$-module $\X$ and every $\C$-bilinear map $\phi:\A \times \A \rightarrow \X$ the following holds: if $\phi(A,B)=0$ whenever $AB=0$, then there exists a $\C$-linear map $L$ such that $\phi(A,B)=L(AB)$ for all $A,B\in \A$. If we replace in this definition the ordinary product by the Jordan (resp. Lie) product, then we say that $\A$ is zero Jordan (resp. Lie) product determined. We show that the triangular algebra $\T=\begin{pmatrix} \A & \M \\ 0 & \B \end{pmatrix}$ is zero (resp. Lie) product determined if and only if $\A$ and $\B$ are zero (resp. Lie) product determined, and under some technical restrictions, a same result is true for the Jordan product. The main result is then applied to generalized triangular matrix algebras and (block) upper triangular matrix algebras. In particular we show that: (i) the block upper triangular matrix algebra $B_{n}^{\bar{k}}(\C)$ ($n\geq 1 $) is a zero product determined algebra; (ii) if $\C$ contains the element $\frac{1}{2}$, then $B_{n}^{\bar{k}}(\C)$ ($n\geq 1 $) is a zero Jordan product determined algebra; (iii) if $\A$ is a commutative algebra, then $B_{n}^{\bar{k}}(\A)$ ($n\geq 1 $) is a zero Lie product determined algebra.