The invention discloses a data transmission method and a data transmission device in a unidirectional network, which are used in the field of network communication. The method provided by the invention comprises the following steps: obtaining a frame of message in a bidirectional network, and extracting key field information in the message; matching the feature information of the target machine with the key field information, and when the feature information of the target machine can be matched with the key field information, identifying a protocol name adopted by the message; responding to acorresponding response message according to the protocol name; when protocol name is TCP, if yes, identifying the state identifier of the TCP; Treceiving a message sent by a one-way network end, carrying out corresponding state change, comparing a TCP serial number and an expected TCP serial number received in the message, responding to an ACK confirmation message if the serial numbers are equal,calculating the checksum of a TCP data part of the message, combining a new UDP message, and sending the new UDP message to a target machine of the one-way network end. According to the method, the problems of poor real-time performance and low transmission speed of a traditional data ferrying method are solved, and the transmission reliability and real-time performance are improved on the premiseof ensuring the data transmission safety.