1. A method of online energy coincidence for an all-digital PET system, wherein the method comprises: S1: collecting information of scintillation pulses generated by incident i photons, forming a data frame of a single event and transmitting the data frame to a host computer, by a detection module; S2: performing two-dimensional position distribution statistics on the incident y photons, acquiring a two-dimensional position spectrum of the incident y photons, performing segmentation of the position spectrum to confine a region for each of crystal strips, and forming a crystal segmentation table, by the host computer; S3: after the segmentation, making statistics for an energy distribution spectrum of the scintillation pulses contained in each of the crystal strips, obtaining an energy value, as an energy correction value of a corresponding crystal strip, that actually corresponds to a 511 keV energy peak for each of the energy distribution spectrums by searching for a point at which count of each of the energy spectrums is the highest, to form an energy correction table, by the host computer; S4: transmitting the crystal segmentation table and the energy correction table from the host computer to a storage unit of the detection module; S5: collecting information of online energy correction by the detection module according to the crystal segmentation table and the energy correction table; S6: when an event occurs, searching for the number of a corresponding crystal strip from the crystal segmentation table in accordance with a two-dimensional coordinate of the event, and searching for an energy correction value from the energy correction table in accordance with the number of the corresponding crystal strip; and S7: calculating a true energy value of the event in accordance with the searched energy correction value, reserving the event if the true energy value of the event is within an energy window, filtering out the event if the true energy value of the event is not within the energy window, and transmitting data of the reserved event to the host computer.