With the experimental advances in microscale fabrication technology, the designing of functional devices by using single molecules has become one of the most promising methods for the next generation of electronic devices. Molecular rectifier, as a basic component almost for any electronic device, has become a research hotspot in molecular electronics. Recently, one-dimensional graphene nanoribbons (GNRs) which cut off from the novel two-dimensional material-graphene were used as the electrodes for several molecular devices due to their unique electronic structures and transport characteristics. The GNRs have less serious contact problems than metallic electrode materials like gold. In this paper, we investigate the rectifying performances of oligo phenylene ethynylene molecular devices based on graphene electrodes by using the density-functional theory and the non-equilibrium Green's function method. The effect of functional group on the rectifying performances of molecular device is discussed. The results show that the functional group plays a significant role in determining the rectifying performances of oligo phenylene ethynylene molecular device. The rectifying ratio can be effectively tuned by the functional group: adding the donor group (NH2) can lead to the positive rectifying phenomenon, adding the acceptor group (NO2) can trigger the negative rectifying phenomenon, and simultaneously adding NH2 and NO2 groups can bring about an alternate phenomenon between positive and reverse rectifying . The physical mechanism of the rectifying behavior is explained based on the transmission spectra and molecular projected self-consistent Hamiltonian. The transmission spectra of four models (M1-M4) bias voltages in range from-1.0 V to 1.0 V are given. The main transmission peak of M1 for positive bias is similar to that for negative bias, resulting in a weak rectification ratio. However, for M2 and M3, the main transmission peaks for positive and negative bias are significantly different from each other, which shows obviously a rectifying behavior. For M4, the main transmission peak is higher for the bias of (0.44-0.83 V) and also for the bias (0.95-1.00 V), showing an alternate phenomenon between positive and reverse rectifying. The maximum rectification ratio reaches 2.71 by adding an acceptor group (NO2), which suggests that this system has attractive potential applications in future molecular circuit.