CN117615042A - Data communication method, device, computer equipment and storage medium - Google Patents

Data communication method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN117615042A
CN117615042A CN202311620735.XA CN202311620735A CN117615042A CN 117615042 A CN117615042 A CN 117615042A CN 202311620735 A CN202311620735 A CN 202311620735A CN 117615042 A CN117615042 A CN 117615042A
Authority
CN
China
Prior art keywords
data
transmission control
control protocol
protocol connection
transmitted
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.)
Pending
Application number
CN202311620735.XA
Other languages
Chinese (zh)
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.)
Yusur Technology Co ltd
Original Assignee
Yusur Technology Co ltd
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 Yusur Technology Co ltd filed Critical Yusur Technology Co ltd
Priority to CN202311620735.XA priority Critical patent/CN117615042A/en
Publication of CN117615042A publication Critical patent/CN117615042A/en
Pending legal-status Critical Current

Links

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/161Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
    • 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
    • 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/22Parsing or analysis of headers

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer And Data Communications (AREA)

Abstract

The present disclosure provides a data communication method, apparatus, computer device, and storage medium. The data communication method comprises the following steps: acquiring a transmission control protocol connection establishment request for the second device from the first device through a first dedicated data channel between the first dedicated data processor and the first device; responding to a transmission control protocol connection establishment request, and establishing transmission control protocol connection with the second equipment; acquiring data to be transmitted from first equipment through a first special data channel; and encapsulating the data to be transmitted by a transmission control protocol to obtain a first encapsulated message, and transmitting the first encapsulated message to the second device through the transmission control protocol connection. The embodiment of the disclosure reduces the resource occupation of the terminal equipment, improves the TCP data communication speed and reduces the communication time delay.

Description

Data communication method, device, computer equipment and storage medium
Technical Field
The present disclosure relates to the field of data transmission, and in particular, to a data communication method, apparatus, computer device, and storage medium.
Background
In order to reduce the resource occupation of the terminal device when the terminal device performs data communication, a special data processor is usually coupled to the terminal device. When the terminal equipment sends data to be transmitted to the opposite terminal equipment, the terminal equipment establishes Transmission Control Protocol (TCP) connection with the opposite terminal equipment, and then a TCP/IP protocol stack in the terminal equipment performs TCP encapsulation processing on the data to be transmitted, namely, a TCP/IP header is marked to obtain an encapsulated message, the encapsulated message is forwarded to the opposite terminal equipment through a special data processor, and then the opposite terminal equipment processes the received encapsulated message to obtain the data to be transmitted.
In the prior art, a terminal device needs to establish a TCP connection, and a TCP/IP protocol stack in the terminal device needs to perform encapsulation processing on data to be transmitted, which occupies terminal device resources, especially, a plurality of TCP/IP protocol stacks in the terminal device are generally used, different TCP/IP protocol stacks are used to encapsulate data to be transmitted generated by different service container groups in the terminal device, and if the terminal device transmits data to be transmitted generated by different service container groups to an opposite terminal device at the same time, a plurality of TCP/IP protocol stacks in the terminal device perform encapsulation processing at the same time, so as to occupy more terminal device resources, affect normal processing speed of the terminal device, and increase time delay.
Disclosure of Invention
In view of this, embodiments of the present application provide a data communication method, apparatus, computer device, and storage medium, which can reduce the resource occupation of a terminal device in TCP data communication, improve the speed of TCP data communication, and reduce the time delay.
According to a first aspect of embodiments of the present application, there is provided a data communication method applied to a first dedicated data processor coupled to a first device, the first device performing data communication with the second device through the first dedicated data processor, the data communication method including:
Acquiring a transmission control protocol connection establishment request for a second device from the first device through a first dedicated data channel between the first dedicated data processor and the first device;
establishing a transmission control protocol connection with the second device in response to the transmission control protocol connection establishment request;
acquiring data to be transmitted from the first equipment through the first special data channel;
and encapsulating the data to be transmitted by a transmission control protocol to obtain a first encapsulated message, and transmitting the first encapsulated message to the second device through the transmission control protocol connection.
According to a second aspect of embodiments of the present application, there is provided a data communication apparatus for use with a first dedicated data processor coupled to a first device, the first device being in data communication with the second device via the first dedicated data processor, the data communication apparatus comprising:
a request unit, configured to obtain, from the first device, a transmission control protocol connection establishment request for a second device through a first dedicated data channel between the first dedicated data processor and the first device;
A connection unit, configured to establish a transmission control protocol connection with the second device in response to the transmission control protocol connection establishment request;
an obtaining unit, configured to obtain data to be transmitted from the first device through the first dedicated data channel;
and the sending unit is used for carrying out transmission control protocol encapsulation on the data to be transmitted to obtain a first encapsulated message, and sending the first encapsulated message to the second equipment through the transmission control protocol connection.
According to a third aspect of embodiments of the present application, there is provided a computer device comprising:
a memory and a processor, wherein the memory stores a computer program which, when executed by the processor, implements the data communication method as described above.
According to a fourth aspect of embodiments of the present application, there is provided a computer storage medium storing computer program code which, when executed by a processor, causes the processor to perform the data communication method as described above.
According to the embodiment of the application, the first device does not need to send the packaged message to the first special data processor, but adopts a special data channel mode to directly send the bare packet of the data to be transmitted to the first special data processor, and the channel ensures the communication safety, does not occupy terminal equipment resources, and improves the data communication efficiency. The TCP connection establishment and encapsulation process is not required on the first device for the data to be transmitted. Instead, the establishment of the TCP connection on the first device is moved to the first special data processor for execution, and the TCP encapsulation of the data to be transmitted of the TCP/IP protocol stack on the first device is moved to the TCP/IP protocol stack of the first special data processor for execution, so that the occupation of resources to the terminal device is reduced in TCP data communication, the TCP data communication speed is improved, and the communication time delay is reduced. Particularly, when the first device transmits a plurality of data to be transmitted to the opposite terminal device at the same time, the TCP/IP protocol stack in the first special data processor encapsulates different data to be transmitted to replace the plurality of TCP/IP protocol stacks in the first device for encapsulation, so that the data communication method of the embodiment of the invention can further reduce the occupation of resources to the terminal device, further improve the TCP data communication speed and reduce the communication delay.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the following description will briefly introduce the drawings that are required to be used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are only some embodiments described in the embodiments of the present disclosure, and other drawings may also be obtained according to these drawings for a person having ordinary skill in the art.
FIG. 1 is a system architecture diagram of a data communication method embodying an embodiment of the present disclosure;
FIG. 2 is a flow chart of a data communication method according to one embodiment of the present disclosure;
FIG. 3 is a detailed view of one implementation of the data communication method of FIG. 2;
FIG. 4 is a detailed view of another implementation of the data communication method of FIG. 2;
FIG. 5 is a block diagram of a data communication device according to one embodiment of the present disclosure;
fig. 6 is a block diagram of a computer device implementing the data communication method shown in fig. 2.
Detailed Description
In order to better understand the technical solutions in the embodiments of the present application, the following descriptions will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only some embodiments of the present application, but not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the embodiments of the present application shall fall within the scope of protection of the embodiments of the present application.
The Transmission Control Protocol (TCP) is a connection-oriented, reliable, byte stream based transport layer communication protocol that is handled when the terminal device is performing TCP communication.
In order to improve the efficiency of the terminal device in performing TCP communication, the terminal device is coupled to a special data processor, when the terminal device sends data to be transmitted to the opposite terminal device, the terminal device establishes a Transmission Control Protocol (TCP) connection with the opposite terminal device, and then a TCP/IP protocol stack in the terminal device performs TCP encapsulation processing on the data to be transmitted, i.e. a TCP/IP header is sent, the terminal device needs to perform TCP connection establishment, and the TCP/IP protocol stack in the terminal device needs to perform encapsulation processing on the data to be transmitted, which occupies terminal device resources, affects normal processing speed of the terminal device, and increases time delay.
Therefore, a technology capable of improving the speed of TCP data communication by the terminal device and reducing the communication delay of the terminal device is needed.
Fig. 1 is a system architecture diagram for implementing a data communication method according to an embodiment of the present disclosure. The system architecture includes a first device, a second device, a first specialized data processor coupled to the first device, a second specialized data processor coupled to the second device, the first and second specialized data processors being for TCP data communication between the first and second devices.
The first device is a device that is to establish TCP data communications. It may be a client or a server. In particular, it may be embodied as a desktop computer, a laptop computer, a mobile phone, a PDA, a dedicated terminal, or as a cluster of several terminals, or it may be a part of a terminal, such as a virtual machine, that is divided.
The second device refers to a device that establishes TCP communication with the first device in response to a TCP communication request of the first device. It may be a client or a server. In general, when the first device is a client, the second device is a server; when the first device is a server, the second device is a client. In particular, it may also be embodied as a desktop computer, a laptop computer, a mobile phone, a PDA, a dedicated terminal, or as a cluster of several terminals, or it may be a part of a terminal, such as a virtual machine, that is divided.
TCP data communication refers to communication employing the TCP protocol. The TCP protocol is a connection-oriented, reliable, byte stream based transport layer communication protocol.
The first special data processor and the second special data processor are special Data Processors (DPU), the DPU is a special processor which is constructed by taking data as a center, and the software-defined technical route is adopted to support the virtualization of infrastructure layer resources and support the services of the infrastructure layer such as storage, security, service quality management and the like. Because the TCP data communication is to establish a TCP connection between the first device and the second device and transmit data through the TCP connection, the first device and the second device realize the TCP connection establishment and the data transmission between the first special data processor and the second special data processor, thereby saving the computing resources of the first device and the second device.
And TCP data communication is carried out between the first special data processor and the second special data processor through a network port. Since the first device is TCP connected to the second dedicated data processor through the first dedicated data processor, the first device may transmit data to the second device through an established TCP connection between the first dedicated data processor and the second dedicated data processor.
As shown in fig. 2, a data communication method 200 is provided according to one embodiment of the present disclosure. The method is performed by a first dedicated data processor through which the first device communicates data with a second device. The data communication method comprises the following steps:
step 210, acquiring a transmission control protocol connection establishment request for the second device from the first device through a first dedicated data channel between the first dedicated data processor and the first device;
step 220, in response to the transmission control protocol connection establishment request, establishing a transmission control protocol connection with the second device;
step 230, obtaining data to be transmitted from the first device through the first dedicated data channel;
step 240, encapsulating the data to be transmitted by using a transmission control protocol to obtain a first encapsulated message, and transmitting the first encapsulated message to the second device through the transmission control protocol connection.
Establishing a transmission control protocol connection with the second device in step 220 refers to the process of establishing a TCP connection with the second device through the running TCP/IP protocol stack. For example, a first TCP/IP protocol stack is run in the first dedicated data processor, and a second TCP/IP protocol stack is run in the second dedicated data processor, so after the first dedicated data processor obtains the transmission control protocol connection establishment request, a TCP connection can be established between the first dedicated data processor and the second TCP/IP protocol stack through the first TCP/IP protocol stack, so as to establish a transmission control protocol connection with the second dedicated data processor, that is, to establish a transmission control protocol connection with the second device.
The step 240 of encapsulating the data to be transmitted with the transmission control protocol refers to encapsulating the data to be transmitted with a TCP/IP protocol stack. For example, when a first TCP/IP protocol stack is running in the first special data processor, when the data to be transmitted is encapsulated by a transmission control protocol, the data to be transmitted is encapsulated by the first TCP/IP protocol stack by performing encapsulation processing such as TCP/IP header, so as to obtain a first encapsulated packet.
The steps 210-240 have the advantages that the first device does not need to send the encapsulated message to the first special data processor, but directly sends the bare packet of the data to be transmitted to the first special data processor in a special data channel mode, the channel ensures the communication security, does not occupy the terminal device resources, and improves the data communication efficiency. The TCP connection establishment and encapsulation process is not required on the first device for the data to be transmitted. Instead, the establishment of the TCP connection on the first device is moved to the first special data processor for execution, and the TCP encapsulation of the data to be transmitted of the TCP/IP protocol stack on the first device is moved to the TCP/IP protocol stack of the first special data processor for execution, so that the occupation of resources to the terminal device is reduced in TCP data communication, the TCP data communication speed is improved, and the communication time delay is reduced. Particularly, when the first device transmits a plurality of data to be transmitted to the opposite terminal device at the same time, the TCP/IP protocol stack in the first special data processor encapsulates different data to be transmitted to replace the plurality of TCP/IP protocol stacks in the first device for encapsulation, so that the data communication method of the embodiment of the invention can further reduce the occupation of resources to the terminal device, further improve the TCP data communication speed and reduce the communication delay.
The implementation of steps 210 and 230 is described in detail below.
As shown in fig. 3, in one embodiment, the first dedicated data channel includes a shared memory within the first dedicated data processor, based on which step 210 includes:
step 2101, periodically poll the shared memory to obtain a tcp connection establishment request in the shared memory.
Correspondingly, step 230 includes:
step 2301, periodically polling the shared memory to obtain data to be transmitted in the shared memory.
The tcp connection establishment request in step 2101 is generated by the first device and then placed in the shared memory, specifically, after the tcp connection establishment request is generated in the first device, the tcp connection establishment request may be copied to the shared memory according to the shared memory address shared by the first dedicated data processor to the first device.
The data to be transmitted in step 2301 is generated by the first device and then placed in the shared memory, and specifically, after the data to be transmitted is generated in the first device, the data to be transmitted may be copied to the shared memory according to the shared memory address shared by the first dedicated data processor to the first device.
It should be noted that, the copying of the transmission control protocol connection establishment request by the first device to the shared memory and the copying of the data to be transmitted by the first device to the shared memory may be performed simultaneously or sequentially, which is not limited by the embodiment of the present disclosure.
The beneficial effects of step 2101 and step 2301 are that the disclosed embodiment adopts a scheme of setting a shared memory in the first special data processor, so that the storage resource of the first device can be not occupied on the premise of ensuring the communication security between the first device and the first special data processor as much as possible, the resource occupation of the first device is reduced, the TCP data communication speed is improved, and the communication time delay is reduced.
As shown in fig. 4, in another embodiment, the first dedicated data channel includes a system on a chip internal to the first dedicated data processor, based on which step 210 includes:
step 2102, obtaining a transmission control protocol connection establishment request forwarded by the system on chip.
Correspondingly, step 230 includes:
step 2302, obtain the data to be transmitted forwarded by the system on chip.
The tcp connection establishment request in step 2102 is generated by the first device and then sent to the system on chip, specifically, after the tcp connection establishment request is generated in the first device, the tcp connection establishment request may be sent to the system on chip in the first dedicated data processor through an interface corresponding to the system on chip in the first device.
The data to be transmitted in step 2302 is generated by the first device and then sent to the system on chip, specifically, after the data to be transmitted is generated in the first device, the data to be transmitted may be sent to the system on chip of the first dedicated data processor through an interface corresponding to the system on chip in the first device.
It should be noted that, the sending of the transmission control protocol connection establishment request by the first device to the system on chip and the sending of the data to be transmitted by the first device to the system on chip may be performed simultaneously or sequentially, which is not limited in the embodiment of the present disclosure.
The advantages of step 2102 and step 2302 are that the embodiment of the present disclosure adopts a scheme of setting a system on chip in the first dedicated data processor, and since the system on chip can directly send the received transmission control protocol connection establishment request and the data to be transmitted to the first dedicated data processor, compared with the scheme of periodically polling the shared memory by the first dedicated data processor, the scheme of directly sending data by the system on chip adopted in the embodiment of the present disclosure can shorten the time of data communication, so as to improve the data communication efficiency.
The architecture within the first device is described in detail below with reference to fig. 1.
The first device comprises at least one source service container group, each source service container group having a source data interface unit; the transmission control protocol connection establishment request and the data to be transmitted are generated by a target source traffic container group of the at least one source traffic container group and sent to the first dedicated data channel via a source data interface unit inside the target source traffic container group.
The source service container groups are pod in the first device, each source service container group may have a third TCP/IP protocol stack running, and for each source service container group, the source data interface unit in the source service container group may be a socket interface of the third TCP/IP protocol stack in the source service container group, or may be a data interface replacing the socket interface, which is not limited in the embodiments of the present disclosure. The source service container group is provided with a source data interface unit, and the source data interface unit is provided with a first dedicated data channel.
Therefore, the source data interface unit in the target source service container group can directly acquire the data such as the transmission control protocol connection establishment request and the data to be transmitted, and the source data interface unit sends the data to the first special data channel, so that the data to be transmitted is not required to be packaged in the first equipment, the occupation of resources of the first equipment is reduced, the TCP data communication speed is improved, and the communication time delay is reduced.
In addition, the source data interface unit in the source service container group can be a socket interface of the third TCP/IP protocol stack in the source service container group, or can be a data interface replacing the socket interface, so that data such as data to be transmitted generated by a source service program running in the source service container group can be directly acquired by the source data interface unit, further, the data to be transmitted generated by the source service program can be sent to the second device through the first special data channel without being perceived, and the application side is not required to be adaptively modified, thereby improving the user experience.
The implementation of step 220 is described in detail below.
As shown in fig. 3 and 4, in one embodiment, the transmission control protocol connection establishment request has a source traffic container group identification and a second device identification, based on which step 220 includes:
Step 2201, based on the second device identifier, acquiring a second identifier of a second dedicated data processor coupled to the second device;
step 2202, based on the second identifier, sending a transmission control protocol handshake request to the second dedicated data processor;
step 2203, receiving, from the second dedicated data processor, the destination traffic container group identification allocated in the second device;
step 2204, binding the source service container group identifier, the first identifier of the first special data processor, the second identifier, and the destination service container group identifier, thereby establishing a transmission control protocol connection.
Wherein, as shown in fig. 6, the second device comprises at least one destination service container group, each destination service container group having a destination data interface unit; a second dedicated data channel is disposed between the second dedicated data processor and the second device, and the second dedicated data channel may be a shared memory disposed inside the second dedicated data processor or a system on chip disposed inside the second dedicated data processor.
The destination service container groups are pod in the second device, each destination service container group may have a fourth TCP/IP protocol stack running, and for each source service container group, the destination data interface unit in the destination service container group may be a socket interface of the fourth TCP/IP protocol stack in the destination service container group, or may be a data interface replacing the socket interface, which is not limited in this embodiment of the disclosure. Therefore, the destination service program running in the destination service container group can directly acquire the data to be transmitted through the destination data interface unit, and further the application can acquire the data sent by the first device through the first special data channel without perception, so that the application side does not need to carry out adaptive modification, and the user experience is improved.
In a specific embodiment, the second device comprises a destination traffic container group, based on which, after step 2202 and before step 2203, the second dedicated data processor may receive a transmission control protocol handshake request, where the second data processor may send identification request information to the second device through the second dedicated data channel and the destination data interface unit of the destination traffic container group, so that the second device sends the destination traffic container group identification to the second dedicated data processor through the second dedicated data channel and the destination data interface unit.
In another specific embodiment, the second device includes a plurality of destination service container groups, based on which, after step 2202 and before step 2203, the second dedicated data processor may receive a transmission control protocol handshake request, where the second data processor may send identification request information to the second device through a destination data interface unit that the second dedicated data channel and the destination service container groups have, so that the second device determines, among the plurality of destination service container groups, any destination service container group with the smallest load capacity or any destination service container group with the largest free capacity, and the second dedicated data channel and the destination data interface unit send, to the second dedicated data processor, a destination service container group identifier of the destination service container group, where the destination service container group identifier is a destination service container group identifier allocated in the second device.
The advantage of steps 2201-2204 is that, by adopting the scheme that the first special data processor and the second special data processor establish the transmission control protocol connection, the second device and the first special data processor can not be used for performing the transmission control protocol connection, thereby reducing the resource occupation of the second device, improving the efficiency of TCP communication and reducing the communication time delay.
The implementation process in step 240 is described in detail below.
As shown in fig. 3 and 4, step 240 includes:
packaging the data to be transmitted by a transmission control protocol to obtain a first packaged message (step 2401);
the first encapsulated packet is sent to a second dedicated data processor corresponding to the second identifier through a tcp connection (step 2402), so that after the second dedicated data processor decapsulates the first encapsulated packet (step 2403), the first encapsulated packet is sent to a destination service container group corresponding to the destination service container group identifier through a second dedicated data channel between the second dedicated data processor and the second device (step 2404).
Specifically, based on the second TCP/IP protocol stack running in the second dedicated data processor, in step 2403, the second dedicated data processor decapsulates the first encapsulated message by the second TCP/IP protocol stack.
The steps 2401-2404 have the advantages that the TCP connection between the first device and the second device can be realized by establishing the TCP connection between the first dedicated data processor and the second dedicated data processor, so that the occupation of terminal device resources can be reduced by performing encapsulation and decapsulation processing in the first dedicated data processor and the second dedicated data processor, and the TCP data communication efficiency is improved.
Alternatively, the first dedicated data processor may be provided with a first application for processing the received data, and the second dedicated data processor is provided with a second application for processing the received data, based on which:
the first special data processor can determine whether the data to be transmitted needs to be processed by the first application program after receiving the data to be transmitted, if so, the data to be transmitted is sent to the first application program, after the first application program processes the data to be transmitted to obtain updated data to be transmitted, the data to be transmitted is sent to a first TCP/IP protocol stack in the first special data processor, so that the first TCP/IP protocol stack encapsulates the data to be transmitted, and a first encapsulated message is obtained; otherwise, the data to be transmitted is directly encapsulated through a first TCP/IP protocol stack to obtain a first encapsulated message.
After the first special data processor sends the first encapsulated message to a second special data processor corresponding to the second identifier through a transmission control protocol connection, the second special data processor can determine whether the first encapsulated message needs to be processed by a second application program, if so, the first encapsulated message is decapsulated by a second TCP/IP protocol stack to obtain data to be transmitted, the data to be transmitted is sent to the second application program, after the second application program processes the data to be transmitted to obtain updated data to be transmitted, the data to be transmitted is sent to a destination service container group corresponding to the destination service container group identifier through a second special data channel between the second special data processor and the second device; otherwise, the second TCP/IP protocol stack in the second special data processor directly unpacks the first packed message to obtain data to be transmitted, and then the data to be transmitted is sent to the destination service container group corresponding to the destination service container group identifier through a second special data channel between the second special data processor and the second device.
The first application program and the second application program may be application programs that perform update processing on data to be transmitted, and a specific update manner of the update processing is not limited in the embodiment of the present application.
Compared with the prior art that the first special data processor receives the encapsulated data to be transmitted, the first special data processor needs to unpack the data and then process the data through the first application program.
As shown in fig. 3 and 4, in one embodiment, the data communication method further includes:
receiving a second encapsulated message sent by a second special data processor corresponding to the second identifier through a transmission control protocol connection (step 250);
the second encapsulated message is subjected to tcp decapsulation to recover the reply data (step 260), and the reply data is sent to the source service container group corresponding to the source service container group identifier through the first dedicated data channel (step 270).
The second encapsulated packet in step 250 is generated by the second dedicated data processor corresponding to the second identifier receiving response data from the destination service container set corresponding to the destination service container set identifier through the second dedicated data channel, and encapsulating the response data by using a transmission control protocol.
Specifically, before step 250, the second device may generate response data according to the received data to be transmitted, and then send the response data to the second special data processor through the destination data interface unit and the second special data channel, so that the second TCP/IP protocol stack in the second special data processor encapsulates the response data to obtain a second encapsulated packet, and the second special data processor may send the second encapsulated packet to the first special data processor through the transmission control protocol connection, so that in step 250, the first special data processor may receive the second encapsulated packet.
In step 260, after the first dedicated data processor receives the second encapsulated packet, the second encapsulated packet may be decapsulated by the first TCP/IP protocol stack to recover the reply data.
The steps 250-270 have the advantages that when the response data sent by the second device is sent to the first device through the first special data processor, the second device does not need to send the packaged message to the second special data processor, but directly sends the bare packet of the response data to the second special data processor in a special data channel mode, the channel ensures the communication safety, does not occupy terminal equipment resources, and improves the TCP data communication efficiency. And the received message is not required to be subjected to decapsulation processing on the first device. Instead, the TCP decapsulation operation of the encapsulated message of the TCP/IP protocol stack on the first device is moved to the TCP/IP protocol stack of the first special data processor for execution, so that the occupation of resources on terminal equipment is reduced in TCP data communication, the TCP data communication speed is improved, and the communication time delay is reduced.
According to still another aspect of the embodiments of the present application, referring to fig. 5, there is shown a data communication apparatus 300 provided in the present embodiment, applied to a first dedicated data processor coupled to a first device, the first device performing data communication with a second device through the first dedicated data processor, the data communication apparatus 300 including:
a request unit 310, configured to obtain, from a first device, a transmission control protocol connection establishment request for a second device through a first dedicated data channel between a first dedicated data processor and the first device;
a connection unit 320, configured to establish a transmission control protocol connection with the second device in response to the transmission control protocol connection establishment request;
an acquiring unit 330, configured to acquire data to be transmitted from a first device through a first dedicated data channel;
the sending unit 340 is configured to encapsulate the data to be transmitted according to a transmission control protocol, obtain a first encapsulated packet, and send the first encapsulated packet to the second device through a transmission control protocol connection.
Optionally, the first dedicated data channel includes a shared memory within the first dedicated data processor;
the request unit 310 specifically is configured to:
periodically polling the shared memory to obtain a transmission control protocol connection establishment request in the shared memory, wherein the transmission control protocol connection establishment request is generated by the first equipment and then is placed in the shared memory;
The obtaining unit 330 specifically is configured to:
and periodically polling the shared memory so as to acquire data to be transmitted in the shared memory, and placing the data to be transmitted in the shared memory after the data to be transmitted is generated by the first equipment.
Optionally, the first dedicated data channel comprises a system on chip internal to the first dedicated data processor;
the request unit 310 specifically is configured to:
acquiring a transmission control protocol connection establishment request forwarded by a system-on-chip, and sending the transmission control protocol connection establishment request to the system-on-chip after being generated by first equipment;
the obtaining unit 330 specifically is configured to:
and acquiring data to be transmitted forwarded by the system-on-chip, generating the data to be transmitted by the first equipment, and sending the data to be transmitted to the system-on-chip.
Optionally, the first device comprises at least one source traffic container group, each source traffic container group having one source data interface unit; the transmission control protocol connection establishment request and the data to be transmitted are generated by a target source traffic container group of the at least one source traffic container group and sent to the first dedicated data channel via a source data interface unit inside the target source traffic container group.
Optionally, the transmission control protocol connection establishment request has a source service container group identifier and a second device identifier;
The connection unit 320 specifically is configured to:
acquiring a second identifier of a second special data processor coupled with the second device based on the second device identifier;
based on the second identification, sending a transmission control protocol handshake request to the second dedicated data processor;
receiving, from the second dedicated data processor, the destination traffic container group identification allocated in the second device;
binding the source service container group identifier, the first identifier, the second identifier and the destination service container group identifier of the first special data processor, thereby establishing a transmission control protocol connection.
Alternatively, the obtaining unit 330 is specifically configured to:
and sending the first encapsulated message to a second special data processor corresponding to the second identifier through the transmission control protocol connection, so that the second special data processor decapsulates the first encapsulated message and then sends the first encapsulated message to a destination service container group corresponding to the destination service container group identifier through a second special data channel between the second special data processor and second equipment.
Optionally, the data communication method further includes a recovery unit 340, where the recovery unit 340 is specifically configured to:
receiving a second encapsulated message sent by a second special data processor corresponding to a second identifier through a transmission control protocol connection, wherein the second encapsulated message is generated by the second special data processor corresponding to the second identifier receiving response data from a destination service container set corresponding to the destination service container set identifier through a second special data channel and encapsulating the response data through the transmission control protocol;
And decapsulating the second encapsulated message by using a transmission control protocol to recover response data, and sending the response data to the source service container group corresponding to the source service container group identifier through the first special data channel.
The data communication apparatus 300 of the present embodiment is configured to implement the corresponding data communication method in the foregoing multiple method embodiments, and has the beneficial effects of the corresponding method embodiments, which are not described herein again. In addition, the functional implementation of each unit in the data communication apparatus 300 of the present embodiment may refer to the description of the corresponding parts in the foregoing method embodiments, which is not repeated herein.
A computer device 400 according to an embodiment of the present disclosure is described below with reference to fig. 6. The computer device 400 is just the first special-purpose data processor, and the computer device 400 shown in fig. 6 is only an example, and should not be construed as limiting the function and the application scope of the embodiment of the present invention.
The computer device 400 shown in fig. 6 may include, but is not limited to: at least one processing unit 410, at least one memory unit 420, a bus 430 connecting the different system components, including the memory unit 420 and the processing unit 410. The storage unit 420 stores program code that can be executed by the processing unit 410, such that the processing unit 410 performs the steps according to various exemplary embodiments of the present invention described in the description section of the exemplary method described above in the present specification.
The storage unit 420 may include readable media in the form of volatile storage units, such as Random Access Memory (RAM) 4201 and/or cache memory 4202, and may further include Read Only Memory (ROM) 4203.
The storage unit 420 may also include a program/utility 4204 having a set (at least one) of program modules 8205, such program modules 4205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
Bus 430 may be a local bus representing one or more of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or using any of a variety of bus architectures.
The computer device 400 may also communicate with one or more external devices 500 (e.g., keyboard, pointing device, bluetooth device, etc.), one or more devices that enable a user to interact with the computer device 400, and/or any devices (e.g., routers, modems, etc.) that enable the computer device 400 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 450. Moreover, computer device 400 may also communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network, such as the Internet, through network adapter 460. As shown, the network adapter 460 communicates with other modules of the computer device 400 over the bus 430. It should be appreciated that although not shown, computer device 400 may be implemented using other hardware and/or software modules, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or may be implemented in software in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, including several instructions to cause a computing device (may be a personal computer, a server, a terminal device, or a network device, etc.) to perform the method according to the embodiments of the present disclosure.
In an exemplary embodiment of the present disclosure, there is also provided a computer program medium having computer-readable instructions stored thereon, which, when executed by a processor of a computer, cause the computer to perform the method described in the method embodiment section above.
According to an embodiment of the present disclosure, there is also provided a program product for implementing the method in the above method embodiments, which may employ a portable compact disc read only memory (CD-ROM) and comprise program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
It should be noted that although in the above detailed description several modules or units of a device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit in accordance with embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into a plurality of modules or units to be embodied.
Furthermore, although the steps of the methods in the present disclosure are depicted in a particular order in the drawings, this does not require or imply that the steps must be performed in that particular order or that all illustrated steps be performed in order to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step to perform, and/or one step decomposed into multiple steps to perform, etc.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or may be implemented in software in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, including several instructions to cause a computing device (may be a personal computer, a server, a mobile terminal, or a network device, etc.) to perform the method according to the embodiments of the present disclosure.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any adaptations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

Claims (10)

1. A data communication method applied to a first dedicated data processor coupled to a first device, the first device in data communication with the second device through the first dedicated data processor, the data communication method comprising:
acquiring a transmission control protocol connection establishment request for a second device from the first device through a first dedicated data channel between the first dedicated data processor and the first device;
establishing a transmission control protocol connection with the second device in response to the transmission control protocol connection establishment request;
acquiring data to be transmitted from the first equipment through the first special data channel;
and encapsulating the data to be transmitted by a transmission control protocol to obtain a first encapsulated message, and transmitting the first encapsulated message to the second device through the transmission control protocol connection.
2. The data communication method of claim 1, wherein the first dedicated data channel comprises a shared memory within the first dedicated data processor;
the obtaining, from the first device, a transmission control protocol connection establishment request for a second device through a first dedicated data channel between the first dedicated data processor and the first device, including: periodically polling the shared memory to acquire the transmission control protocol connection establishment request in the shared memory, wherein the transmission control protocol connection establishment request is generated by the first device and then is placed in the shared memory;
The obtaining, through the first dedicated data channel, data to be transmitted from the first device includes: and periodically polling the shared memory so as to acquire the data to be transmitted in the shared memory, wherein the data to be transmitted is generated by the first equipment and then is placed into the shared memory.
3. The data communication method of claim 1, wherein the first dedicated data channel comprises a system on a chip internal to the first dedicated data processor;
the obtaining, from the first device, a transmission control protocol connection establishment request for a second device through a first dedicated data channel between the first dedicated data processor and the first device, including: acquiring the transmission control protocol connection establishment request forwarded by the system-on-chip, wherein the transmission control protocol connection establishment request is generated by the first equipment and then sent to the system-on-chip;
the obtaining, through the first dedicated data channel, data to be transmitted from the first device includes: and acquiring the data to be transmitted forwarded by the system-on-chip, generating the data to be transmitted by the first equipment, and then sending the data to be transmitted to the system-on-chip.
4. The data communication method of claim 1, wherein said first device comprises at least one source traffic container group, each of said source traffic container groups having a source data interface unit; the transmission control protocol connection establishment request and the data to be transmitted are generated by a target source service container group in at least one source service container group, and are sent to a first dedicated data channel through the source data interface unit inside the target source service container group.
5. The data communication method of claim 4, wherein the transmission control protocol connection establishment request has a source traffic container group identification and a second device identification;
the responding to the transmission control protocol connection establishment request establishes transmission control protocol connection with the second equipment, and comprises the following steps:
acquiring a second identifier of a second special data processor coupled with the second device based on the second device identifier;
based on the second identifier, sending a transmission control protocol handshake request to the second dedicated data processor;
receiving, from the second dedicated data processor, a destination traffic container group identification assigned in the second device;
Binding the source service container group identifier, the first identifier of the first special data processor, the second identifier and the destination service container group identifier, thereby establishing the transmission control protocol connection.
6. The method of claim 5, wherein the sending the first encapsulated message to the second device over the transmission control protocol connection comprises:
and sending the first encapsulated message to the second special data processor corresponding to the second identifier through the transmission control protocol connection, so that the second special data processor unpacks the first encapsulated message and sends the first encapsulated message to the destination service container group corresponding to the destination service container group identifier through a second special data channel between the second special data processor and the second device.
7. The data communication method of claim 6, wherein after sending the first encapsulated message to the second device over the transmission control protocol connection, the data communication method further comprises:
receiving a second encapsulated message sent by the second special data processor corresponding to the second identifier through the transmission control protocol connection, wherein the second encapsulated message is generated by the second special data processor corresponding to the second identifier receiving response data from the destination service container set corresponding to the destination service container set identifier through the second special data channel and performing transmission control protocol encapsulation on the response data;
And decapsulating the second encapsulated message by using a transmission control protocol to recover the response data, and sending the response data to the source service container group corresponding to the source service container group identifier through the first dedicated data channel.
8. A data communication apparatus for application to a first dedicated data processor coupled to a first device, the first device in data communication with the second device through the first dedicated data processor, the data communication apparatus comprising:
a request unit, configured to obtain, from the first device, a transmission control protocol connection establishment request for a second device through a first dedicated data channel between the first dedicated data processor and the first device;
a connection unit, configured to establish a transmission control protocol connection with the second device in response to the transmission control protocol connection establishment request;
an obtaining unit, configured to obtain data to be transmitted from the first device through the first dedicated data channel;
and the sending unit is used for carrying out transmission control protocol encapsulation on the data to be transmitted to obtain a first encapsulated message, and sending the first encapsulated message to the second equipment through the transmission control protocol connection.
9. A computer device, comprising:
a memory and a processor, wherein the memory has stored therein a computer program which, when executed by the processor, implements the data communication method of any of claims 1 to 7.
10. A computer storage medium storing computer program code which, when executed by a processor, causes the processor to perform the data communication method of any one of claims 1 to 7.
CN202311620735.XA 2023-11-30 2023-11-30 Data communication method, device, computer equipment and storage medium Pending CN117615042A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311620735.XA CN117615042A (en) 2023-11-30 2023-11-30 Data communication method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311620735.XA CN117615042A (en) 2023-11-30 2023-11-30 Data communication method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117615042A true CN117615042A (en) 2024-02-27

Family

ID=89957683

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311620735.XA Pending CN117615042A (en) 2023-11-30 2023-11-30 Data communication method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117615042A (en)

Similar Documents

Publication Publication Date Title
CN108494817B (en) Data transmission method, related device and system
CN110022264B (en) Method for controlling network congestion, access device and computer readable storage medium
US9049218B2 (en) Stateless fibre channel sequence acceleration for fibre channel traffic over Ethernet
CN111131037B (en) Data transmission method, device, medium and electronic equipment based on virtual gateway
CN110708393A (en) Method, device and system for transmitting data
CN115134245A (en) Techniques for network packet processing between cloud and telecommunications networks
WO2019000866A1 (en) Data processing method and internet of things (iot) gateway
CN114244906B (en) Data traffic distribution method, device, equipment and medium
CN114518969A (en) Inter-process communication method, system, storage medium and computer device
CN111294235A (en) Data processing method, device, gateway and readable storage medium
CN114070833A (en) Multi-protocol service compatible method, system, device, medium, and program product
CN114124929A (en) Cross-network data processing method and device
CN114828140B (en) Service flow message forwarding method and device, storage medium and electronic equipment
CN112968919B (en) Data processing method, device, equipment and storage medium
CN114095587A (en) Client, message sending and receiving method, device and storage medium
CN113765801B (en) Message processing method and device applied to data center, electronic equipment and medium
CN113609059A (en) Communication system and communication method
CN112968965A (en) Metadata service method, server and storage medium for NFV network node
CN117615042A (en) Data communication method, device, computer equipment and storage medium
US7529812B2 (en) Socket connections over a serial link
CN113497767A (en) Method and device for transmitting data, computing equipment and storage medium
CN117640653A (en) Data transmission method, device, special data processor and medium
CN112187698B (en) Communication method, service system, electronic equipment and host MCU (micro control Unit) of electronic equipment
CN114978643B (en) Communication method, network equipment and storage medium
CN113301104B (en) Data processing system and method

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