The invention discloses a
data transmission method and device based on open
system interconnection, equipment and a medium, and relates to the technical field of
data security, and the method comprises the steps: determining a data reading request for target data in a preset
database of a
server, and generating a corresponding target structured
query statement, encrypting the target structured
query statement through a transmission layer of an open
system interconnection model by using a preset tunnel protocol to obtain encrypted information, transmitting a first data packet generated based on the encrypted information to a
server side by using the open
system interconnection model, and receiving target data returned by the
server side; wherein the preset tunnel protocol is a network protocol constructed based on a
transmission control protocol or a
user datagram protocol between the
client and the server. The tunnel protocol is directly deployed on the transmission layer to encrypt the
SQL statement, full
encryption does not need to be performed on the whole data packet, the calculation overhead is reduced,
application layer service codes and server
database configuration do not need to be changed, and the universality of the technical scheme is improved.