A data transmission method, comprising: detecting, by a terminal, data transmission situation of each of at least two serving cells, wherein the at least two serving cells comprise a primary cell and at least one secondary cell; and performing, by the terminal, random access on a serving cell where a beam failure occurs to update serving beam of the serving cell, according to the data transmission situation of each of the serving cells; wherein, the detecting, by the terminal, data transmission situation of each of the at least two serving cells, comprises: maintaining, by the terminal, a timer and a counter configured in each of the serving cells, to count a number of times that the beam failure occurs in each of the serving cells within running time of the timer configured in each of the serving cell, wherein, the performing, by the terminal, random access on the serving cell where the beam failure occurs to update serving beam of the serving cell, according to the data transmission situation of each of the serving cells, comprises: performing, by the terminal, random access on the serving cell to update serving beam of the serving cell, if the number of times that the beam failure occurs in the serving cell reaches to a pre-configured threshold of number-of-times within the running time of the timer configured in the serving cell. detecting, by a terminal, data transmission situation of each of at least two serving cells, wherein the at least two serving cells comprise a primary cell and at least one secondary cell; and performing, by the terminal, random access on a serving cell where a beam failure occurs to update serving beam of the serving cell, according to the data transmission situation of each of the serving cells; wherein, the detecting, by the terminal, data transmission situation of each of the at least two serving cells, comprises: maintaining, by the terminal, a timer and a counter configured in each of the serving cells, to count a number of times that the beam failure occurs in each of the serving cells within running time of the timer configured in each of the serving cell, wherein, the performing, by the terminal, random access on the serving cell where the beam failure occurs to update serving beam of the serving cell, according to the data transmission situation of each of the serving cells, comprises: performing, by the terminal, random access on the serving cell to update serving beam of the serving cell, if the number of times that the beam failure occurs in the serving cell reaches to a pre-configured threshold of number-of-times within the running time of the timer configured in the serving cell. maintaining, by the terminal, a timer and a counter configured in each of the serving cells, to count a number of times that the beam failure occurs in each of the serving cells within running time of the timer configured in each of the serving cell, wherein, the performing, by the terminal, random access on the serving cell where the beam failure occurs to update serving beam of the serving cell, according to the data transmission situation of each of the serving cells, comprises: performing, by the terminal, random access on the serving cell to update serving beam of the serving cell, if the number of times that the beam failure occurs in the serving cell reaches to a pre-configured threshold of number-of-times within the running time of the timer configured in the serving cell.