CN111770165A - Method and device for uploading files, electronic equipment and readable storage medium - Google Patents

Method and device for uploading files, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN111770165A
CN111770165A CN202010598092.3A CN202010598092A CN111770165A CN 111770165 A CN111770165 A CN 111770165A CN 202010598092 A CN202010598092 A CN 202010598092A CN 111770165 A CN111770165 A CN 111770165A
Authority
CN
China
Prior art keywords
target
user
file
uploading
preset
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010598092.3A
Other languages
Chinese (zh)
Inventor
赵洪飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202010598092.3A priority Critical patent/CN111770165A/en
Publication of CN111770165A publication Critical patent/CN111770165A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/65Network streaming protocols, e.g. real-time transport protocol [RTP] or real-time control protocol [RTCP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/75Media network packet handling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/565Conversion or adaptation of application format or content
    • H04L67/5651Reducing the amount or size of exchanged application data

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the application discloses a method and a device for uploading files, electronic equipment and a computer-readable storage medium, and relates to the technical field of data uploading processing and image/video data processing. One embodiment of the method comprises: receiving a first agent uploading request which is sent by a first user and contains an index of a target file; determining a target second user storing the target file according to the index; wherein, the corresponding relation between the index of each file and the user holding the file is recorded in advance; initiating a second agent upload request of the target file to the target second user; and receiving a target file uploaded by the target second user. The implementation mode expands the realization way of file uploading and improves the overall success rate.

Description

Method and device for uploading files, electronic equipment and readable storage medium
Technical Field
The embodiment of the application relates to the technical field of data transmission, in particular to the technical field of data processing and image/video data processing, and particularly relates to a method and device for uploading files, electronic equipment and a computer-readable storage medium.
Background
With the improvement of the mobile terminal device performance, the mobile network bandwidth and the network speed, the mobile terminal application is gradually started, and the user can realize more functions and operations through the mobile terminal application.
Receiving, editing and uploading various files at the mobile terminal gradually become a new processing form, and the fragmenting time of a user can be well utilized by means of the convenience of carrying about of the mobile terminal.
Aiming at the aspect of uploading a mobile-side file, the prior art provides a mobile-side file uploading scheme with a plurality of transmission functions including fragmentation, breakpoint resuming and the like.
Disclosure of Invention
The embodiment of the application provides a method and device for uploading a file, electronic equipment and a computer-readable storage medium.
In a first aspect, an embodiment of the present application provides a method for uploading a file, including: receiving a first agent uploading request which is sent by a first user and contains an index of a target file; determining a target second user storing the target file according to the index; wherein, the corresponding relation between the index of each file and the user holding the file is recorded in advance; initiating a second proxy upload request of the target file to the target second user; and receiving a target file uploaded by the target second user.
In a second aspect, an embodiment of the present application provides an apparatus for uploading a file, including: receiving a first agent uploading request which is sent by a first user and contains an index of a target file; determining a target second user storing the target file according to the index; wherein, the corresponding relation between the index of each file and the user holding the file is recorded in advance; initiating a second proxy upload request of the target file to the target second user; and receiving a target file uploaded by the target second user.
In a third aspect, an embodiment of the present application provides an electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executable by the at least one processor to enable the at least one processor, when executed, to implement a method for uploading files as described in any implementation manner of the first aspect.
In a fourth aspect, embodiments of the present application provide a non-transitory computer-readable storage medium storing computer instructions for enabling a computer to implement the method for uploading files described in any implementation manner of the first aspect when executed.
The application provides a method, a device, an electronic device and a computer-readable storage medium for uploading files through the above embodiments, and first, a first agent uploading request containing an index of a target file sent by a first user is received; then, determining a target second user storing the target file according to the index; wherein, the corresponding relation between the index of each file and the user holding the file is recorded in advance; then, a second agent uploading request of the target file is sent to the target second user; and finally, receiving the target file uploaded by the target second user.
According to the file agent uploading scheme based on the task agent and task transfer thought, under the condition that the user grants permission, the index of the file locally stored by each user at the mobile terminal can be recorded in advance, so that the first user cannot automatically complete target file uploading operation due to the network quality of the environment where the first user is located, the working state of the mobile terminal equipment is not good and other reasons, other target second users capable of helping to complete target file uploading can be determined through the index, the first user can be helped to complete target file uploading through the target second users, the realization way of file uploading is expanded, and the overall success rate is improved.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 is an exemplary system architecture to which the present application may be applied;
FIG. 2 is a flow diagram of one embodiment of a method for uploading files, according to the present application;
FIG. 3 is a flow diagram of another embodiment of a method for uploading files according to the present application;
FIG. 4 is a timing diagram of one application scenario of a method for uploading files according to the present application;
FIG. 5 is a schematic block diagram of one embodiment of an apparatus for uploading files according to the present application;
fig. 6 is a block diagram of an electronic device suitable for implementing a method for uploading a file according to an embodiment of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Fig. 1 illustrates an exemplary system architecture 100 to which embodiments of the method, apparatus, electronic device, and computer-readable storage medium for uploading files of the present application may be applied.
As shown in fig. 1, the system architecture 100 may include a first mobile terminal 101, a network 102, a server 103, and a second mobile terminal 104. The network 102 serves as a medium for providing communication links between the first mobile terminal 101 and the second mobile terminal 104, respectively, and the server 103. Network 102 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
A user may use his mobile terminal to interact with the server 103 via the network 102 to receive or send messages or the like. Various applications for implementing information communication among the first mobile terminal 101, the server 103, and the second mobile terminal 104 may be installed on the first mobile terminal 101, the server 103, and the second mobile terminal 104, such as a proxy upload application, a data transmission application, an instant messaging application, and the like.
The first mobile terminal 101, the server 103, and the second mobile terminal 104 may be hardware or software. When the first mobile terminal 101 and the second mobile terminal 104 are hardware, they may be various mobile electronic devices with a display screen, including but not limited to smart phones, tablets, laptop portable computers, smart wearable devices, and the like; when the first mobile terminal 101 and the second mobile terminal 104 are software, they may be installed in the electronic devices listed above, and they may be implemented as a plurality of software or software modules, or may be implemented as a single software or software module, and are not limited in this respect. When the server 103 is hardware, it may be implemented as a distributed server cluster formed by multiple servers, or may be implemented as a single server; when the server is software, the server may be implemented as a plurality of software or software modules, or may be implemented as a single software or software module, which is not limited herein.
The server 103 may provide various services through various built-in applications, taking a proxy upload application that may provide a file proxy upload service as an example, the server 103 may implement the following effects when running the proxy upload application: firstly, a first proxy uploading request which is sent by a first user through a first mobile terminal 101 and contains an index of a target file is received through a network 102; then, on the basis of the corresponding relation between the index of each file and the user holding the file, determining a target second user storing the target file according to the index; then, a second proxy uploading request of the target file is initiated to a second mobile terminal 104 where the target second user is located; finally, the target file uploaded by the target second user through the second mobile terminal 104 is received. That is, the server 103 completes the purpose of uploading the target file by the second user by the first user agent through the above processing steps, and outputs the result of whether the target file is finally successfully uploaded.
Based on the implementation process of file proxy uploading, the method for uploading files provided in the following embodiments of the present application is generally executed by the server 103 that establishes data connections with mobile terminals of different users, and accordingly, the apparatus for uploading files is generally also disposed in the server 103. However, it should be noted that, in a special case, the proxy upload operation may be performed by a special mobile terminal. Accordingly, the device for uploading files may also be disposed in the first mobile terminal 101 or the second mobile terminal 104. In such a case, exemplary system architecture 100 may also not include server 103 and network 102.
It should be understood that the number of first mobile terminals, networks, servers and second mobile terminals in fig. 1 is merely illustrative. There may be any number of first mobile terminals, networks, servers, and second mobile terminals, as desired for implementation.
With continuing reference to FIG. 2, an implementation flow 200 of one embodiment of a method for uploading files in accordance with the present application is shown, comprising the steps of:
step 201: receiving a first agent uploading request which comprises an index of a target file and is sent by a first user;
this step is intended to receive, by an executing agent of the method for uploading files (for example, the server 103 shown in fig. 1), a first proxy upload request sent by a first user.
The first proxy request is initiated by the first user to the execution main body on the basis that the first user cannot finish the uploading operation of the target file by himself/herself through a mobile terminal (e.g., the first mobile terminal 101 shown in fig. 1) used by the first user, and the form of sending the first proxy request to the execution main body indicates that the first user encounters file uploading barriers which are difficult to overcome by himself/herself, such as insufficient remaining power of the mobile terminal, poor quality of an environment network, running of applications which are critical and occupy most of computing resources, and the like, so that the execution main body is expected to know the situation when receiving the first proxy uploading request, and help the second user to finish the proxy uploading operation of the target file.
The index of the file is used for identifying the file so as to realize the query of the storage position of the file through lightweight index query, and the index can be generated through various ways, such as hash algorithm, some custom algorithm, unique number and the like. It should be noted that the files applicable to the proxy upload method provided in the present application are not limited to the types and formats thereof, and include various types of files in which image data, video data, executable applications, documents, and the like are packaged in various formats.
Step 202: determining a target second user storing a target file according to the index;
on the basis of step 201, this step is intended to identify, by the execution agent described above, in response to receiving the first proxy upload request, a target second user who also holds (stores) the target file locally thereon, based on the correspondence between the index of each file recorded in advance and the user who holds the file. The target second user is a user that meets a preset requirement in all the second users, specifically, the target second user may be a non-first user whose mobile terminal locally stores a file that is the same as the target file, and whether the preset requirement is met is determined according to the working state information of the mobile terminal of each second user.
Under the applicable environment of the application, the execution subject executing the method for uploading the file may pre-strive for the authorization of each user using the proxy upload service, so as to complete the proxy operation and provide the proxy upload service based on the obtained authorization. The mobile terminal of the user granting the authority to the execution main body sends the index of the file stored locally to the execution main body, so that the execution main body can determine which files are stored in the mobile terminal of which user according to the received index, and further determine the second user.
Considering that not all the second users are suitable for helping the first user complete the proxy uploading operation of the target file, the preset requirements for helping to screen out the target second users suitable for completing the proxy uploading operation from all the second users may specifically include at least one of the following: the remaining memory is greater than the remaining amount of the preset memory, the current load is not greater than the preset load, the current running application number is not greater than the preset number, the current activity of the device is less than the preset activity, and other running state parameters capable of representing whether the mobile terminal is suitable for executing the proxy uploading operation currently exist, and the corresponding working state information is the remaining memory, the current load, the current running application number, the current activity of the device and the like. Furthermore, the target second user can be determined by combining attributes such as size, format and type of the target file, and the target second user is determined by combining preset requirements, so that the one-time success rate of the proxy uploading operation is improved as much as possible.
If no second user meeting the preset requirement is selected as the target second user, a notification that the proxy uploading cannot be completed can be directly returned to the first user, or a period of preset time is waited for, so that a second user meeting the preset requirement appears after the preset time, the parameter of the preset requirement can be selectively reduced, a request for clearing a part of useless processes to better complete the proxy uploading operation can be initiated to the second user meeting the requirement after the parameter is reduced, and the like.
Step 203: initiating a second agent upload request of the target file to a target second user;
on the basis of step 202, this step is intended to initiate a second agent upload request of the target file to the target second user by the execution subject, that is, the second agent upload request is sent to the target second user by the execution subject, so as to acquire whether the target second user gives an agreed reply content by integrating the working state of the mobile terminal of the target second user and the influence of the individual subjective intention.
Step 204: and receiving a target file uploaded by the target second user.
On the basis that the target second user agrees to the second proxy uploading request sent by the executing body, the proxy uploading operation aiming at the target file being clarified by the executing body can be executed by the target second user, and the target file sent by the target second user is received until the complete target file is received. It should be noted that, the execution subject may determine whether the target second user agrees to help the first user complete uploading the target file in a plurality of ways, for example, an agreement upload reply signal returned by the target second user for the second agent upload request is received, or a data stream uploaded by the second user may be directly received within a preset time.
Correspondingly, if the target second user returns a reply signal not agreeing to upload after comprehensive consideration to the execution main body or the execution main body does not receive any data stream within the preset time after the second agent upload request is issued, the execution main body judges that the target second user refuses to help the first user to finish uploading the target file, and then selects a new target second user from the second users meeting the preset requirement again. When the second users meeting the preset requirements exist, the second users can be selected as target second users, the second users with the highest priority can be selected as preferred target second users according to the priority sequence of the target second users on a parameter meeting the preset requirements, and when the preferred target second users do not agree with the uploading, the target second users with the second priority can be selected as new preferred target second users.
Further, in order to reduce performance impact caused by the fact that a single target second user performs proxy uploading operation as much as possible in the case that a plurality of target second users exist, the execution main body may further uniformly coordinate the plurality of target second users to fragment the same target file in the same form, and then control each target second user to upload different fragments therein, so that the execution main body may restore the received fragments into a complete target file. And the second users with different targets can select the number of the uploaded fragments according to the actual conditions of the mobile terminals.
The method for uploading files provided by this embodiment actually provides a file agent uploading scheme based on task agent and task transfer ideas, and under the condition that a user grants permission, indexes of files locally stored by each user at a mobile terminal of each user can be recorded in advance, so that a first user cannot finish target file uploading operation by himself due to reasons such as network quality of the environment where the first user is located and poor working state of mobile terminal equipment, and other target second users capable of helping to finish target file uploading can be determined through the indexes, and finally the first user can be helped to finish target file uploading through the target second users, so that a file uploading implementation way is expanded, and the overall success rate is improved.
On the basis of the above embodiment, the present application also provides a flow 300 of another method for uploading a file through fig. 3, including the following steps:
step 301: receiving a first agent uploading request which is sent by a first user and contains an index of a target file;
the above step 301 is the same as the step 201 shown in fig. 2, and please refer to the corresponding parts in the previous embodiment for the same contents, which is not described herein again.
Step 302: determining all second users storing the target files corresponding to the indexes according to the indexes;
step 303: acquiring the current activity of the equipment used by each second user, and selecting the second users with the current activity less than the preset activity as target second users;
in contrast to step 202 in the previous embodiment, the present embodiment provides a specific implementation scheme for selecting a suitable target second user based on the current activity of the device (e.g., the mobile terminal thereof) used by each second user through steps 302 and 303. Specifically, the device activity may be obtained by comprehensively analyzing a plurality of parameters such as whether the device is in an idle state, the total number of running applications, the total memory occupancy of the running applications, the device temperature, and the like, and the preset activity is preset as a demarcation point for judging whether the device meets the requirement of executing the proxy uploading operation.
Step 304: initiating a second agent upload request of the target file to a target second user;
the above step 304 is the same as the step 203 shown in fig. 2, and please refer to the corresponding parts of the previous embodiment for the same contents, which is not described herein again.
Step 305: in response to receiving an upload approval reply signal returned by the target second user in response to the second agent request, controlling the target second user to upload the target file at a preset maximum fragment number and a preset minimum unit upload rate, and receiving the target file uploaded by the target second user;
different from step 204 in the previous embodiment, in this step 305, after the execution main body receives the upload approval reply signal returned by the target second user, the execution main body controls the target second user to upload the target file at the preset maximum number of pieces and the preset minimum unit upload rate, so as to reduce the performance impact on the mobile terminal of the second user performing the proxy upload operation as much as possible by setting the proxy upload parameters of the maximum number of pieces and the minimum unit upload rate.
Step 306: and after receiving the complete target file from the target second user, respectively sending a notice that the target file is uploaded to the first user and the target second user.
After the execution main body receives the complete target file from the target second user, the step informs the first user initiating the proxy uploading request and the target user helping the first user to complete the proxy uploading operation of the actual uploading result of the target file by respectively sending a target file uploading notification to the first user and the target second user, so that the first user and the target second user can conveniently perform subsequent processing according to the result.
On the basis of having all the advantages of the previous embodiment, the present embodiment provides an implementation manner how to specifically determine the target second user through the combination of the parameters of step 302 and step 303 and the device activity, provides a scheme for reducing performance pressure brought to the mobile terminal of the target second user by performing the proxy upload operation as much as possible through step 305, thereby avoiding negative effects brought to the user by performing the proxy upload operation as much as possible, and provides a scheme for feeding back the target file upload result to the first user and the target second user through step 306, thereby increasing the integrity of the scheme. It should be noted that the above three modifications or the specific implementation schemes presented have no cause or dependency relationship with each other, and can be combined with the generic schemes provided in the above embodiments to form separate embodiments, and this example only exists as a preferred embodiment including three preferred schemes at the same time.
For further understanding, the present application further provides a specific implementation scheme in combination with a specific application scenario, please refer to a sequence diagram shown in fig. 4, in order to more clearly show a complete file proxy upload scheme, the sequence diagram shown in fig. 4 simultaneously embodies three execution main bodies, namely (a mobile terminal of) a first user, a server, and (a mobile terminal of) a second user, the first user and the second user grant various permissions required for performing proxy upload operations to the server in advance, and according to the permissions, the mobile terminals of the first user and the second user may periodically store indexes of files to the server sender locally, including the following steps:
step 401: uploading a video file A;
the first user initiates an upload request of a video file a with a size of 500MB to the server through his mobile terminal.
Step 402: the upload failed;
the server returns a plurality of uploading failure signals to the mobile terminal of the first user due to the fact that the packet loss rate of the mobile terminal of the first user is too large.
Step 403: a first agent upload request;
in response to the received upload failure signal, the first user initiates a first proxy upload request for the video file a to the server through his mobile terminal.
Step 404: searching a second user holding the video file A according to the index;
in response to the received first agent upload request, the server determines one of the second users who also holds the video file a according to the pre-stored index.
Step 405: a second agent upload request;
and the server initiates a second agent uploading request to the mobile terminal of the second user.
Step 406: agreeing to proxy uploading;
and responding to the received second agent uploading request, and returning a reply signal of agreeing to upload to the server by the second user through the mobile terminal of the second user.
Step 407: issuing an agent uploading parameter;
and responding to the received reply signal which agrees to upload, and issuing the preferred agent upload parameters aiming at the video file A to the mobile terminal of the second user by the server according to the working state information of the mobile terminal of the second user and the size of the video file which are contained in the reply signal. For example, when the mobile terminal of the second user currently runs more applications, the preferred proxy upload parameter may be that 500MB of video file a is divided into 10 video fragments of 50MB, and each video fragment is sequentially uploaded at an upload rate of 200KB per second; when the mobile terminal of the second user is currently idle by the user, the preferred proxy upload parameter may be to divide the 500MB video file into 20 video slices of 25MB, and upload the 20 video slices simultaneously and in parallel without an upload rate limit.
Step 408: uploading the video file A according to the proxy uploading parameter;
and responding to the received proxy uploading parameters, and uploading the video file A stored locally to the server by the mobile terminal of the second user according to the proxy uploading parameters.
Step 409: receiving a video file A;
the server receives the data of the video file A sent by the mobile terminal of the second user.
Step 410-1: the video file A is uploaded;
and after the server receives the complete video file A, sending a notification that the video file A is uploaded to the mobile terminal of the first user.
Step 410-2: the video file A is uploaded;
and after the server receives the complete video file A, sending a notification that the video file A is uploaded to the mobile terminal of the second user.
With further reference to fig. 5, as an implementation of the method shown in the above figures, the present application provides an embodiment of an apparatus for uploading a file, where the embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 2, and the apparatus may be applied to various electronic devices.
As shown in fig. 5, the apparatus 500 for uploading a file of the present embodiment may include: a first proxy upload request receiving unit 501, a target second user determining unit 502, a second proxy upload request initiating unit 503, and a target file receiving unit 504. The first proxy upload request receiving unit 501 is configured to receive a first proxy upload request sent by a first user and containing an index of a target file; a target second user determination unit 502 configured to determine a target second user storing the target file according to the index; wherein, the corresponding relation between the index of each file and the user holding the file is recorded in advance; a second proxy upload request initiation unit 503 configured to initiate a second proxy upload request of the target file to the target second user; a target file receiving unit 504 configured to receive a target file uploaded by a target second user.
In the present embodiment, in the apparatus 500 for uploading a file: the detailed processing and the technical effects of the first proxy upload request receiving unit 501, the target second user determining unit 502, the second proxy upload request initiating unit 503 and the target file receiving unit 504 may refer to the related descriptions of step 201 and step 204 in the corresponding embodiment of fig. 2, and are not described herein again.
In some optional implementations of this embodiment, the target second user determination unit 502 may be further configured to: determining all second users storing the target files corresponding to the indexes according to the indexes; and selecting the second users meeting the preset requirements as target second users according to the working state information of the equipment used by each second user.
In some optional implementations of this embodiment, the preset requirement includes at least one of: the residual memory is larger than the residual amount of the preset memory, the current load amount is not larger than the preset load amount, the current running application number is not larger than the preset number, and the current activity of the equipment is smaller than the preset activity.
In some optional implementations of this embodiment, the apparatus 500 for uploading a file may further include: and the preferred uploading parameter control unit is configured to control the target second user to upload the target file at a preset maximum fragment number and a preset minimum unit uploading rate.
In some optional implementations of this embodiment, the apparatus 500 for uploading a file may further include: and the reselection unit is configured as a reselection unit and is configured to respond to the condition that no return signal is received within a preset time length after the second agent uploading request is sent out or an uploading refusing reply signal returned by the target second user in response to the second agent uploading request is received.
In some optional implementations of this embodiment, the apparatus 500 for uploading a file may further include: and the uploaded notification sending unit is configured to send the uploaded target file notification to the first user and the second target user respectively after receiving the complete target file from the second target user.
The present embodiment exists as an apparatus embodiment corresponding to the above method embodiment, and the apparatus for uploading a file provided in the present embodiment actually provides a file agent uploading scheme based on task agent and task transfer idea, and under the condition that a user grants an authority, an index of a file locally stored by each user at a mobile terminal of each user may be pre-recorded, so that a first user cannot automatically complete a target file uploading operation due to network quality of an environment where the first user is located, poor working state of a mobile terminal device, and the like, and other target second users capable of helping to complete the target file uploading may be determined through the index, and finally the first user is helped to complete the target file uploading through the target second users, thereby expanding a realization approach for completing a target file uploading target, and improving an overall success rate
According to an embodiment of the present application, an electronic device and a computer-readable storage medium are also provided.
Fig. 6 shows a block diagram of an electronic device suitable for implementing the method for uploading files of the embodiment of the present application. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present application that are described and/or claimed herein.
As shown in fig. 6, the electronic apparatus includes: one or more processors 601, memory 602, and interfaces for connecting the various components, including a high-speed interface and a low-speed interface. The various components are interconnected using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions for execution within the electronic device, including instructions stored in or on the memory to display graphical information of a GUI on an external input/output apparatus (such as a display device coupled to the interface). In other embodiments, multiple processors and/or multiple buses may be used, along with multiple memories and multiple memories, as desired. Also, multiple electronic devices may be connected, with each device providing portions of the necessary operations (e.g., as a server array, a group of blade servers, or a multi-processor system). In fig. 6, one processor 601 is taken as an example.
The memory 602 is a non-transitory computer readable storage medium as provided herein. The memory stores instructions executable by the at least one processor to cause the at least one processor to perform the method for uploading files provided herein. A non-transitory computer readable storage medium of the present application stores computer instructions for causing a computer to perform the method for uploading files provided by the present application.
The memory 602 is used as a non-transitory computer readable storage medium for storing non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules corresponding to the method for uploading files in the embodiment of the present application (for example, the first proxy upload request receiving unit 501, the target second user determining unit 502, the second proxy upload request initiating unit 503, and the target file receiving unit 504 shown in fig. 5). The processor 601 executes various functional applications of the server and data processing by executing non-transitory software programs, instructions, and modules stored in the memory 602, that is, implements the method for uploading files in the above method embodiments.
The memory 602 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store various types of data and the like created by the electronic device in performing the method for uploading the file. Further, the memory 602 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory 602 optionally includes memory located remotely from the processor 601, which may be connected via a network to an electronic device adapted to perform the method for uploading files. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The electronic device adapted to perform the method for uploading a file may further include: an input device 603 and an output device 604. The processor 601, the memory 602, the input device 603 and the output device 604 may be connected by a bus or other means, and fig. 6 illustrates the connection by a bus as an example.
The input device 603 may receive input numeric or character information and generate key signal inputs related to user settings and function control of an electronic apparatus suitable for performing the method for uploading files, such as an input device of a touch screen, a keypad, a mouse, a track pad, a touch pad, a pointing stick, one or more mouse buttons, a track ball, a joystick, or the like. The output devices 604 may include a display device, auxiliary lighting devices (e.g., LEDs), and tactile feedback devices (e.g., vibrating motors), among others. The display device may include, but is not limited to, a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) display, and a plasma display. In some implementations, the display device can be a touch screen.
Various implementations of the systems and techniques described here can be realized in digital electronic circuitry, integrated circuitry, application specific ASICs (application specific integrated circuits), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
These computer programs (also known as programs, software applications, or code) include machine instructions for a programmable processor, and may be implemented using high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and/or device (e.g., magnetic discs, optical disks, memory, Programmable Logic Devices (PLDs)) used to provide machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and/or data to a programmable processor.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
According to the file agent uploading scheme based on the task agent and the task transfer idea, under the condition that the user grants the authority, the index of the file locally stored by each user at the mobile terminal can be recorded in advance, so that the first user cannot finish the target file uploading operation by himself due to the network quality of the environment where the first user is located, the working state of the mobile terminal device is not good and other reasons, other target second users capable of helping to finish the target file uploading can be determined through the index, the first user can be helped to finish the target file uploading through the target second users, the realization way of finishing the target file uploading is expanded, and the overall success rate is improved.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present application may be executed in parallel, sequentially, or in different orders, and the present invention is not limited thereto as long as the desired results of the technical solutions disclosed in the present application can be achieved.
The above-described embodiments should not be construed as limiting the scope of the present application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (14)

1. A method for uploading a file, comprising:
receiving a first agent uploading request which is sent by a first user and contains an index of a target file;
determining a target second user storing the target file according to the index; wherein, the corresponding relation between the index of each file and the user holding the file is recorded in advance;
initiating a second proxy upload request of the target file to the target second user;
and receiving a target file uploaded by the target second user.
2. The method of claim 1, wherein determining a target second user storing the target file from the index comprises:
determining all second users storing target files corresponding to the index according to the index;
and selecting the second users meeting preset requirements as the target second users according to the working state information of the equipment used by each second user.
3. The method of claim 2, wherein the preset requirements include at least one of: the residual memory is larger than the residual amount of the preset memory, the current load amount is not larger than the preset load amount, the current running application number is not larger than the preset number, and the current activity of the equipment is smaller than the preset activity.
4. The method of claim 1, further comprising:
and controlling the target second user to upload the target file at a preset maximum fragment number and a preset minimum unit upload rate.
5. The method of claim 1, further comprising:
and in response to the fact that no return signal is received within a preset time after the second agent uploading request is sent out or an uploading refusing reply signal returned by the target second user in response to the second agent uploading request is received, reselecting to obtain a new target second user.
6. The method of any of claims 1 to 5, wherein after receiving the complete target file from the target second user, further comprising:
and respectively sending a notice that the target file is uploaded to the first user and the target second user.
7. An apparatus for uploading a file, comprising:
a first proxy upload request receiving unit configured to receive a first proxy upload request containing an index of a target file sent by a first user;
a target second user determination unit configured to determine a target second user storing the target file according to the index; wherein, the corresponding relation between the index of each file and the user holding the file is recorded in advance;
a second proxy upload request initiation unit configured to initiate a second proxy upload request of the target file to the target second user;
and the target file receiving unit is configured to receive the target file uploaded by the target second user.
8. The apparatus of claim 7, wherein the target second user determination unit is further configured to:
determining all second users storing target files corresponding to the index according to the index;
and selecting the second users meeting preset requirements as the target second users according to the working state information of the equipment used by each second user.
9. The apparatus of claim 8, wherein the preset requirements comprise at least one of: the residual memory is larger than the residual amount of the preset memory, the current load amount is not larger than the preset load amount, the current running application number is not larger than the preset number, and the current activity of the equipment is smaller than the preset activity.
10. The apparatus of claim 7, further comprising:
and the preferred uploading parameter control unit is configured to control the target second user to upload the target file at a preset maximum fragment number and a preset minimum unit uploading rate.
11. The apparatus of claim 7, further comprising:
and the reselection unit is configured to reselect to obtain a new target second user in response to the fact that no return signal is received within a preset time length after the second agent uploading request is sent out or an uploading rejection reply signal returned by the target second user in response to the second agent uploading request is received.
12. The apparatus of any of claims 7 to 11, further comprising:
an uploaded notification sending unit configured to send a notification that the target file is uploaded to the first user and the target second user, respectively, after receiving the complete target file from the target second user.
13. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method for uploading a file of any of claims 1-6.
14. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method for uploading a file of any one of claims 1-6.
CN202010598092.3A 2020-06-28 2020-06-28 Method and device for uploading files, electronic equipment and readable storage medium Pending CN111770165A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010598092.3A CN111770165A (en) 2020-06-28 2020-06-28 Method and device for uploading files, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010598092.3A CN111770165A (en) 2020-06-28 2020-06-28 Method and device for uploading files, electronic equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN111770165A true CN111770165A (en) 2020-10-13

Family

ID=72722276

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010598092.3A Pending CN111770165A (en) 2020-06-28 2020-06-28 Method and device for uploading files, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN111770165A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114039968A (en) * 2021-11-05 2022-02-11 上海商汤科技开发有限公司 Resource package uploading method and device, electronic equipment and storage medium
CN114845089A (en) * 2022-07-04 2022-08-02 浙江大华技术股份有限公司 Video picture transmission method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101222299A (en) * 2006-11-20 2008-07-16 株式会社Ntt都科摩 Relay apparatus for relaying a data packet
CN102244670A (en) * 2010-05-13 2011-11-16 北京大学 Idle node assistance method for P2P (peer-to-peer) file transmission
CN103685373A (en) * 2012-09-10 2014-03-26 联想(北京)有限公司 Data uploading device and data uploading method
CN103731451A (en) * 2012-10-12 2014-04-16 腾讯科技(深圳)有限公司 Method and system for uploading file
CN106210065A (en) * 2016-07-13 2016-12-07 广东欧珀移动通信有限公司 A kind of document transmission method, device and mobile terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101222299A (en) * 2006-11-20 2008-07-16 株式会社Ntt都科摩 Relay apparatus for relaying a data packet
CN102244670A (en) * 2010-05-13 2011-11-16 北京大学 Idle node assistance method for P2P (peer-to-peer) file transmission
CN103685373A (en) * 2012-09-10 2014-03-26 联想(北京)有限公司 Data uploading device and data uploading method
CN103731451A (en) * 2012-10-12 2014-04-16 腾讯科技(深圳)有限公司 Method and system for uploading file
CN106210065A (en) * 2016-07-13 2016-12-07 广东欧珀移动通信有限公司 A kind of document transmission method, device and mobile terminal

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114039968A (en) * 2021-11-05 2022-02-11 上海商汤科技开发有限公司 Resource package uploading method and device, electronic equipment and storage medium
CN114845089A (en) * 2022-07-04 2022-08-02 浙江大华技术股份有限公司 Video picture transmission method and device

Similar Documents

Publication Publication Date Title
US10992512B2 (en) File sharing method, apparatus, and storage medium
CN113568884B (en) File management method and device, electronic equipment and storage medium
CN111131317B (en) Data processing method, device, equipment and medium based on block chain
CN112016068A (en) Account control method, device, equipment and computer readable storage medium
CN111770165A (en) Method and device for uploading files, electronic equipment and readable storage medium
CN111541919A (en) Video frame transmission method and device, electronic equipment and readable storage medium
CN111552934A (en) Database access method and device
CN111770176B (en) Traffic scheduling method and device
CN112311597B (en) Message pushing method and device
CN111611023A (en) Control method and device of intelligent equipment, electronic equipment and storage medium
CN112084395A (en) Search method, search device, electronic device, and storage medium
CN111930539A (en) Task management method, device and equipment based on label engine and storage medium
CN111787088A (en) Method and device for processing applet data
JP2011076251A (en) Remote operation system, client device, server, communication method, program, and recording medium
CN110619008A (en) Database query method and device, electronic equipment and storage medium
CN112069137B (en) Method, device, electronic equipment and computer readable storage medium for generating information
CN111615171B (en) Access method and device of wireless local area network
CN111124291B (en) Data storage processing method and device of distributed storage system and electronic equipment
CN112559867A (en) Business content output method, device, equipment, storage medium and program product
CN111767149A (en) Scheduling method, device, equipment and storage equipment
CN111367995A (en) Data synchronization method and device based on service lock, electronic equipment and storage medium
CN112752323B (en) Method and device for changing hot spot access state
CN113641688B (en) Node updating method, related device and computer program product
CN112770415B (en) Information processing method and device for wireless hotspots
CN112118576B (en) Method and apparatus for networking over wireless hotspots

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20201013

RJ01 Rejection of invention patent application after publication