Data transmission method and system of heterogeneous communication middleware based on RDMA
By determining the terminal device on the host side and generating the target communication link for data protocol format conversion, the problem of inefficient data transmission in the prior art is solved, and a more efficient data transmission process is achieved.
Patent Information
- Application Number
- CN202410927242.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-11
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2044-07-11
AI Technical Summary
In the prior art, after the host sends the data to be transmitted to the slave, it needs to retrieve the data again on the slave and send it to the terminal device through protocol conversion, resulting in low data transmission efficiency.
Using a heterogeneous communication middleware based on RDMA, when the host receives the data to be transmitted, it determines the corresponding terminal device, and generates a target communication link based on the terminal device and the preset overall link relationship, converts the data protocol format, and transmits the converted data protocol and the data to be transmitted to the slave, so that the slave can directly transmit it to the terminal device according to the converted data protocol.
This improves the efficiency of data transmission and avoids the slave's protocol format conversion and transmission again, thereby improving the overall data transmission performance.
Smart Images

Figure CN118803085B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of remote data transmission, and in particular to a data transmission method and system of heterogeneous communication middleware based on RDMA. Background Art
[0002] With the rapid development of information technology, data acquisition, processing and transmission are becoming more and more important. Traditional data transmission methods are often limited by factors such as geographical location and distance, and cannot meet the needs of modern society. Therefore, remote data transmission technology came into being and gradually developed into an important data transmission method.
[0003] The existing method generally uses a bus to connect the host and the slave on the same port, but this method is only applicable to data transmission between the host and the slave. When the entire system is a heterogeneous communication network architecture, after the user uses the host to send data to the slave through the bus, the data must be retrieved again on the slave and converted through the format before it can be sent to the terminal device.
[0004] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention
[0005] The main purpose of the present application is to provide a data transmission method and system based on RDMA heterogeneous communication middleware, aiming to solve the technical problem in the prior art that after the host sends the data to be transmitted to the slave, the data needs to be retrieved again on the slave and sent to the terminal device through protocol conversion, resulting in low data transmission efficiency.
[0006] To achieve the above object, the present application proposes a data transmission method of heterogeneous communication middleware based on RDMA, the method is applied to a host in a data transmission system of heterogeneous communication middleware based on RDMA, the system further includes: a terminal device and a slave, the host is connected to the terminal device through the slave, and the method includes:
[0007] When receiving the data to be transmitted, determining the terminal device corresponding to the data to be transmitted;
[0008] Generate a target communication link based on the terminal device and the preset overall link relationship, and perform format conversion on the corresponding data protocol according to the target communication link;
[0009] The converted data protocol and the data to be transmitted are transmitted to the slave device, so that the slave device transmits the data to be transmitted to the terminal device according to the converted data protocol.
[0010] In one embodiment, the step of generating a target communication link based on the terminal device and a preset overall link relationship includes:
[0011] Determine a corresponding device address based on the terminal device;
[0012] The communication link corresponding to the device address in the preset overall link relationship is used as the target communication link.
[0013] In one embodiment, the step of taking the communication link corresponding to the device address in the preset overall link relationship as the target communication link includes:
[0014] When the device address exists in the preset overall link relationship, determining whether there is a communication link corresponding to the device address in the preset overall link relationship;
[0015] If so, the communication link is used as the target communication link.
[0016] In one embodiment, the step of converting the format of the corresponding data protocol according to the target communication link includes:
[0017] Obtaining the communication port and the communication interface involved between the slave device and the terminal device based on the target communication link;
[0018] The corresponding data protocol is format converted according to the communication interface and the communication port.
[0019] In one embodiment, before the step of determining the terminal device corresponding to the data to be transmitted when the data to be transmitted is received, the step further includes:
[0020] Obtaining the communication port, communication interface and device address of the terminal device involved between the slave and the terminal device based on the initialization data uploaded by the terminal device;
[0021] A preset overall link relationship is generated according to the communication port, the communication interface and the device address.
[0022] In one embodiment, after the step of transmitting the converted data protocol and the data to be transmitted to the slave device so that the slave device transmits the data to be transmitted to the terminal device according to the converted data protocol, the step further includes:
[0023] When receiving the data to be fed back uploaded by the terminal device through the slave device, performing protocol parsing on the data to be fed back;
[0024] The valid data of the terminal device is determined based on the analysis result, and the valid data is stored, so that the remote device obtains the operation result corresponding to the terminal device according to the valid data.
[0025] In one embodiment, after the step of determining the valid data of the terminal device based on the parsing result, the method further includes:
[0026] Determine the communication interface and the communication port involved between the slave device and the terminal device based on the analysis result;
[0027] The preset overall link relationship is updated based on the communication interface and the communication port.
[0028] In addition, to achieve the above purpose, the present application also proposes a data transmission method of heterogeneous communication middleware based on RDMA, the method is applied to a slave in a data transmission system of heterogeneous communication middleware based on RDMA, the system also includes: a terminal device and a host, the host is connected to the terminal device through the slave, and the method includes:
[0029] Receiving a converted data protocol and data to be transmitted sent by the host, wherein the converted data protocol is obtained by the host performing format conversion on a corresponding data protocol according to a target communication link generated by the data to be transmitted;
[0030] The data to be transmitted is transmitted to the terminal device according to the converted data protocol.
[0031] In addition, to achieve the above purpose, the present application also proposes a data transmission system of heterogeneous communication middleware based on RDMA, the system comprising: a host, a slave and a terminal device, the host is connected to the terminal device through the slave;
[0032] The host is used to determine the terminal device corresponding to the data to be transmitted when receiving the data to be transmitted;
[0033] The host is further used to generate a target communication link based on the terminal device and the preset overall link relationship, and perform format conversion on the corresponding data protocol according to the target communication link;
[0034] The host is further used to transmit the converted data protocol and the data to be transmitted to the slave;
[0035] The slave device is used to transmit the data to be transmitted to the terminal device according to the converted data protocol.
[0036] In one embodiment, the host is further used to determine a corresponding device address based on the terminal device;
[0037] The host is further configured to use the communication link corresponding to the device address in the preset overall link relationship as the target communication link.
[0038] The present application proposes a data transmission method for heterogeneous communication middleware based on RDMA, the method is applied to a host in a data transmission system of heterogeneous communication middleware based on RDMA, the system also includes: a terminal device and a slave, the host is connected to the terminal device through the slave, the method includes: when receiving data to be transmitted, determining the terminal device corresponding to the transmitted data; generating a target communication link based on the terminal device and a preset overall link relationship, and formatting the corresponding data protocol according to the target communication link; transmitting the converted data protocol and the data to be transmitted to the slave, so that the slave transmits the data to be transmitted to the terminal device according to the converted data protocol.
[0039] Since in the present application, the host can determine the corresponding terminal device when receiving the data to be transmitted and generate a target communication link based on the terminal device and the preset overall link relationship, the corresponding data protocol is formatted according to the target communication link, and the converted data protocol and the above-mentioned data to be transmitted are transmitted to the slave, so that the slave can directly transmit the above-mentioned data to be transmitted to the above-mentioned terminal device according to the converted data protocol. Compared with the existing method of transmitting the data to be transmitted from the host to the slave through a protocol, and then the slave performs protocol format conversion on the received data to be transmitted and sends it to the terminal device through the protocol, the present application can convert the data protocol corresponding to the data to be transmitted according to the target communication link by the host and send it to the slave, so that the slave can directly transmit the above-mentioned data to be transmitted to the terminal device according to the converted data protocol, without the need for the slave to convert the data protocol and transmit it to the terminal device according to the converted data protocol, thereby improving the efficiency of data transmission. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0041] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0042] Figure 1 A connection diagram of a data transmission system of a heterogeneous communication middleware based on RDMA in a first embodiment of a data transmission method of a heterogeneous communication middleware based on RDMA proposed in an embodiment of the present application;
[0043] Figure 2 A flowchart of a first embodiment of a data transmission method for heterogeneous communication middleware based on RDMA proposed in an embodiment of the present application;
[0044] Figure 3 Query frame format diagrams for heterogeneous communication transport protocols;
[0045] Figure 4 Reply frame format diagram for heterogeneous communication transmission protocol;
[0046] Figure 5 A flowchart of a data transmission method for heterogeneous communication middleware based on RDMA proposed in an embodiment of the present application;
[0047] Figure 6 A flowchart of a second embodiment of a data transmission method for heterogeneous communication middleware based on RDMA proposed in an embodiment of the present application;
[0048] Figure 7 A working diagram of a second embodiment of a data transmission method for heterogeneous communication middleware based on RDMA proposed in an embodiment of the present application;
[0049] Figure 8 A flowchart of a third embodiment of a data transmission method for heterogeneous communication middleware based on RDMA proposed in an embodiment of the present application;
[0050] Fig. 9 This is a connection relationship diagram within the data transmission system of the heterogeneous communication middleware based on RDMA in an embodiment of the present application.
[0051] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0052] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0053] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0054] It is understandable that with the rapid development of information technology, the acquisition, processing and transmission of data have become increasingly important. Traditional data transmission methods are often limited by factors such as geographical location and distance, and cannot meet the needs of modern society. Therefore, remote data transmission technology came into being and gradually developed into an important data transmission method.
[0055] In order to achieve remote data transmission, the existing Modbus protocol is generally used for remote data transmission. However, since the Modbus protocol can only recognize the protocol description between the host and the slave, when the entire system is a heterogeneous communication network architecture, after the user uses the host to convert the data to the slave through the Modbus protocol, the data needs to be retrieved again on the slave and sent to the terminal device through the Modbus protocol conversion. The above content is only used to assist in understanding the technical solution of this application, and does not mean that the above content is recognized as prior art.
[0056] Therefore, in order to solve the technical problem that the host needs to retrieve the data again on the slave and send it to the terminal device through protocol conversion after sending the data to be transmitted to the slave in the prior art, resulting in low data transmission efficiency, this embodiment provides a data transmission method of heterogeneous communication middleware based on RDMA, which can determine the corresponding terminal device when receiving the data to be transmitted by the host and generate a target communication link based on the terminal device and the preset overall link relationship, perform format conversion on the corresponding data protocol according to the target communication link, and transmit the converted data protocol and the above-mentioned data to be transmitted to the slave, so that the slave can directly transmit the above-mentioned data to be transmitted to the above-mentioned terminal device according to the converted data protocol. Compared with the existing method of transmitting the data to be transmitted from the host to the slave through the Modbus protocol, and then the slave performs protocol format conversion on the received data to be transmitted and sends it to the terminal device through the Modbus protocol, the present application can convert the data protocol corresponding to the data to be transmitted according to the target communication link by the host and send it to the slave, so that the slave can directly transmit the above-mentioned data to be transmitted to the terminal device according to the converted data protocol, without the need for the slave to convert the data protocol and transmit it to the terminal device according to the converted data protocol, thereby improving the efficiency of data transmission.
[0057] For ease of understanding, the following combination Figures 1 to 9 The data transmission method of heterogeneous communication middleware based on RDMA provided in the embodiment of the present application and the data transmission system of heterogeneous communication middleware based on RDMA provided in the following embodiment are specifically introduced.
[0058] The present application embodiment provides a data transmission method for heterogeneous communication middleware based on RDMA, referring to Figure 1 and Figure 2 , Figure 1The data transmission method of heterogeneous communication middleware based on RDMA proposed in the embodiment of the present application is a connection diagram of the data transmission system of heterogeneous communication middleware based on RDMA in the first embodiment, Figure 2 This is a flow chart of the first embodiment of the data transmission method of the heterogeneous communication middleware based on RDMA proposed in the embodiment of the present application. Figure 1 and Figure 2 As shown, in this embodiment, the above method can be applied to the host in the data transmission system of the RDMA-based heterogeneous communication middleware, and the system also includes: a terminal device and a slave, and the host is connected to the terminal device through the slave.
[0059] It should be understood that this method can be applied to scenarios where the host transmits data to a terminal device via a slave, and can certainly also be used in other scenarios such as data transmission between the host and a slave. This embodiment uses the scenario where the host transmits data to a terminal device via a slave for illustration.
[0060] It should be noted that the host can be a middleware in the server, which at least includes: a storage module, a data extraction module, a data protocol parsing / conversion module, a heterogeneous communication interface, and each device communication link module. The middleware can transmit data with a remote data transmission tool through remote direct memory access (RDMA) or connect through a file transfer protocol, etc. This embodiment does not limit this, but considering the higher transmission efficiency, this embodiment uses RDMA transmission for illustration, as shown in the following example. Figure 1 As shown, the middleware transmits data with the remote data transmission tool through RDMA.
[0061] The above middleware can also perform data transmission with a multi-level device system including at least one level of slave through a heterogeneous communication transmission protocol. Figure 3 , Figure 3 The query frame format of the heterogeneous communication transmission protocol is shown in FIG. The query frame format of the heterogeneous communication transmission protocol includes a header (16 bits, i.e. Figure 3 16 bits, 0xFFFF), device address (8 bits, i.e. Figure 3 8 bits in the middle, 0xFF), source address (8 bits, that is Figure 3 8 bits, 0xFF), communication interface (32 bits, i.e. Figure 3 16 bits, 0xFFFFFFFF), communication port (32 bits, that is Figure 3 16 bits, 0xFFFFFFFF), signal function code (8 bits, i.e. Figure 3 8 bits, 0xFF), data content (more than 32 bits, that is, Figure 332+Nbit, 32+N), return result (8 bits, that is Figure 3 8 bits, 0xFF), verification code (16 bits, i.e. Figure 3 16 bits in the middle, 0xFFFF) and the needle tail (16 bits, that is Figure 3 16bit, 0xFFFF). It should be noted that the needle head and needle tail can be generated by the middleware through the data protocol parsing / conversion module, which is used to divide the data packet to determine the complete data packet for easy parsing. The device address can be the device address of the slave that directly communicates with the server, and the source address can be the device address of the terminal device that initiates communication with the server, which is used to determine the target terminal device. The communication interface and communication port can be the interface number and port number of each node device output and returned by each node generated by each node during the data transmission process, which are used in the middleware to parse the output interface and port data of the current node device according to the communication interface data, and generate data link information. The signal function code can be a function code generated according to the number of each signal processing method, which can be used for the terminal device to exchange signals according to this signal function code and preliminarily determine the processing channel to be performed. The data content can be the valid data received, wherein the data content can also include an operation code, and the operation code is used to control the terminal device to perform the corresponding operation. The return result can be a signal generated by a remote data transmission tool, which is used to control the terminal device to return the operation result to the remote data transmission tool. The verification code may be a data code generated by a data protocol parsing / conversion module in the middleware, and is used by the gateway to verify the data from the device address to the returned result according to the verification code when entering the gateway.
[0062] The above heterogeneous communication transmission protocol also has a reply frame format, refer to Figure 4 , Figure 4 Reply frame format diagram for heterogeneous communication transmission protocol, such as Figure 4 As shown, the reply frame format includes: header, device address, source address, communication interface, communication port, signal function code, number of bytes (8 bits, i.e. Figure 3 It should be noted that the needle header, device address, source address, communication interface, communication port, signal function code, verification code and needle tail in the above reply frame are basically the same as those in the above inquiry frame. The data content in the above inquiry frame can be the feedback content of the terminal device operation result, and the number of bytes in the above reply frame can be used to divide the byte size of the above data content.
[0063] The method includes:
[0064] Step S10: When the data to be transmitted is received, the terminal device corresponding to the data to be transmitted is determined.
[0065] It is understandable that the data to be transmitted may be data generated by a remote data transmission tool and sent to the host. In this embodiment, when a user has a data transmission requirement, the user may send the data to be transmitted to the storage module in the middleware through the remote data transmission tool, and the middleware may extract the data to be transmitted through the data extraction module, and determine the terminal device corresponding to the data to be transmitted based on the extracted data to be transmitted.
[0066] In actual use, when the user uses the remote data transmission tool to transfer data to the server memory (i.e. Figure 1 When the middleware determines that the memory cache is not empty, the data in the memory is extracted by the extraction module, and the data parsing / conversion module separates the device address and the instruction data to determine the corresponding terminal device.
[0067] It can be understood that, in order to obtain the status of each terminal and slave in the data transmission system of the heterogeneous communication middleware based on RDMA, before step S10, the method further includes:
[0068] Step S01: obtaining the communication port, communication interface and device address of the terminal device involved between the slave and the terminal device based on the initialization data uploaded by the terminal device.
[0069] It should be understood that the initialization data may be the heterogeneous communication transmission protocol query frame format data with empty data content sent by the terminal device to the middleware through the slave when the data transmission system of the RDMA-based heterogeneous communication middleware is started.
[0070] The communication port can be a physical port, such as a serial port, parallel port, input / output device, etc. of a computer, or a software port for identifying a specific process or a certain type of service step. The communication interface can be a physical interface for connecting communication devices for information transmission, and can be a hardware interface or a software interface. In this embodiment, the communication port and the communication interface are both in software form.
[0071] Step S02: generating a preset overall link relationship according to the communication port, the communication interface and the device address.
[0072] It is understandable that the preset overall link relationship may be a link relationship generated by all communication ports, communication interfaces and device addresses of the terminal device involved in data transmission between the slave and the terminal device. The device address may be a data address representing the terminal device corresponding to the data to be transmitted.
[0073] For easier understanding, please refer to Figure 1 and Figure 5 , Figure 5 The specific flow chart of the data transmission method of the heterogeneous communication middleware based on RDMA proposed in the embodiment of the present application. In the specific implementation, when the data transmission system of the heterogeneous communication middleware based on RDMA is started, the slave and the target terminal (i.e. Figure 1 Each device in the multi-level device system) is initialized (i.e. Figure 5 Each device in the power-on initialization), each slave and terminal device uploads protocol data with empty data content (i.e. Figure 5 The protocol data is parsed by the data protocol parsing / conversion module in the middleware to obtain all the communication ports and communication interfaces involved in the upload data of each device (i.e. Figure 5 The above-mentioned preset overall relationship is generated according to the device address of the above-mentioned terminal device and the communication port and communication interface involved, and is stored in the device communication link module in the above-mentioned middleware (i.e. Figure 5 Register the device link in the
[0074] Step S20: Generate a target communication link based on the terminal device and the preset overall link relationship, and perform format conversion on the corresponding data protocol according to the target communication link.
[0075] It can be understood that the target communication link may be a communication link formed by the communication ports and communication interfaces of the slaves and the terminal devices involved in the data transmission process between the terminal device corresponding to the data to be transmitted and the server.
[0076] The above-mentioned format conversion can be to convert the protocol format of the data to be transmitted into the above-mentioned heterogeneous communication transmission protocol inquiry frame format, wherein the communication port and communication interface in the target communication link correspond to the communication port and communication interface in the above-mentioned heterogeneous communication transmission protocol inquiry frame format.
[0077] In this embodiment, after determining the terminal device corresponding to the data to be transmitted, the middleware retrieves the preset overall link relationship in the device communication link module in the middleware, and matches the corresponding communication link in the preset overall link relationship as the target communication link according to the corresponding terminal device.
[0078] Furthermore, in order to accurately confirm the target communication link corresponding to the terminal device, the step of generating the target communication link based on the terminal device and the preset overall link relationship further includes:
[0079] Step S21: Determine a corresponding device address based on the terminal device.
[0080] Step S22: taking the communication link corresponding to the device address in the preset overall link relationship as the target communication link.
[0081] In a specific implementation, after determining the corresponding terminal device, the middleware determines the device address corresponding to the terminal device, and calls the preset overall link relationship in the device communication link module in the middleware, compares the device address in the preset overall link relationship with the device address of the corresponding terminal device, and obtains the target communication link of the corresponding terminal device.
[0082] It can be understood that in order to confirm whether there is a communication link corresponding to the above-mentioned device address in the preset overall link relationship, the above-mentioned step S22 includes:
[0083] Step S221: when the device address exists in the preset overall link relationship, it is determined whether there is a communication link corresponding to the device address in the preset overall link relationship.
[0084] It should be noted that the above-mentioned communication link may be a data link composed of a terminal device address and a communication port and a communication interface involved in data transmission.
[0085] Step S222: If yes, the communication link is used as the target communication link.
[0086] For ease of understanding, the following references Figure 5 To explain, when the middleware obtains the above-mentioned corresponding device address and the preset overall link relationship, it queries whether the corresponding device address exists in the preset overall link relationship. If the address does not exist, the data transmission is terminated directly; if the device address exists, it determines whether the communication link corresponding to the device address is normal. If not, the transmission is terminated directly; if so, the communication link corresponding to the device address is used as the target communication link.
[0087] It can be understood that, in order to achieve complete data protocol conversion, the above step of converting the format of the corresponding data protocol according to the target communication link includes:
[0088] Step S23: obtaining the communication port and communication interface involved between the slave device and the terminal device based on the target communication link.
[0089] It should be understood that the above-mentioned communication ports and communication interfaces may be ports and interfaces represented by interface numbers and port numbers generated by each node during data transmission and returned by each node device output.
[0090] S24: Performing format conversion on the corresponding data protocol according to the communication interface and the communication port.
[0091] In a specific implementation, the middleware obtains the terminal device corresponding to the above-mentioned data to be transmitted and the communication port and communication interface of the slave machine involved in the transmission of the data to be transmitted according to the determined target communication link, and writes the data encoding corresponding to the pass port and the pass interface into the pass port and the pass interface in the inquiry frame format of the above-mentioned heterogeneous pass transmission protocol, writes the device address of the slave machine directly connected to the middleware through the heterogeneous pass transmission protocol into the device address in the inquiry frame format of the above-mentioned heterogeneous communication transmission protocol, writes the device address of the above-mentioned terminal device into the source address in the inquiry frame format of the above-mentioned heterogeneous communication transmission protocol, writes the above-mentioned data to be transmitted into the data content in the inquiry frame format of the above-mentioned heterogeneous communication transmission protocol, and obtains the inquiry frame of the above-mentioned heterogeneous communication transmission protocol as the converted data protocol.
[0092] Step S30: transmitting the converted data protocol and the data to be transmitted to the slave device, so that the slave device transmits the data to be transmitted to the terminal device according to the converted data protocol.
[0093] The above-mentioned slave machine may be a device for transmitting the data to be transmitted sent by the above-mentioned middleware to the terminal device, and the above-mentioned slave machine includes at least one-level slave machine. The above-mentioned converted data protocol may be the above-mentioned heterogeneous communication transmission protocol, which is used to enable the slave machine to directly identify the data protocol and transmit it to the terminal device according to the content of the protocol. In a specific implementation, the above-mentioned middleware sends the heterogeneous communication transmission protocol with the data to be transmitted to the above-mentioned slave machine through the above-mentioned heterogeneous communication interface. When receiving the above-mentioned heterogeneous communication transmission protocol, the above-mentioned slave machine can call the pass interface and pass port in the above-mentioned heterogeneous communication transmission protocol, and send the heterogeneous communication transmission protocol with the data to be transmitted to the terminal device according to the above-mentioned pass port and communication interface.
[0094] For ease of understanding, the following examples are given, but the present invention is not limited thereto. At the initialization stage, each device in the multi-level device system is initialized, RDMA allocates a memory cache area, RDMA and the Transmission Control Protocol (TCP) establish a connection, and each device in the multi-level device system uploads protocol data with empty data content according to the heterogeneous communication transmission protocol. This protocol data is parsed by the middleware for the communication interface and communication port, and each downward communication link of each device is registered and judged. The middleware writes the device communication link data into the database through the API interface.
[0095] When the user uses the remote data transmission tool to write the device instruction data to the server memory through RDMA transmission. When the middleware determines that the content cache buffer is not empty, it extracts the middleware data and separates the device address and instruction data. The middleware retrieves the device communication link corresponding to the device in the database through the device address. If there is no device address, it replies with a "400" exception code. If there is no communication link for the device address, it replies with a "404" exception code. When the device link retrieval is normal, the device communication link is filled into the communication interface and communication port according to the protocol format, and the valid data is filled into the data content. The conversion is completed in the heterogeneous communication transmission protocol format, and it is sent to the slave through the TCP protocol. When the slave receives the heterogeneous communication transmission protocol, it calls the access interface and access port in the above-mentioned heterogeneous communication transmission protocol, and sends the heterogeneous communication transmission protocol with the data to be transmitted to the terminal device according to the above-mentioned access port and communication interface.
[0096] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 6 , Figure 6 This is a flow chart of a second embodiment of a data transmission method for heterogeneous communication middleware based on RDMA proposed in an embodiment of the present application. After step S30, the method further includes steps S301 to S302:
[0097] Step S301: when receiving the data to be fed back uploaded by the terminal device through the slave device, performing protocol parsing on the data to be fed back.
[0098] It should be understood that the data to be fed back may be the result of the operation of the terminal device after receiving the data to be transmitted. Figure 7 To explain, Figure 7 This is a working diagram of the second embodiment of the present application. When the terminal device needs to feedback data, the terminal device transmits the feedback data to the heterogeneous communication interface of the middleware through the slave in the reply frame format of the heterogeneous communication transmission protocol. When the middleware detects that the heterogeneous communication interface has data incoming, the feedback data is parsed by the data protocol parsing / conversion module (i.e. Figure 7 As shown, heterogeneous communication data protocol analysis).
[0099] Step S302: determining valid data of the terminal device based on the analysis result, and storing the valid data, so that the remote device can obtain the corresponding operation result of the terminal device according to the valid data.
[0100] It should be understood that the valid data may be the data content in the reply frame format of the heterogeneous communication transmission protocol, or the operation result fed back by the terminal. The remote device may be a remote data transmission tool used by the user, for allowing the user to interact with the middleware through the remote data transmission tool.
[0101] In this embodiment, based on the protocol parsing result of the feedback data by the protocol parsing / conversion module of the above-mentioned middleware, the data content in the reply frame format of the above-mentioned heterogeneous communication transmission protocol can be obtained as valid data, and the valid data can be stored in the storage module of the above-mentioned middleware, so that the above-mentioned remote device can directly read the valid data in the storage module through RDMA.
[0102] Further, in order to update the above-mentioned preset overall link relationship, after the above-mentioned step of determining the valid data of the terminal device based on the analysis result, it also includes:
[0103] Step S3021: Determine the communication interface and the communication port involved between the slave device and the terminal device based on the analysis result.
[0104] Step S3022: updating the preset overall link relationship based on the communication interface and the communication port.
[0105] In this embodiment, the protocol parsing / conversion module of the middleware parses the protocol of the feedback data and uses the communication port, communication interface and source address in the reply frame format of the heterogeneous communication transmission protocol as the pass port, pass interface and device address in the preset overall link relationship to update the preset overall link relationship (i.e. Figure 7 The preset overall link relationship used in the subsequent steps is the updated overall link relationship.
[0106] Other embodiments or specific implementations of the data transmission method of the heterogeneous communication middleware based on RDMA described in this embodiment can refer to the first embodiment and will not be repeated here.
[0107] In addition, to achieve the above purpose, the embodiment of the present application also provides a data transmission method of heterogeneous communication middleware based on RDMA, referring to Figure 8 , Figure 8 This is a flowchart of the third embodiment of the data transmission method of the RDMA-based heterogeneous communication middleware proposed in the embodiment of the present application.
[0108] Based on the first and second embodiments of the present application, in the third embodiment of the present application, the same or similar contents as those of the above-mentioned embodiment one or embodiment two can be referred to the above introduction and will not be repeated later.
[0109] In this embodiment, the above method can be applied to a slave in a data transmission system of heterogeneous communication middleware based on RDMA, and the system also includes: a terminal device and a host, and the host is connected to the terminal device through the slave.
[0110] like Figure 8 As shown, the method includes:
[0111] Step S40: receiving the converted data protocol and the data to be transmitted sent by the host, wherein the converted data protocol is obtained by the host performing format conversion on the corresponding data protocol according to the target communication link generated by the data to be transmitted.
[0112] It should be noted that the above-mentioned converted data protocol can be the protocol except the data content in the above-mentioned heterogeneous communication transmission protocol inquiry frame, the above-mentioned data to be transmitted can be the data content in the above-mentioned heterogeneous communication transmission protocol inquiry frame, and the above-mentioned host can be the server that actively sends the above-mentioned converted data protocol and the data to be transmitted or the middleware in the server.
[0113] Step S50: transmitting the data to be transmitted to the terminal device according to the converted data protocol.
[0114] In a specific embodiment, when the above-mentioned slave machine receives the above-mentioned heterogeneous communication transmission protocol inquiry frame, it obtains the communication port and access interface in the heterogeneous communication transmission protocol inquiry frame through protocol parsing, and transmits the heterogeneous communication transmission protocol inquiry frame to the above-mentioned terminal device through the port and interface corresponding to the communication port and access interface.
[0115] In addition, the present application also provides a data transmission system for heterogeneous communication middleware based on RDMA, please refer to Fig. 9 , Fig. 9 The figure is a connection relationship diagram of a data transmission system of a heterogeneous communication middleware based on RDMA in an embodiment of the present application, wherein the system includes: a host, a slave, and a terminal device, wherein the host is connected to the terminal device through the slave;
[0116] The host is used to determine the terminal device corresponding to the data to be transmitted when receiving the data to be transmitted;
[0117] The host is further used to generate a target communication link based on the terminal device and the preset overall link relationship, and perform format conversion on the corresponding data protocol according to the target communication link;
[0118] The host is further used to transmit the converted data protocol and the data to be transmitted to the slave;
[0119] The slave device is used to transmit the data to be transmitted to the terminal device according to the converted data protocol.
[0120] Furthermore, the host is further configured to determine a corresponding device address based on the terminal device;
[0121] The host is further configured to use the communication link corresponding to the device address in the preset overall link relationship as the target communication link.
[0122] The specific structure of the data transmission system of the RDMA-based heterogeneous communication middleware refers to the above-mentioned method embodiments. Since the data transmission system of the RDMA-based heterogeneous communication middleware adopts all the technical solutions of all the above-mentioned embodiments, it at least has all the beneficial effects brought by the technical solutions of the above-mentioned embodiments, which will not be described one by one here.
[0123] Other embodiments or specific implementations of the data transmission system based on RDMA heterogeneous communication middleware described in this embodiment can refer to the embodiments of the vacant parking space positioning method, which will not be repeated here.
[0124] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
[0125] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0126] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0127] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A data transmission method for heterogeneous communication middleware based on RDMA, characterized in that: The method is applied to a host in a data transmission system of a heterogeneous communication middleware based on RDMA, the system further comprising: a terminal device and a slave, the host being connected to the terminal device via the slave, the method comprising: When receiving the data to be transmitted, determining the terminal device corresponding to the data to be transmitted; Generate a target communication link based on the terminal device and the preset overall link relationship, and perform format conversion on the corresponding data protocol according to the target communication link; Transmitting the converted data protocol and the data to be transmitted to the slave device, so that the slave device transmits the data to be transmitted to the terminal device according to the converted data protocol; The step of generating a target communication link based on the terminal device and the preset overall link relationship comprises: Determine a corresponding device address based on the terminal device; Taking the communication link corresponding to the device address in the preset overall link relationship as the target communication link; The step of converting the format of the corresponding data protocol according to the target communication link comprises: Obtaining the communication port and the communication interface involved between the slave device and the terminal device based on the target communication link; Performing format conversion on the corresponding data protocol according to the communication interface and the communication port; Before the step of determining the terminal device corresponding to the data to be transmitted when the data to be transmitted is received, the step further includes: Obtaining the communication port, communication interface and device address of the terminal device involved between the slave and the terminal device based on the initialization data uploaded by the terminal device; A preset overall link relationship is generated according to the communication port, the communication interface and the device address.
2. The method according to claim 1, characterized in that The step of taking the communication link corresponding to the device address in the preset overall link relationship as the target communication link comprises: When the device address exists in the preset overall link relationship, determining whether there is a communication link corresponding to the device address in the preset overall link relationship; If so, the communication link is used as the target communication link.
3. The method according to claim 1, characterized in that After the step of transmitting the converted data protocol and the data to be transmitted to the slave device so that the slave device transmits the data to be transmitted to the terminal device according to the converted data protocol, the step further includes: When receiving the data to be fed back uploaded by the terminal device through the slave device, performing protocol parsing on the data to be fed back; The valid data of the terminal device is determined based on the analysis result, and the valid data is stored, so that the remote device obtains the operation result corresponding to the terminal device according to the valid data.
4. The method according to claim 3, characterized in that After the step of determining the valid data of the terminal device based on the analysis result, the method further includes: Determine the communication interface and the communication port involved between the slave device and the terminal device based on the analysis result; The preset overall link relationship is updated based on the communication interface and the communication port.
5. A data transmission method for heterogeneous communication middleware based on RDMA, characterized in that: The method is applied to a slave in a data transmission system of heterogeneous communication middleware based on RDMA, the system further comprising: a terminal device and a host, the host being connected to the terminal device via the slave, the method comprising: Receive the converted data protocol and the data to be transmitted sent by the host, the converted data protocol is obtained by the host performing format conversion on the corresponding data protocol according to the target communication link generated by the data to be transmitted, and the host determines the corresponding device address based on the terminal device; takes the communication link corresponding to the device address in the preset overall link relationship as the target communication link; the host obtains the communication port and communication interface involved between the slave and the terminal device based on the target communication link; performs format conversion on the corresponding data protocol according to the communication interface and the communication port; before sending the converted data protocol and the data to be transmitted, the host also obtains the communication port, communication interface and device address of the terminal device involved between the slave and the terminal device based on the initialization data uploaded by the terminal device; generates a preset overall link relationship according to the communication port, the communication interface and the device address; The data to be transmitted is transmitted to the terminal device according to the converted data protocol.
6. A data transmission system of heterogeneous communication middleware based on RDMA, characterized in that: The system comprises: a host, a slave and a terminal device, wherein the host is connected to the terminal device via the slave; The host is used to determine the terminal device corresponding to the data to be transmitted when receiving the data to be transmitted; The host is further used to generate a target communication link based on the terminal device and the preset overall link relationship, and perform format conversion on the corresponding data protocol according to the target communication link; The host is further used to transmit the converted data protocol and the data to be transmitted to the slave; The slave device is used to transmit the data to be transmitted to the terminal device according to the converted data protocol; The host is further configured to determine a corresponding device address based on the terminal device; and to use a communication link corresponding to the device address in a preset overall link relationship as a target communication link; The host is further used to obtain the communication port and communication interface involved between the slave and the terminal device based on the target communication link; and perform format conversion on the corresponding data protocol according to the communication interface and the communication port; The host is also used to obtain the communication port, communication interface and device address of the terminal device involved between the slave and the terminal device based on the initialization data uploaded by the terminal device before the step of determining the terminal device corresponding to the data to be transmitted when the data to be transmitted is received; and generate a preset overall link relationship according to the communication port, the communication interface and the device address.
Citation Information
Patent Citations
Interface conversion device of communication equipment and communication system
CN112199312A
Fragmented network resource security splicing communication system based on heterogeneity
CN115549954A