A cross-node file transmission method, device and medium based on a TIPC protocol
By employing a cross-node file transfer method based on the TIPC protocol in a TIPC cluster network, determining the addresses and service addresses of communication nodes, creating client and server components, fragmenting files for transfer, and adjusting data packet frame formats, the problem of resource overhead and low efficiency of the traditional TCP/IP protocol in a TIPC cluster network is solved, achieving efficient and reliable file transfer.
Patent Information
- Application Number
- CN202411502918.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2044-10-25
AI Technical Summary
In the existing TIPC cluster network, file transfer still uses the traditional TCP/IP-based method, which leads to increased network resource overhead, low transmission efficiency, and a lack of security and reliability, especially when transferring large files, there is a risk of data loss and tampering.
A cross-node file transfer method based on the TIPC protocol is adopted. By determining the TIPC address and service address of each communication node in the TIPC cluster, a client and server are created. The file is divided into multiple data packets using a fragmented transmission method and adjusted to a specific file transfer data packet frame format to achieve seamless transmission of data packets between cluster nodes.
It improves the accuracy and speed of data transmission, reduces communication latency, enhances the adaptability and scalability of the system, reduces the transmission error rate, improves transmission efficiency and stability, and supports efficient data sharing and collaborative work.
Smart Images

Figure CN119383182B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data transmission, and particularly relates to a cross-node file transmission method based on a TIPC protocol, equipment and a medium. BACKGROUND
[0002] At present, in computer network technology, cluster network is widely used in various large-scale computing systems and data centers as an efficient data processing and storage architecture. In the cluster network, file transmission between nodes is the basis of data sharing and exchange, and is crucial to the overall performance and stability of the system. Traditional file transmission methods mostly rely on the TCP / IP protocol stack for addressing and communication through IP addresses and port numbers. However, with the continuous development of network technology, the resource overhead and performance bottleneck of the TCP / IP protocol stack gradually appear in some specific scenarios, such as Transparent Inter-Process Communication (TIPC) cluster network.
[0003] As an inter-process communication protocol designed specifically for cluster environment, TIPC protocol has unique advantages such as link state awareness and service publishing, which can significantly improve the communication efficiency and reliability between nodes. However, in the existing TIPC cluster network, file transmission still follows the traditional method based on TCP / IP protocol, which not only increases the network resource overhead, but also limits the full play of the characteristics of TIPC protocol.
[0004] As a simple remote file transfer protocol, Trivial File Transfer Protocol (TFTP) has the advantages of simple implementation and easy deployment, but has obvious shortcomings in transmission efficiency, security and reliability. Especially when transmitting large files, TFTP protocol has a fixed packet length of 512 bytes, resulting in low transmission efficiency; at the same time, due to the lack of encryption and check mechanism, there is a risk of tampering during file transmission; in addition, TFTP protocol does not support retransmission mechanism, once the data is lost or error, manual intervention is needed to solve, further reducing the reliability of file transmission. SUMMARY
[0005] The embodiments of the present application provide a cross-node file transmission method based on TIPC protocol, equipment and medium to solve the above technical problems.
[0006] In one aspect, the embodiments of the present application provide a cross-node file transmission method based on TIPC protocol, comprising:
[0007] Determine the TIPC address corresponding to each communication node in the TIPC cluster, and determine the service address corresponding to the communication node according to the TIPC address;
[0008] Based on the specified TIPC file transfer command, create the client and server of the TIPC file transfer, and set the TIPC configuration parameters and the fragmentation transmission parameters;
[0009] According to the preset fragmentation transmission mode, the to-be-transmitted file is segmented into a plurality of data packets, and the data packets are adjusted to a preset file transmission data packet frame format;
[0010] According to the service address corresponding to the client and the server, and based on the TIPC file transfer command, the cross-node file transmission of the data packet frame format data packet is realized.
[0011] In an implementation manner of the present application, according to the preset fragmentation transmission mode, the to-be-transmitted file is segmented into a plurality of data packets, specifically including:
[0012] Determine the file size of the to-be-transmitted file, so as to calculate the number of to-be-segmented data packets according to the file size and the preset data packet fragmentation size;
[0013] According to the preset fragmentation strategy, the file content in the to-be-transmitted file is cut into a plurality of data packets in segments, and each data packet is assigned a corresponding unique sequence number.
[0014] In an implementation manner of the present application, the data packet is adjusted to a preset file transmission data packet frame format, specifically including:
[0015] Define the structure corresponding to the data packet frame format of the file transmission; wherein the data packet frame format is a data packet sequence number, a data packet type, a data length, a check code, a reserved part, and transmission file data content;
[0016] For each segmented data packet, encapsulate according to the defined data packet frame format, and pass the encapsulated data packet frame format data packet to the TIPC protocol layer.
[0017] In an implementation manner of the present application, for each segmented data packet, encapsulation is performed according to the defined data packet frame format, specifically including:
[0018] For each segmented data packet, the data packet sequence number is filled in the front part of the data packet, and the data packet is uniquely identified through the data packet sequence number;
[0019] After the data packet sequence number, the data packet corresponding data packet type is filled in, and according to the actual length of the data content in the data packet, the data length field corresponding to the data packet is filled in after the data packet type;
[0020] The check code corresponding to the data packet is calculated, and the check code field is filled in after the data length field;
[0021] The reserved part is set after the check code field, the default value is filled in the reserved part, and the data content corresponding to the data packet is filled in after the reserved part.
[0022] In an implementation manner of the present application, the TIPC address corresponding to each communication node in the TIPC cluster is determined, and specifically includes:
[0023] The configuration information of each communication node in the TIPC cluster is queried; the configuration information includes the TIPC address, network ID and node ID;
[0024] According to the TIPC address corresponding to the communication node in the configuration information, the mapping relationship table between the TIPC address and the communication node is constructed.
[0025] In an implementation manner of the present application, according to the TIPC address, the service address corresponding to the communication node is determined, and specifically includes:
[0026] The registration information of each communication node in the TIPC cluster when running the service is queried, and according to the registration information of the communication node and the TIPC address, the service address corresponding to the communication node is queried;
[0027] The service address is associated with the communication node, and the corresponding relationship table between the service address and the communication node is generated.
[0028] In an implementation manner of the present application, based on the specified TIPC file transmission command, the client and server of TIPC file transmission are created, and specifically includes:
[0029] A plurality of historical TIPC file transmission records are obtained, and a plurality of TIPC file transmission commands are set according to the plurality of historical TIPC file transmission records to generate a corresponding TIPC file transmission command set;
[0030] According to the specified TIPC file transmission command in the TIPC file transmission command set, the client and server of TIPC file transmission are created.
[0031] In an implementation form of the application, the cross-node file transmission of the data packet in the data packet frame format is implemented according to the service addresses corresponding to the client and the server and based on a TIPC file transmission command, and specifically includes:
[0032] determining the service address corresponding to the communication node of the client and the service address corresponding to the communication node of the server;
[0033] based on the service addresses corresponding to the client and the server, sending, by the client, a TIPC file transmission command to the server, so that the server replies to the client with a corresponding file transmission confirmation command;
[0034] based on the file transmission confirmation command, transmitting, by the client, the data packet in the data packet frame format to the server, so as to implement the cross-node file transmission.
[0035] In another aspect, the embodiments of the application further provide a cross-node file transmission device based on a TIPC protocol, and the device includes:
[0036] at least one processor;
[0037] and a memory in communication connection with the at least one processor;
[0038] wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the cross-node file transmission method based on the TIPC protocol as described above.
[0039] In another aspect, the embodiments of the application further provide a non-volatile computer storage medium storing computer executable instructions, and the computer executable instructions are executed to implement the cross-node file transmission method based on the TIPC protocol as described above.
[0040] The embodiments of the application provide a cross-node file transmission method, device and medium based on a TIPC protocol, and at least include the following beneficial effects:
[0041] By determining the TIPC address of each communication node in the TIPC cluster, and further mapping to the corresponding service address, efficient resolution and accurate positioning between communication nodes are realized, which helps to reduce communication delay and improve data transmission accuracy and speed; based on the specified TIPC file transfer command to create client and server, and flexibly set TIPC configuration parameters and fragmentation transmission parameters, so that the file transfer system can be customized and optimized according to the actual demand, not only meet the file transfer demand in different scenes, but also improve the adaptability and scalability of the system; the preset fragmentation transmission mode is adopted, the to-be-transmitted file is divided into multiple data packets, and the specific file transfer data packet frame format is adjusted, which effectively reduces the data amount of single transmission, reduces the error rate in the transmission process, and at the same time, through the optimization of frame format, the efficiency and stability of data transmission are further improved; according to the service address corresponding to the client and server of TIPC file transfer, combined with TIPC file transfer command, the seamless transmission of data packet frame format data packet between different communication nodes in the cluster is realized, and this cross-node file transfer capability not only enhances the distributed processing capability of the system, but also provides strong support for efficient data sharing and collaborative work. BRIEF DESCRIPTION OF DRAWINGS
[0042] The drawings described herein are used to provide further understanding of the present application, and form a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application, and do not constitute improper limitations on the present application. In the drawings:
[0043] Figure 1 A flowchart of a cross-node file transmission method based on a TIPC protocol provided by an embodiment of the present application is shown.
[0044] Figure 2 An internal structure diagram of a cross-node file transmission device based on a TIPC protocol provided by an embodiment of the present application is shown. DETAILED DESCRIPTION
[0045] In order to make the purpose, technical scheme and advantages of the present application clearer, the technical scheme of the present application will be described in detail below in combination with specific embodiments of the present application and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0046] The technical scheme provided by the embodiments of the present application will be described in detail below in combination with the drawings.
[0047] Figure 1 A flowchart of a cross-node file transmission method based on a TIPC protocol provided by an embodiment of the present application is shown.
[0048] The analysis method involved in the embodiments of this application can be implemented by a terminal device or a server, and this application does not impose any special limitations on it. For ease of understanding and description, the following embodiments are all described in detail using a server as an example.
[0049] It should be noted that the server can be a single device or a system composed of multiple devices, i.e., a distributed server. This application does not make any specific limitations on this.
[0050] like Figure 1 As shown in the figure, an embodiment of this application provides a cross-node file transfer method based on the TIPC protocol, comprising:
[0051] 101. Determine the TIPC address corresponding to each communication node in the TIPC cluster, and determine the service address corresponding to the communication node based on the TIPC address.
[0052] Communication nodes within a TIPC cluster support addressing for communication using service addresses. A TIPC service address consists of two parts: a service type number and a service instance number. The TIPC implementation used in this application supports identifying different sockets through service type and instance, thereby achieving isolation between services.
[0053] For TIPC-based remote file transfer services, a dedicated service type number, such as 1023, is agreed upon, and the service instance number is the NODE field value in the TIPC address. This ensures the uniqueness of the service address for each cluster node.
[0054] For ease of description, the TIPC addresses of the three devices are designated as <1.10.1>, <1.10.2>, and <1.10.3>. Upon each node coming online, a pre-agreed service address is activated: the service type number is 1023, and the service instance number is the NODE field value of its respective TIPC address. Based on this service, by using the corresponding file transfer client and providing the service type and service instance number parameters, cross-node remote file transfer can be achieved.
[0055] Specifically, in one embodiment of this application, determining the TIPC address corresponding to each communication node in the TIPC cluster includes:
[0056] Query the configuration information of each communication node in the TIPC cluster; the configuration information includes the TIPC address, network ID, and node ID;
[0057] Based on the TIPC address corresponding to the communication node in the configuration information, construct a mapping table between the TIPC address and the communication node.
[0058] In one embodiment, the first query request is sent to the TIPC cluster through the cluster management tool or command line interface to obtain the configuration information of each communication node. These configuration information is usually stored in the configuration file or database of the cluster and can be accessed through specific query commands or APIs. After receiving the configuration information, it is parsed to extract the TIPC address, network ID and node ID of each communication node. These information is usually presented in a structured format such as JSON, XML or table, which is convenient for us to parse and process.
[0059] Next, according to the parsed configuration information, the mapping relationship table between TIPC address and communication node is constructed. This table can be a simple two-dimensional array or hash table, where TIPC address is the key and communication node (including its network ID and node ID) is the value. In this way, the corresponding communication node can be quickly found through the TIPC address. Finally, we verify the mapping relationship table constructed to ensure its correctness and integrity. This can be achieved by sending test messages to the communication nodes in the cluster and checking whether they can be correctly routed to the target node according to the mapping relationship table.
[0060] In one embodiment of the present application, the service address corresponding to the communication node is determined according to the TIPC address, specifically including:
[0061] Query the registration information of each communication node in the TIPC cluster when running the service, and according to the registration information of the communication node and the TIPC address, query the service address corresponding to the communication node;
[0062] Associate the service address with the communication node and generate the corresponding relationship table between the service address and the communication node.
[0063] In one embodiment, in the TIPC cluster, the service running on each communication node registers a unique service address, which is associated with the TIPC address. Therefore, by using the service registration mechanism provided by the TIPC cluster, the registration information of each communication node when running the service is queried. These information usually includes service name, service type, service status and service address, etc.
[0064] After obtaining the registration information, the TIPC address in it is matched with the TIPC address in the previously obtained communication node configuration information to determine the communication node corresponding to each service. According to the matching result, the service address corresponding to each communication node is extracted from the registration information. This service address can be a combination of an IP address and a port, or other forms of network addresses, used to identify the access point of the service. Finally, the communication node and the service address are associated, and a corresponding relationship table is generated. This table can be a simple list or hash table containing the identification of the communication node (such as TIPC address, network ID and node ID) and the corresponding service address.
[0065] The adopted TIPC optimizes the communication efficiency between nodes, reduces the steps of establishing communication connection and addressing target address, improves the frequency of information exchange between nodes, and reduces the waiting time between nodes.
[0066] 102. Based on the specified TIPC file transfer command, create the client and server of TIPC file transfer, and set the TIPC configuration parameters and fragmentation transmission parameters.
[0067] Specifically, in one embodiment of the present application, based on the specified TIPC file transfer command, the client and server of TIPC file transfer are created, specifically including:
[0068] Obtain a number of historical TIPC file transfer records, and set a number of TIPC file transfer commands according to a number of historical TIPC file transfer records to generate a corresponding TIPC file transfer command set;
[0069] According to the specified TIPC file transfer command in the TIPC file transfer command set, create the client and server of TIPC file transfer.
[0070] In one embodiment, a TIPC file transfer command with rich functions is designed to support the creation of a TIPC file transfer client and server using the command.
[0071] First, a number of historical TIPC file transfer records are obtained from the log system of the TIPC cluster. These records include the file name, size, transmission time, source node and target node, etc. Through in-depth analysis of these historical records, common transmission modes such as regular backup, data migration, real-time synchronization, etc. are identified. At the same time, the transmission frequency, file size and transmission duration, etc. of each mode are also counted.
[0072] Based on the analysis results, a series of TIPC file transfer commands are set, which are designed to meet different transmission needs and optimize transmission performance. For example, for periodic backup tasks, a timed transmission command is set; for data migration tasks, a batch transmission command is set. The above-mentioned transmission commands are integrated to generate a TIPC file transfer command set. This command set contains multiple transmission commands, each of which corresponds to a specific transmission scenario and requirement. Thus, according to actual needs, a specified TIPC file transfer command is selected from the command set, and a TIPC file transfer client and server are created based on these commands. The client is responsible for initiating transmission requests, while the server is responsible for receiving and processing these requests.
[0073] 103. According to the preset fragmentation transmission mode, the file to be transmitted is divided into multiple data packets, and the data packets are adjusted to a preset file transmission data packet frame format.
[0074] Specifically, in one embodiment of the present application, according to the preset fragmentation transmission mode, the file to be transmitted is divided into multiple data packets, specifically including:
[0075] The file size of the file to be transmitted is determined to calculate the number of data packets to be divided according to the file size and the preset data packet fragmentation size;
[0076] According to the preset fragmentation strategy, the file content in the file to be transmitted is cut into corresponding data packets in segments, and each data packet is assigned a corresponding unique sequence number.
[0077] In one embodiment, first, the actual size of the file to be transmitted is obtained through the API of the file system, which is the basis for subsequent fragmentation processing. Then, according to the preset data packet fragmentation size (for example, each data packet size is 1MB), the number of data packets to be divided is calculated. This ensures that the size of each data packet is within a controllable range, facilitating network transmission.
[0078] An efficient fragmentation strategy is designed, which takes into account the internal structure of the file (such as file header, data segment, file tail, etc.) to ensure that each data packet contains complete and meaningful data segments. According to the fragmentation strategy, the file content in the file to be transmitted is cut into corresponding data packets in segments using file reading and writing operations. Each data packet contains a part of the file content.
[0079] In order to ensure the order and integrity of the data packets, a unique sequence number is assigned to each data packet. This sequence number can be an incremental integer or other forms of unique identifier. During transmission, data packets are sent in sequence according to the sequence number. The receiving end receives and recombines the data packets according to the sequence number to recover the original file.
[0080] The data packet length is not fixed in the slice transmission mode, and the user can customize a suitable length according to the actual transmission efficiency, and the transmission efficiency is greatly improved.
[0081] In an embodiment of the present application, the data packet is adjusted to a preset file transmission data packet frame format, specifically including:
[0082] The structure corresponding to the data packet frame format of file transmission is defined; wherein the data packet frame format is data packet serial number, data packet type, data length, check code, reserved part and transmission file data content;
[0083] For each segmented data packet, encapsulation is performed according to the defined data packet frame format, and the encapsulated data packet frame format data packet is transmitted to the TIPC protocol layer.
[0084] In an embodiment, in a large file transmission system, in order to ensure that the file can be transmitted efficiently and accurately, the following data packet frame format structure is defined:
[0085] Data packet serial number: used to uniquely identify each data packet, which plays a key role in file recombination;
[0086] Data packet type: indicating which part of the file data the data packet is, such as file header, file body or file tail;
[0087] Data length: indicating the length of the actual file data content carried in the data packet;
[0088] Check code: used to verify the integrity of the data packet to prevent data loss or tampering during transmission;
[0089] Reserved part: reserved space for future possible expansion or specific use;
[0090] Transmission file data content: actual file data to be transmitted.
[0091] Before file transmission, the large file is first segmented into multiple data packets according to a preset segmentation strategy. Then, each data packet is encapsulated according to the above defined frame format, including adding data packet serial number, data packet type, data length, check code and other information, and the encapsulated data packet is transmitted to the TIPC protocol layer for transmission.
[0092] In an embodiment of the present application, for each segmented data packet, encapsulation is performed according to the defined data packet frame format, specifically including:
[0093] For each segmented data packet, the data packet serial number is filled in the front part of the data packet, and the data packet is uniquely identified through the data packet serial number;
[0094] After the data packet sequence number, fill in the data packet corresponding data packet type, and according to the actual length of the data content in the data packet, fill in the data length field corresponding to the data packet after the data packet type;
[0095] Calculate the check code corresponding to the data packet, and fill in the check code field after the data length field;
[0096] After the check code field, set the reserved part, fill in the default value in the reserved part, and fill in the data content corresponding to the data packet after the reserved part.
[0097] In one embodiment, in a file transmission system, an efficient data packet encapsulation method is adopted. For each segmented data packet, a data packet sequence number is filled in the front part, which is a unique identifier for tracking and identifying data packets during transmission and reception. Next to the data packet sequence number, fill in the data packet type, which indicates the nature of the content carried by the data packet, such as file header, file body or file tail. According to the actual length of the data content in the data packet, fill in the data length field after the data packet type to ensure that the receiving end can accurately parse and recombine the file. Then, the check code of the data packet is calculated and filled into the check code field for verifying the integrity of the data packet. After the check code field, a reserved part is set and filled with default values for future expansion. Finally, the data content corresponding to the data packet is filled in after the reserved part, completing the encapsulation of the data packet.
[0098] The way of designing slice transmission is to divide a larger file into multiple smaller data packets for transmission. A custom-designed data packet frame format is used, in which the front part of the data packet contains the data packet sequence number, type, data length and check code, and the back part is the file data content for transmission.
[0099] The present application designs a custom frame format for data packets, each data packet consisting of a data header and data content, the data header part containing the length of the data content for this transmission, MD5 check code, data packet sequence number, etc. The client will calculate and fill in the length of the current data packet, MD5 value before sending the file, and the server will parse and verify the length and MD5 value of the packet after receiving the data packet. Therefore, if the file is erroneous or tampered with during transmission, it will be discovered in time after receiving at the server and an error code will be returned through the response message.
[0100] 104. According to the service address corresponding to the client and the server, and based on the TIPC file transmission command, cross-node file transmission of data packets in data packet frame format is realized.
[0101] Specifically, in one embodiment of the present application, according to the service addresses corresponding to the client and the server, and based on the TIPC file transfer command, cross-node file transfer of the data packet in the data packet frame format is implemented, specifically including:
[0102] determining the service address corresponding to the communication node of the client and the service address corresponding to the communication node of the server;
[0103] based on the service addresses corresponding to the client and the server, sending a TIPC file transfer command from the client to the server, so that the server replies a corresponding file transfer confirmation command to the client;
[0104] based on the file transfer confirmation command, transmitting the data packet in the data packet frame format from the client to the server to implement cross-node file transfer.
[0105] In one embodiment, in a distributed file system, the client and the server are respectively deployed on different communication nodes. First, the system determines the service addresses of the client and the server respectively. Then, the client sends a TIPC file transfer command to the server according to the address information, requesting to transfer a specific file. After receiving the command, the server makes corresponding preparations and replies a file transfer confirmation command to the client. Then, the client divides the file into multiple data packets in the data packet frame format and transmits them to the server in sequence. After receiving all the data packets, the server recombines and checks them, and finally completes the cross-node file transfer.
[0106] In one embodiment, the present application supports file retransmission mechanism. During the transmission process, if a certain slice data packet is lost or damaged due to network problems, the server sends a response message to the client after the checking fails. After receiving the response message, the client only needs to retransmit the slice data packet according to the message error code, without retransmitting the entire file, which greatly improves the reliability and stability of file transfer.
[0107] The above is a method embodiment of the present application. Based on the same inventive concept, the present application embodiment also provides a cross-node file transfer device based on TIPC protocol, the structure of which is shown in Figure 2 .
[0108] Figure 2 An internal structure diagram of a cross-node file transfer device based on TIPC protocol provided by the present application embodiment. As shown in Figure 2 , the device includes:
[0109] at least one processor;
[0110] and a memory in communication connection with the at least one processor;
[0111] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to:
[0112] determine a TIPC address corresponding to each communication node in the TIPC cluster, and determine a service address corresponding to the communication node according to the TIPC address;
[0113] create a client and a server of the TIPC file transmission based on a specified TIPC file transmission command, and set TIPC configuration parameters and sharding transmission parameters;
[0114] segment a file to be transmitted into a plurality of data packets according to a preset sharding transmission mode, and adjust the data packets into a preset file transmission data packet frame format;
[0115] implement cross-node file transmission of the data packet in the data packet frame format according to the service address corresponding to the client and the server, and based on the TIPC file transmission command.
[0116] The embodiments of the application further provide a non-volatile computer storage medium storing computer executable instructions, and the computer executable instructions are executed to enable:
[0117] determine a TIPC address corresponding to each communication node in the TIPC cluster, and determine a service address corresponding to the communication node according to the TIPC address;
[0118] create a client and a server of the TIPC file transmission based on a specified TIPC file transmission command, and set TIPC configuration parameters and sharding transmission parameters;
[0119] segment a file to be transmitted into a plurality of data packets according to a preset sharding transmission mode, and adjust the data packets into a preset file transmission data packet frame format;
[0120] implement cross-node file transmission of the data packet in the data packet frame format according to the service address corresponding to the client and the server, and based on the TIPC file transmission command.
[0121] Each of the embodiments in the application is described in a progressive manner, and the same or similar parts of each of the embodiments can be referred to each other. Each of the embodiments mainly describes the difference from other embodiments. Especially, the device and medium embodiments are described simply because they are basically similar to the method embodiments, and the relevant parts can be referred to the part of the description of the method embodiments.
[0122] The above describes specific embodiments of the application. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order and still accomplish the desired result. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve the desired results. In certain implementations, multitasking and parallel processing can be advantageous or necessary.
[0123] The device and medium provided by the embodiments of the present application are one-to-one corresponding to the method, and therefore the device and medium also have similar beneficial technical effects to the method. Since the beneficial technical effects of the method have been described in detail above, the beneficial technical effects of the device and medium will not be described here again.
[0124] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, etc.) containing computer-usable program code.
[0125] The present application is described with reference to the flowcharts and / or block diagrams of the method, device (system), and computer program product according to the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing apparatus to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing apparatus produce a device implemented in accordance with the flowcharts and / or block diagrams. Figure 1 The function specified in one or more flows and / or blocks Figure 1 The means for performing the function specified in one or more blocks.
[0126] These computer program instructions can also be stored in a computer-readable memory that can direct the computer or other programmable data processing apparatus to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including instruction means, which implements the flowcharts and / or block diagrams. Figure 1 The function specified in one or more flows and / or blocks Figure 1 The means for performing the function specified in one or more blocks.
[0127] These computer program instructions can also be loaded into a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 Figure 1
[0128] In one typical configuration, the computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0129] The memory can include non-persistent memory and / or volatile memory, such as random access memory (RAM) about which the processor can execute instructions. The memory can also include non-volatile memory, such as read only memory (ROM), electrically programmable read only memory (EPROM), electrically erasable programmable read only memory (EEPROM), programmable read only memory (PROM), erasable programmable read only memory (EPROM), flash memory, or a combination of non-volatile memories in different types. The memory is an example of computer readable storage media.
[0130] Computer readable media includes permanent and non-permanent, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory (ROM), electrically programmable read only memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital versatile disc (DVD), or other optical storage, magnetic cassette, magnetic tape disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to computing devices. According to the definition herein, computer readable media does not include transitory media such as modulated data signals and carrier waves.
[0131] It should also be noted that the terms "comprising", "containing", or any other variant thereof are intended to cover a non-exclusive inclusion, such that a process, method, article or apparatus that comprises a list of elements does not include only those elements recited, but can also include other elements not expressly listed or inherent to such process, method, article or apparatus. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of additional identical elements in the process, method, article or apparatus that includes the element.
[0132] The above merely provides an example of the present application, but is not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. within the spirit and principle of the present application should be included in the scope of claims of the present application.
Claims
1. A cross-node file transfer method based on the TIPC protocol, characterized in that, The method includes: Determine the TIPC address corresponding to each communication node in the TIPC cluster, and determine the service address corresponding to the communication node based on the TIPC address; Based on the specified TIPC file transfer command, create a TIPC file transfer client and server, and set TIPC configuration parameters and fragmentation transfer parameters; According to the preset fragmentation transmission method, the file to be transmitted is divided into multiple data packets, and the data packets are adjusted to the preset file transmission data packet frame format; Based on the service addresses corresponding to the client and the server, and using the TIPC file transfer command, cross-node file transfer of data packets in data packet frame format is achieved; Adjust the data packets to the preset file transfer data packet frame format, specifically including: Define the structure corresponding to the data packet frame format for file transfer; wherein, the data packet frame format includes data packet sequence number, data packet type, data length, checksum, reserved portion, and the content of the file data to be transferred; For each segmented data packet, it is encapsulated according to the defined data packet frame format, and the encapsulated data packet in the data packet frame format is passed to the TIPC protocol layer; For each segmented data packet, it is encapsulated according to the defined data packet frame format, specifically including: For each segmented data packet, a data packet sequence number is filled into the beginning of the data packet, and the data packet is uniquely identified by the data packet sequence number; Enter the data packet type corresponding to the data packet after the data packet sequence number, and enter the data length field corresponding to the data packet after the data packet type according to the actual length of the data content in the data packet; Calculate the checksum corresponding to the data packet and fill the checksum field after the data length field; A reserved section is set after the verification code field, in which a default value is filled, and the data content corresponding to the data packet is filled after the reserved section.
2. The cross-node file transfer method based on the TIPC protocol according to claim 1, characterized in that, According to the preset fragmentation transmission method, the file to be transmitted is divided into multiple data packets, specifically including: Determine the file size of the file to be transmitted, and calculate the number of data packets to be segmented based on the file size and the preset data packet fragment size; According to the preset fragmentation strategy, the file content of the file to be transmitted is segmented into a corresponding number of data packets, and a unique sequence number is assigned to each data packet.
3. The cross-node file transfer method based on the TIPC protocol according to claim 1, characterized in that, Determining the TIPC address corresponding to each communication node in the TIPC cluster specifically includes: Query the configuration information of each communication node in the TIPC cluster; the configuration information includes the TIPC address, network ID, and node ID; Based on the TIPC address corresponding to the communication node in the configuration information, construct a mapping table between the TIPC address and the communication node.
4. The cross-node file transfer method based on the TIPC protocol according to claim 1, characterized in that, Based on the TIPC address, the service address corresponding to the communication node is determined, specifically including: Query the registration information of each communication node in the TIPC cluster when it is running the service, and query the service address corresponding to the communication node based on the registration information of the communication node and the TIPC address; The service address is associated with the communication node, and a correspondence table between the service address and the communication node is generated.
5. The cross-node file transfer method based on the TIPC protocol according to claim 1, characterized in that, Based on the specified TIPC file transfer command, create a TIPC file transfer client and server, specifically including: Acquire several historical TIPC file transfer records, and based on these historical TIPC file transfer records, set several TIPC file transfer commands to generate a corresponding TIPC file transfer command set; Create a TIPC file transfer client and server based on the specified TIPC file transfer command in the TIPC file transfer command set.
6. The cross-node file transfer method based on the TIPC protocol according to claim 1, characterized in that, Based on the service addresses corresponding to the client and the server, and using TIPC file transfer commands, cross-node file transfer of data packets in data packet frame format is achieved, specifically including: Determine the service address corresponding to the communication node of the client and the service address corresponding to the communication node of the server; Based on the service addresses corresponding to the client and the server, the client sends a TIPC file transfer command to the server, so that the server replies to the client with a corresponding file transfer confirmation command. Based on the file transfer confirmation command, the client transmits a data packet in data packet frame format to the server to achieve cross-node file transfer.
7. A cross-node file transfer device based on the TIPC protocol, characterized in that, The device includes: At least one processor; And, a memory communicatively connected to the at least one processor; The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform a cross-node file transfer method based on the TIPC protocol as described in any one of claims 1-6.
8. A non-volatile computer storage medium storing computer-executable instructions, characterized in that, When the computer-executable instructions are executed, they implement a cross-node file transfer method based on the TIPC protocol as described in any one of claims 1-6.
Citation Information
Patent Citations
Method and device for performing remote procedure call by client or server
CN111597061A
Cross-node remote login method and device based on TIPC protocol and medium
CN117336375A