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

By controlling the destination server to mount the shared directory of the source server in the network file system, forming a candidate server, and directly performing file transfer, the problem of low file transfer efficiency in the existing technology is solved and more efficient file transfer is achieved.

CN119814758AActive Publication Date: 2025-04-11INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In the prior art, when copying files across servers, the network file system is inefficient, resulting in long transmission time, low resource utilization, and additional storage burden and network bandwidth consumption to the client.

Method used

In the network file system, the control server mounts the source shared directory on the source server to form a candidate server, and directly transfers files from the source server and candidate server to avoid files being transferred through the client.

Benefits of technology

It achieves the efficiency of file transfer, reduces the number of network transmissions, reduces the storage and network bandwidth burden of clients, and improves resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119814758A_ABST
    Figure CN119814758A_ABST
Patent Text Reader

Abstract

The invention discloses a file transmission control method and device, a storage medium and electronic equipment. The file transmission control method comprises the steps that a file transmission request initiated by an application program is received; under the condition that the source shared directory belongs to the source server side and the target shared directory belongs to the target server side, controlling the target server side to mount the source shared directory on the source server side to obtain candidate server sides; controlling the source server side and the candidate server side to transmit the target file from a source shared directory on the source server side to a target shared directory on the candidate server side, and controlling the candidate server side to return a transmission result of the target file; and receiving the target transmission result returned by the target server, and sending the target transmission result to the application, by adopting the technical scheme, the problems of low file transmission efficiency in the network file system and the like in related technologies are solved, and the technical effect of improving the file transmission efficiency in the network file system is further 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 computer field, and 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 have become an important infrastructure for data storage and exchange. The efficiency of server-side file replication has a direct impact on the performance of key operations such as data migration, backup, and sharing. Efficient file replication technology can not only significantly reduce data transmission time and improve resource utilization, but is also crucial to ensuring the continuity of key business and the real-time nature of data.

[0003] In the prior art, when a network file system copies files across servers, it usually needs to be transferred through the client. 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 transmissions. When the file is large or the network conditions are poor, it will significantly increase the transmission time and reduce work efficiency. In addition, frequent large file transfers will also bring additional storage burden to the client and increase the consumption of network bandwidth.

[0004] In view of the problems in the related art, such as the low efficiency of file transmission in the network file system, no effective solution has been proposed yet. Summary of the invention

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

[0006] According to an embodiment of the present application, a method for controlling file transmission 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 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, and the method is 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 under 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, control 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 the 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] 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 the 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] 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 the load of the processor on the source server to obtain multiple file fragments and fragment information, and transmit the multiple file fragments and the fragment information to the candidate server in sequence, wherein the fragment information records the position of each of the multiple file fragments in the target file;

[0020] 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.

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

[0022] Generate a transmission message for each of the N file fragments to obtain N transmission messages, wherein the i-th transmission message of the N transmission messages includes: an i-th segment identifier, an i-th segment offset position, an i-th segment data length, an 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 corresponding to the i-th file fragment, the i-th segment identifier is an identifier of the i-th file fragment, the i-th segment offset position is used to indicate the offset position of the i-th file fragment in the target file, the i-th segment data length is the data length of the i-th file fragment, the i-th segment file data records the data of the i-th file fragment, the i-th associated segment offset position records the offset positions of other associated file fragments in the target file that are the same 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] Transmitting the N transmission messages to the candidate server in sequence;

[0024] 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:

[0025] Receiving 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, 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 the 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 the case where the source shared directory and the destination shared directory both belong to the same reference server, an internal copy request is generated 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;

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

[0034] The target transmission result returned by the reference server is received, and the target transmission result is sent to the application.

[0035] According to another embodiment of the 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 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, and the device is applied to the network file system component, including:

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

[0037] A first control module is used for controlling the destination server to mount the source shared directory on the source server to obtain a candidate server when the source shared directory belongs to the source server and the destination shared directory belongs to the destination 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 used to receive the 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 the computer program is executed by a processor to perform the steps in any 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, wherein the computer program is configured to execute the steps of any 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 control scheme for file transfer 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 run 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 respectively, for example, the source shared directory belongs to the source server, and the destination shared directory belongs to the destination server. Different from 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, so that the destination server becomes a candidate server with the ability to access 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. In this process, the destination server can also return the transmission status of the target file to the client in real time. The tester can view these transmission results through the client application. Through the file transfer control method proposed in this application, when the file needs to be transmitted across the server, the file does not need to pass through the client, but can be directly transmitted once between the servers. In this process, the client only needs to transmit the control instruction, and does not involve the reception and uploading of the file, avoiding the problem of low efficiency caused by multiple network transmissions of the file through the client in the related art, thereby improving the efficiency of file transmission. The above technical solution solves the problems of low efficiency of file transmission in the network file system in the related art, and achieves the technical effect of improving the efficiency of file transmission in the network file system. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 It is a hardware structure block diagram of a computer device of 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 It is a schematic diagram of executing corresponding decisions based on the target file size in a file transfer control method according to an embodiment of the present application;

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

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

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

[0054] Fig.11 is a structural block diagram of a file transmission control device according to an embodiment of the present application;

[0055] Fig.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 specification 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 1 is a hardware structure block diagram of a computer device of 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 in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the server device may also include a transmission device 106 and an input / output device 108 for communication functions. It can 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 as shown, or with Figure 1 Different configurations are 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 control method of file transmission 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, to implement the above 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 examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the 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. The specific example of the above network may include a wireless network provided by a communication provider of the server device. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can 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 The present invention is a flowchart of a method for controlling file transmission 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. 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 includes server Server_A and server Server_B. Server Server_A has n storage directories, namely, directories path_A_1, path_A_2, ..., path_A_n, and Server_B has m storage directories, namely, directories path_B_1, path_B_2, ..., path_B_m. Each directory can represent a specific path or network resource location on the server, and can be a directory, such as directory path_A_1 in server Server_A can be directory " / path / to / path_A1 / ", or can be some logical identifier, such as directory path_A_1 can also be a network shared directory (such as \\Server_A\Share\path_A_1). Assuming that server Server_A shares the first storage directory, i.e., shared directory path_A_1 (assuming path_A_1 is " / path / to / path_A1 / "), with client Client_1, the client can access the files under the shared directory " / path / to / path_A1 / " by mounting path_A_1 to the client locally.

[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 under 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: assuming that a user wants to copy file file_X under path_B_1 in server_B to path_A_1 in Server_A, a file transfer request may be initiated in the client's application, and the file transfer request includes a source shared directory mounted by the client (i.e., path_B_1), a target file (i.e., file_X), and a 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, control the destination server to mount the source shared directory on the source server to obtain a candidate server;

[0066] Optionally, in this embodiment, after the network file system component receives the file transfer request initiated by the application, it 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 the server Server_B according to the source shared directory path_B_1 in the file transfer request, and after determining that the destination server is the server Server_A according to the destination shared directory path_A_1 in the file transfer request, controls the server Server_A to mount the source shared directory (path_B_1) on the server Server_B, and determines the server 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 the 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 the 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, control 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 to transfer the target file file_X under the source shared directory path_B_1 mounted by the client 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, control 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 parameter 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, sending the server copy request to the destination server.

[0078] Optionally, in this embodiment, the method of generating the server copy request according to the file transfer request may be, but is not limited to, as follows: Figure 4 is a schematic diagram of components of a server-side replication request according to an embodiment of the present application, such as Figure 4 As shown, first obtain the source server address scr-ip (address of server Server_B) of the source server (server Server_B), the destination server address dst-ip (address of server Server_A) 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 to generate the target request identifier Dcopyid (id_1), where the target request identifier is the unique identifier of the request. Then construct the server copy request according to the address of server Server_B, the address of server 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, and send the server copy request 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 fragments and the fragment information transmitted by the source server, restoring the multiple file fragments into the target file according to the fragment information, and storing the target file in the destination shared directory.

[0082] Optionally, in this embodiment, Figure 5 is a flowchart of a file copy between different servers according to an embodiment of the present application, such as 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, as follows: 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 server has enabled the function of compressing the transmission according to the processor load. If it is determined that the server has not enabled the function of compressing the transmission according to the processor load, When the function of transmission 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 the current processor load parameter is 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 load of its internal processor, 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 size of the target file file_X is 4GB, it needs to be copied from the server end Server_B to the server end Server_A. After receiving the file copy request sent by the server end Server_A, the server end Server_B first evaluates its current processor load parameter 80%, that is, it can be determined 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), and it is determined that the target file file_X needs to be segmented. Assuming that according to the load evaluation result, the server end Server_B decides to divide file_X into 4 file segments of equal size, each segment size is 1GB, and a segment information is generated for each file segment, and the segment information can include but is not limited to the starting position and the ending position 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 corresponding fragment information are transmitted to the server Server_A through the network in sequence.

[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 Server_B, server 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, in the case where 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 fragments to obtain N transmission messages, wherein the i-th transmission message among the N transmission messages includes: an i-th segment identifier, an i-th segment offset position, an i-th segment data length, an 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 corresponding to the i-th file fragment, wherein the i-th segment identifier is an identifier of the i-th file fragment, the i-th segment offset position is used to indicate the offset position of the i-th file fragment in the target file, the i-th segment data length is the data length of the i-th file fragment, the i-th segment file data records the data of the i-th file fragment, the i-th associated segment offset position records the offset positions of other associated file fragments in the target file that are the same 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;

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

[0089] S53, 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:

[0090] S54, receiving N transmission messages;

[0091] S55, splicing the N transmission messages 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.

[0092] Optionally, in this embodiment, when the target file file_A is divided into N file segments, the method of generating segment information corresponding to the N file segments may be but is not limited to: assuming that the target file file_A is divided into 4 file segments, namely file_A_1 to 4, a transmission message is generated for each of the 4 file segments, and 4 transmission messages are generated. Figure 6 is a schematic diagram of components of a transmission message according to an embodiment of the present application, such 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 (the offset position of file_A_3 in the target file file_x, i.e. 3GB), data length (the 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 starting position 2GB to ending position 3GB in the target file file_X), associated fragment offset position (which can be an offset position linked list, recording the target file The data of other associated file fragments in file_X that have the same data as file_A_3 are recorded in file_X. 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, i.e. "file_X") and the transfer end identifier (indicating whether the file fragment is the last file fragment. The indication method can be "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 restores the multiple file segments (file_A_1-4) to the target file file_X according to the segment information in the following manners, but not limited to:

[0094] Step 1: Receive transmission messages. Server_A receives transmission messages packet_1 to 4 transmitted by Server_B in sequence.

[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, whose size is the sum of the lengths of the fragment data in all transmitted messages;

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

[0098] Step 5: Receive file fragments and write them into candidate target files. Receive file_A_1, file_A_2 and file_A_4 indicated by the splicing strategy from Server_B, and write them into the 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, the data recorded in file_A_1 is written into 0GB of file_T according to the fragment offset position 0GB, and at the same time, the data recorded in file_A_1 is written into 3GB of file_T according to the associated fragment offset position 3GB (since the same data is recorded in file_A_1 and file_A_3, the associated fragment offset position in the transmission message 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 restored. After Server_A writes all the file segments indicated by the splicing strategy into the candidate target file file_T, it can verify by comparing the data length of file_T with the data length of the target file file_X to ensure that file_T is completely consistent with file_X.

[0100] Through the above file transfer 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 controlling the destination server to mount the source shared directory on the source server to obtain the candidate server, the method further includes:

[0102] S61, detecting whether the file data volume of the target file is greater than a data volume threshold;

[0103] S62, 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;

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

[0105] Optionally, in this embodiment, Figure 7 is a schematic diagram of executing corresponding decisions based on the 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 the file transfer request initiated by the application and determines that the client has enabled the server-side copy function, it detects whether the file size of the target file file_X is greater than or equal to the 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 and the destination server Server_B 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 copying, obtains the target file file_X from the source shared directory path_B_1 currently mounted by the client, and transfers file_X to the destination shared directory path_A_1 currently mounted by 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 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 replication 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 is a flow chart of a method for controlling file transmission in a server according to an embodiment of the present application, such as Figure 8As shown, after the network file system component receives the file transfer request initiated by the application, the steps performed when it is determined that the source shared directory and the destination shared directory belong to the same reference server Server_A may be but are not limited to: first, an internal copy request is generated 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, and the internal copy request may include but is not limited to: the source shared directory, the destination shared directory and any necessary permissions or authentication information; then, the internal copy request is sent to the reference server Server_A; then, the target transfer result returned by the reference server Server_A is received, and the target transfer result is sent to the application on the client.

[0111] Optionally, in this embodiment, if Figure 8 As shown, the operations performed by the reference server Server_A after receiving the internal copy request may include but are not limited to: sending a response message to the client, the response message may indicate the current status of the reference server Server_A executing the file transfer, including: not started, copying, copy completed, failed, etc.; the client updates the execution status of this server copy request to the server copy table (Dcopytable) according to the response message, and 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, a regular file copy operation is performed. Fig. 9 is a schematic diagram of components of a server-side replication table according to an embodiment of the present application, such as Fig. 9 As shown, each item in the server copy table corresponds to the execution status of a server copy request, and each item includes a target request identifier Dcopyid, a source server IP, a source shared directory, a destination server IP, a destination shared directory, and a status.

[0112] Optionally, in this embodiment, in order to better understand the process of the above-mentioned file transfer control method, the above-mentioned file transfer control method process is described below in combination with an optional embodiment, but it is not used to limit the technical solution of the embodiment of the present application.

[0113] In this embodiment, a method for controlling file transmission is provided, which mainly includes the following steps:

[0114] like Figure 7As shown, a file transfer request is initiated in the client application. When the file transfer request 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 will check whether the server copy function is enabled on the client according to the configuration parameters. If it is not enabled, or the size of the file to be copied is less than the set file size threshold (fileminsize), the regular file copy operation is performed. If the server copy function is enabled and the file size meets the requirements, the client network file system component will calculate a unique target request identifier Dcopyid based on the source server, source shared directory, destination shared directory and current time to which the two shared directories (source shared directory and destination shared directory) belong. Next, the client constructs a server copy request, which includes 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 mount parameters and the target request identifier Dcopyid, and sends the server copy request to the server Server_A.

[0115] like Figure 8 As shown, after receiving the server copy request, the server Server_A will check whether the source shared directory where the target file is located and the destination shared file are both in the server. If the source shared directory where the target file is located and the destination shared file are both in the server, the server Server_A will send a response message containing Dcopyid and the execution status of the server copy request to the client. After receiving the response message, the client will update the execution status of this server copy request to the server copy table (Dcopytable). Specifically, when the server Server_A copies files in the server, it will send a response message corresponding to the "copying" status to the client. The client updates the status in the server copy table to "copying"; after completing the file copy, 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 copy table to "copy completed"; if 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 copy table to "failed", and end this server copy.

[0116] Fig.10 is a schematic diagram of a method for controlling file transmission between different servers according to an embodiment of the present application, such as Fig.10As shown, if the source shared directory where the target file is located is not in the server Server_A, but in another server Server_B, the server Server_A will send a response message containing Dcopyid and the execution status of the server copy request to the client. After receiving the response, the client sends a server copy request to the server Server_B. After receiving the server copy request, the server Server_B will check whether the server copy function is enabled. If it is enabled, it will send a corresponding response message of "Server copy request establishment success" to the client; if the server copy function is not enabled, it will send a corresponding response message of "Server copy request establishment failure" to the client. According to the response of the server Server_B, if the client receives a response of "Server copy request establishment success", it will send a message of request continuation to the server Server_A; if it receives a response of "Server copy request establishment failure", it will send a message of request end to the server Server_A, and update the status information in the server copy table to "failure", and end 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 file. 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's replication table to "copying". After the file is copied, 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's replication table to "copy completed", and ends the copying. 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's replication table to "failed" and unmount the source shared directory. If all server-side copying 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 a necessary general hardware platform, and of course 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 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] In the present embodiment, a control device for file transmission is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0120] Fig.11 is a structural block diagram of a file transmission control device according to an embodiment of the present application; Fig.11 As shown, 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, and the device is applied to the network file system component, including:

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

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

[0123] The second receiving module 1106 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;

[0124] The second control module 1108 is used 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 is 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;

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

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

[0129] A first generating module is used 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, used for 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;

[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 configured 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 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 of the N transmission messages includes: an i-th segment identifier, an i-th segment offset position, an i-th segment data length, an 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 corresponding to the i-th file fragment, the i-th segment identifier is an identifier of the i-th file fragment, the i-th segment offset position is used to indicate the offset position of the i-th file fragment in the target file, the i-th segment data length is the data length of the i-th file fragment, the i-th segment file data records the data of the i-th file fragment, the i-th associated segment offset position records the offset positions of other associated file fragments in the target file that are the same 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;

[0137] Transmitting the 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, 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, used for detecting whether the file data volume of the target file is greater than a data volume threshold before the control of the destination server to mount the source shared directory on the source server to obtain a candidate server;

[0143] A third control module is used to control 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 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 is used for, after receiving the file transfer request initiated by the application, generating an internal copy request for the target file when 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 the transfer result of the target file;

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

[0148] The third receiving module is used 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 by 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 also provides a computer program product, including 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 also includes a non-volatile computer-readable storage medium, which stores the computer program, and 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, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[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, Fig.12 is a schematic diagram of an electronic device according to an embodiment of the present application, such as Fig.12As shown, the electronic device includes a memory and a processor, 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.

[0154] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0155] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.

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

[0157] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made 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: 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, and the method is applied to the network file system component, including: Receiving a file transfer request initiated by the application, wherein the file transfer request is used to request to transfer a target file under 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, control 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 the transfer result of the target file; Receive the target transmission result returned by the destination server, and send the target transmission result to the application.

2. The method according to claim 1, characterized in that The controlling the destination server to mount the source shared directory on the source server to obtain a candidate server includes: 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 the parameters required to mount the source shared directory; 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.

3. The method according to claim 2, 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.

4. 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: 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 the load of the processor on the source server to obtain multiple file fragments and fragment information, and transmit the multiple file fragments and the fragment information to the candidate server in sequence, 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.

5. The method according to claim 4, characterized in that In the 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, wherein 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 of the N transmission messages includes: an i-th segment identifier, an i-th segment offset position, an i-th segment data length, an 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 corresponding to the i-th file fragment, the i-th segment identifier is an identifier of the i-th file fragment, the i-th segment offset position is used to indicate the offset position of the i-th file fragment in the target file, the i-th segment data length is the data length of the i-th file fragment, the i-th segment file data records the data of the i-th file fragment, the i-th associated segment offset position records the offset positions of other associated file fragments in the target file that are the same 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; Transmitting the 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, target file identifier and transmission end identifier in each of the N transmission messages to obtain the target file.

6. The method according to claim 1, characterized in that 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.

7. The method according to claim 1, characterized in that After receiving the file transfer request initiated by the application, the method further includes: In the case where the source shared directory and the destination shared directory both belong to the same reference server, an internal copy request is generated 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; sending the internal replication request to the reference server; The target transmission result returned by the reference server is received, and the target transmission result is sent to the application.

8. A file transfer control device, characterized in that: include: The network file system includes: a client and a server, wherein an application and a network file system component are run 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, and the device is applied to the network file system component, including: A first receiving module is used to receive a file transfer request initiated by the application, wherein the file transfer request is used to request to transfer the target file under the source shared directory mounted by the client to the destination shared directory mounted by the client; a first control module is used to control the destination server to mount the source shared directory on the source server to obtain a candidate server when the source shared directory belongs to the source server and the destination shared directory belongs to the destination 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; The second control module is used to receive the target transmission result returned by the destination server and send the target transmission result to the application.

9. 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 described in any one of claims 1 to 7 when executed by a processor.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method described in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

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

    CN112162958A

  • Method and device for limiting container capacity, electronic equipment and storage medium

    CN114489512A

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

    CN117891779A

  • Multi-shared directory tree-oriented control method and system

    US20230086123A1