Patent ID: 8369715

Claim:
A method for measuring an optical power, comprising: acquiring code type information in an optical signal of a communication system, wherein the optical signal comprises an optical signal of burst emission and/or an optical signal of burst reception; measuring the optical signal of the communication system, and acquiring an optical power value of the optical signal; and correcting the optical power value according to the code type information; wherein the acquiring the code type information in the optical signal of the communication system further comprises: recovering, by a receiving-end device, data from an electrical signal derived from a photoelectric conversion on the optical signal, and scanning, by the receiving-end device, the recovered data to collect a duty ratio of the optical signal or a distribution of “0” signals and “1” signals in the optical signal; wherein the code type information is collected by using a comparer, a first counter and a second counter; and wherein when the electrical signal input to the comparer is lower than a preset threshold level, the first counter is triggered to count a clock signal equal to or greater than a data signal frequency; when the electrical signal input to the comparer is higher than the preset threshold level, the second counter is triggered to count the clock signal, wherein the code type information is acquired according to results of the first counter and the second counter.