1 Introduction

In the natural world, various systems are inevitably affected by the random factors [1,2,3]. Stochastic differential equations are important tools for studying random phenomena (see e.g. [4,5,6,7,8,9,10,11]). May [12] has pointed out that because of the continuous interference of the environment, the biological parameters in the ecosystem such as birth rates, intraspecific competition coefficients, death rates and other parameters may have some degree of random fluctuation. Parameter perturbation induced by white noise is an important and common form to describe the effect of stochasticity [13,14,15,16,17]. In recent years, many famous susceptible–infected–recovered–susceptible stochastic models have been formulated (see e.g. [18,19,20,21,22,23,24]). In [25], a stochastic SIRS model with environment noise was proposed as follows:

$$ \textstyle\begin{cases} dS(t)= [A-dS(t)- \frac{\beta S(t)I(t)}{N(t)}+\delta R(t) ]\,dt+\sigma _{1}S(t)\,dB_{1}(t), \\ dI(t)= [\frac{\beta S(t)I(t)}{N(t)}-(\gamma+d+\alpha)I(t) ]\,dt+\sigma_{2}I(t)\,dB_{2}(t), \\ dR(t)=[\gamma I(t)-(\delta+d)R(t)]\,dt+\sigma_{3}R(t)\,dB_{3}(t), \end{cases} $$
(1)

where \(B_{i}(t)\), denoting the white noise, are independent standard Brownian motions, \(\sigma_{i}^{2}\) are the intensities of the white noise, \(i=1,2,3\). For the meaning of detailed parameters, please see [25]. By using stochastic Lyapunov functions, the authors proved that the system (1) has a unique global positive solution for any initial value \((S(0),I(0),R(0))\in\mathbb{R}_{+}^{3}\) and also has an ergodic stationary distribution under some conditions.

In fact, owing to the season alternation, the life cycle of the individual, the mating habits, the food supply and so on, the birth rate, incidence rate of disease and other parameters in system (1) will exhibit more or less periodicity rather than being constant [26,27,28,29,30]. So it is more realistic to discuss the model (1) with periodic coefficients. In 2003, Greenhalgh and Moneim [31] studied a SIRS epidemic model with general seasonal variation in the contact rate. In 2009, Martcheva [32] studied a non-autonomous multi-strain SIS epidemic model with periodic coefficients. In 2015, Lin et al. [33] proposed a stochastic SIR epidemic model with seasonal variation and analyzed the existence of a nontrivial positive periodic solution. Motivated by the above work, we shall investigate the stochastic non-autonomous SIRS epidemic model which takes the form as follows:

$$ \textstyle\begin{cases} dS(t)= [A(t)-d(t)S(t)- \frac{\beta(t) S(t)I(t)}{N(t)}+\delta(t) R(t) ]\,dt+\sigma _{1}(t)S(t)\,dB_{1}(t), \\ dI(t)= [\frac{\beta(t) S(t)I(t)}{N(t)}-(\gamma(t)+d(t)+\alpha (t))I(t) ]\,dt+\sigma_{2}(t)I(t)\,dB_{2}(t), \\ dR(t)=[\gamma(t) I(t)-(\delta(t)+d(t))R(t)]\,dt+\sigma_{3}(t)R(t)\,dB_{3}(t), \end{cases} $$
(2)

where \(A(t)\), \(d(t)\), \(\beta(t)\), \(\delta(t)\), \(\gamma(t)\), \(\alpha(t)\) and \(\sigma_{i}(t)\) stand for the continuous positive periodic functions of period T, \(i=1,2,3\). In this paper, we intend to prove the existence of nontrivial positive T-periodic solutions under sufficient conditions of system (2).

In the real world, besides white noise, the system may be disturbed by many other noises. For example, telephone noise often causes the system to switch from one state to another [34, 35]. Recently, a large number of researchers have widely concerned the stochastic models with regime switching (see e.g. [36,37,38,39,40]). In 1978, Slatkin [41] developed and analyzed a population model in a markovian environment. In 1999, Mao [42] investigated the stability of stochastic differential equations with markovian switching. In 2016, Zhao et al. [43] have studied a stochastic phytoplankton allelopathy model under regime switching. The telephone noise is usually described by Markov chains. Let \((r(t))_{t\geq0}\) be a continuous-time Markov chain taking values in a finite state space \(\mathbb{S}=\{1,2,\ldots,m\}\). Coupling the Markov chain \(r(t)\) into model (1), we get

$$ \textstyle\begin{cases} dS(t)= [A(r(t))-d(r(t))S(t)- \frac{\beta(r(t)) S(t)I(t)}{N(t)}+\delta(r(t)) R(t) ]\,dt \\ \hphantom{dS(t)={}}{} +\sigma_{1}(r(t))S(t)\,dB_{1}(t), \\ dI(t)= [\frac{\beta(r(t)) S(t)I(t)}{N(t)}-(\gamma (r(t))+d(r(t))+\alpha(r(t)))I(t) ]\,dt \\ \hphantom{dI(t)={}}{}+\sigma_{2}(r(t))I(t)\,dB_{2}(t), \\ dR(t)=[\gamma(r(t)) I(t)-(\delta(r(t))+d(r(t)))R(t)]\,dt+\sigma _{3}(r(t))R(t)\,dB_{3}(t). \end{cases} $$
(3)

When the model is affected by severe stochastic interference such as rainfall or nutrition, etc., the parameter switch one state \(r(t)=i\) into another state \(r(t)=j\) and it will switch into the next regime until the next major environmental change. For any \(k\in\mathbb{S}\), \(A(k)\), \(d(k)\), \(\beta(k)\), \(\delta(k)\), \(\gamma(k)\), \(\alpha(k)\) and \(\sigma_{i}(k)\) (\(i=1,2,3\)) are positive constants. Another goal of this paper is to prove the existence of a unique ergodic stationary distribution of the positive solution to the system (3).

This paper is arranged as follows. In Sect. 2, we give some basic knowledge which are used in this paper. In Sect. 3, for the system (2), the criteria for extinction of the disease are obtained and then we show that the system has at least one nontrivial positive T-periodic solution under some conditions. In Sect. 4, for the system (3), we proposed a sufficient condition of the disease extinction. Meanwhile, the existence of a unique ergodic stationary distribution is proved. Finally, we conclude the main result briefly and make some numerical simulations in Sect. 5.

2 Preliminaries

In this paper, let \((\varOmega,\mathcal{F}, \{\mathcal{F}\}_{t\geq0}, \mathbb{P})\) be a complete probability space and let \(r(t)\), \(t\geq0\) be a right-continuous Markov chain on Ω taking values in the finite state space \(\mathbb{S}=\{1,2,\ldots,m\}\). For each vector \(g=(g(1),\ldots, g(m))\), set \(\hat{g}=\min_{k\in\mathbb{S}}\{g(k)\}\) and \(\check{g}=\max_{k\in\mathbb{S}}\{g(k)\}\). Supposed that the generator \(\varGamma=(q_{ij})_{m\times m}\) of the Markov chain is given by

$$ \mathbb{P}\bigl(r(t+\Delta t)=j|r(t)=i\bigr)= \textstyle\begin{cases} {q_{ij}\Delta t+o(\Delta t)}, &\mbox{if }i\neq j, \\ {1+q_{ij}\Delta t+o(\Delta t)}, &\mbox{if }i=j, \end{cases} $$

where \(\Delta t>0\), \(q_{ij}>0\), \(i\neq j\) is the transition rate from state i to j while \(\sum_{j=1}^{m}q_{ij}=0\). Suppose further that the Markov chain \(r(t)\) is irreducible and has a unique stationary distribution \(\pi=(\pi_{1},\pi_{2},\ldots,\pi_{m})\), which is the solution of the system of linear equations \(\pi\varGamma=0\) subject to \(\sum_{h=1}^{m}\pi_{h}=1\) and \(\pi_{h}>0\) for all \(h\in\mathbb{S}\). For any vector \(\varpi=(\varpi(1),\varpi(2),\ldots,\varpi(m))^{T}\), we have

$$\lim_{t\rightarrow\infty}\frac{1}{t} \int_{0}^{t}\varpi\bigl(r(s)\bigr)\,ds=\sum _{k\in\mathbb{S}}\pi_{k}\varpi(k). $$

Consider the following equation:

$$ dx(t)=f\bigl(t,x(t)\bigr)\, dt+g\bigl(t,x(t)\bigr)\, dB(t),\quad x \in \mathbb{R}^{n}, $$
(4)

where functions f and g are T-periodic in t.

Lemma 2.1

([37])

Assume that system (4) has a unique global solution. If there has a function \(V(t,x)\in C^{2}\) which is T-periodic in t such that

$$ (\mathrm{i})\quad \inf_{|x|>M}V(t,x)\rightarrow \infty\quad \textit{as }M\rightarrow\infty $$
(5)

and

$$ (\mathrm{ii})\quad LV(t,x)\leq-1 \quad \textit{outside some compact set}, $$
(6)

where we define the operator L by

$$LV(t,x)=V_{t}(t,x)+V_{x}(t,x)f(t,x)+\frac{1}{2} \operatorname{trace}\bigl(g^{T}(t,x)V_{xx}(t,x)g(t,x)\bigr). $$

Then for system (4) there exists a T-periodic solution.

Lemma 2.2

The following differential equations:

$$ \textstyle\begin{cases} {m_{1}'(t)=d(t)m_{1}(t)}, \\ {m_{2}'(t)=(\delta(t)+d(t))m_{2}(t)-\delta(t)m_{1}(t)}, \end{cases} $$
(7)

have a unique positive T-periodic solution \((m_{1}(t),m_{2}(t))^{T}\), where \(d(t)\), \(\delta(t)\) are continuous, positive and non-constant functions of period T.

The proof is similar to Lemma 3.1 in Liu et al. [28], here we omit it.

Now we are in the position to give some results of the stationary distribution for stochastic system under regime switching. Let \((X(t),r(t))\) be the diffusion process defined by the equation as follows:

$$ \textstyle\begin{cases} d X(t)=b(X(t),r(t))\,dt+\tau(X(t),r(t))\,dB(t), \\ X(0)=x_{0},\qquad r(0)=r_{0}, \end{cases} $$
(8)

where \(B(\cdot)\) denotes the p-dimensional Brownian motion and \(r(\cdot)\) is the right-continuous Markov chain in the above discussion, and \(b(\cdot, \cdot): \mathbb{R}^{n}\times\mathbb {S}\rightarrow\mathbb{R}^{n}\), \(\tau(\cdot,\cdot):\mathbb{R}^{n}\times \mathbb{S}\rightarrow\mathbb{R}^{n\times p}\), satisfying \(\tau(x,k)\tau ^{T}(x,k)=(d_{ij}(x,k))_{n\times n}\triangleq D(x,k)\). For any \(k\in \mathbb{S}\), let \(V(\cdot,k)\) be any twice continuously differentiable function, the operator \(\mathcal{L}\) is defined

$$\mathcal{L}V(x,k)=\sum_{i=1}^{n}b_{i}(x,k) \frac{\partial V(x,k)}{\partial x_{i}}+\frac{1}{2}\sum_{i,j=1}^{n}d_{ij}(x,k) \frac{\partial ^{2}V(x,k)}{\partial x_{i}\, \partial x_{j}}+\sum_{l=1}^{m}q_{kl}V(x,l). $$

Lemma 2.3

([37])

Assume that system (8) satisfies the conditions as follows:

  1. (i)

    \(q_{ij}>0\) for each \(i\neq j\);

  2. (ii)

    for any \(k\in\mathbb{S}\), \(D(x,k)=(d_{ij}(x,k))_{n\times n}\) is symmetric and obey

    $$ \kappa_{0}|\xi|^{2}\leq\bigl\langle D(x,k)\xi,\xi\bigr\rangle \leq\kappa_{0}^{-1}|\xi |^{2} \quad \textit{for all }\xi\in\mathbb{R}^{n}, $$

    with some constant \(\kappa_{0}\in(0,1]\) for any \(x\in\mathbb{R}^{n}\);

  3. (iii)

    there exists a nonempty open set \(\mathcal{D}\) with compact closure, and for any \(k\in\mathbb{S}\), there is a nonnegative function \(V(\cdot,k):\mathcal{D}^{C}\rightarrow\mathbb{R}\) such that

    $$\mathcal{L}V(x,k)\leq-1\quad \textit{for any }(x,k)\in\mathcal{D}^{C} \times\mathbb{S}. $$

Then \((X(t),r(t))\) of system (8) is positive recurrent and ergodic. Moreover, the system has a unique stationary distribution \(\mu (\cdot,\cdot)\) such that, for any Borel measurable function \(f(\cdot ,\cdot):\mathbb{R}^{n}\times\mathbb{S}\rightarrow\mathbb{R}\) satisfying

$$\sum_{k=1}^{m} \int_{\mathbb{R}^{n}} \bigl\vert f(x,k) \bigr\vert \mu(dx,k)< +\infty, $$

we have

$$\mathbb{P}\Biggl(\lim_{t\rightarrow+\infty}\frac{1}{t} \int _{0}^{t}f\bigl(X(s),r(s)\bigr)\,ds=\sum _{k=1}^{m} \int_{\mathbb{R}^{n}}f(x,k)\mu(dx,k)\Biggr)=1. $$

3 Extinction of the disease and the periodic solution for system (2)

For the non-autonomous stochastic system (2), we investigate the extinction criteria of the disease, firstly. Define \(R_{1}(t)=\beta(t)-(\gamma(t)+d(t)+\alpha(t)+\frac{\sigma_{2}^{2}(t)}{2})\) and \(\langle f\rangle_{T}=\frac{1}{T}\int_{0}^{T}f(s)\,ds\), where f is an integral function on \([0,+\infty)\). Then we have the following conclusion.

Theorem 3.1

The disease \(I(t)\) will go to extinction exponentially almost surely when \(\langle R_{1}(t)\rangle_{T}<0\).

Proof

Applying the generalized Itô formula to model (2) yields

$$\begin{aligned} d \ln I =& \biggl[\frac{\beta(t)S}{S+I+R}- \biggl(\gamma(t)+d(t)+\alpha (t)+ \frac{\sigma_{2}^{2}(t)}{2} \biggr) \biggr]\,dt+\sigma_{2}(t) \,dB_{2}(t) \\ \leq& \biggl[\beta(t)- \biggl(\gamma(t)+d(t)+\alpha(t)+\frac{\sigma _{2}^{2}(t)}{2} \biggr) \biggr]\,dt+\sigma_{2}(t)\,dB_{2}(t). \end{aligned}$$

Let \(M(t):=\int_{0}^{t}\sigma_{2}(t)\,dB_{2}(t)\), based on the strong law of large numbers for martingales (see [44]), then \(\lim_{t\rightarrow\infty}\frac{M(t)}{t}=0\) a.s. Thus,

$$\begin{aligned} \limsup_{t\rightarrow\infty}\frac{\ln I}{t} \leq&\limsup _{t\rightarrow \infty}\frac{1}{t} \int_{0}^{t} \biggl[\beta(s)- \biggl(\gamma(s)+d(s)+ \alpha (s)+\frac{\sigma_{2}^{2}(s)}{2} \biggr) \biggr]\,ds \\ =&\frac{1}{T} \int_{0}^{T} \biggl[\beta(s)- \biggl(\gamma(s)+d(s)+ \alpha (s)+\frac{\sigma_{2}^{2}(s)}{2} \biggr) \biggr]\,ds \\ =&\bigl\langle R_{1}(t)\bigr\rangle _{T}< 0, \end{aligned}$$

therefore

$$\lim_{t\rightarrow\infty}I(t)=0\quad \mbox{a.s.} $$

 □

Next, we consider the existence of nontrivial positive T-periodic solution of system (2). To simplify, we denote \(g^{u}=\sup_{t\in[0,+\infty)}g(t)\), \(g^{l}=\inf_{t\in[0,+\infty)}g(t)\), where g is a bounded function on \([0,+\infty)\).

Define

$$R_{2}(t)=3\sqrt[3]{A(t)\beta(t)d(t)}+\bigl(m_{1}(t)-1 \bigr)A(t)- \biggl(\gamma (t)+2d(t)+\alpha(t)+\frac{\sigma_{1}^{2}(t)+\sigma_{2}^{2}(t)}{2} \biggr), $$

where \(m_{1}(t)\) is the solution of system (7). Then we get the following theorem.

Theorem 3.2

If \(\langle R_{2}(t)\rangle_{T}>0\), then system (2) admits at least one positive T-periodic solution.

Proof

To prove Theorem 3.2, we should construct a \(C^{2}\)-function \(V(t,x)\) which is T-periodic in t and a closed set \(U\in\mathbb {R}_{+}^{3}\) satisfy the conditions in Lemma 2.1.

Take \(0<\theta<\min \{\frac{2d^{l}}{(\sigma_{1}^{2})^{u}\vee(\sigma _{2}^{2})^{u}\vee(\sigma_{3}^{2})^{u}},1 \}\) and \(K>0\) such that

$$\begin{aligned}& \varrho=:d^{l}-\frac{\theta}{2}\bigl(\bigl( \sigma_{1}^{2}\bigr)^{u}\vee\bigl(\sigma _{2}^{2}\bigr)^{u}\vee\bigl(\sigma_{3}^{2} \bigr)^{u}\bigr)>0, \end{aligned}$$
(9)
$$\begin{aligned}& \tau=:-K\bigl\langle R_{2}(t)\bigr\rangle _{T}+\delta^{u}+2d^{u}+ \beta^{u}+H+\frac {(\sigma_{1}^{2})^{u}+(\sigma_{3}^{2})^{u}}{2}\leq-2, \end{aligned}$$
(10)

where

$$H=\sup_{(S,I,R)\in\mathbb{R}_{+}^{3}} \biggl\{ A^{u}(S+I+R)^{\theta}- \frac {\varrho}{2}(S+I+R)^{\theta+1} \biggr\} . $$

Define

$$\begin{aligned} V(S,I,R,t) =&\frac{1}{\theta+1}(S+I+R)^{\theta+1}+K\bigl(-\ln S-\ln I-m_{1}(t) (S+I) \\ &{}-m_{2}(t)R+S+I+R-\omega(t)\bigr)-\ln S-\ln R \\ =:&V_{1}+KV_{2}+V_{3}+V_{4}, \end{aligned}$$

where \(V_{1}=\frac{1}{\theta+1}(S+I+R)^{\theta+1}\), \(V_{2}=-\ln S-\ln I-m_{1}(t)(S+I)-m_{2}(t)R+S+I+R-\omega(t)\), \(V_{3}=-\ln S\), \(V_{4}=-\ln R\), \(m_{1}(t)\), \(m_{2}(t)\) are given in Lemma 2.2, \(\omega(t)\) is a T-periodic function defined on \([0,+\infty)\) satisfying \(\omega'(t)=\langle R_{2}(t)\rangle_{T}-R_{2}(t)\) and \(\omega (0)=0\). Obviously, \(V(S,I,R,t)\) is T-periodic in t and

$$\liminf_{k\rightarrow+\infty,(S,I,R)\in\mathbb{R}_{+}^{3}\setminus U_{k}}V(S,I,R,t)=+\infty, $$

where \(U_{k}=(\frac{1}{k}, k)\times(\frac{1}{k}, k)\times(\frac{1}{k}, k)\). Therefore, condition (i) of Lemma 2.1 is satisfied. Next, we prove that condition (ii) of Lemma 2.1 is true.

Using Itô’s formula, we get

$$\begin{aligned}& LV_{1} =(S+I+R)^{\theta}\bigl(A(t)-d(t)S-\bigl(d(t)+\alpha(t) \bigr)I-d(t)R\bigr) \\& \hphantom{LV_{1} ={}}{}+\frac{\theta}{2}(S+I+R)^{\theta-1}\bigl( \sigma_{1}^{2}(t)S^{2}+\sigma _{2}^{2}(t)I^{2}+ \sigma_{3}^{2}(t)R^{2}\bigr) \\& \hphantom{LV_{1}} \leq A(t) (S+I+R)^{\theta}-d(t) (S+I+R)^{\theta+1} \\& \hphantom{LV_{1} ={}}{} {}+\frac{\theta}{2}\bigl(\sigma_{1}^{2}(t) \vee\sigma_{2}^{2}(t)\vee\sigma _{3}^{2}(t) \bigr) (S+I+R)^{\theta+1} \\& \hphantom{LV_{1}} = A(t) (S+I+R)^{\theta}- \biggl(d(t)-\frac{\theta}{2} \bigl(\sigma_{1}^{2}(t)\vee \sigma_{2}^{2}(t) \vee\sigma_{3}^{2}(t)\bigr) \biggr) (S+I+R)^{\theta+1} \\& \hphantom{LV_{1}} \leq H-\frac{1}{2}\varrho(S+I+R)^{\theta+1}, \\& LV_{2} = - \biggl(\frac{A(t)}{S}-d(t)-\frac{\beta(t)I}{N}+ \frac{\delta (t)R}{S} \biggr)- \biggl(\frac{\beta(t)S}{N}-\bigl(\gamma(t)+d(t)+\alpha (t)\bigr) \biggr) \\& \hphantom{LV_{2} ={}}{}-m_{1}(t) \bigl(A(t)-d(t)S+\delta(t)R-\bigl( \gamma(t)+d(t)+\alpha (t)\bigr)I\bigr)-m_{1}'(t) (S+I) \\& \hphantom{LV_{2} ={}}{} -m_{2}(t) \bigl(\gamma(t)I-\bigl(\delta(t)+d(t) \bigr)R\bigr)-m_{2}'(t)R-\omega'(t)+ \frac {\sigma_{1}^{2}(t)+\sigma_{2}^{2}(t)}{2} \\& \hphantom{LV_{2} ={}}{} +A(t)-d(t) (S+I+R)-\alpha(t)I \\& \hphantom{LV_{2} } \leq -\frac{A(t)}{S}-\frac{\beta (t)S}{S+I+R}-d(t) (S+I+R)-m_{1}(t)A(t)+\gamma(t)+d(t)+\alpha(t) \\& \hphantom{LV_{2} ={}}{} +\frac{\sigma_{1}^{2}(t)+\sigma _{2}^{2}(t)}{2}-\bigl(m_{1}'(t)-m_{1}(t)d(t) \bigr)S-\bigl[m_{2}'(t)+m_{1}(t)\delta (t)- \bigl(\delta(t) \\& \hphantom{LV_{2} ={}}{} +d(t)\bigr)m_{2}(t)\bigr]R-\bigl[m_{1}'(t)-m_{1}(t) \bigl(\gamma(t)+d(t)+\alpha (t)\bigr)+m_{2}(t)\gamma(t)+\alpha(t) \bigr]I \\& \hphantom{LV_{2} ={}}{} -\omega'(t)+A(t)+d(t)+\frac{\beta(t)I}{N} \\& \hphantom{LV_{2} } \leq -3\sqrt[3]{A(t)\beta(t)d(t)}-m_{1}(t)A(t)+A(t)+2d(t)+ \gamma (t)+\alpha(t) \\& \hphantom{LV_{2} ={}}{}+\frac{\sigma_{1}^{2}(t)+\sigma_{2}^{2}(t)}{2}+ \biggl(m_{1}(t) \gamma(t)+m_{1}(t)\alpha(t)-m_{2}(t)\gamma(t)-\alpha(t)+ \frac{\beta (t)}{N} \biggr)I \\& \hphantom{LV_{2} ={}}{}-\omega'(t) \\& \hphantom{LV_{2}}\leq -\bigl\langle R_{2}(t)\bigr\rangle _{T}+ \biggl(m_{1}^{u}\gamma ^{u}+m_{1}^{u} \alpha^{u}-m_{2}^{l}\gamma^{l}- \alpha^{l}+\frac{\beta ^{u}}{N} \biggr)I, \\& LV_{3}=-\frac{A(t)}{S}+d(t)+\frac{\beta(t)I}{N}- \frac{\delta(t)R}{S}+\frac {\sigma_{1}^{2}(t)}{2}\leq-\frac{A^{l}}{S}+d^{u}+ \beta^{u}+\frac{(\sigma _{1}^{2})^{u}}{2}, \end{aligned}$$

and

$$ LV_{4}=-\frac{\gamma(t)I}{R}+\delta(t)+d(t)+\frac{\sigma _{3}^{2}(t)}{2}\leq- \frac{\gamma^{l}I}{R}+\delta^{u}+d^{u}+\frac{(\sigma _{3}^{2})^{u}}{2}. $$

Hence

$$\begin{aligned} LV \leq&H-\frac{1}{2}\varrho(S+I+R)^{\theta+1}+K \biggl( \frac{\beta ^{u}}{N}+m_{1}^{u}\gamma^{u}+m_{1}^{u} \alpha^{u}-m_{2}^{l}\gamma^{l}-\alpha ^{l} \biggr)I \\ &{}-K\bigl\langle R_{2}(t)\bigr\rangle _{T}- \frac{A^{l}}{S}+d^{u}+\beta^{u}+\frac {(\sigma_{1}^{2})^{u}}{2}- \frac{\gamma^{l}I}{R}+\delta^{u}+d^{u}+\frac {(\sigma_{3}^{2})^{u}}{2} \\ \leq&-\frac{\varrho}{2}S^{\theta+1}-\frac{A^{l}}{S}- \frac{\varrho }{2}I^{\theta+1}+K \biggl(\frac{\beta^{u}}{N}+m_{1}^{u} \gamma ^{u}+m_{1}^{u}\alpha^{u}-m_{2}^{l} \gamma^{l}-\alpha^{l} \biggr)I \\ &{}-\frac{\varrho}{2}R^{\theta+1}-\frac{\gamma^{l}I}{R}+\tau. \end{aligned}$$

Define a bounded closed set

$$U_{\varepsilon}= \biggl\{ (S,I,R)\in\mathbb{R}_{+}^{3}: \varepsilon\leq S\leq\frac{1}{\varepsilon} ,\varepsilon^{2}\leq I\leq \frac {1}{\varepsilon^{2}}, \varepsilon^{3}\leq R\leq\frac{1}{\varepsilon ^{3}} \biggr\} , $$

where \(\varepsilon>0\) is small enough. In the set \(\mathbb {R}_{+}^{3}\backslash U_{\varepsilon}\), one can choose ε sufficiently small and satisfying

$$\begin{aligned}& -\frac{A^{l}}{\varepsilon}+\tilde{K}+\tau\leq-1, \end{aligned}$$
(11)
$$\begin{aligned}& \tau+K\bigl(m_{1}^{u}\gamma^{u}+m_{1}^{u} \alpha^{u}-m_{2}^{l}\gamma^{l}-\alpha ^{l}\bigr)\varepsilon^{2}+K\beta^{u}\varepsilon \leq-1, \end{aligned}$$
(12)
$$\begin{aligned}& -\frac{\gamma^{l}}{\varepsilon}+\tilde{K}+\tau\leq-1, \end{aligned}$$
(13)
$$\begin{aligned}& -\frac{\varrho}{2\varepsilon^{\theta+1}}+\tilde{K}+\tau\leq-1, \end{aligned}$$
(14)
$$\begin{aligned}& -\frac{\varrho}{4\varepsilon^{2(\theta+1)}}+\tilde{K}+\tau\leq-1, \end{aligned}$$
(15)
$$\begin{aligned}& -\frac{\varrho}{2\varepsilon^{3(\theta+1)}}+\tilde{K}+\tau\leq-1, \end{aligned}$$
(16)

where is a positive constant which of the following can be found in Eq. (18). For convenience, one can divide \(U_{\varepsilon}^{C}\) into the following six domains:

$$\begin{aligned}& U_{1}=\bigl\{ (S,I,R)\in\mathbb{R}_{+}^{3}, 0< S< \varepsilon\bigr\} ,\qquad U_{2}=\bigl\{ (S,I,R)\in\mathbb{R}_{+}^{3}, 0< I< \varepsilon^{2},S\geq\varepsilon\bigr\} , \\& U_{3}=\bigl\{ (S,I,R)\in\mathbb{R}_{+}^{3}, 0< R< \varepsilon^{3}, I\geq \varepsilon^{2}\bigr\} ,\qquad U_{4}=\biggl\{ (S,I,R)\in\mathbb{R}_{+}^{3}, S> \frac {1}{\varepsilon}\biggr\} , \\& U_{5}=\biggl\{ (S,I,R)\in\mathbb{R}_{+}^{3}, I> \frac{1}{\varepsilon^{2}}\biggr\} ,\qquad U_{6}=\biggl\{ (S,I,R)\in \mathbb{R}_{+}^{3}, R>\frac{1}{\varepsilon^{3}}\biggr\} . \end{aligned}$$

Clearly, \(U_{\varepsilon}^{C}=U_{1}\cup\cdots\cup U_{6}\). Now we show that \(LV(S,I,R,t)\leq-1\) on \(U_{\varepsilon}^{C}\times\mathbb{R}\), which is equivalent to prove it on these six domains.

Case 1. If \((S,I,R,t)\in U_{1}\times\mathbb{R}\), from (11), we get

$$\begin{aligned} LV \leq&-\frac{A^{l}}{S}+K \biggl(\frac{\beta^{u}}{S+I+R}+m_{1}^{u} \gamma ^{u}+m_{1}^{u}\alpha^{u}-m_{2}^{l} \gamma^{l}-\alpha^{l} \biggr)I-\frac {\varrho}{4}I^{\theta+1}+ \tau \\ \leq&-\frac{A^{l}}{\varepsilon}+\tilde{K}+\tau\leq-1, \end{aligned}$$
(17)

where

$$ \tilde{K}=\sup_{(S,I,R)\in\mathbb{R}^{3}_{+}} \biggl\{ K\biggl( \frac{\beta ^{u}}{S+I+R}+m_{1}^{u}\gamma^{u}+m_{1}^{u} \alpha^{u}-m_{2}^{l}\gamma ^{l}- \alpha^{l}\biggr)I-\frac{\varrho}{4}I^{\theta+1} \biggr\} . $$
(18)

Case 2. If \((S,I,R,t)\in U_{2}\times\mathbb{R}\), from (12), one can see that

$$\begin{aligned} LV \leq&\frac{K\beta^{u}I}{S+I+R}+K\bigl(m_{1}^{u} \gamma^{u}+m_{1}^{u}\alpha ^{u}-m_{2}^{l} \gamma^{l}-\alpha^{l}\bigr)I+\tau \\ \leq&K\beta^{u}\varepsilon+K\bigl(m_{1}^{u} \gamma^{u}+m_{1}^{u}\alpha ^{u}-m_{2}^{l} \gamma^{l}-\alpha^{l}\bigr)\varepsilon^{2}+\tau \leq-1. \end{aligned}$$
(19)

Case 3. If \((S,I,R,t)\in U_{3}\times\mathbb{R}\), from (13), one can derive that

$$\begin{aligned} LV \leq&-\frac{\gamma^{l}I}{R}+K \biggl(\frac{\beta ^{u}}{S+I+R}+m_{1}^{u} \gamma^{u}+m_{1}^{u}\alpha^{u}-m_{2}^{l} \gamma ^{l}-\alpha^{l} \biggr)I-\frac{\varrho}{4}I^{\theta+1}+ \tau \\ \leq&-\frac{\gamma^{l}}{\varepsilon}+\tilde{K}+\tau\leq-1. \end{aligned}$$
(20)

Case 4. If \((S,I,R,t)\in U_{4}\times\mathbb{R}\), from (14), we get

$$\begin{aligned} LV \leq&-\frac{\varrho}{2}S^{\theta+1}+K \biggl(\frac{\beta ^{u}}{S+I+R}+m_{1}^{u} \gamma^{u}+m_{1}^{u}\alpha^{u}-m_{2}^{l} \gamma ^{l}-\alpha^{l} \biggr)I-\frac{\varrho}{4}I^{\theta+1}+ \tau \\ \leq&-\frac{\varrho}{2\varepsilon^{\theta+1}}+\tilde {K}+\tau\leq-1. \end{aligned}$$
(21)

Case 5. If \((S,I,R,t)\in U_{5}\times\mathbb{R}\), (15) implies that

$$\begin{aligned} LV \leq&-\frac{\varrho}{4}I^{\theta+1}-\frac{\varrho}{4}I^{\theta +1}+K \biggl(\frac{\beta^{u}}{S+I+R}+m_{1}^{u}\gamma^{u}+m_{1}^{u} \alpha ^{u}-m_{2}^{l}\gamma^{l}- \alpha^{l} \biggr)I+\tau \\ \leq&-\frac{\varrho}{4\varepsilon^{2(\theta+1)}}+\tilde{K}+\tau\leq-1. \end{aligned}$$
(22)

Case 6. If \((S,I,R,t)\in U_{6}\times\mathbb{R}\), from (16), one obtains

$$\begin{aligned} LV \leq&-\frac{\varrho}{2}R^{\theta+1}-\frac{\varrho}{4}I^{\theta +1}+K \biggl(\frac{\beta^{u}}{S+I+R}+m_{1}^{u}\gamma^{u}+m_{1}^{u} \alpha ^{u}-m_{2}^{l}\gamma^{l}- \alpha^{l} \biggr)I+\tau \\ \leq&-\frac{\varrho}{2\varepsilon^{3(\theta+1)}}+\tilde{K}+\tau\leq-1. \end{aligned}$$
(23)

By (17), (19), (20), (21), (22) and (23), one can get

$$LV(S,I,R,t)\leq-1, \quad (S,I,R,t)\in U_{\varepsilon}^{C}\times \mathbb{R}. $$

So, condition (ii) for Lemma 2.1 is true. By Lemma 2.1, Theorem 3.2 is proved. □

4 Extinction of the disease and the ergodic stationary distribution for system (3)

For the system with regime switching, we will explore the extinction of the disease and the existence of an ergodic stationary distribution. Let \((S(t),I(t),R(t),r(t))\) be the solution of system (3) with initial value \((S(0),I(0),R(0),r(0))\in\mathbb {R}_{+}^{3}\times\mathbb{S}\).

Define

$$ R_{1}^{*}=\frac{\sum_{k=1}^{m}\pi_{k}\beta(k)}{\sum_{k=1}^{m}\pi_{k} (\gamma(k)+d(k)+\alpha(k)+\frac{\sigma _{2}^{2}(k)}{2} )}, $$

then we have the following.

Theorem 4.1

If \(R_{1}^{*}<1\), then \(\lim_{t\rightarrow\infty}I(t)=0\) a.s.

Proof

By Itô’s formula, we get

$$\begin{aligned} d \ln I =& \biggl[\frac{\beta(r(t))S}{S+I+R}- \biggl(\gamma \bigl(r(t)\bigr)+d\bigl(r(t) \bigr)+\alpha\bigl(r(t)\bigr)+\frac{\sigma_{2}^{2}(r(t))}{2} \biggr) \biggr]\,dt \\ &{}+\sigma_{2}\bigl(r(t)\bigr)\,dB_{2}(t). \end{aligned}$$
(24)

Integrating both sides of Eq. (24) leads to

$$\begin{aligned} \frac{\ln I(t)-\ln I(0)}{t} \leq&\frac{1}{t} \int_{0}^{t} \biggl[\beta\bigl(r(s)\bigr)- \biggl( \gamma \bigl(r(s)\bigr)+d\bigl(r(s)\bigr)+\alpha\bigl(r(s)\bigr)+ \frac{\sigma_{2}^{2}(r(s))}{2} \biggr) \biggr]\,ds \\ &{}+\frac{1}{t} \int_{0}^{t}\sigma_{2}\bigl(r(s)\bigr) \,dB_{2}(s). \end{aligned}$$
(25)

From the ergodic property of \(r(t)\), one can get

$$\begin{aligned} &\lim_{t\rightarrow\infty}\frac{1}{t} \int_{0}^{t} \biggl[\beta \bigl(r(s)\bigr)- \biggl( \gamma\bigl(r(s)\bigr)+d\bigl(r(s)\bigr)+\alpha\bigl(r(s)\bigr)+\frac{\sigma _{2}^{2}(r(s))}{2} \biggr) \biggr]\,ds \\ &\quad =\sum_{k=1}^{m}\pi_{k} \beta(k)-\sum_{k=1}^{m}\pi_{k} \biggl(\gamma (k)+d(k)+\alpha(k)+\frac{\sigma_{2}^{2}(k)}{2} \biggr). \end{aligned}$$

So, (25) implies that

$$\limsup_{t\rightarrow\infty}\frac{\ln I(t)}{t}\leq\sum _{k=1}^{m}\pi _{k} \biggl(\gamma(k)+d(k)+ \alpha(k)+\frac{\sigma_{2}^{2}(k)}{2} \biggr) \bigl(R_{1}^{*}-1 \bigr)< 0\quad \mbox{a.s.} $$

Hence we have

$$\lim_{t\rightarrow\infty}I(t)=0 \quad \mbox{a.s.} $$

 □

Next, we shall establish sufficient conditions for the existence of an ergodic stationary distribution of system (3).

Let

$$R_{2}^{*}=\frac{\sum_{k=1}^{m}\pi_{k}[c_{1}(k)A(k)+\beta(k)]}{\sum_{k=1}^{m}\pi_{k} (\gamma(k)+d(k)+\alpha(k)+\frac{\sigma _{2}^{2}(k)}{2} )}, $$

where \(c_{1}(k)\) is the solution of the following linear system:

$$ \textstyle\begin{cases} c_{1}(k)d(k)-\sum_{l=1}^{m}q_{kl}c_{1}(l)-\beta(k)=0, \quad k=1,2,\ldots,m, \\ -c_{1}(k)\delta(k)+c_{2}(k)(\delta(k)+d(k))-\sum_{l=1}^{m}q_{kl}c_{2}(l)=0,\quad k=1,2,\ldots,m. \end{cases} $$
(26)

By the literature [34], system (26) has a unique solution

$$\bigl(c_{1}(1),c_{1}(2),\ldots,c_{1}(m),c_{2}(1),c_{2}(2), \ldots,c_{2}(m)\bigr)^{T}\gg0. $$

Then we have

Theorem 4.2

If \(R_{2}^{*}>1\), then system (3) has a unique ergodic stationary distribution.

Proof

To prove Theorem 4.2, we just have to verify that conditions (i), (ii) and (iii) in Lemma 2.3 be satisfied. First, assumption \(q_{ij}>0\) for \(i\neq j\) in Sect. 2 implicates that the condition (i) holds. Second, the diffusion matrix \(D(S,I,R,k)=\operatorname{diag}\{\sigma_{1}^{2}(k)S^{2}, \sigma_{2}^{2}(k)I^{2}, \sigma _{3}^{2}(k)R^{2}\}\) of model (3) is positive definite, which shows that condition (ii) in Lemma 2.3 is satisfied. Next, we will show condition (iii) is satisfied by constructing suitable Lyapunov function. Let us define

$$\begin{aligned} V(S,I,R,k) =&\frac{1}{\xi+1}(S+I+R)^{\xi+1}+M\bigl(-c_{1}(k) (S+I)-c_{2}(k)R-\ln I-\omega(k)\bigr) \\ &{}-\ln S-\ln R, \end{aligned}$$

where \(c_{1}(k)\), \(c_{2}(k)\) are the solution of the system (26), \(\xi\in(0,1)\) and \(M>0\) satisfy \(\rho:=\hat{d}-\frac{\xi }{2}(\check{\sigma}_{1}^{2}\vee\check{\sigma}_{2}^{2}\vee\check{\sigma }_{3}^{2})>0\), and \(E+2\check{d}+\check{\beta}+\check{\delta}+\frac{\check {\sigma}_{1}^{2}+\check{\sigma}_{3}^{2}}{2}-M\varSigma_{k=1}^{m}\pi _{k}(\gamma(k)+d(k)+\alpha(k)+\frac{\sigma_{2}^{2}(k)}{2})(R_{2}^{*}-1)\leq -2\), E and \(\omega(k)\) will be defined later.

Denote

$$\begin{aligned}& V_{1} = \frac{1}{\xi+1}(S+I+R)^{\xi+1}, \\& V_{2} = -c_{1}(k) (S+I)-c_{2}(k)R-\ln I- \omega(k), \\& V_{3} = -\ln S, \\& V_{4} = -\ln R. \end{aligned}$$

Applying the generalized Itô formula, we have

$$ \mathcal{L}V_{1} \leq E-\frac{\rho}{2}(S+I+R)^{\xi+1}, $$

where \(E=\sup_{S+I+R\in\mathbb{R}_{+}}\{\check{A}(S+I+R)^{\xi}-\frac {\rho}{2}(S+I+R)^{\xi+1}\}\). Furthermore,

$$\begin{aligned} \mathcal{L}V_{2} =&-c_{1}(k) \bigl(A(k)-d(k)S+\delta(k)R- \bigl(\gamma(k)+d(k)+\alpha (k)\bigr)I\bigr) \\ &{}-(S+I)\sum_{l=1}^{m}q_{kl}c_{1}(l)-c_{2}(k) \bigl(\gamma(k)I-\bigl(\delta (k)+d(k)\bigr)R\bigr)-R\sum _{l=1}^{m}q_{kl}c_{2}(l) \\ &{}- \biggl(\frac{\beta(k)S}{N}- \biggl(\gamma(k)+d(k)+\alpha(k)+ \frac{\sigma _{2}^{2}(k)}{2} \biggr) \biggr)-\sum_{l=1}^{m}q_{kl} \omega(l) \\ \leq&-c_{1}(k)A(k)-\beta(k)+ \biggl(\gamma(k)+d(k)+\alpha(k)+ \frac{\sigma _{2}^{2}(k)}{2} \biggr)-\sum_{l=1}^{m}q_{kl} \omega(l) \\ &{}+ \Biggl(c_{1}(k)d(k)-\sum_{l=1}^{m}q_{kl}c_{1}(l)- \beta(k) \Biggr)S \\ &{}+ \Biggl(c_{1}(k) \bigl(\gamma(k)+d(k)+\alpha(k) \bigr)-c_{2}(k)\gamma(k)-\sum_{l=1}^{m}q_{kl}c_{1}(l) \Biggr)I \\ &{}+ \Biggl(-c_{1}(k)\delta(k)+c_{2}(k) \bigl( \delta(k)+d(k)\bigr)-\sum_{l=1}^{m}q_{kl}c_{2}(l) \Biggr)R \\ &{}+\beta(k)S+\frac{\beta(k)I}{N}+\frac{\beta(k)R}{N} \\ \leq&-R_{0k}-\sum_{l=1}^{m}q_{kl} \omega(l)+\bigl(c_{1}(k) \bigl(\gamma(k)+\alpha (k)\bigr)+ \beta(k)-c_{2}(k)\gamma(k)\bigr)I \\ &{}+\beta(k)S+\frac{\beta(k)I}{N}+\frac{\beta(k)R}{N}, \end{aligned}$$
(27)

where

$$R_{0k}=c_{1}(k)A(k)+\beta(k)- \biggl(\gamma(k)+d(k)+ \alpha(k)+\frac{\sigma _{2}^{2}(k)}{2} \biggr). $$

Let \(\omega=(\omega(1),\omega(2),\ldots,\omega(m))^{T}\) be the following Poisson system’s solution:

$$\varGamma\omega=\Biggl(\sum_{l=1}^{m} \pi_{k}R_{0k}\Biggr)\vec{1}-\tilde{R}_{0}, $$

where \(\tilde{R}_{0}=(R_{01},R_{02},\ldots R_{0m})^{T}\). This shows that

$$\begin{aligned} -R_{0k}-\sum_{l=1}^{m}q_{kl} \omega(l) =&-\sum_{k=1}^{m}\pi _{k}R_{0k} \\ =&-\sum_{k=1}^{m}\pi_{k} \biggl(\gamma(k)+d(k)+\alpha(k)+\frac{\sigma _{2}^{2}(k)}{2} \biggr) \bigl(R_{2}^{*}-1 \bigr). \end{aligned}$$

Substituting this equality into (27), one has

$$\begin{aligned}& \begin{aligned} \mathcal{L}V_{2}&\leq-\sum _{k=1}^{m}\pi_{k} \biggl(\gamma(k)+d(k)+ \alpha (k)+\frac{\sigma_{2}^{2}(k)}{2} \biggr) \bigl(R_{2}^{*}-1 \bigr)+\bigl(\check{c_{1}}(\check {\gamma}+\check{\alpha})+\check{ \beta} \\ &\quad {}-\hat{c_{2}}\hat{\gamma}\bigr)I+\check{\beta}S+ \frac{\check{\beta }I}{N}+\frac{\check{\beta}R}{N}, \end{aligned} \\& \mathcal{L}V_{3}=-\frac{A(k)}{S}+\frac{\beta(k)I}{N}- \frac{\delta (k)R}{S}+d(k)+\frac{\sigma_{1}^{2}(k)}{2}, \end{aligned}$$

and

$$ \mathcal{L}V_{4}=-\frac{\gamma(k)I}{R}+\delta(k)+d(k)+ \frac{\sigma_{3}^{2}(k)}{2}. $$

Consequently, one can get

$$\begin{aligned} \mathcal{L}V \leq& -\frac{\rho}{2}S^{\xi+1}+M\check{\beta}(S+1)- \frac{\hat{A}}{S}-\frac {\rho}{2}I^{\xi+1} +M\bigl[ \check{c_{1}}(\check{\gamma}+\check{\alpha})+\check{\beta}-\hat {c_{2}}\hat{\gamma}\bigr]I \\ &{}-\frac{\rho}{2}R^{\xi+1}-\frac{\hat{\gamma}I}{R}+E+2\check{d}+\check { \beta}+\check{\delta} +\frac{\check{\sigma_{1}^{2}}+\check{\sigma_{3}^{2}}}{2} \\ &{}-M\sum_{k=1}^{m}\pi_{k} \biggl(\gamma(k)+d(k)+\alpha(k)+\frac{\sigma _{2}^{2}(k)}{2} \biggr) \bigl(R_{2}^{*}-1 \bigr). \end{aligned}$$

Consider the bounded open set \(D= (\frac{1}{\eta}, \eta )\times (\frac{1}{\eta}, \eta )\times (\frac{1}{\eta}, \eta )\subset\mathbb{R}_{+}^{3}\), where η is a positive number. From the discussing above, we derive that, for a sufficiently large η,

$$ \mathcal{L}V(S,I,R,k)\leq-1,\quad \mbox{for all }(S,I,R,k)\in D^{C} \times\mathbb{S}. $$

By virtue of Lemma 2.3, one can see that system (3) has a solution which is a stationary Markov process. The proof is completed. □

5 Conclusions and numerical simulations

In this paper, we proposed a stochastic non-autonomous SIRS epidemic model with periodic coefficients (model (2)), and a stochastic epidemic model perturbed by telegraph noise (model (3)). Then the dynamic behaviors of the two models are studied.

Firstly, for system (2), there are the following properties:

  1. (1)

    If \(\langle R_{1}(t)\rangle_{T}<0\), then the disease will go to extinction almost surely.

  2. (2)

    If \(\langle R_{2}(t)\rangle_{T}>0\), then system (2) has at least one positive T-periodic solution.

Secondly, system (3) possesses the following properties:

  1. (1)

    If \(R_{1}^{*}<1\), the disease \(I(t)\) will go to extinction exponentially with probability 1.

  2. (2)

    If \(R_{2}^{*}>1\), then the solution of system (3) has a unique ergodic stationary distribution.

To verify the correctness of the theoretical analysis, we will give some examples with computer simulations.

Example 1

First, we consider system (2) and let

$$\begin{aligned}& A(t) =0.1\sin t+1.1, \qquad d(t)=0.1\sin t+0.2,\qquad \beta(t)=0.1\sin t+0.9, \\& \alpha(t) =0.1\sin t+0.2,\qquad \gamma(t)=0.1\sin t+0.2,\qquad \delta(t)=0.1\sin t+0.2, \\& \sigma_{1}(t) =0.1\sin t+0.01, \qquad \sigma_{2}(t)=0.1 \sin t+1.2,\qquad \sigma _{3}(t)=0.1\sin t+0.01. \end{aligned}$$

Case (a). Simple calculation shows that

$$\bigl\langle R_{1}(t)\bigr\rangle _{T}=-0.4284< 0. $$

From Theorem 3.1, we know that the disease goes to extinction (see Fig. 1).

Figure 1
figure 1

Sample paths of \((S(t),I(t),R(t))\) with initial conditions \((S(0),I(0),R(0))=(3,2.5,2)\)

Case (b). We only change the intensity of the noise \(\sigma _{2}(t)=0.1\sin t+0.2\). Then direct computation leads to \(\langle R_{2}(t)\rangle_{T}=0.2573>0\). From Theorem 3.2, we can see that system (2) has at least one positive T-periodic solution (see Fig. 2).

Figure 2
figure 2

Sample paths of \((S(t),I(t),R(t))\) with initial conditions \((S(0),I(0),R(0))=(0.3,0.3,0.3)\)

Example 2

In model (3), if the Markov chain \(r(t)\) take values in \(\mathbb{S}=\{1,2\}\) with the generator

Γ= ( 1 1 1 1 ) .

Then the unique stationary distribution of \(r(t)\) is \((\pi_{1},\pi _{2})= (\frac{1}{2},\frac{1}{2} )\). Choose parameters

$$\begin{aligned}& A(1)=1.4,\qquad \beta(1)=1,\qquad d(1)=0.2,\qquad \gamma(1)=0.3,\qquad \alpha(1)=0.1, \\& \delta(1)=0.2,\qquad A(2)=2, \qquad \beta(2)=0.8,\qquad d(2)=0.15,\qquad \gamma(2)=0.25, \\& \alpha(2)=0.2,\qquad \delta(2)=0.1,\qquad \sigma_{1}(1)=0.05, \qquad \sigma_{2}(1)=1.3, \\& \sigma_{3}(1)=0.05,\qquad \sigma_{1}(2)=0.1,\qquad \sigma_{2}(2)=1.5, \qquad \sigma_{3}(2)=0.2. \end{aligned}$$

Case (a). By direct calculation, we get \(R_{1}^{*}=0.5678<1\). Then from Theorem 4.1, we know the disease \(I(t)\) finally go to extinction (see Fig. 3).

Figure 3
figure 3

Sample paths of \((S(t),I(t),R(t))\) with initial conditions \((S(0),I(0),R(0))=(1.5,2.5,2.5)\)

Case (b). We only change the intensity of the noise \(\sigma_{2}(1)=0.15\), \(\sigma_{2}(2)=0.2\). Then we have \(R_{2}^{*}=2.0560>1\), one can derived that model (3) has a unique stationary distribution. Figure 4(a) shows the Markov chain switching process and Fig. 4(b) shows the process of changing system variables over time. From Fig. 4(c), Fig. 4(d) and Fig. 4(e), we can see system (3) has a stationary distribution.

Figure 4
figure 4

Computer simulation of a single path of Markov chain \(r(t)\) and its corresponding solutions \((S(t),I(t),R(t))\) for the system (3). The last three pictures are the histograms of the path