File transmission control method and device, storage medium and electronic device

By controlling the destination server to mount the shared directory of the source server in the network file system, direct file transfer between the source server and the candidate server is achieved, which solves the problem of low file transfer efficiency and optimizes the transmission performance of the network file system.

CN119814758BActive Publication Date: 2025-10-10INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411747962.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-10-10
Estimated Expiration
2044-11-29

AI Technical Summary

Technical Problem

The file transfer efficiency in existing network file systems is low, especially when transferring large files, which increases the transfer time and network bandwidth consumption. Frequent transfers also bring storage burden to the client.

Method used

By controlling the destination server to mount the shared directory of the source server, direct file transfer between the source server and the candidate server is achieved, avoiding multiple network transmissions of files through the client, and using segmented transmission and splicing technology to optimize the file transfer process.

Benefits of technology

It improves file transfer efficiency, reduces client storage burden and network bandwidth consumption, and optimizes the transmission performance of the network file system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119814758B_ABST
    Figure CN119814758B_ABST
Patent Text Reader

Abstract

The application discloses a file transmission control method and device, a storage medium and an electronic equipment. The file transmission control method comprises the following steps: receiving a file transmission request initiated by an application program; in the case that a source shared directory belongs to a source server and a destination shared directory belongs to a destination server, controlling the destination server to mount the source shared directory on the source server to obtain a candidate server; controlling the source server and the candidate server to transmit a target file from the source shared directory on the source server to the destination shared directory on the candidate server, and controlling the candidate server to return a transmission result of the target file; receiving the target transmission result returned by the destination server, and sending the target transmission result to the application program. By using the technical scheme, the problems of low file transmission efficiency in a network file system in the prior art are solved, and the technical effect of improving the file transmission efficiency in the network file system is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computers, and more specifically, to a file transfer control method and device, a storage medium, and an electronic device. Background Art

[0002] In the digital age, network file systems (NFS) have become a crucial infrastructure for data storage and exchange. The efficiency of server-side file replication directly impacts the performance of critical operations such as data migration, backup, and sharing. Efficient file replication technology not only significantly reduces data transfer time and improves resource utilization, but is also crucial for ensuring critical business continuity and data real-time availability.

[0003] In existing technologies, when copying files across servers, network file systems typically require a client to perform a transfer. This means that the file must first be transferred from the source server to the client, and then from the client to the target server. This process involves at least two network transfers, which significantly increases transfer time and reduces work efficiency when the file is large or the network conditions are poor. Furthermore, frequent large file transfers impose additional storage burdens on the client and increase network bandwidth consumption.

[0004] In view of the problems in related technologies such as low efficiency of file transmission in network file systems, no effective solutions have been proposed yet. Summary of the Invention

[0005] The embodiments of the present application provide a file transfer control method and device, a storage medium, and an electronic device to at least solve the problem of low efficiency of file transfer in a network file system in the related art.

[0006] According to one embodiment of the present application, a method for controlling file transfer is provided, including: a network file system, the network file system including a client and a server, an application and a network file system component running on the client, the client mounting a shared directory on the server, the network file system component being used to provide the application with access to files on the server through the shared directory, the method being applied to the network file system component, including:

[0007] receiving a file transfer request initiated by the application, wherein the file transfer request is used to request to transfer a target file in a source shared directory mounted by the client to a destination shared directory mounted by the client;

[0008] When the source shared directory belongs to the source server and the destination shared directory belongs to the destination server, controlling the destination server to mount the source shared directory on the source server to obtain a candidate server;

[0009] Control the source server and the candidate server to transfer the target file from the source shared directory on the source server to the destination shared directory on the candidate server, and control the candidate server to return a transfer result of the target file;

[0010] Receive the target transmission result returned by the destination server, and send the target transmission result to the application.

[0011] Optionally, controlling the destination server to mount the source shared directory on the source server to obtain a candidate server includes:

[0012] Controlling the destination server to extract the mount parameters corresponding to the source shared directory from the server copy request, wherein the server copy request is used to request the destination server to transfer the target file under the source shared directory mounted by the client to the destination shared directory mounted by the client, and the mount parameters are parameters required to mount the source shared directory;

[0013] The destination server is controlled to mount the source shared directory on the source server according to the mounting parameters to obtain the candidate server.

[0014] Optionally, before controlling the destination server to extract the mount parameter corresponding to the source shared directory from the server copy request, the method further includes:

[0015] Generate a target request identifier according to the source server address of the source server, the destination server address of the destination server, the source shared directory, the destination shared directory and the current time;

[0016] Constructing the server copy request according to the source server address of the source server, the destination server address of the destination server, the source shared directory, the destination shared directory, the mount parameters and the target request identifier;

[0017] Send the server copy request to the destination server.

[0018] Optionally, controlling the source server and the candidate server to transfer the target file from the source shared directory on the source server to the destination shared directory on the candidate server includes:

[0019] controlling the candidate server to send a file copy request carrying the source shared directory to the source server, wherein the file copy request is used to control the source server to segment the target file according to a load condition of a processor on the source server to obtain a plurality of file segments and segment information, and sequentially transmit the plurality of file segments and the segment information to the candidate server, wherein the segment information records a position of each of the plurality of file segments in the target file;

[0020] controlling the candidate server to receive the plurality of file segments and the segment information transmitted by the source server, restore the plurality of file segments to the target file according to the segment information, and store the target file to the destination shared directory.

[0021] Optionally, in a case where the plurality of file segments include N file segments, N is an integer greater than 1, and the source server is configured to sequentially transmit the plurality of file segments and the segment information to the candidate server by the following steps:

[0022] generating a transmission message for each of the N file segments to obtain N transmission messages, wherein an i th transmission message in the N transmission messages includes an i th segment identifier corresponding to the i th file segment, an i th segment offset position, an i th segment data length, i th segment file data, an i th associated segment offset position, an i th target file identifier, and an i th transmission end identifier, the i th segment identifier is an identifier of the i th file segment, the i th segment offset position is used to indicate an offset position of the i th file segment in the target file, the i th segment data length is a data length of the i th file segment, the i th segment file data records data of the i th file segment, the i th associated segment offset position records an offset position of another associated file segment in the target file which has the same data as the i th segment file data, the i th target file identifier is an identifier of the target file, and the i th transmission end identifier is used to indicate whether the i th transmission message is the last transmission message;

[0023] sequentially transmitting the N transmission messages to the candidate server;

[0024] the candidate server is configured to restore the plurality of file segments to the target file according to the segment information by the following steps:

[0025] receiving the N transmission messages;

[0026] The N transmission messages are spliced ​​according to the fragment identifier, fragment offset position, fragment data length, fragment file data, associated fragment offset position, the target file identifier and transmission end identifier in each of the N transmission messages to obtain the target file.

[0027] Optionally, before controlling the destination server to mount the source shared directory on the source server to obtain a candidate server, the method further includes:

[0028] Detecting whether the file data volume of the target file is greater than a data volume threshold;

[0029] When it is detected that the file data volume is greater than or equal to the data volume threshold, controlling the destination server to mount the source shared directory on the source server to obtain a candidate server;

[0030] When it is detected that the file data volume is less than the data volume threshold, the target file is obtained from the source shared directory currently mounted by the client, and the target file is transferred to the destination shared directory currently mounted by the client.

[0031] Optionally, after receiving the file transfer request initiated by the application, the method further includes:

[0032] In a case where the source shared directory and the destination shared directory both belong to the same reference server, generating an internal copy request for the target file, wherein the internal copy request is used to control the reference server to directly copy the target file from the source shared directory to the destination shared directory internally, and return a transfer result of the target file;

[0033] sending the internal copy request to the reference server;

[0034] Receive the target transmission result returned by the reference server, and send the target transmission result to the application.

[0035] According to another embodiment of the present application, a file transfer control device is further provided, including: a network file system including a client and a server, an application and a network file system component running on the client, the client mounting a shared directory on the server, the network file system component being used to provide the application with access to files on the server through the shared directory, and the device applied to the network file system component including:

[0036] A first receiving module is configured to receive a file transfer request initiated by the application, wherein the file transfer request is used to request that a target file in a source shared directory mounted by the client be transferred to a destination shared directory mounted by the client;

[0037] A first control module is configured to, when the source shared directory belongs to the source server and the destination shared directory belongs to the destination server, control the destination server to mount the source shared directory on the source server to obtain a candidate server;

[0038] A second receiving module is used to control the source server and the candidate server to transfer the target file from the source shared directory on the source server to the destination shared directory on the candidate server, and control the candidate server to return the transfer result of the target file;

[0039] The second control module is configured to receive a target transmission result returned by the destination server and send the target transmission result to the application.

[0040] According to another embodiment of the present application, a computer program product is provided, including a computer program, wherein a processor executes the steps in any one of the above method embodiments.

[0041] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored. The computer program is configured to execute the steps of any one of the above method embodiments when run.

[0042] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0043] In an embodiment of the present application, a file transfer control scheme is proposed, including: a network file system, wherein the network file system includes a client and a server, an application and a network file system component are running on the client, the client mounts a shared directory on the server, and the network file system component can provide the application with access to files on the server through the shared directory. The network file system component first receives a file transfer request initiated by the application, and the file transfer request can request to transfer the target file under the source shared directory mounted by the client to the destination shared directory mounted by the client; then, when the source shared directory belongs to the source server and the destination shared directory belongs to the destination server, the destination server is controlled to mount the source shared directory on the source server to obtain a candidate server; then, the source server and the candidate server are controlled to transfer the target file from the source shared directory on the source server to the destination shared directory on the candidate server, and the candidate server is controlled to return the transfer result of the target file; finally, the target transfer result returned by the destination server is received and the target transfer result is sent to the application, that is, when the network file system component of the client receives the file transfer request initiated by the application, and the source shared directory and the destination shared directory belong to different servers, for example, the source shared directory belongs to the source server and the destination shared directory belongs to the destination server. Unlike the file transfer method in the related art, which first downloads the target file from the source shared directory of the source server to the client and then uploads the downloaded file to the destination shared directory of the destination server, this solution controls the destination server to mount the source shared directory on the source server, making the destination server a candidate server capable of accessing the target file in the mounted source shared directory. Then, the source server and the candidate server are controlled to transfer the target file from the source shared directory on the source server to the destination shared directory on the candidate server. During this process, the destination server can also return the transfer status of the target file to the client in real time. Testers can view these transfer results through the client application. Through the file transfer control method proposed in this application, when a file needs to be transferred across servers, the file does not need to pass through the client, but can be directly transferred once between the servers. During this process, the client only needs to transmit control instructions and does not involve receiving and uploading files. This avoids the low efficiency problem caused by multiple network transmissions of files through the client in the related art, thereby improving the efficiency of file transfer. The above technical solution solves the low efficiency of file transfer in network file systems in the related art and achieves the technical effect of improving the efficiency of file transfer in network file systems. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 This is a hardware structure block diagram of a computer device for a file transfer control method according to an embodiment of the present application;

[0045] Figure 2is a flow chart of a method for controlling file transmission according to an embodiment of the present application;

[0046] Figure 3 is a schematic diagram of a network file system according to an embodiment of the present application;

[0047] Figure 4 is a schematic diagram of components of a server-side replication request according to an embodiment of the present application;

[0048] Figure 5 This is a flowchart of file copying between different servers according to an embodiment of the present application;

[0049] Figure 6 is a schematic diagram of components of a transmission message according to an embodiment of the present application;

[0050] Figure 7 is a schematic diagram of executing corresponding decisions based on target file size in a file transfer control method according to an embodiment of the present application;

[0051] Figure 8 This is a flow chart of a method for controlling file transmission in a server according to an embodiment of the present application;

[0052] Figure 9 is a schematic diagram of components of a server-side replication table according to an embodiment of the present application;

[0053] Figure 10 is a schematic diagram of a method for controlling file transmission between different servers according to an embodiment of the present application;

[0054] Figure 11 This is a structural block diagram of a file transfer control device according to an embodiment of the present application;

[0055] Figure 12 is a schematic diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0056] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0057] It should be noted that the terms "first", "second", etc. in the description and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0058] The method embodiments provided in the embodiments of the present application can be executed in a server device or a similar computing device. Taking running on a server device as an example, Figure 1 This is a hardware structure block diagram of a computer device for a file transfer control method according to an embodiment of the present application. Figure 1As shown, the server device may include one or more ( Figure 1 Only one is shown) a processor 102 (the processor 102 may include but is not limited to a microprocessor MCU or a programmable logic device FPGA and other processing devices) and a memory 104 for storing data, wherein the above-mentioned server device may also include a transmission device 106 for communication functions and an input and output device 108. It will be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above server device. Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.

[0059] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the file transfer control method in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implementing the above-mentioned method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely located relative to the processor 102, and these remote memories may be connected to a server device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0060] The transmission device 106 is used to receive or send data via a network. A specific example of the aforementioned network may include a wireless network provided by a communication provider of the server device. In one embodiment, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0061] In this embodiment, a method for controlling file transmission is provided. Figure 2 This is a flowchart of a method for controlling file transfer according to an embodiment of the present application. The network file system includes: a client and a server. An application and a network file system component are running on the client. The client mounts a shared directory on the server. The network file system component is used to provide the application with access to files on the server through the shared directory. The method is applied to the network file system component, such as Figure 2 As shown, the process includes the following steps:

[0062] Optionally, in this embodiment, the network file system may include but is not limited to a client and a server, wherein the client may be but is not limited to a terminal device that can run applications and network file system components; the server may be but is not limited to multiple servers, each server containing multiple server storage directories or network resource locations (file directories), and these storage directories or network resource locations can be shared with the client, and the client accesses the files in the server shared directory by mounting the file directory (shared directory) shared by the server to the client locally. Figure 3 is a schematic diagram of a network file system according to an embodiment of the present application, such as Figure 3 As shown, the server side includes server_A and server_B. Server_A has n storage directories, namely path_A_1, path_A_2, ..., path_A_n, and Server_B has m storage directories, namely path_B_1, path_B_2, ..., path_B_m. Each directory can represent a specific path or network resource location on the server. It can be a directory, such as " / path / to / path_A1 / " for directory path_A_1 on server_A, or it can be some logical identifier, such as a network shared directory (e.g., \\Server_A\Share\path_A_1). Assume that server_A shares the first storage directory, path_A_1 (assuming path_A_1 is " / path / to / path_A1 / "), with client_1. The client can access the files under the shared directory " / path / to / path_A1 / " by mounting path_A_1 locally on the client.

[0063] Step S12: receiving a file transfer request initiated by the application, wherein the file transfer request is used to request to transfer a target file in the source shared directory mounted by the client to the destination shared directory mounted by the client;

[0064] Optionally, in this embodiment, the way in which the network file system component receives a file transfer request initiated by an application may be, but is not limited to, as follows: assuming that a user wants to copy file file_X under path_B_1 in server Server_B to path_A_1 in Server_A, a file transfer request may be initiated in the client application, where the file transfer request includes the source shared directory mounted by the client (i.e., path_B_1), the target file (i.e., file_X), and the destination shared directory (i.e., path_A_1).

[0065] Step S14, when the source shared directory belongs to the source server and the destination shared directory belongs to the destination server, controlling the destination server to mount the source shared directory on the source server to obtain a candidate server;

[0066] Optionally, in this embodiment, after receiving a file transfer request initiated by an application, the network file system component first determines the source server to which the source shared directory belongs, determines the destination server to which the destination shared directory belongs, and then mounts the source shared directory on the source server to obtain a candidate server. In this embodiment, the network file system component determines that the source server is server_B based on the source shared directory path_B_1 in the file transfer request, and then determines that the destination server is server_A based on the destination shared directory path_A_1 in the file transfer request. The component then controls server_A to mount the source shared directory (path_B_1) on server_B, and determines server_A, after mounting the source shared directory (path_B_1), as the candidate server.

[0067] Step S16, controlling the source server and the candidate server to transfer the target file from the source shared directory on the source server to the destination shared directory on the candidate server, and controlling the candidate server to return a transfer result of the target file;

[0068] Step S18: receiving the target transmission result returned by the destination server, and sending the target transmission result to the application.

[0069] Optionally, in this embodiment, the network file system component controls the source server (server Server_B) and the candidate server (server Server_A after mounting the source shared directory path_B_1) to transfer the target file file_X from the source shared directory path_B_1 on the source server to the destination shared directory path_A_1 on the candidate server, and controls the candidate server to return the transfer result of the target file, and then sends the target transfer result to the application.

[0070] As an optional solution, controlling the destination server to mount the source shared directory on the source server to obtain a candidate server includes:

[0071] S21, controlling the destination server to extract the mount parameters corresponding to the source shared directory from the server copy request, wherein the server copy request is used to request the destination server to transfer the target file under the source shared directory mounted by the client to the destination shared directory mounted by the client, and the mount parameters are parameters required to mount the source shared directory;

[0072] S22, controlling the destination server to mount the source shared directory on the source server according to the mounting parameters to obtain the candidate server.

[0073] Optionally, in this embodiment, the network file system component obtains the candidate server in the following manner, but is not limited to: first, controlling the server Server_A to extract the mount parameters corresponding to path_B_1 from the server copy request, wherein the server copy request refers to a request sent by the client to the server Server_A, requesting that the target file file_X under the source shared directory path_B_1 mounted by the client be transferred to the destination shared directory path_A_1 mounted by the client; the mount parameters are the parameters required to mount the source shared directory path_B_1, which may include: the address of Server_B, the source shared directory, authentication information, etc.; then, controlling Server_A to mount the source shared directory path_B_1 on Server_B according to the mount parameters to obtain the candidate server.

[0074] As an optional solution, before controlling the destination server to extract the mount parameters corresponding to the source shared directory from the server copy request, the method further includes:

[0075] S31, generating a target request identifier according to the source server address of the source server, the destination server address of the destination server, the source shared directory, the destination shared directory and the current time;

[0076] S32, constructing the server copy request according to the source server address of the source server, the destination server address of the destination server, the source shared directory, the destination shared directory, the mount parameters, and the target request identifier;

[0077] S33: Send the server copy request to the destination server.

[0078] Optionally, in this embodiment, a method of generating a server-side copy request according to a file transfer request may be, but is not limited to, the following: Figure 4 Schematic diagram of components of a server-side replication request according to an embodiment of the present application. Figure 4 As shown, the source server address scr-ip (Server_B's address) of the source server (Server_B), the destination server address dst-ip (Server_A's address) of the destination server (Server_A), the source shared directory src-path (path_B_1), the destination shared directory (path_A_1), and the current time time_cur are obtained to generate the target request identifier Dcopyid(id_1), where the target request identifier is a unique identifier for the request. Then, based on the server address Server_B, the server address Server_A, the source shared directory path_B_1, the destination shared directory path_A_1, the mount parameters, and the target request identifier id_1, a server copy request is constructed and sent to the destination server (Server_A).

[0079] As an optional solution, controlling the source server and the candidate server to transfer the target file from the source shared directory on the source server to the destination shared directory on the candidate server includes:

[0080] S41, controlling the candidate server to send a file copy request carrying the source shared directory to the source server, wherein the file copy request is used to control the source server to segment the target file according to the load of the processor on the source server to obtain multiple file fragments and fragment information, and sequentially transmit the multiple file fragments and the fragment information to the candidate server, wherein the fragment information records the position of each of the multiple file fragments in the target file;

[0081] S42, controlling the candidate server to receive the multiple file segments and the segment information transmitted by the source server, restoring the multiple file segments into the target file according to the segment information, and storing the target file in the destination shared directory.

[0082] Optionally, in this embodiment, Figure 5 This is a flowchart of a file copy between different servers according to an embodiment of the present application. Figure 5As shown, the method of transferring the target file file_X from the source shared directory (path_B_1) on the source server (server Server_B) to the destination shared directory (path_A_1) on the candidate server (server Server_A) may be, but is not limited to, the following: after the server Server_A mounts the source shared directory path_B_1 of the server Server_B, the network file system component controls the server Server_A to send a file copy request carrying the target request identifier (id_1) and the source shared directory (path_B_1) to the server Server_B. After receiving the file copy request, the server Server_B first determines whether the function of compressing transmission according to the processor load is enabled on the server. If it is determined that the function of compressing transmission according to the processor load is not enabled on the server, the server Server_B will first determine whether the function of compressing transmission according to the processor load is enabled on the server. When the transfer function is enabled, the target file file_X is directly sent to the server Server_A. When it is determined that the server has enabled the function of compressing and transmitting according to the processor load, the current processor load parameter of the server is read and compared with the preset processor load threshold (cpu-load-max). When the current processor load parameter is greater than the preset processor load threshold, the target file file_X is directly sent to the server Server_A. When the current processor load parameter is less than or equal to the preset processor load threshold and the size of the target file file_X is greater than the preset file size threshold (fileminsize), the target file file_X is segmented according to the internal processor load and the segmented files are then transmitted to the server Server_A.

[0083] Optionally, in this embodiment, assuming that the preset processor load threshold cpu-load-max is 90%, the preset file size threshold fileminsize is 1GB, and the target file file_X is 4GB in size and needs to be copied from server server_B to server server_A, server server_B, upon receiving the file copy request from server server_A, first evaluates its current processor load parameter, which is 80%. This means that it determines that the current processor load parameter (80%) is less than the preset processor load threshold (90%) and the size of the target file file_X (4GB) is greater than the preset file size threshold (1GB). Therefore, it determines that a segmentation operation is required for the target file file_X. Assume that, based on the load evaluation results, server server_B decides to segment file_X into four equal-sized file segments, each of 1GB in size, and generates segment information for each file segment. The segment information may include, but is not limited to, the starting and ending positions of the segment in the target file file_X. For example: Fragment 1: Position 0-1GB, Fragment 2: Position 1GB-2GB, Fragment 3: Position 2GB-3GB, Fragment 4: Position 3GB-4GB, and then these four file fragments and the corresponding fragment information are transmitted to the server Server_A in sequence through the network.

[0084] Optionally, in this embodiment, the fragment information also includes a hash value corresponding to each file fragment, and the hash values ​​of file fragments recording the same data are the same. The way in which the server Server_B transmits file fragments to the server Server_A can also be: among multiple file fragments with the same hash value, only one file fragment is selected for transmission.

[0085] Optionally, in this embodiment, after receiving multiple file segments and segment information transmitted by server_B, server_A can restore the multiple file segments into target file file_A according to the segment information, and store the target file file_A in the destination shared directory path_A_1.

[0086] As an optional solution, when the multiple file fragments include N file fragments, the source server is configured to sequentially transmit the multiple file fragments and the fragment information to the candidate server through the following steps, where N is an integer greater than 1:

[0087] S51, generating a transmission message for each of the N file segments to obtain N transmission messages, wherein the i-th transmission message of the N transmission messages comprises: an i-th segment identifier corresponding to the i-th file segment, an i-th segment offset position, an i-th segment data length, i-th segment file data, an i-th associated segment offset position, an i-th target file identifier, and an i-th transmission end identifier, the i-th segment identifier is an identifier of the i-th file segment, the i-th segment offset position is used to indicate an offset position of the i-th file segment in the target file, the i-th segment data length is a data length of the i-th file segment, the i-th segment file data records data of the i-th file segment, the i-th associated segment offset position records an offset position of another associated file segment in the target file which has the same i-th segment file data as the i-th file segment in the target file, the i-th target file identifier is an identifier of the target file, and the i-th transmission end identifier is used to indicate whether the i-th transmission message is the last transmission message;

[0088] S52, sequentially transmitting the N transmission messages to the candidate server;

[0089] S53, the candidate server is configured to restore the plurality of file segments to the target file according to the segment information by the following steps:

[0090] S54, receiving the N transmission messages;

[0091] S55, splicing the N transmission messages according to the segment identifier, the segment offset position, the segment data length, the segment file data, the associated segment offset position, the target file identifier, and the transmission end identifier in each of the N transmission messages to obtain the target file.

[0092] Optionally, in the embodiment, in the case that the target file file_A is divided into N file segments, the way of generating the segment information corresponding to the N file segments can be, but is not limited to, as follows: assuming that the target file file_A is divided into four file segments file_A_1-4, a transmission message is generated for each of the four file segments to obtain four transmission messages, Figure 6 is a schematic diagram of a transmission message according to an embodiment of the present application, as Figure 6As shown, for the third file fragment file_A_3, the transmission message packet_3 can be generated according to the following parameters: fragment identifier (file_A_3 identifier, i.e. "file_A_3"), offset position (offset position of file_A_3 in the target file file_x, i.e. 3GB), data length (data length of file_A_3, i.e. 1GB), file data (data recorded in file_A_3, i.e. data recorded in the range of 2GB from the starting position to 3GB from the end position in the target file file_X), associated fragment offset position (which can be an offset position linked list, recording the target file The data includes the offset positions of other associated file fragments in file_X that record the same data as file_A_3 (assuming that the data recorded in file_A_1 is the same as that recorded in file_A_3, the record is 0GB), the target file identifier (the identifier of the target file file_X, that is, "file_X"), and the transfer end identifier (indicating whether the file fragment is the last file fragment, the indication method can use "1" to indicate that the file fragment is the last file fragment, and "0" to indicate that the file fragment is not the last file fragment. Since file_A_3 is not the last file fragment, this parameter is 0).

[0093] Optionally, in this embodiment, the server Server_A may restore the multiple file segments (file_A_1 to 4) to the target file file_X according to the segment information in the following manner, but is not limited to:

[0094] Step 1: Receive the transmission message. Server_A receives the transmission messages packet_1 to packet_4 from Server_B.

[0095] Step 2: Parse the transmission message. Parse the fragment identifier, fragment offset position, fragment data length, fragment file data, associated fragment offset position, target file identifier and transmission end identifier in each transmission message of all transmission messages;

[0096] Step 3: Create a target file. Create an empty candidate target file file_T in the destination shared directory path_A_1. Its size is the sum of the lengths of the fragment data in all transmitted packets.

[0097] Step 4: Formulate a splicing strategy. According to the associated fragment offset position in each transmission packet, formulate a splicing strategy, which can instruct Server_B to send specific fragments and avoid sending file fragments recording the same data repeatedly. For example, for file fragments file_A_1~4, file_A_1 and file_A_3 record the same data, and the splicing strategy can instruct Server_B to send only file_A_1, file_A_2 and file_A_4, so as to complete the recovery of file_X;

[0098] Step 5: Receive file fragments and write into a candidate target file. Receive file_A_1, file_A_2 and file_A_4 instructed by the splicing strategy from Server_B, and write them into a candidate target file file_T according to the fragment offset position and the associated fragment offset position. For example, when file_A_1 is received, write the data recorded by file_A_1 into file_T at 0GB according to the fragment offset position, and write the data recorded by file_A_1 into file_T at 3GB according to the associated fragment offset position (since file_A_1 and file_A_3 record the same data, the associated fragment offset position in the transmission packet packet_1 corresponding to file_A_1 is recorded as the fragment offset position of file_A_3, i.e. 3GB);

[0099] Step 6: Verify whether the candidate target file is recovered. After Server_A writes all file fragments instructed by the splicing strategy into the candidate target file file_T, it can verify whether file_T is completely consistent with file_X by comparing the data length of file_T with the data length of file_X.

[0100] Through the above file transmission method, the amount of repeated data transmission can be effectively reduced, and the efficiency of file transmission can be improved.

[0101] As an optional solution, before the control of mounting the source shared directory on the source server side to obtain a candidate server, the method further comprises:

[0102] S61: Detect whether the file data amount of the target file is greater than a data amount threshold value;

[0103] S62: In the case where it is detected that the file data amount is greater than or equal to the data amount threshold value, control the destination server to mount the source shared directory on the source server side to obtain a candidate server;

[0104] S63: When it is detected that the file data volume is less than the data volume threshold, the target file is obtained from the source shared directory currently mounted by the client, and the target file is transferred to the destination shared directory currently mounted by the client.

[0105] Optionally, in this embodiment, Figure 7 FIG. 1 is a schematic diagram of executing corresponding decisions based on target file size in a file transfer control method according to an embodiment of the present application, such as Figure 7 As shown, after the network file system component receives a file transfer request initiated by an application and determines that the server-side copy function is enabled on the client, it detects whether the file size of the target file file_X is greater than or equal to a preset file size threshold (fileminsize). When it is detected that the size of the target file file_X is greater than or equal to the preset file size threshold (fileminsize), it controls the source shared directory path_B_1 on the destination server Server_A to obtain a candidate server; when it is detected that the size of the target file file_X is less than the preset file size threshold (fileminsize), it performs regular file copy, obtains the target file file_X from the source shared directory path_B_1 currently mounted on the client, and transfers file_X to the destination shared directory path_A_1 currently mounted on the client.

[0106] As an optional solution, after receiving the file transfer request initiated by the application, the method further includes:

[0107] S71, when the source shared directory and the destination shared directory both belong to the same reference server, generating an internal copy request for the target file, wherein the internal copy request is used to control the reference server to directly copy the target file from the source shared directory to the destination shared directory internally, and return the transfer result of the target file;

[0108] S72, sending the internal copy request to the reference server;

[0109] S73, receiving the target transmission result returned by the reference server, and sending the target transmission result to the application.

[0110] Optionally, in this embodiment, Figure 8 Flowchart of a method for controlling file transmission in a server according to an embodiment of the present application. Figure 8As shown, after the network file system component receives the file transfer request initiated by the application, the steps executed when the source shared directory and the destination shared directory belong to the same reference server Server_A can include but are not limited to the following: first, generating an internal copy request for the target file file_X, wherein the internal copy request can control the reference server Server_A to directly copy the target file file_X from the source shared directory to the destination shared directory internally, and return the transfer result of the target file file_X, the internal copy request can include but is not limited to the source shared directory, the destination shared directory, and any necessary permissions or authentication information; then, sending the internal copy request to the reference server Server_A; receiving the target transfer result returned by the reference server Server_A, and sending the target transfer result to the application on the client.

[0111] Optionally, in the embodiment, as shown in Figure 8 As shown, after the reference server Server_A receives the internal copy request, the operations executed by the reference server Server_A can include but are not limited to the following: sending a response message to the client, the response message can indicate the status of the file transfer executed by the current reference server Server_A, including: not started, copying, copying completed, failed, etc.; the client updates the execution of this server copy request to the server copy table (Dcopytable) according to the response message, when the status of the file transfer indicates that the target file copy is completed, the file transfer is ended, if the status of the file transfer indicates that the target file copy fails, the normal file copy operation is executed, Figure 9 is a schematic diagram of a server copy table component according to an embodiment of the present application, as shown in Figure 9 As shown, each item in the server copy table corresponds to the execution of a server copy request, each item contains target request identification Dcopyid, source server IP, source shared directory, destination server IP, destination shared directory, and status.

[0112] Optionally, in the embodiment, in order to better understand the process of the above-mentioned file transfer control method, the following will describe the file transfer control method flow in combination with the optional embodiment, but not used to limit the technical solutions of the embodiments of the present application.

[0113] In the embodiment, a file transfer control method is provided, mainly including the following steps:

[0114] As shown in Figure 7As shown, the application program on the client initiates a file transfer request, which indicates that the file file_X under path_B_1 in the server Server_B needs to be copied to path_A_1 in Server_A. The network file system component on the client checks whether the server replication function is enabled on the client according to the configuration parameters. If not, or if the size of the file to be copied is smaller than the set file size threshold (fileminsize), a regular file copy operation is performed. If the server replication function is enabled and the file size meets the requirement, the client network file system component calculates a unique target request identifier Dcopyid according to the source server to which the two shared directories (the source shared directory and the destination shared directory) belong, the source shared directory, the destination shared directory, and the current time. Then, the client constructs a server replication request containing the address of the server Server_B, the address of the server Server_A, the source shared directory path_B_1, the destination shared directory path_A_1, the mounting parameters, and the target request identifier Dcopyid, and sends the server replication request to the server Server_A.

[0115] As shown in Figure 8 After receiving the server replication request, the server Server_A checks whether the source shared directory and the destination shared file of the target file are both in the server. If both the source shared directory and the destination shared file of the target file are in the server, the server Server_A sends a response message containing the Dcopyid and the execution status of the server replication request to the client. After receiving the response message, the client updates the execution status of the server replication request to the server replication table (Dcopytable). Specifically, when the server Server_A copies the file in the server, the server Server_A sends a response message corresponding to the "copying" status to the client, and the client updates the status in the server replication table to "copying". After completing the file copy, the server Server_A sends a response message corresponding to the "complete" status to the client, and the client updates the status in the server replication table to "copying complete". If the copy fails, the server Server_A sends a response message corresponding to the "failure" status to the client, the client updates the status in the server replication table to "failure", and ends the server replication.

[0116] Figure 10 is a schematic diagram of a control method for file transfer between different servers according to an embodiment of the present application, as shown in Figure 10As shown, if the source shared directory where the target file resides isn't on server_A but on another server, Server_B, Server_A sends a response message to the client containing Dcopyid and the execution status of the server copy request. Upon receiving this message, the client sends a server copy request to Server_B. Upon receiving the server copy request, Server_B checks whether the server copy feature is enabled. If so, it sends a "Server copy request established successfully" response message to the client. If not, it sends a "Server copy request established failed" response message to the client. Based on Server_B's response, if it receives a "Server copy request established successfully" response, the client sends a request to continue to Server_A. If it receives a "Server copy request established failed" response, it sends a request completion message to Server_A and updates the status information in the server copy table to "failed," ending the file copy.

[0117] After receiving the message requesting to continue, the server Server_A will try to mount the source shared directory of the server Server_B to this server according to the mount parameters, and copy the files. During the copying process, a response message corresponding to the "copying" status will be sent to the client, and the client will update the status in the server-side replication table to "copying". After the file copy is completed, the server Server_A sends a response message corresponding to the "completed" status to the client, and the client updates the status in the server-side replication table to "copy completed", and ends the copy. If the mount fails or the copy fails, the server Server_A will send a response message corresponding to the "failed" status to the client, and the client will update the status in the server-side replication table to "failed" and unmount the source shared directory. If all server-side copy steps fail, the client will perform regular file copy operations.

[0118] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0119] This embodiment also provides a file transfer control device for implementing the above-mentioned embodiments and preferred implementations. Details already described will not be repeated here. As used below, the term "module" may refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.

[0120] Figure 11 is a structural block diagram of a file transmission control device according to an embodiment of the present application; Figure 11 As shown, the network file system includes: a client and a server, wherein an application and a network file system component are running on the client, the client mounts a shared directory on the server, and the network file system component is used to provide the application with access to files on the server through the shared directory. The device is applied to the network file system component and includes:

[0121] A first receiving module 1102 is configured to receive a file transfer request initiated by the application, wherein the file transfer request is used to request that a target file in a source shared directory mounted by the client be transferred to a destination shared directory mounted by the client;

[0122] A first control module 1104 is configured to, when the source shared directory belongs to the source server and the destination shared directory belongs to the destination server, control the destination server to mount the source shared directory on the source server to obtain a candidate server;

[0123] The second receiving module 1106 is configured to control the source server and the candidate server to transfer the target file from the source shared directory on the source server to the destination shared directory on the candidate server, and control the candidate server to return a transfer result of the target file;

[0124] The second control module 1108 is configured to receive the target transmission result returned by the destination server and send the target transmission result to the application.

[0125] In an exemplary embodiment, the first control module includes:

[0126] a first control unit, configured to control the destination server to extract mount parameters corresponding to the source shared directory from a server-side copy request, wherein the server-side copy request is used to request the destination server to transfer a target file under the source shared directory mounted by the client to the destination shared directory mounted by the client, and the mount parameters are parameters required for mounting the source shared directory;

[0127] The second control unit is configured to control the destination server to mount the source shared directory on the source server according to the mount parameters to obtain the candidate server.

[0128] In an exemplary embodiment, the apparatus further comprises:

[0129] A first generating module is configured to generate a target request identifier according to a source server address of the source server, a destination server address of the destination server, the source shared directory, the destination shared directory, and the current time before controlling the destination server to extract the mount parameters corresponding to the source shared directory from the server copy request;

[0130] A construction module, configured to construct the server copy request according to the source server address of the source server, the destination server address of the destination server, the source shared directory, the destination shared directory, the mount parameters, and the target request identifier;

[0131] The first sending module is used to send the server copy request to the destination server.

[0132] In an exemplary embodiment, the second receiving module includes:

[0133] a third control unit, configured to control the candidate server to send a file copy request carrying the source shared directory to the source server, wherein the file copy request is used to control the source server to segment the target file according to a load of a processor on the source server to obtain a plurality of file fragments and fragment information, and transmit the plurality of file fragments and the fragment information to the candidate server in sequence, wherein the fragment information records a position of each of the plurality of file fragments in the target file;

[0134] A fourth control unit is used to control the candidate server to receive the multiple file fragments and the fragment information transmitted by the source server, restore the multiple file fragments into the target file according to the fragment information, and store the target file in the destination shared directory.

[0135] In an exemplary embodiment, when the plurality of file fragments include N file fragments, where N is an integer greater than 1, the third control unit is further configured to:

[0136] Generate a transmission message for each of the N file fragments to obtain N transmission messages, wherein the i-th transmission message among the N transmission messages includes: an i-th fragment identifier, an i-th fragment offset position, an i-th fragment data length, an i-th fragment file data, an i-th associated fragment offset position, an i-th target file identifier, and an i-th transmission end identifier corresponding to the i-th file fragment, wherein the i-th fragment identifier is an identifier of the i-th file fragment, the i-th fragment offset position is used to indicate the offset position of the i-th file fragment in the target file, the i-th fragment data length is the data length of the i-th file fragment, the i-th fragment file data records the data of the i-th file fragment, the i-th associated fragment offset position records the offset positions of other associated file fragments in the target file that are identical to the i-th fragment file data, the i-th target file identifier is an identifier of the target file, and the i-th transmission end identifier is used to indicate whether the i-th transmission message is the last transmission message;

[0137] Transmitting N transmission messages to the candidate server in sequence;

[0138] The candidate server is configured to restore the plurality of file segments into the target file according to the segment information through the following steps:

[0139] Receiving N transmission messages;

[0140] The N transmission messages are spliced ​​according to the fragment identifier, fragment offset position, fragment data length, fragment file data, associated fragment offset position, the target file identifier and transmission end identifier in each of the N transmission messages to obtain the target file.

[0141] In an exemplary embodiment, the apparatus further comprises:

[0142] A detection module, configured to detect whether the file data volume of the target file is greater than a data volume threshold before controlling the destination server to mount the source shared directory on the source server and obtaining a candidate server;

[0143] A third control module is configured to control the destination server to mount the source shared directory on the source server to obtain a candidate server when detecting that the file data volume is greater than or equal to the data volume threshold;

[0144] The acquisition module is used to acquire the target file from the source shared directory currently mounted by the client and transfer the target file to the destination shared directory currently mounted by the client when detecting that the file data volume is less than the data volume threshold.

[0145] In an exemplary embodiment, the apparatus further comprises:

[0146] a second generating module, configured to, after receiving the file transfer request initiated by the application, generate an internal copy request for the target file if both the source shared directory and the destination shared directory belong to the same reference server, wherein the internal copy request is used to control the reference server to directly copy the target file from the source shared directory to the destination shared directory internally, and return a transfer result of the target file;

[0147] A second sending module, configured to send the internal copy request to the reference server;

[0148] The third receiving module is configured to receive the target transmission result returned by the reference server and send the target transmission result to the application.

[0149] It should be noted that the above modules can be implemented through software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0150] An embodiment of the present application further provides a computer program product, comprising a computer program, which, when executed by a processor, implements the steps of the method described in each embodiment of the present application; the computer program product further comprises a non-volatile computer-readable storage medium, which stores the computer program, which, when executed by a processor, implements the steps of the method described in each embodiment of the present application.

[0151] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps of any of the above method embodiments when run.

[0152] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.

[0153] An embodiment of the present application further provides an electronic device, Figure 12 is a schematic diagram of an electronic device according to an embodiment of the present application, such as Figure 12As shown, the electronic device comprises a memory in which a computer program is stored, and a processor configured to execute the computer program to perform the steps in any of the method embodiments described above.

[0154] In one exemplary embodiment, the electronic device described above can further comprise a transmission device connected to the processor, and an input / output device connected to the processor.

[0155] The specific examples in the embodiments can refer to the examples described in the above embodiments and exemplary implementation manners, which will not be described herein again.

[0156] Obviously, those skilled in the art should understand that the modules or steps of the present application described above can be realized by general computing devices, which can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, which can be realized by program codes executable by the computing devices, so that they can be stored in storage devices and executed by the computing devices, and in some cases, the steps shown or described can be executed in different order, or they can be manufactured into individual integrated circuit modules, or multiple modules or steps can be manufactured into a single integrated circuit module. Thus, the present application is not limited to any specific combination of hardware and software.

[0157] The above only describes the preferred embodiments of the present application and is not intended to limit the present application. Those skilled in the art can make various modifications and changes to the present application. Any modification, equivalent replacement, improvement, etc. within the principles of the present application shall be included in the protection scope of the present application.

Claims

1. A method for controlling file transmission, characterized in that: A network file system includes: a client and a server. An application and a network file system component are running on the client. The client mounts a shared directory on the server. The network file system component is used to provide the application with access to files on the server through the shared directory. The method is applied to the network file system component and includes: receiving a file transfer request initiated by the application, wherein the file transfer request is used to request to transfer a target file in a source shared directory mounted by the client to a destination shared directory mounted by the client; When the source shared directory belongs to the source server and the destination shared directory belongs to the destination server, controlling the destination server to mount the source shared directory on the source server to obtain a candidate server; Control the source server and the candidate server to transfer the target file from the source shared directory on the source server to the destination shared directory on the candidate server, and control the candidate server to return a transfer result of the target file; receiving a target transmission result returned by the destination server, and sending the target transmission result to the application; Among them, the controlling the destination server to mount the source shared directory on the source server to obtain the candidate server includes: controlling the destination server to extract the mount parameters corresponding to the source shared directory from the server copy request, wherein the server copy request is used to request the destination server to transfer the target file under the source shared directory mounted by the client to the destination shared directory mounted by the client, and the mount parameters are parameters required to mount the source shared directory; controlling the destination server to mount the source shared directory on the source server according to the mount parameters to obtain the candidate server.

2. The method according to claim 1, characterized in that Before controlling the destination server to extract the mount parameter corresponding to the source shared directory from the server copy request, the method further includes: Generate a target request identifier according to the source server address of the source server, the destination server address of the destination server, the source shared directory, the destination shared directory and the current time; Constructing the server copy request according to the source server address of the source server, the destination server address of the destination server, the source shared directory, the destination shared directory, the mount parameters and the target request identifier; Send the server copy request to the destination server.

3. The method according to claim 1, characterized in that The controlling the source server and the candidate server to transfer the target file from the source shared directory on the source server to the destination shared directory on the candidate server includes: Controlling the candidate server to send a file copy request carrying the source shared directory to the source server, wherein the file copy request is used to control the source server to segment the target file according to the load of the processor on the source server to obtain multiple file fragments and fragment information, and sequentially transmitting the multiple file fragments and the fragment information to the candidate server, wherein the fragment information records the position of each of the multiple file fragments in the target file; The candidate server is controlled to receive the multiple file fragments and the fragment information transmitted by the source server, restore the multiple file fragments into the target file according to the fragment information, and store the target file in the destination shared directory.

4. The method according to claim 3, characterized in that In a case where the plurality of file segments include N file segments, the source server is configured to sequentially transmit the plurality of file segments and the segment information to the candidate server through the following steps, where N is an integer greater than 1: Generate a transmission message for each of the N file fragments to obtain N transmission messages, wherein the i-th transmission message among the N transmission messages includes: an i-th fragment identifier, an i-th fragment offset position, an i-th fragment data length, an i-th fragment file data, an i-th associated fragment offset position, an i-th target file identifier, and an i-th transmission end identifier corresponding to the i-th file fragment, wherein the i-th fragment identifier is an identifier of the i-th file fragment, the i-th fragment offset position is used to indicate the offset position of the i-th file fragment in the target file, the i-th fragment data length is the data length of the i-th file fragment, the i-th fragment file data records the data of the i-th file fragment, the i-th associated fragment offset position records the offset positions of other associated file fragments in the target file that are identical to the i-th fragment file data, the i-th target file identifier is an identifier of the target file, and the i-th transmission end identifier is used to indicate whether the i-th transmission message is the last transmission message; Transmitting N transmission messages to the candidate server in sequence; The candidate server is configured to restore the plurality of file segments into the target file according to the segment information through the following steps: Receiving N transmission messages; The N transmission messages are spliced ​​according to the fragment identifier, fragment offset position, fragment data length, fragment file data, associated fragment offset position, the target file identifier and transmission end identifier in each of the N transmission messages to obtain the target file.

5. The method according to claim 1, wherein Before controlling the destination server to mount the source shared directory on the source server to obtain a candidate server, the method further includes: Detecting whether the file data volume of the target file is greater than a data volume threshold; When it is detected that the file data volume is greater than or equal to the data volume threshold, controlling the destination server to mount the source shared directory on the source server to obtain a candidate server; When it is detected that the file data volume is less than the data volume threshold, the target file is obtained from the source shared directory currently mounted by the client, and the target file is transferred to the destination shared directory currently mounted by the client.

6. The method according to claim 1, characterized in that After receiving the file transfer request initiated by the application, the method further includes: In a case where the source shared directory and the destination shared directory both belong to the same reference server, generating an internal copy request for the target file, wherein the internal copy request is used to control the reference server to directly copy the target file from the source shared directory to the destination shared directory internally, and return a transfer result of the target file; sending the internal copy request to the reference server; Receive the target transmission result returned by the reference server, and send the target transmission result to the application.

7. A file transfer control device, characterized in that: include: A network file system includes: a client and a server, wherein an application and a network file system component are running on the client, the client mounts a shared directory on the server, and the network file system component is used to provide the application with access to files on the server through the shared directory. The device is applied to the network file system component and includes: A first receiving module is configured to receive a file transfer request initiated by the application, wherein the file transfer request is used to request that a target file in a source shared directory mounted by the client be transferred to a destination shared directory mounted by the client; A first control module is configured to, when the source shared directory belongs to the source server and the destination shared directory belongs to the destination server, control the destination server to mount the source shared directory on the source server to obtain a candidate server; A second receiving module is used to control the source server and the candidate server to transfer the target file from the source shared directory on the source server to the destination shared directory on the candidate server, and control the candidate server to return the transfer result of the target file; A second control module is configured to receive a target transmission result returned by the destination server and send the target transmission result to the application; Among them, the first control module includes: a first control unit, used to control the destination server to extract the mount parameters corresponding to the source shared directory from the server copy request, wherein the server copy request is used to request the destination server to transfer the target file under the source shared directory mounted by the client to the destination shared directory mounted by the client, and the mount parameters are parameters required to mount the source shared directory; a second control unit, used to control the destination server to mount the source shared directory on the source server according to the mount parameters to obtain the candidate server.

8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method according to any one of claims 1 to 6 when executed by a processor.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Mounting method and device of network file system, electronic equipment and storage medium

    CN112162958A

  • Network file system access method and device, storage medium and electronic equipment

    CN117891779A