A method, device, equipment and medium for distributed file transmission
Through the distributed file transfer method, the task manager allocates and manages the identity, point-to-point split transmission is realized, solving the high requirements for servers and bandwidth of large-scale transmission tasks in the prior art, and improving transmission efficiency and user experience.
Patent Information
- Application Number
- CN201911305142.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-12-17
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2039-12-17
AI Technical Summary
The existing file transfer technology puts high requirements on server and bandwidth when transferring tasks on a large scale, resulting in low server performance, unstable and high maintenance costs.
The distributed file transfer method is adopted, and the sending terminal determines the identification of the files to be sent and the receiving terminal, distributes the files to multiple receiving terminals, and allocates and manages the identification through the task manager to realize point-to-point split transmission.
It effectively reduces dependence on servers and bandwidth, improves file transfer efficiency, reduces maintenance costs of server resources, and improves user experience.
Smart Images

Figure CN111190960B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data transmission, and in particular to a method, device, equipment and medium for distributed file transmission. Background Art
[0002] File transfer is a very common function in our daily life, and this is also true in the visual networking environment. When a large-scale meeting is held in a certain place using a visual networking terminal, sometimes it is necessary to send meeting materials or related files to many recipients. At this time, the file transfer function is needed. The previous technical implementation of the file transfer function: the meeting party first transfers the file to the server, and the recipient then downloads the file from the server to the local. The disadvantage of this transmission method is that when a large number of transmission tasks occur, the test on the server and bandwidth is very large. Many factors such as low server performance, instability, small bandwidth, network fluctuations, etc. will affect the file transfer rate, and the maintenance of the server also requires a lot of costs. Summary of the invention
[0003] In view of the above problems, embodiments of the present invention are proposed to provide a distributed file transmission method, apparatus, device and medium that overcome the above problems or at least partially solve the above problems.
[0004] In a first aspect, in order to solve the above problem, an embodiment of the present invention discloses a distributed file transmission method, which is applied to a sending terminal and includes:
[0005] Determine the file to be sent and the identifiers of the multiple receiving terminals;
[0006] Sending the file to be sent to at least one receiving terminal among the multiple receiving terminals;
[0007] receiving a task request message returned by a target terminal among the at least one terminal, wherein the task request message carries an identifier of the target terminal;
[0008] A file transfer task is sent to the target terminal, wherein the file transfer task carries the identifier of at least one terminal among the multiple receiving terminals except the identifier of the target terminal, so that the target terminal sends the file to be sent to the receiving terminal corresponding to the identifier carried by the file transfer task.
[0009] Preferably, the sending terminal is configured with a task manager, the task manager is internally configured with an identification list, the identification list includes identifications of the multiple receiving terminals respectively; the step of sending the file to be sent to at least one of the multiple receiving terminals comprises:
[0010] Determining the number of paths through which the file to be sent can be sent according to the size of the file to be sent, the hardware information of the sending terminal, and the size of the bandwidth;
[0011] According to the number of routes, the task manager allocates in the identifier list identifiers not exceeding the number of routes; wherein the identifiers are locked by the task manager after being allocated;
[0012] The file to be sent is sent to a receiving terminal corresponding to the identifier according to the identifier.
[0013] Preferably, after the step of causing the target terminal to send the to-be-sent file to a receiving terminal corresponding to the identifier carried by the file transfer task, the method further includes:
[0014] After the target terminal sends the file to be sent to the receiving terminal corresponding to the identifier carried by the file transfer task, a feedback message sent by the target terminal is received; wherein the feedback message includes the identifier of the receiving terminal to which the file to be sent is sent and sending status information, and the sending status information represents status information of success or failure of sending;
[0015] If the sending status information is status information of successful sending, the task manager is enabled to delete the identifier in the identifier list that is the same as the identifier;
[0016] If the sending status information is status information of sending failure, the task manager is enabled to unlock and add a mark to the identifier in the identifier list that is the same as the identifier.
[0017] Preferably, when the task manager allocates identifiers, the priority of the identifiers with the tags added is lower than that of the identifiers without the tags added.
[0018] In a second aspect, in order to solve the above problem, an embodiment of the present invention discloses a distributed file transmission method, characterized in that the method is applied to a receiving terminal, comprising:
[0019] Receive the file to be sent sent by the sending terminal;
[0020] Sending a task request message to the sending terminal, wherein the task request message carries an identifier of the receiving terminal;
[0021] receiving a file transmission task sent by the sending terminal according to the identifier, wherein the file transmission task carries the identifier of at least one terminal among the multiple receiving terminals;
[0022] Sending the to-be-sent file to a terminal corresponding to the identifier according to the at least one terminal;
[0023] A feedback message is sent to the sending terminal, so that the sending terminal deletes or unlocks and then adds a mark to the corresponding identifier in the identifier list according to the feedback message.
[0024] Preferably, the task request message also carries the hardware information and bandwidth size of the receiving terminal, so that the sending terminal allocates an identifier to the receiving terminal according to the size of the file to be sent, the hardware information and the bandwidth size.
[0025] In a third aspect, in order to solve the above problem, an embodiment of the present invention discloses a distributed file transmission device, which is applied to a sending terminal and includes:
[0026] An identification determination module, used to determine the identification of the file to be sent and the identification of each of the multiple receiving terminals;
[0027] A first file sending module, used to send a file to be sent to at least one receiving terminal among the multiple receiving terminals;
[0028] A task request message receiving module, used to receive a task request message returned by a target terminal among the at least one terminal, wherein the task request message carries an identifier of the target terminal;
[0029] A task sending module is used to send a file transfer task to the target terminal, wherein the file transfer task carries the identifier of at least one terminal among the multiple receiving terminals except the identifier of the target terminal, so that the target terminal sends the file to be sent to the receiving terminal corresponding to the identifier carried by the file transfer task.
[0030] Preferably, the sending terminal is configured with a task manager, and the task manager is internally configured with an identification list, and the identification list includes the identifications of the multiple receiving terminals; the first file sending module includes:
[0031] A path determination submodule, used to determine the number of paths that can send the file to be sent according to the size of the file to be sent, the hardware information of the sending terminal and the size of the broadband;
[0032] an identifier allocation submodule, configured to enable the task manager to allocate identifiers in the identifier list not exceeding the number of ...
[0033] The file sending submodule is used to send the file to be sent to a receiving terminal corresponding to the identifier according to the identifier.
[0034] Preferably, the device further comprises:
[0035] A feedback message receiving module, configured to receive a feedback message sent by the target terminal after the target terminal sends the file to be sent to the receiving terminal corresponding to the identifier carried by the file transfer task; wherein the feedback message includes the identifier of the receiving terminal to which the file to be sent is sent and sending status information, wherein the sending status information represents status information of success or failure of sending;
[0036] an identification deletion module, configured to enable the task manager to delete the identification in the identification list that is identical to the identification if the sending status information is the status information of successful sending;
[0037] The tag adding module is used to enable the task manager to unlock and add a tag to the identifier in the identifier list that is the same as the identifier if the sending status information is the status information of sending failure.
[0038] Preferably, when the task manager allocates identifiers, the priority of the identifiers with the tags added is lower than that of the identifiers without the tags added.
[0039] In a fourth aspect, in order to solve the above problem, an embodiment of the present invention discloses a distributed file transmission device, which is applied to a receiving terminal and includes:
[0040] A file receiving module, used for receiving a file to be sent from a sending terminal;
[0041] A task request message receiving module, used for sending a task request message to the sending terminal, wherein the task request message carries an identifier of the receiving terminal;
[0042] A task receiving module, used to receive a file transmission task sent by the sending terminal according to the identifier, wherein the file transmission task carries the identifier of at least one terminal among the multiple receiving terminals;
[0043] A second file sending module, configured to send the to-be-sent file to a terminal corresponding to the identifier of the at least one terminal according to the identifier of the at least one terminal;
[0044] The feedback message sending module is used to send a feedback message to the sending terminal, so that the sending terminal deletes the corresponding identification in the identification list or adds a mark after unlocking it according to the feedback message.
[0045] Preferably, the task request message also carries the hardware information and bandwidth size of the receiving terminal, so that the sending terminal allocates an identifier to the receiving terminal according to the size of the file to be sent, the hardware information and the bandwidth size.
[0046] In a fifth aspect, in order to solve the above-mentioned problem, an embodiment of the present invention discloses a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps in any one of the methods described in the first and second aspects are implemented.
[0047] In the sixth aspect, in order to solve the above-mentioned problem, an embodiment of the present invention discloses an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executed, implements the steps of any of the methods described in the first and second aspects.
[0048] The embodiments of the present invention include the following advantages:
[0049] The present invention determines the scope of sending the file to be sent by determining the respective identifiers of the file to be sent and multiple receiving terminals; sends the file to be sent to at least one receiving terminal among the multiple receiving terminals, receives a task request message returned by a target terminal among the at least one terminal, the task request message carries the identifier of the target terminal, so that the sending terminal can allocate a suitable number of identifiers to the target terminal through the task request message, and fully utilizes the network resources and hardware resources of the target terminal; sends a file transfer task to the target terminal, the file transfer task carries the identifier of at least one terminal among the multiple receiving terminals except the identifier of the target terminal, so that the target terminal sends the file to be sent to the receiving terminal corresponding to the identifier carried by the file transfer task, so that the target terminal is transformed from a file sender to a file transmitter, so that more receiving terminals can send the file to be sent, and the efficiency of file transmission is increased.
[0050] The present invention increases the number of receiving terminals that are converted into file senders in a split manner, so that the task of transmitting the file to be sent can be completed quickly. The distributed file transmission method of the present invention is completely a point-to-point split transmission between terminals, which gets rid of the limitations of servers and bandwidth, greatly improves the file transmission efficiency, enhances the user experience, and reduces the maintenance cost of server resources required for file transmission. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 It is a block diagram of a design scheme of distributed file transmission of the present invention;
[0052] Figure 2 It is a flow chart of steps of a distributed file transmission method of the present invention;
[0053] Figure 3 It is a flow chart of steps of a distributed file transmission method of the present invention;
[0054] Figure 4 It is a flow chart of steps of distributed file transmission of the present invention;
[0055] Figure 5 It is a functional block diagram of a distributed file transmission of the present invention;
[0056] Figure 6 It is a block diagram of a distributed file transmission device of the present invention;
[0057] Figure 7 It is a block diagram of a distributed file transmission device of the present invention. DETAILED DESCRIPTION
[0058] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0059] Reference Figure 1 , the present invention provides a block diagram of a design scheme for distributed file transmission. The details are as follows:
[0060] exist Figure 1 In the present invention, the conference-making terminal is the sending terminal, and the conference-receiving terminal is the receiving terminal. Before transmitting files, the conference-making terminal of the present invention needs to perform a pull-in operation, that is, pull the conference-receiving terminal and the conference-making terminal to which the files are to be transmitted into a network, so that data information can be transmitted between the terminals, and at the same time, the conference-making terminal records the identifiers of the conference-receiving terminals to which the files are to be transmitted in the identifier list of the conference-making terminal through the pull-in operation, and the identifier list is used for the conference-making terminal to subsequently allocate the identifiers in the identifier list to transmit files to the conference-receiving terminals corresponding to these identifiers.
[0061] When the conference-opening terminal sends a file transfer task, it first sends the file to a small number of conference-receiving terminals; when the conference-receiving terminal receives the file, the conference-receiving terminal changes from a file receiver to a file sender, and the conference-receiving terminal continues to send the file to other conference-receiving terminals. In this way, the number of file senders that have been transformed from conference-receiving terminals increases exponentially, so that the file is quickly sent to the conference-receiving terminal corresponding to the identifier recorded in the identifier list, so that the file transfer task can be completed quickly.
[0062] The main problem that the present invention aims to solve through the above-mentioned file transmission method is that when encountering large-scale transmission tasks, the distributed file transmission technology is used to get rid of the limitations of servers and bandwidth, and a large number of terminals are used as file senders to quickly complete the transmission task.
[0063] Reference Figure 2 , the present invention provides a flow chart of steps of a distributed file transmission method. The method is applied to a sending terminal, and is specifically as follows:
[0064] Step 201: Determine the identifiers of the file to be sent and the respective identifiers of multiple receiving terminals.
[0065] In the embodiment of the present invention, the receiving terminal and the sending terminal are input and output devices of a computer system, such as a mobile phone, a computer, a handwriting tablet, a command vehicle, a vehicle-mounted terminal, etc.
[0066] Before sending a file to be sent, the sending terminal needs to select the file to be sent, and also needs to record the identification of each receiving terminal that needs to send the file in the identification list of the sending terminal through a pull-to-join operation.
[0067] In an embodiment of the present invention, the pull-conference operation can be that after the sending terminal establishes a local area network for file transmission, each receiving terminal that joins the network sends its own identification to the sending terminal; or after the network connection between the sending terminal and each receiving terminal is established in the visual network / Internet / other network, the user selects or inputs the receiving terminal to be transmitted in the sending terminal, so that the sending terminal starts to transmit the file to be transmitted to each receiving terminal to be transmitted in a distributed file transmission manner. The present invention does not make specific restrictions on the pull-conference operation method.
[0068] Step 202: Send the file to be sent to at least one receiving terminal among the multiple receiving terminals.
[0069] In the embodiment of the present invention, a task manager is configured in the sending terminal, an identification list is configured inside the task manager, and the identification list includes the identifications of the multiple receiving terminals.
[0070] When starting to send a file to be sent, the sending terminal first sends the file to be sent to a small number of receiving terminals corresponding to the identifiers in the identifier list, so that the receiving terminals that receive the file to be sent are transformed from file receivers to file senders.
[0071] In the embodiment of the present invention, this change of identity enables the sending terminal to no longer need to send files to be sent after successfully sending the files to be sent to a small number of receiving terminals, thereby reducing the bandwidth and device performance burden of the sending terminal. At the same time, by continuously increasing the number of file sending devices, the file transfer task can be completed quickly.
[0072] Step 203: receiving a task request message returned by a target terminal among the at least one terminal, wherein the task request message carries an identifier of the target terminal.
[0073] In an embodiment of the present invention, after the target receiving terminal receives the file to be sent, the target receiving terminal changes from a file receiver to a file sender, so the target receiving terminal sends a task request message to the sending terminal, so that the sending terminal assigns itself a transmission task containing an identifier, which is the identifier of the terminal to which the file to be sent needs to be transmitted.
[0074] After receiving the task request message, the sending terminal will parse the task request message to obtain the target terminal's identifier, hardware information, and broadband size information; the sending terminal determines how many other receiving terminals the target terminal can send the file to be sent to at the same time based on the size of the file to be sent, the hardware information of the receiving terminal, and the broadband size information, that is, the number of routes for sending the file to be sent. The number of routes is used by the task manager of the sending terminal to allocate to the target terminal a number of identifiers that does not exceed the number of routes in the identifier list. In order to improve the utilization rate of the receiving terminal and the rate of file transmission, the present embodiment allows the task manager to allocate to the target terminal a number of identifiers corresponding to the number of routes. Of course, when the target terminal itself needs broadband resources and / or hardware resources, the number of identifiers allocated to the target terminal can also be limited according to actual conditions. The number of identifiers is greater than or equal to 1 and less than or equal to the number of routes.
[0075] Step 204, sending a file transfer task to the target terminal, the file transfer task carrying the identifier of at least one terminal among the multiple receiving terminals except the identifier of the target terminal, so that the target terminal sends the file to be sent to the receiving terminal corresponding to the identifier carried by the file transfer task.
[0076] In an embodiment of the present invention, the sending terminal obtains the identifier of at least one target terminal according to the analysis in the above step 203, and responds to the task request message sent by the target terminal, that is, the sending terminal sends a file transfer task to the target terminal according to the identifier of the target terminal, and the file transfer task carries the terminal identifier assigned by the task manager in the above step 203, and the terminal identifier does not include the identifier of the above target terminal.
[0077] After receiving the transmission task, the target terminal parses the transmission task data and obtains the terminal identifiers assigned by the task manager. The target terminal sends the to-be-sent file to the receiving terminals corresponding to the identifiers according to the terminal identifiers assigned by the task manager, so that the receiving terminals change from file receivers to file senders after receiving the to-be-sent file and continue to send the to-be-sent file to other receiving terminals that need to transmit the to-be-sent file.
[0078] In the above embodiment, the number of receiving terminals that are converted into file senders is increased in a split manner, so that the task of transmitting the file to be sent can be completed quickly. The distributed file transmission method of the present invention is completely a point-to-point split transmission between terminals, which gets rid of the limitations of servers and bandwidth, greatly improves the transmission efficiency of files, enhances user experience, and reduces the maintenance cost of server resources required for file transmission.
[0079] Reference Figure 3, the present invention provides a flow chart of steps of a distributed file transmission method. The method is applied to a receiving terminal, and is specifically as follows:
[0080] Step 301: receiving a file to be sent from a sending terminal.
[0081] In the embodiment of the present invention, after receiving the to-be-sent file sent by the sending terminal, the identity of the receiving terminal changes from the file receiver to the file sender. In the present invention, no matter which identifier in the identification list corresponds to the receiving terminal, as long as there is a to-be-sent file, the receiving terminal can send the to-be-sent file to the terminals corresponding to other identifiers in the identification list.
[0082] Step 302: Send a task request message to the sending terminal, wherein the task request message carries the identifier of the receiving terminal.
[0083] In the embodiment of the present invention, after the receiving terminal successfully receives the file to be sent, the receiving terminal will detect its own hardware information and bandwidth size, and obtain its own hardware information and bandwidth size information. Then the receiving terminal packages its own corresponding identifier and its own hardware information and bandwidth size information into task request message data, and then sends it to the sending terminal. The purpose of the task request message is to enable the sending terminal to assign an identifier to the receiving terminal according to the size of the file to be sent, the hardware information and the bandwidth size.
[0084] Step 303: receiving a file transmission task sent by the sending terminal according to the identifier, wherein the file transmission task carries the identifier of at least one terminal among the multiple receiving terminals.
[0085] In the embodiment of the present invention, the sending terminal sends the identifier assigned by the task manager in the form of a file transfer task to the receiving terminal corresponding to the identifier carried by the task request message in step 302. The number of identifiers assigned by the task manager is determined by the size of the file to be sent, the hardware information, and the bandwidth size.
[0086] Step 304: Send the to-be-sent file to a terminal corresponding to the identifier of the at least one terminal according to the identifier of the at least one terminal.
[0087] In the embodiment of the present invention, after receiving the file transmission task, the receiving terminal first parses the file transmission task to obtain the identifier assigned by the task manager; then, the receiving terminal sends the files to the receiving terminals corresponding to the identifiers one by one according to the identifiers.
[0088] Preferably, the receiving terminal sends the files to be sent one by one to the receiving terminals corresponding to the identifiers according to the identifiers, which may be performed by sending the files to be sent simultaneously through multiple threads, or may be performed by sending the files to be sent sequentially.
[0089] Step 305: Send a feedback message to the sending terminal, so that the sending terminal deletes or unlocks and then adds a mark to the corresponding identifier in the identifier list according to the feedback message.
[0090] In the embodiment of the present invention, after the receiving terminal sends the file to be sent to a terminal, the receiving terminal will send a feedback message including the identifier of the receiving terminal to which the file to be sent is sent and the sending status information to the sending terminal, wherein the sending status information indicates the status information of the sending success or failure.
[0091] After receiving and parsing the sending status information sent by the receiving terminal, the sending terminal obtains the identification and sending status information of the receiving terminal to which the file to be sent is sent; then, based on the sending status information, the sending terminal instructs the task manager to unlock and delete the same identification of the receiving terminal to which the file to be sent is sent that is locked in the identification list, or to add a mark after unlocking it.
[0092] Reference Figure 4 , the present invention provides a flow chart of steps for distributed file transmission. The details are as follows:
[0093] Step 401: The sending terminal determines the file to be sent and the identifiers of multiple receiving terminals.
[0094] Step 402: The sending terminal sends the file to be sent to at least one receiving terminal among the multiple receiving terminals.
[0095] In an embodiment of the present invention, a task manager is configured in the sending terminal, and an identification list is configured inside the task manager, and the identification list includes the identification of each of the multiple receiving terminals; according to the size of the file to be sent, the hardware information of the sending terminal and the broadband size, the number of ways to send the file to be sent is determined; according to the number of ways, the task manager is enabled to allocate identifications in the identification list that do not exceed the number of ways; wherein the identification is locked by the task manager after being allocated; according to the identification, the file to be sent is sent to the receiving terminal corresponding to the identification.
[0096] Specifically, a task manager is configured in the sending terminal, and an identification list is maintained inside the task manager. The identification list includes identifications of the multiple receiving terminals.
[0097] The sending terminal first determines the number of ways in which the sending terminal can send the file to be sent according to its own hardware information, its own bandwidth size information and the size information of the file to be sent;
[0098] Then, the sending terminal sends the above number of routes to the task manager. After receiving the number of routes, the task manager allocates terminal identifiers not exceeding the number of routes in the above identifier list to the sending terminal. At the same time, the task manager locks these allocated identifiers to prevent the same identifier from being allocated repeatedly, causing the terminal corresponding to the repeatedly allocated identifier to repeatedly receive the file to be sent, thereby avoiding the waste of file transmission resources and terminal memory resources.
[0099] Finally, after receiving the above-assigned identifiers, the sending terminal transmits the files to be sent to the receiving terminals corresponding to the identifiers according to the identifiers;
[0100] If, after the sending terminal successfully sends a file to be sent to the above-mentioned receiving terminal, the sending terminal will send the identifier of the receiving terminal to which the file has been successfully sent to the task manager, and after receiving the identifier, the task manager will unlock and delete the identifier from the identifier list to ensure that the remaining identifiers in the identifier list represent that the corresponding receiving terminal has not received or has received the file to be sent;
[0101] If, every time the sending terminal fails to send a file to be sent to one of the above-mentioned receiving terminals, the sending terminal will send the identifier of the receiving terminal where the sending failed to occur to the task manager, and after receiving the identifier, the task manager will unlock the identifier from the identifier list and add a mark, so that the task manager will give priority to allocating the unmarked identifiers in the identifier list before allocating the marked identifiers.
[0102] Preferably, a counter is included in the receiving terminal and the sending terminal. Each time the receiving terminal or the sending terminal fails to send a file to be sent, the counter in the receiving terminal or the sending terminal counts once; if the accumulated number of times of the counter reaches a preset threshold, the sending of the file to be sent is considered to have failed. For example, the receiving terminal or the sending terminal determines that the sending of the file to be sent has failed after the sending of the file to be sent has failed three times; after determining that the sending of the file to be sent has failed, the counter is cleared.
[0103] Step 403: The sending terminal receives a task request message returned by a target terminal among the at least one terminal, wherein the task request message carries an identifier of the target terminal.
[0104] In the embodiment of the present invention, after successfully receiving the file to be sent, the target terminal will send a task request message including the identifier of the target terminal, the hardware information of the target terminal and the bandwidth size information to the sending terminal.
[0105] Step 404: the sending terminal sends the file transfer task to the target terminal.
[0106] In the embodiment of the present invention, the sending terminal first receives the task request message and then parses the task request message to obtain the identification, hardware information and bandwidth size information of the target terminal;
[0107] Next, the sending terminal determines the number of ways through which the target terminal can send the file to be sent according to the size information of the file to be sent, the hardware information of the target terminal, and the bandwidth size information;
[0108] Then, the sending terminal sends the above-mentioned number of routes to the task manager. After receiving the number of routes, the task manager allocates terminal identifiers not exceeding the number of routes in the identifier list to the sending terminal. At the same time, the task manager locks these allocated identifiers to prevent the same identifier from being allocated repeatedly, causing the terminal corresponding to the repeatedly allocated identifier to repeatedly receive the file to be sent, thereby avoiding the waste of file transmission resources and terminal memory resources;
[0109] Finally, after receiving the above-assigned identifiers, the sending terminal packages the identifiers into a file transmission task, and sends the file transmission task to the target terminal according to the identifier of the target terminal.
[0110] Step 405: The target terminal sends the file to be sent to the receiving terminal corresponding to the identifier carried by the file transmission task.
[0111] In the embodiment of the present invention, after the target terminal receives the file transfer task in step 404, the target terminal first parses the file transfer task to obtain the terminal identifier assigned by the task manager in step 404;
[0112] Then, the target terminal sends the files to be sent one by one to the receiving terminals corresponding to the identifiers according to these identifiers.
[0113] Step 406: The target terminal sends a feedback message to the sending terminal.
[0114] In an embodiment of the present invention, after the target terminal sends the file to be sent to the receiving terminal corresponding to the identifier carried by the file transfer task, a feedback message sent by the target terminal is received; wherein the feedback message includes the identifier of the receiving terminal to which the file to be sent is sent and sending status information, and the sending status information represents status information of successful or failed sending; if the sending status information is status information of successful sending, the task manager deletes the identifier in the identifier list that is identical to the identifier; if the sending status information is status information of failed sending, the task manager unlocks and adds a mark to the identifier in the identifier list that is identical to the identifier.
[0115] Specifically, after the target terminal sends a file to be sent to each receiving terminal corresponding to an identifier, it will feed back a feedback message to the sending terminal; wherein the feedback message includes: the identifier of the receiving terminal to which the file to be sent is sent, and the sending status information, the sending status information is the status information representing the success or failure of the sending, and the sending status information is represented by a variable, and the variable has two status information representing the success or failure of the sending. For example, state represents the sending status information, state=0 represents the status information of the successful sending, and state=1 represents the status information of the failed sending.
[0116] After receiving and parsing the sending status information sent by the target terminal, the sending terminal obtains the identification and sending status information of the receiving terminal; then, the sending terminal asks the task manager to unlock and delete the same identification of the receiving terminal in the identification list according to the sending status information, or to add a mark after unlocking. For example, when state = 0, the task manager unlocks and deletes the corresponding identification in the identification list; when state = 1, the task manager unlocks the corresponding identification in the identification list and adds a mark to the identification list.
[0117] Step 407: The sending terminal sends an identifier for adding a mark.
[0118] In the embodiment of the present invention, when the task manager allocates identifiers, the priority of the identifiers added with the mark is lower than that of the identifiers not added with the mark.
[0119] Specifically, after the task manager has assigned the unmarked identifiers, it sends the marked identifiers that do not exceed the number of corresponding routes to the receiving terminal that currently sends the task request message and locks these identifiers. These identifiers are sent to the receiving terminal by the sending terminal in the form of a file transfer task, so that the receiving terminal sends the files to be sent to the receiving terminals corresponding to the identifiers according to these identifiers. After the receiving terminal sends the files to be sent to each receiving terminal, it will send a feedback message to the sending terminal; if the sending status information in the feedback message is the status information of failed sending, the corresponding identifier in the identifier list will not be processed; if the sending status information in the feedback message is the status information of successful sending, the task manager will unlock and delete the identifier corresponding to the status information from the identifier list. Until the files to be sent are sent to the receiving terminals corresponding to all the marked identifiers in the identifier list again, the sending terminal queries the remaining identifiers in the identifier list, and displays these identifier information on the interface of the sending terminal in the form of message notification or pop-up window, so that the user can clearly know which receiving terminals have not received the files to be sent.
[0120] Reference Figure 5 , the present invention provides a functional block diagram of distributed file transmission. The details are as follows:
[0121] In the embodiment of the present invention, a task manager is configured in the terminal of the conference party, and an identifier list of the terminal identifiers of the conference party to which the to-be-sent file needs to be transmitted is maintained inside the task manager.
[0122] First, the terminal of the conference party sends a request task data to the task manager;
[0123] Next, the task manager selects a small number of identifiers from the identifier list and sends the selected identifiers to the conference party terminals, after which the selected identifiers are locked in the identifier list by the task manager;
[0124] Next, the conference-opening terminal sends the files to be sent to the conference-receiving terminals corresponding to these identifiers according to these identifiers. If the conference-opening terminal successfully sends the files to be sent, the task manager will unlock and delete the identifier of the conference-receiving terminal that successfully receives the files to be sent in the identifier list; if the conference-opening terminal fails to send the files to be sent, the task manager will unlock and add a mark to the identifier of the conference-receiving terminal that fails to receive the files to be sent in the identifier list;
[0125] Next, the receiving terminal that successfully receives the file to be sent sends request task data including at least its own identification to the conferencing terminal;
[0126] Next, the terminal of the conference party asks the task manager to allocate the identifiers in the identifier list according to the task request data, wherein the task manager gives priority to the identifiers that are not marked when allocating the identifiers;
[0127] Next, the conferencing terminal sends the assigned identifier to the corresponding conferencing terminal in the form of a task according to the identifier of the conferencing terminal that sent the request task data;
[0128] Next, the receiving terminal sends the to-be-sent file to the receiving terminal corresponding to these identifiers according to these identifiers;
[0129] Finally, through this split method of sending files, when only the marked identifiers are left in the identifier list, the task manager will reallocate the marked identifiers to the receiving terminal that requested the task, allowing the receiving terminal to send the files to be sent to the receiving terminals corresponding to these marked identifiers.
[0130] Beneficial effects of the above embodiments:
[0131] In the embodiment of the present invention, by determining the respective identifiers of the file to be sent and multiple receiving terminals, the scope of sending the file to be sent is determined; by sending the file to be sent to at least one receiving terminal among the multiple receiving terminals, receiving a task request message returned by the target terminal among the at least one terminal, the task request message carries the identifier of the target terminal, so that the sending terminal can allocate a suitable number of identifiers to the target terminal through the task request message, and make full use of the network resources and hardware resources of the target terminal; by sending a file transfer task to the target terminal, the file transfer task carries the identifier of at least one terminal among the multiple receiving terminals except the identifier of the target terminal, so that the target terminal sends the file to be sent to the receiving terminal corresponding to the identifier carried by the file transfer task, so that the target terminal is transformed from a file sender to a file transmitter, so that more receiving terminals can send the file to be sent, and the efficiency of file transmission is increased. The present invention increases the number of receiving terminals that are transformed into file senders by splitting, so that the file transfer task to be sent can be completed quickly. The distributed file transmission method of the present invention is completely point-to-point split transmission between terminals, gets rid of the limitations of servers and bandwidth, greatly improves the transmission efficiency of files, improves user experience, and reduces the maintenance cost of server resources required for file transmission.
[0132] Reference Figure 6 The present invention provides a block diagram of a device for distributed file transmission, which is applied to a sending terminal, and the specific device is as follows:
[0133] The identification determination module 601 is used to determine the identifications of the file to be sent and the multiple receiving terminals.
[0134] The first file sending module 602 is configured to send a file to be sent to at least one receiving terminal among the multiple receiving terminals.
[0135] Preferably, the sending terminal is configured with a task manager, and the task manager is internally configured with an identification list, and the identification list includes the identifications of the multiple receiving terminals; the first file sending module 602 includes the following submodules:
[0136] The number of paths determining submodule 6021 is used to determine the number of paths that can send the file to be sent according to the size of the file to be sent, the hardware information of the sending terminal and the size of the broadband.
[0137] The identifier allocation submodule 6022 is used to enable the task manager to allocate identifiers in the identifier list not exceeding the number of routes according to the number of routes; wherein the identifiers are locked by the task manager after being allocated.
[0138] The file sending submodule 6023 is used to send the file to be sent to a receiving terminal corresponding to the identifier according to the identifier.
[0139] The task request message receiving module 603 is configured to receive a task request message returned by a target terminal among the at least one terminal, wherein the task request message carries an identifier of the target terminal.
[0140] The task sending module 604 is used to send a file transfer task to the target terminal, and the file transfer task carries the identifier of at least one terminal among the multiple receiving terminals except the identifier of the target terminal, so that the target terminal sends the file to be sent to the receiving terminal corresponding to the identifier carried by the file transfer task.
[0141] The feedback message receiving module 605 is used to receive the feedback message sent by the target terminal after the target terminal sends the file to be sent to the receiving terminal corresponding to the identifier carried by the file transfer task; wherein the feedback message includes the identifier of the receiving terminal to which the file to be sent is sent and the sending status information, and the sending status information represents the status information of the success or failure of the sending.
[0142] Optionally, an identifier deletion module 606 is used to enable the task manager to delete the identifier in the identifier list that is the same as the identifier if the sending status information is the status information of successful sending;
[0143] Optionally, a tag adding module 607 is used to enable the task manager to unlock and add a tag to the same identifier in the identifier list if the sending status information is a sending failure status information. The marked identifier has a lower priority than the unmarked identifier when the task manager allocates identifiers.
[0144] Reference Figure 7 The present invention provides a block diagram of a device for distributed file transmission, which is applied to a receiving terminal, and the specific device is as follows:
[0145] The file receiving module 701 is used to receive the file to be sent from the sending terminal;
[0146] The task request message receiving module 702 is used to send a task request message to the sending terminal, wherein the task request message carries the identifier of the receiving terminal;
[0147] A task receiving module 703, configured to receive a file transmission task sent by the sending terminal according to the identifier, wherein the file transmission task carries the identifier of at least one terminal among the multiple receiving terminals;
[0148] A second file sending module 704, configured to send the to-be-sent file to a terminal corresponding to the identifier of the at least one terminal according to the identifier of the at least one terminal;
[0149] The feedback message sending module 705 is used to send a feedback message to the sending terminal, so that the sending terminal deletes the corresponding identifier in the identifier list or adds a mark after unlocking it according to the feedback message.
[0150] In the device, the task request message also carries the hardware information and bandwidth size of the receiving terminal, so that the sending terminal allocates an identifier to the receiving terminal according to the size of the file to be sent, the hardware information and the bandwidth size.
[0151] Based on the same inventive concept, another embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the method described in any of the above embodiments of the present application.
[0152] Based on the same inventive concept, another embodiment of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executed, implements the steps of the method described in any of the above embodiments of the present application.
[0153] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0154] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0155] It will be appreciated by those skilled in the art that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0156] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0157] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0158] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0159] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0160] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0161] The above is a detailed introduction to the method, device, equipment and medium for distributed file transmission provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A distributed file transmission method, characterized in that: The method is applied to a sending terminal, comprising: Determine the file to be sent and the identifiers of the multiple receiving terminals; Sending the file to be sent to at least one receiving terminal among the multiple receiving terminals; receiving a task request message returned by a target terminal among the at least one terminal, wherein the task request message carries an identifier of the target terminal; Sending a file transfer task to the target terminal, the file transfer task carrying an identifier of at least one terminal among the multiple receiving terminals except the identifier of the target terminal, so that the target terminal sends the file to be sent to the receiving terminal corresponding to the identifier carried by the file transfer task; The sending terminal is configured with a task manager, and the task manager is internally configured with an identification list, and the identification list includes the identifications of the multiple receiving terminals respectively; the step of sending the file to be sent to at least one of the multiple receiving terminals includes: Determining the number of paths through which the file to be sent can be sent according to the size of the file to be sent, the hardware information of the sending terminal, and the size of the bandwidth; According to the number of routes, the task manager allocates in the identifier list identifiers not exceeding the number of routes; wherein the identifiers are locked by the task manager after being allocated; The file to be sent is sent to a receiving terminal corresponding to the identifier according to the identifier.
2. The method according to claim 1, characterized in that After the step of causing the target terminal to send the file to be sent to the receiving terminal corresponding to the identifier carried by the file transmission task, the method further includes: After the target terminal sends the file to be sent to the receiving terminal corresponding to the identifier carried by the file transfer task, a feedback message sent by the target terminal is received; wherein the feedback message includes the identifier of the receiving terminal to which the file to be sent is sent and sending status information, and the sending status information represents status information of success or failure of sending; If the sending status information is status information of successful sending, the task manager is enabled to delete the identifier in the identifier list that is identical to the identifier; If the sending status information is status information of sending failure, the task manager is enabled to unlock and add a mark to the identifier in the identifier list that is the same as the identifier.
3. The method according to claim 2, characterized in that When the task manager allocates identifiers, the identifiers that are marked have a lower priority than the identifiers that are not marked.
4. A distributed file transmission method, characterized in that: The method is applied to a receiving terminal, comprising: At least one receiving terminal among the multiple receiving terminals receives the to-be-sent file sent by the sending terminal; A target terminal among the at least one receiving terminal sends a task request message to the sending terminal, wherein the task request message carries an identifier of the target terminal; The target terminal receives a file transfer task sent by the sending terminal according to the identifier of the target terminal, the file transfer task carries the identifier of at least one terminal among multiple receiving terminals except the representation of the target terminal; the identifier is allocated by a task manager configured in the sending terminal according to the number of paths in an identifier list, not exceeding the number of paths; the number of paths is determined by the sending terminal according to the size of the file to be sent, the hardware information of the sending terminal and the bandwidth size; the identifier list is configured in the task manager, and the identifier list includes the identifiers of the multiple receiving terminals respectively; Sending the to-be-sent file to a terminal corresponding to the identifier according to the at least one terminal; A feedback message is sent to the sending terminal, so that the sending terminal deletes or unlocks and then adds a mark to the corresponding identifier in the identifier list according to the feedback message.
5. The method according to claim 4, characterized in that The task request message also carries the hardware information and bandwidth size of the receiving terminal, so that the sending terminal allocates an identifier to the receiving terminal according to the size of the file to be sent, the hardware information and the bandwidth size.
6. A distributed file transmission device, characterized in that: The device is applied to a sending terminal, and includes: An identification determination module, used to determine the identification of the file to be sent and the identification of each of the multiple receiving terminals; A first file sending module, used to send a file to be sent to at least one receiving terminal among the multiple receiving terminals; A task request message receiving module, used to receive a task request message returned by a target terminal among the at least one terminal, wherein the task request message carries an identifier of the target terminal; a task sending module, configured to send a file transfer task to the target terminal, wherein the file transfer task carries an identifier of at least one terminal among the multiple receiving terminals except the identifier of the target terminal, so that the target terminal sends the file to be sent to the receiving terminal corresponding to the identifier carried by the file transfer task; The sending terminal is configured with a task manager, and the task manager is internally configured with an identification list, and the identification list includes the identifications of the multiple receiving terminals; the first file sending module includes: A path determination submodule, used to determine the number of paths that can send the file to be sent according to the size of the file to be sent, the hardware information of the sending terminal and the size of the broadband; an identifier allocation submodule, configured to enable the task manager to allocate identifiers in the identifier list not exceeding the number of ... The file sending submodule is used to send the file to be sent to a receiving terminal corresponding to the identifier according to the identifier.
7. A distributed file transmission device, characterized in that: The device is applied to a receiving terminal, and includes: A file receiving module, used for at least one receiving terminal among the multiple receiving terminals to receive a file to be sent sent by the sending terminal; A task request message receiving module, configured for a target terminal in the at least one receiving terminal to send a task request message to the sending terminal, wherein the task request message carries an identifier of the target terminal; A task receiving module, configured for the target terminal to receive a file transfer task sent by the sending terminal according to the identifier of the target terminal, wherein the file transfer task carries the identifier of at least one terminal among multiple receiving terminals except the representation of the target terminal; A second file sending module is configured to send the file to be sent to a terminal corresponding to the identifier of the at least one terminal according to the identifier of the at least one terminal; the identifier is allocated by a task manager configured in the sending terminal according to the number of paths in an identifier list, and the number of paths does not exceed the number of paths; the number of paths is determined by the sending terminal according to the size of the file to be sent, the hardware information of the sending terminal, and the bandwidth size; the identifier list is configured in the task manager, and the identifier list includes the identifiers of the multiple receiving terminals respectively; The feedback message sending module is used to send a feedback message to the sending terminal, so that the sending terminal deletes the corresponding identification in the identification list or adds a mark after unlocking it according to the feedback message.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps in any one of the methods according to claims 1 to 5 are implemented.
9. 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 executed, the processor implements the steps of the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
File transmission method and device, and mobile terminal
CN106210065A