[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN115314544A - TCP data one-way transmission method, device, equipment and medium - Google Patents

TCP data one-way transmission method, device, equipment and medium Download PDF

Info

Publication number
CN115314544A
CN115314544A CN202210937775.6A CN202210937775A CN115314544A CN 115314544 A CN115314544 A CN 115314544A CN 202210937775 A CN202210937775 A CN 202210937775A CN 115314544 A CN115314544 A CN 115314544A
Authority
CN
China
Prior art keywords
data
tcp
communication connection
transmission
unidirectional
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210937775.6A
Other languages
Chinese (zh)
Other versions
CN115314544B (en
Inventor
王庆
林楠
黄华伟
李应强
竹宇
黄建平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Westone Information Industry Inc
Original Assignee
Chengdu Westone Information Industry Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chengdu Westone Information Industry Inc filed Critical Chengdu Westone Information Industry Inc
Priority to CN202210937775.6A priority Critical patent/CN115314544B/en
Publication of CN115314544A publication Critical patent/CN115314544A/en
Application granted granted Critical
Publication of CN115314544B publication Critical patent/CN115314544B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/163In-band adaptation of TCP data exchange; In-band control procedures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Communication Control (AREA)

Abstract

The application discloses a method, a device, equipment and a medium for one-way transmission of TCP data, which relate to the technical field of data transmission and comprise the following steps: establishing a first communication connection between a first TCP client and a first TCP server based on a TCP protocol; acquiring TCP data sent by a first TCP client through a first TCP server based on a first communication connection, and then processing the TCP data to obtain processed data; and transmitting the processed data to a receiving end in the unidirectional import system so that the receiving end confirms the processed data to obtain confirmed data, and transmitting the confirmed data to a second TCP server through a second TCP client based on a second communication connection established by a TCP protocol. By the technical scheme, the transmission of the TCP data in the unidirectional import system can be realized.

Description

TCP data one-way transmission method, device, equipment and medium
Technical Field
The present invention relates to the field of data transmission technologies, and in particular, to a method, an apparatus, a device, and a medium for unidirectional transmission of TCP data.
Background
The unidirectional leading-in system is a transmission device for realizing unidirectional leading-in of information among different networks, can conveniently transmit data in a sending end network to a receiving end network, solves the safety problem in the sending end network, and is not attacked by the outside. In the unidirectional import system, a sending end only installs a sending part, a receiving end only installs a receiving part, and unidirectional transmission without feedback is performed in the data transmission process. TCP data streaming is a connection-oriented, reliable, byte-stream-based transport layer communication protocol that is widely used for network data transmission. However, the TCP connection establishment is a bidirectional process, and the TCP connection cannot be directly established between the transmitting end and the receiving end of the unidirectional import system.
In summary, how to realize the transmission of TCP data in the unidirectional import system is a problem to be solved at present.
Disclosure of Invention
In view of the above, the present invention provides a method, an apparatus, a device and a medium for unidirectional transmission of TCP data, which can implement transmission of TCP data in a unidirectional import system. The specific scheme is as follows:
in a first aspect, the present application discloses a method for unidirectional transmission of TCP data, which is applied to a sending end in a unidirectional import system, where the sending end includes a first TCP server, and includes:
establishing a first communication connection between a first TCP client and a first TCP server based on a TCP protocol;
acquiring TCP data sent by the first TCP client through the first TCP server based on the first communication connection, and then processing the TCP data to obtain processed data;
and transmitting the processed data to a receiving end in the unidirectional import system so that the receiving end confirms the processed data to obtain confirmed data, and transmitting the confirmed data to a second TCP server through a second TCP client based on a second communication connection established by a TCP protocol.
Optionally, the processing the TCP data to obtain processed data includes:
extracting original transmission data from the TCP data, adding a connection identifier, a transmission sequence number and a check code to the original transmission data to obtain encapsulated data, and setting an integrity identifier for the encapsulated data to obtain processed data.
Optionally, the transmitting the processed data to a receiving end in the unidirectional ingress system, so that the receiving end confirms the processed data to obtain confirmed data includes:
and transmitting the processed data to a receiving end in the unidirectional import system based on an internal transmission protocol so that the receiving end decapsulates the processed data and confirms the connection identifier, the transmission sequence number, the check code and the integrity identifier of the decapsulated processed data to obtain the confirmed data.
Optionally, before the transmitting, by the second TCP client, the second communication connection established by the confirmed data based on the TCP protocol to the second TCP server, the method further includes:
and determining a second communication connection corresponding to the first communication connection based on the connection identifier.
Optionally, the TCP data unidirectional transmission method further includes:
judging whether the parameter information of the current communication connection meets a preset communication connection termination condition or not through the first TCP client;
and if the parameter information of the current communication connection meets the preset communication connection termination condition, disconnecting the current communication connection, and then reestablishing the next communication connection.
Optionally, the determining, by the first TCP client, whether the current communication connection meets a preset communication connection termination condition includes:
and acquiring the total data amount of the currently transmitted data through the first TCP client, and judging whether the total data amount meets the condition that the total data amount is larger than a preset data amount threshold value.
Optionally, the determining, by the first TCP client, whether the current communication connection meets a preset communication connection termination condition includes:
and acquiring the total communication time of the currently transmitted data through the first TCP client, and judging whether the total communication time meets the condition that the total communication time is greater than a preset communication time threshold value.
In a second aspect, the present application discloses a TCP data unidirectional transmission apparatus, which is applied to a sending end in a unidirectional import system, wherein the sending end includes a first TCP server, including:
the connection establishing module is used for establishing a first communication connection between a first TCP client and the first TCP server based on a TCP protocol;
a data obtaining module, configured to obtain, through the first TCP server, TCP data sent by the first TCP client based on the first communication connection, and then process the TCP data to obtain processed data;
and the data transmission module is used for transmitting the processed data to a receiving end in the unidirectional import system so that the receiving end can confirm the processed data to obtain confirmed data, and the confirmed data is transmitted to a second TCP server through a second TCP client based on a second communication connection established by a TCP protocol.
In a third aspect, the present application discloses an electronic device, comprising:
a memory for storing a computer program;
a processor for executing the computer program to realize the steps of the TCP data unidirectional transmission method disclosed in the foregoing.
A fourth aspect, itself, discloses a computer-readable storage medium for storing a computer program; wherein the computer program realizes the steps of the TCP data unidirectional transmission method disclosed in the foregoing when being executed by a processor.
As can be seen, the method includes the steps that first communication connection is established between a first TCP client and a first TCP server based on a TCP protocol; acquiring TCP data sent by the first TCP client through the first TCP server based on the first communication connection, and then processing the TCP data to obtain processed data; and finally, transmitting the processed data to a receiving end in the unidirectional import system so that the receiving end confirms the processed data to obtain confirmed data, and transmitting the confirmed data to a second TCP server through a second TCP client based on a second communication connection established by a TCP protocol. Therefore, according to the method, a first TCP server is installed at a sending end of a one-way import system, a second TCP client is installed at a receiving end of the one-way import system, communication connection is established between the first TCP client and the first TCP server based on a TCP protocol, TCP data sent by the first TCP client is obtained, corresponding processing is carried out on the data, the processed data are sent to the receiving end of the one-way import system, the received processed data are confirmed through the receiving end, and finally the confirmed data are transmitted to the second TCP server through the second TCP client in the receiving end. The transmission of the TCP data in the unidirectional lead-in system can be realized through the technical scheme.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a unidirectional transmission method of TCP data disclosed in the present application;
FIG. 2 is a flow chart of one-way transmission of TCP data according to the present disclosure;
FIG. 3 is a sub-flowchart of a method for unidirectional transmission of TCP data as disclosed in the present application;
FIG. 4 is a flowchart of a specific TCP data unidirectional transmission method disclosed in the present application;
fig. 5 is a flow chart of data processing at a transmitting end according to the present disclosure;
FIG. 6 is a schematic diagram of a specific data package disclosed herein;
FIG. 7 is a schematic diagram of an exemplary secondary package disclosed herein;
FIG. 8 is a schematic illustration of a communication connection disclosed herein;
FIG. 9 is a schematic structural diagram of a TCP data unidirectional transmission device disclosed in the present application;
fig. 10 is a block diagram of an electronic device disclosed in the present application.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
At present, in a unidirectional import system, a sending end only installs a sending part, a receiving end only installs a receiving part, and unidirectional transmission without feedback is performed in the data transmission process; the establishment of the TCP connection is a two-way process, and the TCP connection cannot be directly established at the transmitting end and the receiving end of the one-way import system. Therefore, the embodiment of the application discloses a method, a device, equipment and a medium for unidirectional transmission of TCP data, which can realize the transmission of the TCP data in a unidirectional import system.
Referring to fig. 1 and fig. 2, an embodiment of the present application discloses a unidirectional TCP data transmission method, which is applied to a sending end in a unidirectional import system, where the sending end includes a first TCP server, and the method includes:
step S11: and establishing a first communication connection between the first TCP client and the first TCP server based on the TCP protocol.
In this implementation, a first communication connection is first established between a first TCP client and a first TCP server in a sending end of a unidirectional import system based on a TCP protocol, so that TCP data can be transmitted through the first communication connection in the following.
Step S12: and acquiring TCP data sent by the first TCP client through the first TCP server based on the first communication connection, and then processing the TCP data to obtain processed data.
In this embodiment, first, the first TCP client sends TCP data to the first TCP server located on the sending end of the unidirectional import system through the established first communication connection, and then the sending end processes the received TCP data to obtain processed data.
Step S13: and transmitting the processed data to a receiving end in the unidirectional import system so that the receiving end confirms the processed data to obtain confirmed data, and transmitting the confirmed data to a second TCP server through the second TCP client based on a second communication connection established by a TCP protocol.
In this embodiment, the sending end transmits the processed data to the receiving end in the unidirectional import system, then the receiving end correspondingly confirms the received processed data, and the second TCP client retransmits the confirmed data to the second TCP server based on the second communication connection established by the TCP protocol, thereby completing the transmission of the TCP data in the unidirectional import system.
It should be noted that, because the unidirectional import system has the characteristic of unidirectional transmission without feedback, in the system, the sending end cannot sense the state of the receiving end, and cannot receive the data sent by the sending end when the receiving end is abnormal or not started, the first TCP client outside the system needs to verify the parameter information of the current communication connection and avoid losing too much data by adopting a mode of intermittently disconnecting the connection and then reestablishing the next communication connection. Specifically referring to fig. 3, the embodiment may further include:
step S21: and judging whether the parameter information of the current communication connection meets the preset communication connection termination condition or not through the first TCP client.
In a specific embodiment, the determining, by the first TCP client, whether the parameter information of the current communication connection meets a preset communication connection termination condition may include: and acquiring the total data amount of the currently transmitted data through the first TCP client, and judging whether the total data amount meets the condition that the total data amount is larger than a preset data amount threshold value. It can be understood that the parameter information of the current communication connection may be a total data amount of data transmitted by the current communication connection, and correspondingly, if the preset communication connection termination condition is a preset data amount threshold, the total data amount is compared with the preset data amount threshold, and it is determined whether the total data amount satisfies that the total data amount is greater than the preset data amount threshold.
In another specific embodiment, the determining, by the first TCP client, whether the parameter information of the current communication connection meets a preset communication connection termination condition may include: and acquiring the total communication time of the currently transmitted data through the first TCP client, and judging whether the total communication time meets the condition that the total communication time is greater than a preset communication time threshold value. It can be understood that the parameter information of the current communication connection may be total communication time of data transmitted by the current communication connection, and correspondingly, if the preset communication connection termination condition is a preset communication time threshold, the total communication time is compared with the preset communication time threshold, and it is determined whether the total communication time satisfies that the total communication time is greater than the preset communication time threshold.
Step S22: and if the parameter information of the current communication connection meets the preset communication connection termination condition, disconnecting the current communication connection, and then reestablishing the next communication connection.
In this embodiment, if the parameter information of the current communication connection meets the preset communication connection termination condition, the first TCP client is required to disconnect the current communication connection and reestablish the next communication connection, so as to avoid that the receiving end is abnormal in the current communication connection and cannot receive data, thereby causing data loss. Correspondingly, since the second TCP client in the receiving end establishes the second communication connection with the second TCP server outside the system, if the current communication connection is disconnected, that is, the first communication connection is disconnected, the terminating instruction for terminating the second communication connection is transmitted to the receiving end, and the receiving end disconnects the second communication connection with the second TCP server according to the terminating instruction.
That is, in this embodiment, in view of the characteristic that the unidirectional import system has unidirectional transmission and no feedback, and thus the state of the receiving end cannot be perceived by the sending end, in this scenario, it is necessary for the first TCP client outside the system to verify the parameter information of the current communication connection, that is, to determine whether the parameter information of the current communication connection meets the preset communication connection termination condition, specifically, when the total data amount of the currently transmitted data is greater than the preset data amount threshold or the total communication time of the currently transmitted data is greater than the preset communication time threshold, the current communication connection is disconnected and the next communication connection is reestablished.
As can be seen, in the embodiment of the present application, a first communication connection is first established between a first TCP client and a first TCP server based on a TCP protocol; acquiring TCP data sent by the first TCP client through the first TCP server based on the first communication connection, and then processing the TCP data to obtain processed data; and finally, transmitting the processed data to a receiving end in the unidirectional import system so that the receiving end confirms the processed data to obtain confirmed data, and transmitting the confirmed data to a second TCP server through a second TCP client based on a second communication connection established by a TCP protocol. Therefore, according to the method, a first TCP server is installed at a sending end of a one-way import system, a second TCP client is installed at a receiving end of the one-way import system, communication connection is established between the first TCP client and the first TCP server based on a TCP protocol, TCP data sent by the first TCP client is obtained, corresponding processing is carried out on the data, the processed data are sent to the receiving end of the one-way import system, the received processed data are confirmed through the receiving end, and finally the confirmed data are transmitted to the second TCP server through the second TCP client in the receiving end. The transmission of the TCP data in the unidirectional lead-in system can be realized through the technical scheme.
Referring to fig. 4, the embodiment of the present application discloses a specific TCP data unidirectional transmission method, and compared with the previous embodiment, the embodiment further describes and optimizes the technical solution. The method specifically comprises the following steps:
step S31: and establishing a first communication connection between the first TCP client and the first TCP server based on the TCP protocol.
Step S32: the method comprises the steps of obtaining TCP data sent by a first TCP client through a first TCP server based on a first communication connection, then extracting original transmission data from the TCP data, adding a connection identifier, a transmission sequence number and a check code to the original transmission data to obtain encapsulation data, and setting an integrity identifier for the encapsulation data to obtain processed data.
In this embodiment, referring to fig. 5, after acquiring TCP data sent by a first TCP client, the data needs to be processed to obtain processed data. Specifically, the original transmission data may be extracted from the TCP data, that is, the TCP data is subjected to protocol stripping processing to obtain the original transmission data that does not include any network protocol information, and then the original transmission data is encapsulated, in the encapsulating process, information such as a connection identifier, a transmission sequence number, a check code, and the like needs to be added to the original transmission data to obtain encapsulated data, and an integrity identifier needs to be set for the encapsulated data, where the integrity identifier may specifically be an SM3 integrity identifier.
It should be noted that the above-mentioned encapsulation process may be specifically divided into two encapsulations, where the first encapsulation is to add information such as connection identifier, transmission sequence number, CRC check code, data length, and data type to the original transmission data, as shown in fig. 6, fig. 6 discloses a specific data encapsulation schematic diagram; the connection identifier is used for realizing that the first communication connection corresponds to the second communication connection; the transmission sequence number is used to ensure the order of the transmitted data, and the CRC check code is used to ensure the integrity of the transmitted data. The second encapsulation is mainly to perform secondary splitting on data in the process of unidirectional data transmission, perform RS data check calculation on the split data, form an independent RS check code, and implement forward error correction through the RS check code to improve the reliability of transmission, and the specific encapsulation process is shown in fig. 7.
Step S33: and transmitting the processed data to a receiving end in the unidirectional import system based on an internal transmission protocol so that the receiving end decapsulates the processed data and confirms the connection identifier, the transmission sequence number, the check code and the integrity identifier of the decapsulated processed data to obtain the confirmed data.
In this embodiment, the processed data is transmitted to the receiving end in the unidirectional import system based on the internal transmission protocol, so that the receiving end decapsulates the processed data and confirms information such as the connection identifier, the transmission sequence number, the CRC check code, the RS check code, and the integrity identifier, thereby ensuring the integrity, the orderliness, and the accuracy of the data and improving the reliability of data transmission.
Step S34: and determining a second communication connection corresponding to the first communication connection based on the connection identifier.
In this implementation, it should be noted that a first communication connection established between the first TCP client and the first TCP server corresponds to a second communication connection established between the second TCP client and the second TCP server. Meanwhile, as shown in fig. 8, different communication connections can be established between the client and the server for different types of data, so that the server can receive multiple communication connections at the same time, and data processing between the communication connections is independent from each other, and thus, the embodiment of the present application also has the capability of processing data in parallel. In this embodiment, the second communication connection corresponding to the first communication connection may be determined by the connection identifier.
Step S35: and transmitting the confirmed data to a second TCP server side through a second TCP client side based on a second communication connection established by a TCP protocol.
For more specific processing procedures of the steps S31 and S35, reference may be made to corresponding contents disclosed in the foregoing embodiments, and details are not repeated here.
It can be seen that in this embodiment of the application, when a sending end of a unidirectional import system transmits data to a receiving end, original transmission data needs to be extracted from TCP data, a connection identifier, a transmission sequence number, and a check code are added to the original transmission data to obtain encapsulated data, an integrity identifier is set for the encapsulated data to obtain processed data, the processed data is transmitted to the receiving end, the obtained processed data is also decapsulated at the receiving end, and the connection identifier, the transmission sequence number, the check code, and the integrity identifier of the decapsulated processed data are confirmed.
Referring to fig. 9, an embodiment of the present application discloses a TCP data unidirectional transmission apparatus, which is applied to a sending end in a unidirectional import system, where the sending end includes a first TCP server, and the apparatus includes:
a connection establishing module 11, configured to establish a first communication connection between a first TCP client and the first TCP server based on a TCP protocol;
a data obtaining module 12, configured to obtain, through the first TCP server based on the first communication connection, TCP data sent by the first TCP client, and then process the TCP data to obtain processed data;
and the data transmission module 13 is configured to transmit the processed data to a receiving end in the unidirectional import system, so that the receiving end confirms the processed data to obtain confirmed data, and transmit, to a second TCP server, a second communication connection established based on a TCP protocol for the confirmed data through the second TCP client.
As can be seen, the method includes the steps that first communication connection is established between a first TCP client and a first TCP server based on a TCP protocol; acquiring TCP data sent by the first TCP client through the first TCP server based on the first communication connection, and then processing the TCP data to obtain processed data; and finally, transmitting the processed data to a receiving end in the unidirectional import system so that the receiving end confirms the processed data to obtain confirmed data, and transmitting the confirmed data to a second TCP server through a second TCP client based on a second communication connection established by a TCP protocol. Therefore, according to the method, a first TCP server is installed at a sending end of a one-way import system, a second TCP client is installed at a receiving end of the one-way import system, communication connection is established between the first TCP client and the first TCP server based on a TCP protocol, TCP data sent by the first TCP client is obtained, corresponding processing is carried out on the data, the processed data are sent to the receiving end of the one-way import system, the received processed data are confirmed through the receiving end, and finally the confirmed data are transmitted to the second TCP server through the second TCP client in the receiving end. The transmission of the TCP data in the unidirectional lead-in system can be realized through the technical scheme.
Fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present application. The method specifically comprises the following steps: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input output interface 25, and a communication bus 26. Wherein, the memory 22 is used for storing a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps in the TCP data unidirectional transmission method executed by the computer device disclosed in any of the foregoing embodiments.
In this embodiment, the power supply 23 is configured to provide an operating voltage for each hardware device on the computer device 20; the communication interface 24 can create a data transmission channel between the computer device 20 and an external device, and a communication protocol followed by the communication interface is any communication protocol applicable to the technical solution of the present application, and is not specifically limited herein; the input/output interface 25 is configured to acquire external input data or output data to the outside, and a specific interface type thereof may be selected according to specific application requirements, which is not specifically limited herein.
The processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 21 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in a wake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 21 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the display screen. In some embodiments, the processor 21 may further include an AI (Artificial Intelligence) processor for processing a calculation operation related to machine learning.
In addition, the storage 22 is used as a carrier for storing resources, and may be a read-only memory, a random access memory, a magnetic disk or an optical disk, etc., the resources stored thereon include an operating system 221, a computer program 222, data 223, etc., and the storage may be a transient storage or a permanent storage.
The operating system 221 is used for managing and controlling each hardware device and the computer program 222 on the computer device 20, so as to realize the operation and processing of the mass data 223 in the memory 22 by the processor 21, which may be Windows, unix, linux, or the like. The computer program 222 may further include a computer program that can be used to perform other specific tasks in addition to the computer program that can be used to perform the TCP data unidirectional transmission method performed by the computer device 20 disclosed in any of the foregoing embodiments. The data 223 may include data received by the computer device and transmitted from an external device, data collected by the input/output interface 25, and the like.
Further, an embodiment of the present application further discloses a storage medium, where a computer program is stored, and when the computer program is loaded and executed by a processor, the method steps executed in the unidirectional transmission process of TCP data disclosed in any of the foregoing embodiments are implemented.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device disclosed in the embodiment corresponds to the method disclosed in the embodiment, so that the description is simple, and the relevant points can be referred to the description of the method part.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the technical solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or apparatus that comprises the element.
The present invention provides a method, an apparatus, a device and a storage medium for unidirectional transmission of TCP data, which are described in detail above, and a specific example is applied in the present disclosure to illustrate the principle and the implementation of the present invention, and the description of the above embodiment is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A method for one-way transmission of TCP data is applied to a sending end in a one-way import system, wherein the sending end comprises a first TCP server and comprises:
establishing a first communication connection between a first TCP client and a first TCP server based on a TCP protocol;
acquiring TCP data sent by the first TCP client through the first TCP server based on the first communication connection, and then processing the TCP data to obtain processed data;
and transmitting the processed data to a receiving end in the unidirectional import system so that the receiving end confirms the processed data to obtain confirmed data, and transmitting the confirmed data to a second TCP server through a second TCP client based on a second communication connection established by a TCP protocol.
2. A method according to claim 1, wherein said processing the TCP data to obtain processed data comprises:
extracting original transmission data from the TCP data, adding a connection identifier, a transmission sequence number and a check code to the original transmission data to obtain encapsulated data, and setting an integrity identifier for the encapsulated data to obtain processed data.
3. A method as claimed in claim 2, wherein said transmitting the processed data to a receiving end in the unidirectional ingress system, so that the receiving end confirms the processed data to obtain confirmed data includes:
and transmitting the processed data to a receiving end in the unidirectional import system based on an internal transmission protocol so that the receiving end decapsulates the processed data and confirms the connection identifier, the transmission sequence number, the check code and the integrity identifier of the decapsulated processed data to obtain the confirmed data.
4. A method as claimed in claim 3, wherein before the step of transmitting the second communication connection established by the second TCP client based on the TCP protocol to the second TCP server, the method further comprises:
and determining a second communication connection corresponding to the first communication connection based on the connection identifier.
5. A unidirectional transmission method of TCP data according to any one of claims 1 to 4, characterized in that it further comprises:
judging whether the parameter information of the current communication connection meets the preset communication connection termination condition or not through the first TCP client;
and if the parameter information of the current communication connection meets the preset communication connection termination condition, disconnecting the current communication connection, and then reestablishing the next communication connection.
6. A method for unidirectional transmission of TCP data according to claim 5, wherein said determining, by the first TCP client, whether the current communication connection meets a preset communication connection termination condition comprises:
and acquiring the total data amount of the currently transmitted data through the first TCP client, and judging whether the total data amount meets the condition that the total data amount is larger than a preset data amount threshold value.
7. The method for unidirectional transmission of TCP data according to claim 5, wherein said determining, by the first TCP client, whether the current communication connection satisfies a predetermined communication connection termination condition includes:
and acquiring the total communication time of the currently transmitted data through the first TCP client, and judging whether the total communication time meets the condition that the total communication time is greater than a preset communication time threshold value.
8. The unidirectional transmission device of TCP data is applied to a sending end in a unidirectional import system, wherein the sending end comprises a first TCP server and comprises:
the connection establishing module is used for establishing a first communication connection between a first TCP client and the first TCP server based on a TCP protocol;
a data obtaining module, configured to obtain, through the first TCP server, TCP data sent by the first TCP client based on the first communication connection, and then process the TCP data to obtain processed data;
and the data transmission module is used for transmitting the processed data to a receiving end in the unidirectional import system so that the receiving end confirms the processed data to obtain confirmed data, and transmitting the confirmed data to a second TCP server through the second TCP client based on a second communication connection established by a TCP protocol.
9. An electronic device, comprising:
a memory for storing a computer program;
a processor for executing said computer program to implement the steps of the TCP data unidirectional transmission method according to any of claims 1 to 7.
10. A computer-readable storage medium for storing a computer program; wherein the computer program when executed by a processor implements the steps of the TCP data unidirectional transmission method of any of claims 1 to 7.
CN202210937775.6A 2022-08-05 2022-08-05 TCP data unidirectional transmission method, device, equipment and medium Active CN115314544B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210937775.6A CN115314544B (en) 2022-08-05 2022-08-05 TCP data unidirectional transmission method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210937775.6A CN115314544B (en) 2022-08-05 2022-08-05 TCP data unidirectional transmission method, device, equipment and medium

Publications (2)

Publication Number Publication Date
CN115314544A true CN115314544A (en) 2022-11-08
CN115314544B CN115314544B (en) 2023-12-15

Family

ID=83860337

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210937775.6A Active CN115314544B (en) 2022-08-05 2022-08-05 TCP data unidirectional transmission method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN115314544B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118113641A (en) * 2023-12-22 2024-05-31 深圳市联瑞电子有限公司 High-reliability unidirectional transmission method, device, equipment and storage medium

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004068793A2 (en) * 2003-01-29 2004-08-12 Rohde & Schwarz Ftk Gmbh System and method for improving the transmission properties of a data transmission operating with the tcp/ip protocol by means of a mono-directional radio connection
CN1929490A (en) * 2006-10-17 2007-03-14 中网信息技术有限公司 No-feedback one-way transmitted physical isolation method
CN104601576A (en) * 2015-01-16 2015-05-06 网神信息技术(北京)股份有限公司 File transmission method and device based on one-way safety isolation gap
CN105007272A (en) * 2015-07-21 2015-10-28 陈巨根 Information exchange system with safety isolation
CN106230789A (en) * 2016-07-19 2016-12-14 杭州维尔信息技术有限公司 A kind of data transmission method and equipment
CN206673968U (en) * 2017-03-17 2017-11-24 河南省中远科技有限公司 A kind of one-way safety transmitting device based on VLC
CN108092993A (en) * 2017-12-29 2018-05-29 税友软件集团股份有限公司 A kind of network data transmission control method and system
CN108234506A (en) * 2018-01-15 2018-06-29 马晓东 A kind of unidirection insulation network brake and data transmission method
CN108777681A (en) * 2018-05-29 2018-11-09 中国人民解放军91977部队 Network data unidirectional transmission control method based on NDIS filtration drives
CN109474628A (en) * 2018-12-27 2019-03-15 北京奇安信科技有限公司 A kind of data transmission method, system, equipment and medium based on double unidirectional gateways
CN110474681A (en) * 2019-07-15 2019-11-19 安徽继远软件有限公司 A kind of across a network security isolation transmission and management system and its transmission method
CN110912940A (en) * 2019-12-25 2020-03-24 普世(南京)智能科技有限公司 Isolated network transparent service access method and system based on double unidirectional switching equipment
CN111131154A (en) * 2019-11-19 2020-05-08 北京国铁盛阳技术有限公司 Network management data ferrying method and system, storage medium and computer equipment
US20200280580A1 (en) * 2019-02-28 2020-09-03 Beijing Baidu Netcom Science And Technology Co., Ltd. Method and apparatus for processing data

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004068793A2 (en) * 2003-01-29 2004-08-12 Rohde & Schwarz Ftk Gmbh System and method for improving the transmission properties of a data transmission operating with the tcp/ip protocol by means of a mono-directional radio connection
CN1929490A (en) * 2006-10-17 2007-03-14 中网信息技术有限公司 No-feedback one-way transmitted physical isolation method
CN104601576A (en) * 2015-01-16 2015-05-06 网神信息技术(北京)股份有限公司 File transmission method and device based on one-way safety isolation gap
CN105007272A (en) * 2015-07-21 2015-10-28 陈巨根 Information exchange system with safety isolation
CN106230789A (en) * 2016-07-19 2016-12-14 杭州维尔信息技术有限公司 A kind of data transmission method and equipment
CN206673968U (en) * 2017-03-17 2017-11-24 河南省中远科技有限公司 A kind of one-way safety transmitting device based on VLC
CN108092993A (en) * 2017-12-29 2018-05-29 税友软件集团股份有限公司 A kind of network data transmission control method and system
CN108234506A (en) * 2018-01-15 2018-06-29 马晓东 A kind of unidirection insulation network brake and data transmission method
CN108777681A (en) * 2018-05-29 2018-11-09 中国人民解放军91977部队 Network data unidirectional transmission control method based on NDIS filtration drives
CN109474628A (en) * 2018-12-27 2019-03-15 北京奇安信科技有限公司 A kind of data transmission method, system, equipment and medium based on double unidirectional gateways
US20200280580A1 (en) * 2019-02-28 2020-09-03 Beijing Baidu Netcom Science And Technology Co., Ltd. Method and apparatus for processing data
CN110474681A (en) * 2019-07-15 2019-11-19 安徽继远软件有限公司 A kind of across a network security isolation transmission and management system and its transmission method
CN111131154A (en) * 2019-11-19 2020-05-08 北京国铁盛阳技术有限公司 Network management data ferrying method and system, storage medium and computer equipment
CN110912940A (en) * 2019-12-25 2020-03-24 普世(南京)智能科技有限公司 Isolated network transparent service access method and system based on double unidirectional switching equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
PRZEMYSŁAW SKUROWSKI等: "Evaluation of IP Transmission Jitter Estimators Using One-Way Active Measurement Protocol (OWAMP)", 《COMMUNICATIONS IN COMPUTER & INFORMATION SCIENCE》 *
褚文斌: "轨道交通数据中心实时单向数据摆渡设计与实现", 《城市轨道交通研究》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118113641A (en) * 2023-12-22 2024-05-31 深圳市联瑞电子有限公司 High-reliability unidirectional transmission method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN115314544B (en) 2023-12-15

Similar Documents

Publication Publication Date Title
CN108965484B (en) Internet of things data transmission method, system and terminal
CN109412946B (en) Method, device, server and readable storage medium for determining back source path
CN107835040B (en) Data communication method, equipment and storage medium based on Bluetooth
CN111083161A (en) Data transmission processing method and device and Internet of things equipment
US20160285820A1 (en) Method for processing address resolution protocol message, switch, and controller
CN113259391B (en) Data transmission method and device applied to multi-level node network
US10469620B2 (en) Method for transferring a new software version to at least one electricity meter via a communication network
CN115314544A (en) TCP data one-way transmission method, device, equipment and medium
CN112087475B (en) Message pushing method and device for cloud platform component application and message server
CN107078837A (en) A kind of agreement frame transmission method, device, node device and system
US20180367635A1 (en) Information Transmission Method, Gateway, and Controller
CN107431965B (en) Method and device for realizing Transmission Control Protocol (TCP) transmission
CN109714135B (en) Data packet transmission method and device
CN107222299A (en) A kind of data transmission method, system and electronic equipment
CN112104763A (en) Method for realizing butt joint of different network platforms in warehouse
CN116938598B (en) Information transmission method, apparatus, electronic device, and computer-readable medium
CN116582487B (en) Data distribution transmission method and device, electronic equipment and storage medium
CN114785603B (en) MQTT protocol-based safety protection method, device, equipment and storage medium
WO2024159848A9 (en) Data packet transmission control method and apparatus based on active and standby machines, device, and medium
EP4243383A1 (en) Message transmission method and system, and network device and storage medium
CN111865884A (en) Message processing method, device and equipment
CN113078986B (en) Data transmission method and electronic equipment
CN116527202A (en) Method and system for data transmission
US20120023248A1 (en) System and method for changing channels for guaranteed reliability communications
CN117750466A (en) Message forwarding method, device, system and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant