1 Introduction

After the outbreak of COVID-19 in Wuhan, the infection spread rapidly to all provinces and cities in China. During the early stages, this spread was due to insufficient understanding of the transmission mechanism of the virus, as well as increases in population mobility during the Spring Festival. However, after the lockdown of Wuhan on 23 January 2020 and the strengthening of prevention and control measures in various regions, the epidemic situation in all provinces and autonomous regions was effectively contained and the epidemic situation improved within a short period. Since March 2020, while the epidemic outside China continues to worsen, the epidemic in China has gradually changed from being dominated by local cases to being dominated by imported cases. At the time of writing (August 2020), the prevention and control and decision-making departments have also adjusted their strategies in a timely manner, from the previous “preventing internal spread and external import” to “preventing external import and internal rebound”. Effects of these measures are well reflected by the situation in Tianjin, China. Tianjin had a short outbreak in its early stage and has been well controlled subsequently. Singapore, on the other hand, kept the epidemic under control in the early days, but the situation became serious in April. Tianjin had a permanent population of 15.6 million (2019), and its total area is 1,1966.5 square kilometres [1]. Singapore had a population of 5.7 million (June 2019) and a total area of 724.4 square kilometres (2019) [2]. Both areas are small places, and both did well in the early stages, but later they have become completely opposite to each other, as one has a secondary outbreak, and the other does not. So, a question naturally arises: under what circumstances is there a risk of a secondary outbreak?

In order to answer the above question, the risk of a secondary outbreak induced by imported cases [3], as well as the risk associated with weakening prevention and control measures [3,4,5,6,7,8,9,10], is assessed in this paper to provide early warning for the later development of the epidemic based on model predictions. By integrating multi-source epidemic data from Tianjin and Singapore, the risks of secondary outbreaks in the two regions were systematically studied, and the probability of secondary outbreaks under different management, quarantine and screening measures and different intensity of prevention and control measures analysed. It is concluded that strengthening the management of, and quarantine measures for, inbound travellers are key factors for preventing secondary outbreaks, as is the timely and comprehensive quarantine of close contacts.

2 Methods

2.1 Data collection

We obtained data on laboratory-confirmed COVID-19 cases in Tianjin and Singapore from the “Health Commission” of Tianjin [11] and the “Ministry of Health” of Singapore [12]. In both areas, very detailed information on each confirmed case has been released. This rigorous contact tracing strategy provided detailed case information on the onset times, first visits to medical facilities, durations of quarantining and confirmations of infection. These data include not only the number of newly reported cases, the cumulative number of confirmed cases reported, the number of recovered cases, the number of deaths, the number of close contacts quarantined and the number of cases medically quarantined and eliminated, but also the date of onset, the date of first medical treatment, the date of laboratory confirmation and date of entry into Tianjin or Singapore (for imported cases). The data were published and analysed anonymously.

Fig. 1
figure 1

Data sets for Tianjin from 11 January to 17 March 2020 and for Singapore from 18 January to 17 March 2020. In A4 and B4, \(E_M(t)\) = daily numbers of imported exposed cases; \(I_M(t)\) = daily numbers of imported infectious cases with symptoms; \(E_{qM}(t)\) = daily numbers of imported quarantined exposed cases; \(H_M(t)\) = daily numbers of imported hospitalized cases

Based on the recorded information, we can obtain the daily number of infectious cases with symptoms, quarantined exposed and hospitalized cases, and the daily number of imported cases including exposed, infectious with symptoms, quarantined exposed and hospitalized cases, as shown in Fig. 1. It is worth noting that the data from Tianjin and Singapore are the traced data obtained through detailed data description, so that the likelihood of errors due to random variation is low. Thus, the proposed model could be accurately formulated, and unknown parameters easily estimated by using these source data sets.

2.2 The model

Since data on the numbers of COVID-19 infectious cases are now announced daily and considering the randomness of population data, it is appropriate to use a stochastic discrete epidemic model to describe the dynamics of the spread of COVID-19. On the basis of the clinical progression of the disease, epidemiological status of the individuals and intervention measures, we divide the populations into eight classes [13]: susceptible S(t) (individuals who may become infected), exposed E(t) (individuals infected by the virus, in the incubation period), infectious with symptoms I(t) (individuals who have been infected, have illness symptoms and have not yet been quarantined), quarantined susceptible \(S_q(t)\) (individuals who have close contact with the exposed or infectious, and have been quarantined, but have not been infected), quarantined exposed \(E_q(t)\) (individuals who have close contact with the exposed or infectious, and have been quarantined, and have been infected), hospitalized H(t) (\(E_q(t)\) or I(t) who have a first medical visit and have been quarantined), infectious but asymptomatic A(t) (individuals who have been infected, have no illness symptoms and have not yet been quarantined), recovered R(t) (individuals who have recovered from the disease).

The variables S(t), E(t), I(t), A(t), \(S_q(t)\), \(E_q(t)\), H(t) and R(t) are the numbers of the individuals in the eight classes at time t, respectively. The transfer variables between compartments are denoted by \(D_{ij}(t)\). At the same time, the corresponding random inputs \({P_E}({\lambda _E})\), \({P_I}({\lambda _I})\), \({P_{{E_{q\mathrm{{ }}}}}}({\lambda _{{E_{q\mathrm{{ }}}}}})\), \({P_H}({\lambda _H})\) and \({P_A}({\lambda _A})\) with parameters \({\lambda _E}, {\lambda _I}, {\lambda _{{E_{q\mathrm{{ }}}}}}, {\lambda _H}\) and \({\lambda _A}\) were used to describe the presence of exposed, symptomatic infected persons, quarantined exposed, hospitalized persons and asymptomatic infected persons. The flow diagram is shown in Fig. 2.

Fig. 2
figure 2

Diagram of the model adopted in the study for simulating the COVID-19 infection

It follows from [14] that the model equations can be formulated as follows:

$$\begin{aligned} \left\{ \begin{array}{l} {S_{t + 1}} = {S_t} - {D_{11}}(t) - {D_{12}}(t) + {D_{41}}(t)\\ {E_{t + 1}} = {E_t} + {D_{11}}(t) - {D_{21}}(t) - {D_{22}}(t) - {D_{23}}(t) + {P_E}({\lambda _E})\\ {I_{\mathrm{{t}} + 1}} = {I_t} + {D_{22}}(t) - {D_{31}}(t) + {P_I}({\lambda _I})\\ {S_{q\mathrm{{ }}}}_{\mathrm{{t}} + 1} = {S_{q\mathrm{{ }}}}_\mathrm{{t}} + {D_{21}}(t) - {D_{41}}(t)\\ {E_{q\mathrm{{ }}}}_{\mathrm{{t}} + 1} = {E_{q\mathrm{{ }}}}_\mathrm{{t}} + {D_{23}}(t) - {D_{51}}(t)\mathrm{{ + }}{P_{{E_{q\mathrm{{ }}}}}}({\lambda _{{E_{q\mathrm{{ }}}}}})\\ {H_{t + 1}} = {H_t} + {D_{31}}(t) + {D_{51}}(t) - {D_{61}}(t) + {P_H}({\lambda _H})\\ {A_{\mathrm{{t}} + 1}} = {A_t} + {D_{21}}(t) - {D_{71}}(t) + {P_A}({\lambda _A})\\ {R_{t + 1}} = {R_t} + {D_{61}}(t) + {D_{71}}(t) \end{array} \right. \nonumber \\ \end{aligned}$$
(1)

where the random variables in (1) can be defined by binomial Bin(np) distributions as follows [15, 16]:

$$\begin{aligned}&\quad {D_{11}}(t) \sim Bin({S_t}, {P_{11}}(t)) \\&\quad {D_{12}}(t) \sim Bin({S_t}, {P_{12}}(t))\\&\quad {D_{21}}(t) \sim Bin({E_t}, {P_{21}}(t)) \\&\quad {D_{22}}(t) \sim Bin({E_t}, {P_{22}}(t))\\&\quad {D_{23}}(t) \sim Bin({E_t}, {P_{23}}(t)) \\&\quad {D_{31}}(t) \sim Bin({I_t}, {P_{31}}(t))\\&\quad {D_{41}}(t) \sim Bin({S_{q\mathrm{{ }}}}_t, {P_{41}}(t)\\&\quad {D_{51}}(t) \sim Bin({E_{q\mathrm{{ }}}}_t, {P_{51}}(t))\\&\quad {D_{61}}(t) \sim Bin({H_t}, {P_{61}}(t)) \\&\quad {D_{71}}(t) \sim Bin({A_t}, {P_{71}}(t)) \end{aligned}$$

with probabilities

$$\begin{aligned} \begin{array}{l} {P_{11}}(t) = 1 - \exp \left[ { - c(t)\beta (t)\frac{{\theta A + I}}{N}} \right] , \mathrm{{ }}{P_{12}}(t) = 1 - \exp \left[ { - c(t)q(t)(1 - \beta (t))\frac{{\theta A + I}}{N}} \right] \\ {P_{21}}(t) = 1 - \exp ( - (1 - q(t))\rho {\sigma _A}), \mathrm{{ }}{P_{22}}(t) = 1 - \exp ( - (1 - q(t))(1-\rho ) {\sigma _I})\\ {P_{23}}(t) = 1 - \exp ( - q(t)), {P_{31}}(t) = 1 - \exp ( - {\delta _I}(t)), {P_{41}}(t) = 1 - \exp ( - \lambda )\\ {P_{51}}(t) = 1 - \exp ( - {\delta _{{E_q}}}), {P_{61}}(t) = 1 - \exp ( - {\gamma _H}), {P_{71}}(t) = 1 - \exp ( - {\gamma _A}) \end{array} \end{aligned}$$

Note that until 17 March (for Tianjin) and 16 March (for Singapore), there were few deaths, so these had little influence on the total population size. Therefore, we assume that the total number of population N is a constant and let \(N = S(t)+E(t)+I(t)+A(t)+S_q(t)+E_q(t)+H(t)+R(t)\). Considering the asymptomatic cases, let the proportion of asymptomatic infected amongst all infected individuals be \(\rho \), and the rate of exposed individuals becoming infectious but asymptomatic be \(\sigma _A\). Let the rate of exposed individuals becoming infectious with symptoms be \(\sigma _I\). Also, we assume that the contact number is c and the transmission probability is \(\beta \). By contact tracing, we introduced the proportion q of quarantined individuals so that if not infected, the susceptible individuals will move to \(S_q\) at the rate of \(cq (1-\beta )\), but, if infected, the exposed individuals will move to \(E_q\) at the rate of q. The other proportion, \(1-q\), including contacts undetected by contact tracing, will become asymptomatic individuals at the rate of \((1-q)\rho \sigma _A\), or infectious with symptoms at the rate of \((1-q)(1-\rho )\sigma _I\). It is well known that susceptible individuals can be infected by the infectious cases with symptoms as well as asymptomatic persons. Since asymptomatic infected persons have no symptoms of the disease, \(\theta \) is set as the correction factor for the transmission probability of asymptomatic infected persons. Table 1 lists all definitions of variables and parameters.

The imported E(t), I(t), \(E_q(t)\), H(t) and A(t) for each day can be described by Poisson distributions \({P_E}({\lambda _E})\), \({P_I}({\lambda _I})\), \({P_{{E_{q\mathrm{{ }}}}}}({\lambda _{{E_{q\mathrm{{ }}}}}})\), \({P_H}({\lambda _H})\) and \({P_A}({\lambda _A})\) with parameters \({\lambda _E}, {\lambda _I}, {\lambda _{{E_{q\mathrm{{ }}}}}}, {\lambda _H}\) and \({\lambda _A}\), respectively. Therefore, we have [14]

$$\begin{aligned} \begin{array}{l} {P_E}({E_t} = m) = \frac{{{\lambda _E}^m{e^{ - {\lambda _E}}}}}{{m!}}, {P_I}({I_t} = m) = \frac{{{\lambda _I}^m{e^{ - {\lambda _I}}}}}{{m!}}\\ {P_{{E_q}}}({E_q} = m) = \frac{{{\lambda _{{E_q}}}^m{e^{ - {\lambda _{{E_q}}}}}}}{{m!}}, {P_H}({H_t} = m) = \frac{{{\lambda _H}^m{e^{ - {\lambda _H}}}}}{{m!}}\\ \mathrm{{ }}{P_A}({A_t} = m) = \frac{{{\lambda _A}^m{e^{ - {\lambda _A}}}}}{{m!}} \end{array} \end{aligned}$$

For Tianjin, the contact rate, transmission probability, quarantined rate and diagnosis rate of the model would not be constants after the implementation of the lockdown strategy in Wuhan on 23 January 2020. We set \(T_0\) to be 22 January 2020. The contact number c(t) and transmission probability \(\beta (t)\) are modelled as decreasing functions over time t, given by [14]

$$\begin{aligned} c(t) = \left\{ \begin{array}{l} {c_0}, {\text { before 23 January 2020 }}\\ ({c_0} - {c_b}){\mathrm{{e}}^{\mathrm{{ - }}{r_1}(t - {T_0})}} + {c_b}, {\text { from 23 January to 17 March 2020 }} \end{array} \right. \\ \beta (t) = \left\{ \begin{array}{l} {\beta _0}, {\text { before 23 January 2020}}\\ ({\beta _0} - {\beta _a}){\mathrm{{e}}^{\mathrm{{ - }}{r_4}(t - {T_0})}} + {\beta _a}, {\text { from 23 January to 17 March 2020 }} \end{array} \right. \end{aligned}$$

Similarly, to describe enhanced contact tracing, we define q(t) as an increasing function of time t, as [14]

$$\begin{aligned} q(t) = \left\{ \begin{array}{l} {q_0}, {\text { before 23 January 2020}}\\ ({q_0} - {q_m}){\mathrm{{e}}^{\mathrm{{ - }}{r_2}(t - {T_0})}} + {q_m}, {\text {from 23 January to 17 March 2020}} \end{array} \right. \end{aligned}$$

We also set the transition rate \({{\delta }_{I(t)}}\) as an increasing function with respect to time t; thus, the detection period \(\frac{1}{{{\delta }_{I(t)}}}\) is a decreasing function of t with the following form [14]

$$\begin{aligned} \frac{1}{{{\delta _I}(t)}} = \left\{ \begin{array}{l} \frac{1}{{{\delta _{\mathrm{{I}}_0}}}}, {\text { before 23 January 2020}}\\ (\frac{1}{{{\delta _{I_0}}}} - \frac{1}{{{\delta _{I_f}}}}){\mathrm{{e}}^{\mathrm{{ - }}{r_3}(t - {T_0})}} + \frac{1}{{{\delta _{I_f}}}}, {\text {from 23 January to 17 March 2020}} \end{array} \right. \end{aligned}$$

For Singapore, according to the Ministry of Health [12], it was aware of the cluster of severe pneumonia cases in Wuhan city, Hubei Province, China, and was monitoring the situation closely on 2 January 2020. Also, the Ministry reported that from the evening of 3 January 2020 temperature screening would be implemented at Changi Airport for inbound travellers arriving on flights from Wuhan, and suspected cases would be referred to hospitals for further assessment. Health advisory posters for all travellers would be put up at Changi Airport, and health advisory information would be provided to all inbound travellers on flights from Wuhan. Clearly, Singapore had been aware of the seriousness of COVID-19 since 2 January 2020 and has always attached great importance to the development of the epidemic, so we can treat the above four parameters as constants.

Fig. 3
figure 3

Model fitting for the daily number of quarantined exposed, infectious with symptoms and hospitalized cases in Tianjin (A1A3) and Singapore (B1B3)

2.3 Simulation

The “National Health Commission” of the People’s Republic of China [17] had issued a notice that county (district)-level health authorities should organize and coordinate the tracing and management of close contacts. Such close contacts of confirmed cases were placed under home or centralized quarantine for medical observation for 14 days after the last contact with a case on 28 January. In Singapore, the “Ministry of Health” [12] issued a press release announcing that the health status of all close contacts would be closely monitored, and as a precautionary measure, they would be quarantined for 14 days from their last exposure to the patient when the first COVID-19 patient was confirmed on 23 January. The information above means that the quarantined susceptible will be removed after 14 days, obviously, so we set \(\lambda \) = 1/14. Estimation of the asymptomatic ratio, the percentage of carriers with no symptoms, will improve understanding of COVID-19 transmission and the spectrum of disease it causes, providing insight into epidemic spread. For this, we used information on Japanese nationals who were evacuated from Wuhan, China, on charter flights and employing a Bayes theorem, we estimated the asymptomatic ratio amongst evacuees to be 30.8% [18], thus setting \(\rho \) = 0.308. For Tianjin, using data extracted from the Health Commission of Tianjin from 11 January to 17 March 2020 the values of some parameters can be obtained by a simple analysis of the recorded data. The mean duration from illness onset to first medical visit before 23 January was 5 days; therefore, we set \(\delta _{I_0}\) = 1/5. The mean duration from quarantined exposed to first medical visit was 4.75 days; therefore, we set \(\delta _{E_q}\) = 1/4.75. Obviously, \(q_0\) = 0. Similarly, for Singapore, we used data extracted from the Ministry of Health from 18 January to 16 March 2020 getting \(\delta _{I_0}\) = 1/4.75 and \(\delta _{E_q}\) = 1/5.67.

3 Main results

3.1 Parameter estimation and model fitting

By fitting data on the daily number of quarantined exposed, infectious with symptoms and hospitalized cases, we obtained the estimated values of other parameters. To do so, we utilized the nonlinear least squares (NLES) method in MATLAB to fit the aforementioned real data sets which correspond to the model solution time series, i.e. \(D_{23}(t)+P_{{E_q}}(\lambda _{E_q})\), \(D_{22}(t)+P_I(\lambda _I)\), and \(D_{31}(t)+D_{51(t)}+P_H(\lambda _H)\), as shown in Fig. 3. The estimated parameter values are listed in Table 1.

Table 1 Initial conditions and parameter values for model (1)

3.2 Effective reproduction number

For an epidemic model, it is important to estimate the effective reproduction number. The effective reproduction number, R (defined as the average number of secondary cases that one index case generates over the course of its infectious period), is a useful measure of transmissibility and can be estimated over time (R(t)) through the course of an epidemic [19]. R(t) shows time-dependent variation due to the decline in susceptible individuals (intrinsic factors) and the implementation of control measures (extrinsic factors) [20]. By using the next-generation matrix approach for discrete-time epidemic models [21, 22], we get the effective reproduction number for system (1) as

$$\begin{aligned} R=\frac{{c\beta (\rho \theta {\delta _I}{\sigma _A}q + {\sigma _I}(1 - q){\gamma _A}\rho - \rho \theta {\delta _I}{\sigma _A} - {\sigma _I}(1 - q){\gamma _A})}}{{({\sigma _I}(1 - q)\rho + \rho {\sigma _A}q - {\sigma _I}(1 - q) - q - \rho {\sigma _A}){\delta _I}{\gamma _A}}}\nonumber \\ \end{aligned}$$
(2)

According to the parameter values given in Table 1, the effective reproduction numbers in Tianjin and Singapore are shown in Fig. 4.

Fig. 4
figure 4

The effective reproduction number R(t) in Tianjin during the period 11 January to 17 March 2020 (a) and for Singapore from 18 January to 16 March 2020 (b)

As can be seen from Fig. 4, the effective reproduction number for Tianjin was close to 8 from 11 to 22 January, and declined rapidly from 23 January, approached 0 from 31 January, and maintained this state until 17 March. That is, the outbreak in Tianjin was very serious at the beginning, but it was soon effectively controlled and kept under strict control, providing good conditions for the resumption of work and the re-opening of schools.

The effective reproduction number for Singapore from 18 January to 16 March was a constant relatively low value (1.083) , indicating that the outbreak was well contained from the start. But it is greater than 1, meaning that there was a risk of an outbreak, and if Singapore had chosen to resume work and re-open schools in this state, the risk of a second outbreak will be high.

It can be seen from formula (2) of the effective reproduction number that it can reflect the intensity of control measures in a region. According to Table 1, the quarantined rate of Singapore was only 0.08, while the quarantined rate of Tianjin was 0 at the beginning, but it rose rapidly from 23 January, and the quarantined rate of Tianjin was obviously much higher than that for Singapore in the later period. Therefore, Singapore’s high effective reproduction number was associated with its low quarantined rate. In other words, Singapore’s screening of close contacts was not as strong as Tianjin’s, and its low level of screening could lead to a second outbreak in the future.

Fig. 5
figure 5

The effects of foreign imported cases and lifting the prevention and control measures on the possibility of a secondary outbreak of COVID-19 in Tianjin. A1A3 The hospitalized cases based on fully lifting the prevention and control measures about c with all combinations of k and \(r_5\) and the corresponding c(t). B1B3 The hospitalized cases based on both fully lifting the prevention and control measures about c and \(\beta \) with all combinations of k and \(r_5\) and the corresponding \(\beta (t)\). C1C3 The hospitalized cases based on both fully lifting the prevention and control measures about c and \(\beta \) and 50% lifting the prevention and control measures about q with all combinations of k and \(r_5\) and the corresponding q(t)

4 Impact of foreign imported cases and prevention and control measures on COVID-19 outbreaks

4.1 Tianjin

For Tianjin, according to the current data, COVID-19 has been well controlled, and there has been a lot of detailed data released, which can clearly tell us whether the cases are asymptomatic infected persons (A) and whether they have symptoms or not when they are imported (I or E). Considering the practical situation, it is known that the cases who are in the symptomatic state when they are imported will be easily detected (all cases in compartment I enter directly into compartment H, and there are no cases in compartment I), generally, so the main consideration is that asymptomatic infections (A) and imported cases during the incubation period (E) may not be detected. Here, parameter k (\(k =0.1, 0.3, 0.6\)) is introduced as the proportion of undetected infected people as a measure of the imported cases who were not detected when they arrived. The proportion k of cases in compartments A and E will stay the same, and the rest of the cases which have been detected will enter compartment \(E_q\).

On the other hand, the resumption of work and re-opening of schools has made people less concerned about the epidemic. However, the effects of the prevention and control measures reflected by the contact number c, the transmission probability \(\beta \) and the quarantined rate q are different [4, 23,24,25], and people attach different importance to them. Amongst the public, once the emphasis on the epidemic situation drops, it will generally be reflected in an increase in c. If the emphasis is lower, there may be less emphasis on wearing masks and other precautionary measures, leading to an increase in \(\beta \). At the lowest level of emphasis, there is a high level of confidence that there are no local cases, and that the symptoms of a COVID-19 case are not reported in time, leading to reduced tracing and quarantine of close contacts, thus leading to the decrease of q.

Interventions of different degrees have different effects [26, 27], so three different degrees of the weakening of prevention and control measures are given: (1) only c increases (\(\beta \) and q maintain the original trend); (2) both c and \(\beta \) increase (q maintains the original trend) and (3) both c and \(\beta \) increase and q decreases. To better study the impact of changes in c, \(\beta \) and q on the epidemic we, firstly, suppose that the slackening of the prevention and control measures began on 18 March. Secondly, suppose that if c and \(\beta \) become larger (i.e. fully lifting the prevention and control measures about c and \(\beta \)), their maximum values can reach the value before the Wuhan blockade. Finally, it is assumed that if q decreases, its lowest value can reach half of the highest quarantined rate in Tianjin, that is, 50% lifting the prevention and control measures about q. A new parameter \(r_5\) is introduced to characterize the exponential increasing rate of c and \(\beta \) and the exponential decreasing rate of q uniformly. The larger \(r_5\) is, the faster the corresponding growth or decrease rate is. In the case of the weakest prevention and control measures described above, the corresponding c(t), \(\beta (t)\) and q(t) in model (1) from 11 January to 8 June are as follows:

$$\begin{aligned}&\begin{array}{l} c(t) = \left\{ \begin{array}{l} {c_0}, {\text { before 23 January 2020}}\\ ({c_0} - {c_b}){\mathrm{{e}}^{\mathrm{{ - }}{r_1}(t - {T_0})}} + {c_b}, {\text {from 23 January to 17 March 2020}}\\ ({c_{01}} - {c_{b1}}){\mathrm{{e}}^{\mathrm{{ - }}{r_5}(t - {T_1})}} + {c_{b1}}, {\text {from 18 March to 8 June 2020}} \end{array} \right. \end{array} \\&\begin{array}{l} \beta (t) = \left\{ \begin{array}{l} {\beta _0},{\text { before 23 January 2020}}\\ ({\beta _0} - {\beta _a}){\mathrm{{e}}^{\mathrm{{ - }}{r_4}(t - {T_0})}} + {\beta _a}, {\text {from 23 January to 17 March 2020}}\\ ({\beta _{01}} - {\beta _{a1}}){\mathrm{{e}}^{\mathrm{{ - }}{r_5}(t - {T_1})}} + {\beta _{a1}}, {\text {from March 18 to 8 June 2020}} \end{array} \right. \end{array} \\&\begin{array}{l} q(t) = \left\{ \begin{array}{l} {q_0}, {\text { before 23 January 2020}}\\ ({q_0} - {q_m}){\mathrm{{e}}^{\mathrm{{ - }}{r_2}(t - {T_0})}} + {q_m}, {\text {from 23 January to 17 March 2020}}\\ ({q_{01}} - {q_{m1}}){\mathrm{{e}}^{\mathrm{{ - }}{r_5}(t - {T_1})}} + {q_{m1}}, {\text {from 18 March to 8 June 2020}} \end{array} \right. \end{array} \end{aligned}$$

The risk of a secondary outbreak in Tianjin under all combinations of k and \(r_5\) was considered based on the above three degrees of neglect (as shown in Fig. 5). In particular, if the value of H(t) is always below 20 after March 18, then there is no secondary outbreak in Tianjin, and if H(t) is greater than 20 at some time, then there is a secondary outbreak in Tianjin.

Fig. 6
figure 6

Impacts of lifting the prevention and control measures about q on a potential secondary outbreak of COVID-19 with \(k=0.6\) and \(r_5=0.1\) in Tianjin

Fig. 7
figure 7

The effects of foreign imported cases and lifting the prevention and control measures about q on a potential secondary outbreak of COVID-19 in Tianjin. The hospitalized cases based on both fully lifting the prevention and control measures about c and \(\beta \), and 60% (A1A3), 80% (B1B3) and fully (C1C3) lifting the prevention and control measures about q with all combinations of k and \(r_5\) and the corresponding q(t)

As can be seen from Fig. 5, there is no risk of a secondary outbreak. In particular, when all the prevention and control measures are relaxed to the weakest point (as shown in Fig. 5C1), that is, both fully lifting the prevention and control measures about c and \(\beta \) and 50% lifting the prevention and control measures about q, the possibility of a secondary outbreak is almost 0. Although the value of q is already very low, it is obvious that q could be lower. Therefore, to find the minimal \(q_{m1}\) resulting in a secondary outbreak of COVID-19 in Tianjin, we continuously reduced \(q_{m1}\) under the circumstance of \(k=0.6\) and \(r_5=0.1\), the results of which are shown in Fig. 6.

Table 2 The risk of a secondary outbreak of COVID-19 under different proportions of undetected infections amongst foreign imported cases and different rates of lifting the prevention and control measures about q in Tianjin

It follows from Fig. 6 that with a high quarantined rate involving intensive tracking and quarantine measures, even if both fully lifting the prevention and control measures about c and \(\beta \) and some of the imported cases have gone undetected, the secondary outbreak of the epidemic in Tianjin cannot occur. However, when \(q_{m1}\) drops to a threshold (\(q_{m1}=0.16\)), there will be a secondary outbreak, and the lower \(q_{m1}\) drops, the more serious the epidemic becomes, which emphasizes the importance of the quarantined rate. Therefore, in order to understand the effect of the quarantined rate on secondary outbreaks more fully, the effects of different rates of lifting the prevention and control measures (\(r_5\)) and the proportion (k) of undetected imported cases were investigated for variations of \(q_{m1}\), as shown in Fig. 7 and Table 2. According to model (1) and Table 1, it is easy to calculate that \(q_{3/17}=0.400277\), so \(q_{m1}=0.16\), \(q_{m1}=0.08\) and \(q_{m1}=0\), respectively, which indicate that 60%, 80% and fully lifting the prevention and control measures about q have been implemented.

It is clear according to Fig. 7B1, B2, C1, C2 and Table 2 that even with the same intensity of lifting the prevention and control measures about quarantined rate q, different lifting speeds result in huge variation in the final outbreak size (about 100 times). It follows from Fig. 7C1 that under our assumption above, the largest secondary outbreak in Tianjin would have reached about 250,000 people in August and September.

The results shown in Figs. 5 and 7 indicate that fully lifting the prevention and control measures about contact number c and transmission possibility \(\beta \) cannot result in a secondary outbreak, while more than 60% lifting the prevention and control measures about quarantined rate q will have a risk of secondary outbreak. Due to the effect of quarantine-related prevention and control measures on the socioeconomics, it is advisable to keep a relative low quarantined rate, i.e. 0.16 at all times.

Fig. 8
figure 8

Impact of the quarantined rate on the secondary outbreak of COVID-19 in Tianjin. The hospitalized cases based on both fully lifting the prevention and control measures about c and \(\beta \) with \(r_5 = 0.1\) from 18 March to 8 June and on q (decreased from 18 March to May 10 and directly increased to 0.5 after 10 May) and the corresponding q(t)

According to the Beijing Municipal Health Commission [28], there was a secondary outbreak in June, and the outbreak was quickly brought under control. Rigorous and meticulous screening of close contacts was carried out. So, it is speculated that the rapid control of the epidemic is related to the higher quarantined rate. In order to verify the above speculation, the data for Tianjin were used for simulation. On the basis of Fig. 7C1, it is assumed that the quarantined rate would increase rapidly starting from 10 May.

According to Fig. 8, when COVID-19 cases occur, the outbreak can be quickly contained as long as the close contacts of the cases can be tracked and quarantined in a timely manner (i.e. the quarantined rate is high).

4.2 Singapore

For Singapore, it can be seen from the Ministry of Health [12] that since 17 March, only the numbers of confirmed and imported cases have been published, with no detailed information. In order to better simulate the status of imported cases, some assumptions were made. We assumed that some of the confirmed imported cases were in the incubation period when they arrived and that some were symptomatic. It is also known from the data before 17 March that approximately 50% of the imported cases were in the incubation period at the time of import, so it is assumed that 50% of the imported cases were in the incubation period and the rest were symptomatic. According to the detailed data before 17 March, almost all of the imported cases with symptoms were quarantined and admitted to hospital on the same day; thus, we guessed that 50% of the imported cases arrived on the day of confirmation of their infections and so directly entered compartment H, while compartment I had no additions. As for confirmed cases imported during the incubation period, it is known that the average time from the importation to entering the compartment H before 17 March was about 5 days, so it was assumed that the time follows a Poisson distribution with an average of 5, thus generating the imported date of each case, which is the date of the importation to the compartment E. It is known that the data collected only included imported confirmed cases so it is impossible to measure the number of imported asymptomatic infected persons. However, according to the literature [18], asymptomatic infected persons may account for 30.8% of all infected persons, so the date of importation of asymptomatic infected persons can be summarized as \(A=H/(1-0.308)\times 0.308\). Based on the above hypothesis, we obtained the dates of the imported cases into the compartments AIH and E, respectively. As with the Tianjin data, we measured the undetected ratio with parameter k. On the other hand, given the outbreak of COVID-19 in Singapore after April, it may be assumed that from 17 March, the contact number c and transmission probability \(\beta \) began to increase (up to twice as high), and the quarantined rate q began to decrease, the lowest of which will be half of the value before. The parameter \(r_5\) is introduced to characterize the exponentially increasing rate of c(t) and \(\beta (t)\), as well as the exponentially decreasing rate of q(t), consistent with Tianjin. The corresponding c(t), \(\beta (t)\) and q(t) in model (1) from 18 January to 12 June are as follows:

$$\begin{aligned} \begin{array}{l} c(t) = \left\{ \begin{array}{l} {c_0}, {\text { before 17 March 2020}}\\ ({c_0} - {c_b}){\mathrm{{e}}^{\mathrm{{ - }}{r_5}(t - {T_0})}} + {c_b}, {\text {from 17 March to 12 June 2020}} \end{array} \right. \\ \beta (t) = \left\{ \begin{array}{l} {\beta _0}, {\text { before 17 March 2020}}\\ ({\beta _0} - {\beta _a}){\mathrm{{e}}^{\mathrm{{ - }}{r_5}(t - {T_0})}} + {\beta _a}, {\text {from 17 March to 12 June 2020}} \end{array} \right. \\ q(t) = \left\{ \begin{array}{l} {q_0}, {\text { before 17 March 2020}}\\ ({q_0} - {q_m}){\mathrm{{e}}^{\mathrm{{ - }}{r_5}(t - {T_0})}} + {q_m}, {\text {from 17 March to 12 June 2020}} \end{array} \right. \end{array} \end{aligned}$$
(3)
Fig. 9
figure 9

Impact of foreign imported cases and lifting the prevention and control measures on the possibility of a secondary outbreak of COVID-19 in Singapore. A1A3 The hospitalized cases based on contact number increased by 100% with all combinations of k and \(r_5\) and the corresponding c(t). B1B3 The hospitalized cases based on both contact number and transmission probability increased by 100% with all combinations of k and \(r_5\) and the corresponding \(\beta (t)\). C1C3 The hospitalized cases based on both contact number and transmission probability increased by 100% and quarantined rate contraction by 50% with all combinations of k and \(r_5\) and the corresponding q(t)

On the basis that the contact number increased by 100% (transmission probability and quarantined rate maintained the original trend), both contact number and transmission probability increased by 100% (quarantined rate maintained the original trend), and both contact number and transmission probability increased by 100% and quarantined rate contraction by 50%, the risk of an outbreak in Singapore under all combinations of k and \(r_5\) was considered, as shown in Fig. 9 and Table 3.

Table 3 The risk of a secondary outbreak of COVID-19 under different proportions of undetected foreign imported cases and different rates of lifting the prevention and control measures in Singapore

As can be seen from Fig. 9 and Table 3, an outbreak of COVID-19 was possible and highly likely in Singapore. It is clear that changes in the contact number, transmission probability and quarantined rate and how quickly they change, significantly influence the extent of the outbreak. It is obvious that with the increasing proportion of undetected cases, the severity of the epidemic also increases. When the previous prevention and control measures are maintained (\(r_5=0\), as shown in Fig. 9A3, B3, C3, which depict the same situation), if no cases are undetected, the epidemic will still have a small secondary outbreak. This means that the secondary outbreak was caused by local cases, indicating that some close contacts or asymptomatic infected persons may have been missed in Singapore in the early stage. In this state, it is not enough to only maintain the prevention and control measures in the early stage, and the prevention and control measures need to be further strengthened to avoid the secondary outbreak.

If the prevention and control measures had weakened (\({r_5} \ne 0\), as shown in Fig. 9A1, A2, B1, B2, C1, C2), the outbreak would seriously increase to the point of being almost completely out of control, and the higher the rate of lifting the prevention and control measures, the more serious the epidemic. Also, due to lifting the prevention and control measures, the influence of the undetected imported cases would be almost negligible. According to Fig. 9A2, A3, if contact number increased by 100%, even if with the lower rate of lifting the prevention and control measures (\(r_5=0.02\)), the number of H(t) would be close to 50,000. And if the contact number was maintained, there would still be a secondary outbreak. Thus, in order to better analyse the relationship between the number of contacts and the secondary outbreak, we analysed the degree of the secondary outbreak caused by the number of contacts increased by 0, 2%, 5%, 10% and 20%, respectively, when \(r_5=0.02\) and \(k=0\) (as shown in Fig. 10).

Fig. 10
figure 10

Impacts of increasing the contact number on a potential secondary outbreak of COVID-19 with \(k=0\) and \(r_5=0.02\) in Singapore

Comparing Figs. 7 and 9, we find that even if the quarantined rate in Tianjin drops to a very low level, it is difficult to generate a secondary outbreak, and even if there is a secondary outbreak, the severity of the epidemic in Tianjin is negligible compared with that in Singapore. The importance of maintaining an effective reproduction number less than 1 is emphasized by our results, given our assumption that people in Tianjin started to go back to work and reopened schools with its effective reproduction number stable at around 0 for nearly a month and a half. Singapore, in contrast, started to ease restrictions when the effective reproduction number was greater than 1. Therefore, if work was resumed and schools reopened with the effective reproduction number greater than 1, the generation of a secondary outbreak would be more likely.

Fig. 11
figure 11

a The estimated and real numbers of hospitalized individuals in Singapore from 18 January to 12 June 2020. be The corresponding trends for c(t), \(\beta (t)\), q(t) and R(t)

According to the Ministry of Health [12], the Prime Minister announced a set of strict measures to slow down the transmission of COVID-19 in Singapore in his address to the nation on 3 April. They imposed stringent measures from 7 April 2020 and introduced even stricter measures on 21 April 2020.

Therefore, 21 April is used as the turning point of new prevention and control measures. Combined with the assumption that various measures started to be loosened on 18 March, we get the corresponding changes of c(t), \(\beta (t)\) and q(t) as follows:

$$\begin{aligned} \begin{array}{l} c(t) = \left\{ \begin{array}{l} {c_0}, {\text { before 17 March 2020}}\\ ({c_0} - {c_b}){\mathrm{{e}}^{\mathrm{{ - }}{r_5}(t - {T_0})}} + {c_b}, {\text {from 17 March to 20 April 2020}}\\ ({c_{01}} - {c_{b1}}){\mathrm{{e}}^{\mathrm{{ - }}{r_6}(t - {T_1})}} + {c_{b1}}, {\text {from 21 April to 12 June 2020}} \end{array} \right. \\ \beta (t) = \left\{ \begin{array}{l} {\beta _0}, {\text { before 17 March 2020}}\\ ({\beta _0} - {\beta _a}){\mathrm{{e}}^{\mathrm{{ - }}{r_5}(t - {T_0})}} + {\beta _a}, {\text {from 17 March to 20 April 2020}}\\ ({\beta _{01}} - {\beta _{a1}}){\mathrm{{e}}^{\mathrm{{ - }}{r_6}(t - {T_1})}} + {\beta _{a1}}, {\text {from 21 April to 12 June 2020}} \end{array} \right. \\ q(t) = \left\{ \begin{array}{l} {q_0}, {\text { before 17 March 2020}}\\ ({q_0} - {q_m}){\mathrm{{e}}^{\mathrm{{ - }}{r_5}(t - {T_0})}} + {q_m}, {\text {from 17 March to 20 April 2020}}\\ ({q_{01}} - {q_{m1}}){\mathrm{{e}}^{\mathrm{{ - }}{r_6}(t - {T_1})}} + {q_{m1}}, {\text {from 21 April to 12 June 2020}} \end{array} \right. \end{array} \end{aligned}$$
(4)

It is clear that formula (4) is the same as formula (3) for the period before 21 April, where the parameter \(r_5=0.035\) except that the new parameter \(r_6=1\) is introduced in the newly added prevention and control measures. The comparison between the simulation and the real data is shown in Fig. 11.

It can be seen from Fig. 11 that the weakening of prevention and control measures caused the secondary outbreak of the epidemic in Singapore. However, subsequent timely strengthening of the measures effectively controlled the worsening of the epidemic.

5 Discussion and conclusions

The COVID-19 epidemic in Tianjin after the Spring Festival was effectively controlled under strict prevention and control measures. Singapore kept its initial outbreak under control with strict measures taken from the start. However, after the two regions lifted their prevention and control measures, one had a secondary outbreak and the other had none. Two questions are raised: What are the key factors affecting the development of the epidemic? And when can we resume work and reopen schools? [29] To address these questions, we constructed a stochastic discrete dynamics model of COVID-19 based on epidemic data from Tianjin and Singapore.

In Tianjin, work began to resume and schools reopened after the effective reproduction number had been approaching 0 for one and a half months. We know that fully lifting the prevention and control measures about contact number c and transmission possibility \(\beta \) will not result in a secondary outbreak, and more than 60% lifting the prevention and control measures about quarantined rate q will have a risk of secondary outbreak. Due to the effect of quarantine-related prevention and control measures on the socioeconomics, it is advisable to keep a relative low quarantined rate, i.e. 0.16 at all times. For Singapore, the effective reproduction number was still more than 1 when it chose to return to resume work and reopen schools, and its quarantined rate was always low (less than 0.1). If its prevention and control measures are slightly relaxed, this will cause a secondary outbreak. The more relaxed the measures, the more serious the epidemic will be. In view of Singapore’s low quarantined rate (with sufficient room for increase) and the effective reproduction number greater than 1, it is recommended to increase the quarantined rate appropriately to make the effective reproduction number less than 1 before considering increasing the contact number [30].

The main conclusions show that strengthening the management of people entering the country and comprehensive tracing of close contacts when cases occur are key factors in preventing outbreaks. The time to resume work and reopen schools depends on the state of the local effective reproduction number. When the effective reproduction number is stable below 1, it is better to keep it at 0 for a long time and maintain relatively strict prevention and control measures according to the above key factors. In this case, the possibility of a secondary outbreak of the epidemic will be relatively low if work and schooling resume. If there is a secondary outbreak, as long as close contacts can be controlled in a timely manner, the epidemic will be effectively controlled.

This paper has shown secondary outbreaks of different degrees caused by different extents to which control measures were lifted. But if we want to better develop strategies for COVID-19, medical resources also need to be considered. So one more compartment (confirmed but not hospitalized) should be introduced in model(1), to discuss how to ensure that the final size of the infected population is low and that the expenditure is economical, providing the train of thought for future research.