We studied the fast variability of three selected active galactic nuclei (AGNs), IRAS\,13224-3809, 1H\,0707-495, and Mrk\,766, and the cataclysmic variable MV\,Lyr, which were observed by the and spacecrafts, respectively. Our goal is to search for the common origin of the variability and to test the so-called sandwich model, in which a geometrically thick corona surrounds a geometrically thin disc. We studied the substructures of the averaged flare profiles. The flare profile method identifies individual flares in the light curve, and averages them. The direct fitting of the profile substructures identified individual characteristic frequencies that are seen in standard power density spectra (PDS) as a break frequency or quasi-periodic oscillation. The credibility of the flare profile substructures is demonstrated by comparison with the autocorrelation function. We found that the flare profiles of AGNs are similar to those of a cataclysmic variable in the low state. We explain this as a consequence of a truncated inner disc in a sandwich model. The same scenario is also able to explain the characteristic break frequencies in X-ray PDS, which are not seen in the optical. We also searched for substructures in the flare profile of IRAS\,13224-3809. In addition to a permanently present main flare, we found that a transient side-lobe appears before the main flare and is only seen in a high-flux period. The complex flare profile of this AGN suggests that an additional source of X-rays appears during the high-flux period. We propose a scenario in which an accretion flow fluctuation enters the sandwich corona and propagates further to some very central part of the accretion disc.