A method for controlling flows of a logical link layer in a near field communication, NFC, software stack, comprising: Step A: arranging a Send Window and a Receive Window in the logical link layer for controlling flows of transmitted data frames; Step B: adjusting the size of the Send Window and the size of the Receive Window according to a transfer rate determined based on upper-layer application, communication delay time determined based on channel quality, and the size of a data frame, and the size of the Receive Window satisfying an equation taking on the form of Receive Window = [FWT×DATARATE_MAX]/[(2+Link Miu)×8] where Receive Window represents the size of the Receive Window, FWT represents the communication delay time, DATARATE_MAX represents the maximum transfer rate ensured in the upper-layer application, and Link Miu represents a parameter indicating Link Maximum Information Unit that is specified when an output terminal and an input terminal are connected, and FWT and DATARATE_MAX being read by an NFC controller at the input terminal; and Step C: controlling flows of the output terminal according to the size of the Send Window, and controlling flows of the input terminal according to the size of the Receive Window, wherein a buffer zone is constructed at the input terminal for buffering the received data frame, characterized in that the input terminal that receives the data frame performs the steps of: Step A1: receiving the data frame sent by the output terminal through the input terminal; Step A2: judging a serial number of the data frame to be in the Receive Window; Step A3: judging the serial number of the data frame to be the lower threshold of the Receive Window when the serial number of the data frame is in the Receive Window; Step A4: moving the data frame to the buffer zone when the serial number of the data frame is not the lower threshold of the Receive Window; Step A5: looking up whether the data frame forms a continuous series with the serial numbers of data frames in the buffer zone when the serial number of the data frame is the lower threshold of the Receive Window; Step A6: returning a confirmation frame to the output terminal when the data frame does not form a continuous series with the serial numbers of the data frames in the buffer zone, and confirming the serial number of the data frame is the data frame in the lower threshold of the Receive Window; and Step A7: forming, with the received data frame and the data frames capable of forming a continuous series, a data frame unit, when the data frame forms a continuous series with the serial numbers of the data frames in the buffer zone, and returning a confirmation frame to the output terminal to confirm that a data frame having a largest serial number in the data frame unit is received. Step A: arranging a Send Window and a Receive Window in the logical link layer for controlling flows of transmitted data frames; Step B: adjusting the size of the Send Window and the size of the Receive Window according to a transfer rate determined based on upper-layer application, communication delay time determined based on channel quality, and the size of a data frame, and the size of the Receive Window satisfying an equation taking on the form of Receive Window = [FWT×DATARATE_MAX]/[(2+Link Miu)×8] where Receive Window represents the size of the Receive Window, FWT represents the communication delay time, DATARATE_MAX represents the maximum transfer rate ensured in the upper-layer application, and Link Miu represents a parameter indicating Link Maximum Information Unit that is specified when an output terminal and an input terminal are connected, and FWT and DATARATE_MAX being read by an NFC controller at the input terminal; and Step C: controlling flows of the output terminal according to the size of the Send Window, and controlling flows of the input terminal according to the size of the Receive Window, Step A1: receiving the data frame sent by the output terminal through the input terminal; Step A2: judging a serial number of the data frame to be in the Receive Window; Step A3: judging the serial number of the data frame to be the lower threshold of the Receive Window when the serial number of the data frame is in the Receive Window; Step A4: moving the data frame to the buffer zone when the serial number of the data frame is not the lower threshold of the Receive Window; Step A5: looking up whether the data frame forms a continuous series with the serial numbers of data frames in the buffer zone when the serial number of the data frame is the lower threshold of the Receive Window; Step A6: returning a confirmation frame to the output terminal when the data frame does not form a continuous series with the serial numbers of the data frames in the buffer zone, and confirming the serial number of the data frame is the data frame in the lower threshold of the Receive Window; and Step A7: forming, with the received data frame and the data frames capable of forming a continuous series, a data frame unit, when the data frame forms a continuous series with the serial numbers of the data frames in the buffer zone, and returning a confirmation frame to the output terminal to confirm that a data frame having a largest serial number in the data frame unit is received.