CN111083243A - File uploading method and device, computer equipment and storage medium - Google Patents

File uploading method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN111083243A
CN111083243A CN201911421143.9A CN201911421143A CN111083243A CN 111083243 A CN111083243 A CN 111083243A CN 201911421143 A CN201911421143 A CN 201911421143A CN 111083243 A CN111083243 A CN 111083243A
Authority
CN
China
Prior art keywords
uploading
node
file
terminal
client
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.)
Granted
Application number
CN201911421143.9A
Other languages
Chinese (zh)
Other versions
CN111083243B (en
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 QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century 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 QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN201911421143.9A priority Critical patent/CN111083243B/en
Publication of CN111083243A publication Critical patent/CN111083243A/en
Application granted granted Critical
Publication of CN111083243B publication Critical patent/CN111083243B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles
    • H04L67/303Terminal profiles
    • 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/52Network services specially adapted for the location of the user terminal
    • 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/54Presence management, e.g. monitoring or registration for receipt of user log-on information, or the connection status of the users

Landscapes

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

Abstract

The file uploading method, the file uploading device, the computer equipment and the storage medium provided by the embodiment of the invention are used for acquiring an uploading parameter acquisition request which is sent by a client and contains position information of a terminal where the client is located and an identifier of the terminal, determining a node in an available state from a preset mixed node library which contains a private cloud node and a public cloud node, determining an uploading node which is used for receiving a file uploaded by the client from the nodes in the available state according to the uploading parameter acquisition request and a preset node scheduling strategy, acquiring parameter information of the uploading node and sending the parameter information to the client, so that the client uploads the file to be uploaded to the uploading node according to the parameter information. Compared with the prior art that the uploading node is determined only from the private cloud node or the public cloud node, the method has the advantages that the selection range of the uploading node is wider, and the selected uploading node is more in line with the terminal requirement, so that the uploading success rate of the file is improved.

Description

File uploading method and device, computer equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of Internet, in particular to a file uploading method and device, computer equipment and a storage medium.
Background
With the rise of short videos, users are required to upload videos anytime and anywhere. Some application programs are provided with a video uploading function in order to meet the requirement of uploading videos of users, and as the uploaded videos need to be stored by an uploading node when the videos are uploaded, development companies with small volume generally purchase public cloud nodes, the public cloud nodes are used as the uploading nodes to store the videos uploaded by the users, and development companies with large volume generally use private cloud nodes as the uploading nodes. For a development company using private cloud nodes as upload nodes, due to the limitation of the number of the private cloud nodes for supporting the upload function inside the development company, the upload failure rate of a user in foreign countries, remote areas or a weak network environment is high, and the influence on the use experience of the user is large.
Disclosure of Invention
In order to solve the technical problem or at least partially solve the technical problem, embodiments of the present invention provide a file uploading method, apparatus, computer device, and storage medium.
In view of this, in a first aspect, an embodiment of the present invention provides a file uploading method, which is applied to a server, and the method includes:
receiving an uploading parameter acquisition request sent by a client, wherein the uploading parameter acquisition request comprises position information of a terminal where the client is located and an identifier of the terminal;
determining nodes in an available state from a preset mixed node library, wherein the mixed node library comprises private cloud nodes and public cloud nodes;
determining an uploading node in the nodes in the available state according to the position information of the terminal, the identification of the terminal and a preset node scheduling strategy, wherein the uploading node is used for receiving the file uploaded by the client;
acquiring parameter information of the uploading node;
and sending the parameter information of the uploading node to the client so that the client uploads the file to be uploaded to the uploading node according to the parameter information.
In a possible implementation manner, determining an upload node among the nodes in the available state according to the location information of the terminal, the identifier of the terminal, and a preset node scheduling policy includes:
determining a node corresponding to the position information of the terminal in the nodes in the available state as a target node according to a preset corresponding relation between the node and the position information;
if the number of the target nodes is one, determining that the target nodes are uploading nodes;
if the number of the target nodes is multiple, determining preset distribution weight of each node in the target nodes aiming at the terminal according to the identification of the terminal, and randomly selecting one node in the target nodes as an uploading node according to the distribution weight.
In one possible implementation, the method further includes:
receiving an uploading result which is sent by the client and is uploaded to the uploading node by the file to be uploaded, wherein the uploading result represents that the file to be uploaded is uploaded successfully or unsuccessfully;
recording the corresponding relation between the uploading result and the terminal;
calculating the uploading success rate of the uploading node aiming at the terminal according to the uploading result;
and adjusting the distribution weight of the uploading node aiming at the terminal according to the uploading success rate.
In a second aspect, an embodiment of the present invention further provides a file uploading method, which is applied to a client, where the method includes:
sending an uploading parameter acquisition request to a server, wherein the uploading parameter acquisition request comprises the position information of a terminal where a client is located and the identifier of the terminal;
receiving parameter information of an uploading node sent by a server end in response to the uploading parameter acquisition request, wherein the parameter information of the uploading node comprises an identifier and a file name of the uploading node;
renaming the file to be uploaded according to the file name contained in the parameter information of the uploading node;
determining an uploading node according to an uploading node identifier contained in the parameter information of the uploading node;
and uploading the renamed file to be uploaded to the uploading node.
In one possible implementation, the method further includes:
acquiring an uploading result of the file to be uploaded to the uploading node;
and sending the uploading result to the server side so that the server side adjusts the distribution weight of the uploading node for the terminal according to the uploading result.
In a third aspect, an embodiment of the present invention further provides a file uploading apparatus, which is applied to a server, where the apparatus includes:
the system comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for receiving an uploading parameter acquisition request sent by a client, and the uploading parameter acquisition request comprises position information of a terminal where the client is located and an identifier of the terminal;
the system comprises a first determining module, a second determining module and a third determining module, wherein the first determining module is used for determining nodes in an available state from a preset mixed node library, and the mixed node library comprises private cloud nodes and public cloud nodes;
a second determining module, configured to determine, according to the location information of the terminal, the identifier of the terminal, and a preset node scheduling policy, an uploading node among the nodes in the available state, where the uploading node is used to receive a file uploaded by the client;
the acquisition module is used for acquiring the parameter information of the uploading node;
and the sending module is used for sending the parameter information of the uploading node to the client so that the client uploads the file to be uploaded to the uploading node according to the parameter information.
In a possible implementation manner, the second determining module is specifically configured to:
determining a node corresponding to the position information in the nodes in the available state as a target node according to a preset corresponding relation between the node and the position information;
if the number of the target nodes is one, determining that the target nodes are uploading nodes;
if the number of the target nodes is multiple, determining preset distribution weight of each node in the target nodes aiming at the terminal according to the identification of the terminal, and randomly selecting and determining one node in the target nodes as an uploading node according to the distribution weight.
In one possible implementation, the apparatus further includes:
the adjusting module is used for receiving an uploading result which is sent by the client and is used for uploading the file to be uploaded to the uploading node, the uploading result shows that the file to be uploaded is uploaded successfully or unsuccessfully, recording the corresponding relation between the uploading result and the terminal, calculating the uploading success rate of the uploading node aiming at the terminal according to the uploading result, and adjusting the distribution weight of the uploading node aiming at the terminal according to the uploading success rate.
In a fourth aspect, an embodiment of the present invention further provides a file uploading apparatus, which is applied to a client, where the apparatus includes:
the system comprises a sending module, a receiving module and a processing module, wherein the sending module is used for sending an uploading parameter acquisition request to a server side, and the uploading parameter acquisition request comprises the position information of a terminal where a client side is located and the identifier of the terminal;
the receiving module is used for receiving the parameter information of the uploading node sent by the server end in response to the uploading parameter acquisition request, wherein the parameter information of the uploading node comprises the identification and the file name of the uploading node;
the renaming module is used for renaming the file to be uploaded according to the file name contained in the parameter information of the uploading node;
the uploading node determining module is used for determining the uploading node according to the uploading node identifier contained in the parameter information of the uploading node;
and the uploading module is used for uploading the renamed file to be uploaded to the uploading node.
In one possible implementation, the apparatus further includes: and the feedback module is used for acquiring an uploading result of the file to be uploaded to the uploading node and sending the uploading result to the server so that the server adjusts the distribution weight of the uploading node for the terminal according to the uploading result.
In a fifth aspect, an embodiment of the present invention further provides a computer device, including: the file uploading system comprises a processor and a memory, wherein the processor is used for executing a data processing program stored in the memory so as to realize the file uploading method of the first aspect or the second aspect.
In a sixth aspect, an embodiment of the present invention further provides a storage medium, where the storage medium stores one or more programs, and the one or more programs are executable by one or more processors to implement the file uploading method according to the first aspect or the second aspect.
Compared with the prior art, the file uploading method provided by the embodiment of the invention comprises the steps of obtaining an uploading parameter obtaining request which is sent by a client and contains the position information of a terminal where the client is located and the identification of the terminal, determining a node in an available state from a preset mixed node library which contains a private cloud node and a public cloud node, determining an uploading node which is used for receiving a file uploaded by the client from the node in the available state according to the position information of the terminal where the client is located, the identification of the terminal and a preset node scheduling strategy, obtaining the parameter information of the uploading node and sending the parameter information to the client, so that the client uploads the file to be uploaded to the uploading node according to the parameter information. According to the scheme, the server determines the uploading node from the available public cloud nodes and/or private cloud nodes according to the position information of the terminal where the client is located and the terminal identification, compared with the existing method that the uploading node is determined only from the private cloud nodes or only from the public cloud nodes, the uploading node is wider in selection range, the uploading node is selected according to the position information of the terminal and the terminal identification, the selected uploading node is enabled to meet the terminal requirements better, and the uploading success rate of the file is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly described below.
Fig. 1 is a flowchart of a file uploading method according to an embodiment of the present invention;
fig. 2 is a flowchart of a method for determining an upload node according to an embodiment of the present invention;
fig. 3 is a flowchart of a file uploading method according to an embodiment of the present invention;
fig. 4 is a block diagram of a file uploading apparatus according to an embodiment of the present invention;
fig. 5 is a block diagram of a file uploading apparatus according to an embodiment of the present invention;
FIG. 6 is a block diagram of a computer device provided by an embodiment of the present invention;
fig. 7 is a schematic diagram of a communication system according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention.
As shown in fig. 7, the embodiment provides a communication system including a client (application), a server, and a hybrid node library (including a large number of private cloud nodes and public cloud nodes), where the client has a file uploading function, and an upload SDK (Software Development Kit) for uploading a file (the file may be a video, an audio, or a text, etc.) is integrated in the client, and the client completes file uploading by calling an upload interface packaged by the upload SDK. The uploading SDK supports the acquisition of parameter information related to the uploaded files from the server side, the server side provides an interface for acquiring uploading scheduling parameters, and the interface supports the return of parameter information and credential information of a general uploading node to the uploading SDK.
When a client uploads a file, an upload SDK sends an upload parameter acquisition request to a server, the upload parameter acquisition request carries information such as position information (such as client IP and/or latitude and longitude information) of a terminal where the client is located and an identifier (such as a device number) of the terminal where the client is located, after the server receives the upload parameter acquisition request, a node in an available state in a preset mixed node library (including a public cloud node and a private cloud node) is determined, then an upload node for receiving the file uploaded by the client is determined from the nodes in the available state according to the position information of the terminal, the identifier of the terminal and a preset node scheduling strategy carried in the upload parameter acquisition request, and parameter information (such as a domain name or IP of the node, a Bucket (open storage) name in the node and/or an upload file name, a file name and the like of the upload node, And the client side receives the parameter information of the uploading node, and the uploading SDK uploads the file to be uploaded to the appointed uploading node and acquires the resource path of the file.
The following describes a file uploading method provided in this embodiment, with a server and a client as execution subjects.
Fig. 1 is a flowchart of a file uploading method provided in an embodiment of the present invention, which is applied to a server, and as shown in fig. 1, the method includes the following steps:
s11, receiving an uploading parameter obtaining request sent by a client, wherein the uploading parameter obtaining request comprises position information of a terminal where the client is located and an identifier of the terminal.
In this embodiment, after receiving an upload parameter acquisition request sent by a client, a server analyzes the upload parameter acquisition request, and acquires the location information of the terminal where the client is located and the identifier of the terminal, which are carried in the upload parameter acquisition request.
The location information of the terminal can be client IP address and/or longitude and latitude information and the like which can represent the geographic location of the terminal.
The identifier of the terminal may be unique information such as a device number of the terminal.
And S12, determining nodes in an available state from a preset mixed node library, wherein the mixed node library comprises private cloud nodes and public cloud nodes.
Parameter information of each node in the hybrid node library is preset, for example, a node name, a node domain name/ID, a node location, a node type (public cloud node or private cloud node), a parameter value indicating whether the node is currently available, an internal Bucket name of the node, and the like.
The node in the available state can be determined according to the parameter value used by each node in the hybrid node library to indicate whether the node is currently in the available state, for example, the parameter value of 0 indicates the available state, and the parameter value of 1 indicates the unavailable state.
And S13, determining an uploading node in the nodes in the available state according to the position information of the terminal, the identification of the terminal and a preset node scheduling strategy, wherein the uploading node is used for receiving the file uploaded by the client.
The node scheduling policy is a preset policy used for determining an uploading node according to the position information of the terminal and the identifier of the terminal.
In a possible implementation manner, the server is provided with a scheduler, the scheduler includes a preset node scheduling policy, and the location information of the terminal, the identifier of the terminal, and the information of the node in the available state are used as input parameters, and are input into the scheduler, and the uploading node meeting the requirement can be obtained by executing the preset node scheduling policy.
And S14, acquiring the parameter information of the uploading node.
The parameters of each node in the mixed node library are preset, so that the parameters can be directly obtained.
The parameter information can comprise a domain name or an IP (Internet protocol) of the uploading node, so that the uploading node can be uniquely determined by the client, the parameter information also comprises a Bucket (open storage) name inside the uploading node, so that the client can know where the file is stored specifically, and the client needs a certificate when uploading the file to the Bucket, so that the parameter information also comprises a temporary certificate for uploading the file to the Bucket corresponding to the node, and the client can upload the file to the Bucket only under the condition of the certificate.
And S15, sending the parameter information of the uploading node to the client so that the client uploads the file to be uploaded to the uploading node according to the parameter information.
The unique uploading node can be determined according to the parameter information of the uploading node, so that the parameter information of the uploading node is sent to the client, the client can determine the unique uploading node according to the parameter information of the uploading node, and the file to be uploaded is uploaded to the uploading node.
The file uploading method provided by the embodiment of the invention comprises the steps of obtaining an uploading parameter obtaining request which is sent by a client and contains the position information of a terminal where the client is located and the identification of the terminal, determining a node in an available state from a preset mixed node library which contains a private cloud node and a public cloud node, determining an uploading node which is used for receiving a file uploaded by the client from the nodes in the available state according to the position information of the terminal where the client is located, the identification of the terminal and a preset node scheduling strategy, obtaining the parameter information of the uploading node and sending the parameter information to the client, so that the client uploads the file to be uploaded to the uploading node according to the parameter information. According to the scheme, the server determines the uploading node from the available public cloud nodes and/or private cloud nodes according to the position information of the terminal where the client is located and the terminal identification, and compared with the existing method that the uploading node is determined only from the private cloud nodes or only from the public cloud nodes, the method and the system increase the nodes for uploading files, improve the uploading success rate, and realize the optimal solution of multiple angles such as node number, distribution breadth, user access threshold, resource use cost and the like.
In a possible implementation manner, on the basis of the file uploading method, as shown in fig. 2, the step S13 of determining an uploading node among the nodes in the available state according to the location information of the terminal, the identifier of the terminal, and a preset node scheduling policy may include the following steps:
s131, determining a node corresponding to the position information of the terminal in the nodes in the available state as a target node according to a preset corresponding relation between the node and the position information.
The corresponding relation between the position information and the nodes (public cloud nodes and/or private cloud nodes) is established in advance, and one position information may correspond to one or more target nodes due to the fact that the number of the nodes is large.
S132, if the number of the target nodes is one, determining that the target nodes are uploading nodes.
And S133, if the number of the target nodes is multiple, determining preset distribution weights for the terminal of all the nodes in the target nodes according to the identification of the terminal, and randomly selecting one node in the target nodes as an uploading node according to the distribution weights.
The distribution weight of each node to each terminal is preset and can be adjusted subsequently, the distribution weight of the same node to different terminals may be different, so that the distribution weight of each node in the target nodes to the terminal where the client is located needs to be determined according to the identification of the terminal, after the distribution weight of each node is determined, one node in the target nodes is selected as an uploading node in a random selection mode, specifically, a random number with a fixed probability can be generated according to the distribution weight of each node, so that one random number is selected randomly, and the node corresponding to the random number is used as the uploading node.
In this embodiment, an uploading node which is in an available state and corresponds to the location information of the terminal is selected from the plurality of nodes in the above manner, and the distribution weight of the node for the terminal is considered when the uploading node is selected, so that the finally selected uploading node is associated with the terminal, and the requirement of the terminal is better met.
In a possible implementation manner, the server is further provided with a feedback mechanism, the feedback mechanism counts a relationship between a terminal where the client is located and an upload success rate of the upload node in real time, and then adjusts an allocation weight of the upload node according to a statistical result to improve the upload success rate, and specifically, on the basis of the file upload method, the file upload method may further include the following steps:
receiving an uploading result which is sent by the client and is used for uploading the file to be uploaded to the uploading node, wherein the uploading result represents that the file to be uploaded is uploaded successfully or unsuccessfully, recording the corresponding relation between the uploading result and the terminal, calculating the uploading success rate of the uploading node aiming at the terminal according to the uploading result, and adjusting the distribution weight of the uploading node aiming at the terminal according to the uploading success rate and a preset adjustment strategy.
The adjustment strategy may be set according to a requirement, for example, if the upload success rate of the upload node for the terminal increases, the distribution weight of the upload node for the terminal is increased, and if the upload success rate of the upload node for the terminal decreases, the distribution weight of the upload node for the terminal is decreased.
In this embodiment, the distribution weights of the nodes are adjusted in the above manner, so that the distribution weight corresponding to the node with the higher uploading success rate is higher, and the node is more easily selected as the uploading node, so that the uploading success rate of the uploading node is also increased, and the success rate of uploading the file is integrally improved.
In a possible implementation manner, if the names of different files uploaded to the same storage location are repeated, the newly stored file may be caused to cover the previously stored file with the same name as the newly stored file, so that the previously stored file is lost, and therefore, in order to avoid this situation, the parameter information of the upload node may further include a file name, different file names are assigned to different files, and the file name is sent to the client, so that the client names the files to be uploaded according to the file name, and thus, the problems of file coverage and the like caused by the renaming are avoided.
Fig. 3 is a flowchart of a file uploading method provided in an embodiment of the present invention, which is applied to a client, and as shown in fig. 3, the method includes:
and S31, sending an uploading parameter acquisition request to the server, wherein the uploading parameter acquisition request comprises the position information of the terminal where the client is located and the identifier of the terminal.
The client is integrated with an upload SDK (Software Development Kit). And the client finishes file uploading by calling an uploading interface packaged by the uploading SDK. The uploading SDK supports the acquisition of parameter information of an uploading node from a server, generates an uploading parameter acquisition request comprising position information of a terminal where a client is located and an identifier (such as a unique identifier of a device number) of the terminal, wherein the position information can be an IP address and/or longitude and latitude information of the client, the longitude and latitude information can be acquired through a positioning device (such as a GPS positioning module) arranged in the terminal, and sends the generated uploading parameter acquisition request to the server so as to acquire the parameter information of the uploading node from the server, wherein the parameter information of the uploading node. The uploading node is a node for storing the file uploaded by the client, and the uploading node can be a private cloud node or a public cloud node.
And S32, receiving the parameter information of the uploading node sent by the server side in response to the uploading parameter acquisition request, wherein the parameter information of the uploading node comprises the identification and the file name of the uploading node.
The identifier of the uploading node can be a domain name or an IP (Internet protocol) of the uploading node, so that the uploading node can be uniquely determined by the client, the parameter information further comprises a Bucket (open storage) name inside the uploading node, so that the client can know where the file is stored specifically, and the client needs a certificate when uploading the file to the Bucket, so that the parameter information further comprises a temporary certificate for uploading the file to the Bucket corresponding to the node, and the client can upload the file to the Bucket only under the condition of the certificate.
And S33, renaming the file to be uploaded according to the file name contained in the parameter information of the uploading node.
In order to prevent duplicate names from occurring due to user-defined file names and prevent duplicate-name files from being uploaded to the same uploading node, the file names are added in parameter information of the uploading node sent to the client, and different file names are allocated for different files.
And S34, determining the uploading node according to the uploading node identifier contained in the parameter information of the uploading node.
And determining a unique node according to the identifier of the uploading node, wherein the node is the uploading node.
And S35, uploading the renamed file to be uploaded to the uploading node.
The method for uploading the file to be uploaded to the upload node after the upload node is determined is the existing mature technology, and generally, the file to be uploaded is uploaded to the internal memory of the upload node according to the name of the internal memory of the upload node and the temporary certificate of the internal memory, and the specific process is not repeated.
In this embodiment, the file to be uploaded is renamed and then uploaded to the uploading node, so that the file name of the file to be uploaded cannot be renamed with other files uploaded to the uploading node, and the problems of file coverage and the like caused by renaming are avoided.
The file uploading method provided by the embodiment of the invention sends an uploading parameter acquisition request comprising the position information of the terminal where the client is located and the identifier of the terminal to the server, so as to acquire the parameter information of the uploading node comprising the identifier of the uploading node and the file name sent by the server, renames the file to be uploaded according to the file name, thereby avoiding the problem of file coverage caused by uploading the renamed file to the same uploading node due to the self naming of a user, and uploads the renamed file with the uploading to the uploading node according to the identifier of the uploading node, thereby completing the file uploading. According to the file uploading method, the client communicates with the server, so that specific uploading nodes are determined from the mixed node library, compared with the existing method that the uploading nodes are determined only from public cloud nodes or only from private cloud nodes, the number of optional nodes is increased, and the uploading success rate is improved.
In a possible implementation manner, on the basis of the file uploading method provided in the foregoing embodiment, the method may further include: and acquiring an uploading result of the file to be uploaded to the uploading node, and sending the uploading result to the server, so that the server adjusts the distribution weight of the uploading node for the terminal according to the uploading result.
Specifically, the higher the uploading success rate of the uploading node for the terminal is, the higher the distribution weight setting of the uploading node for the terminal is when the distribution weight is adjusted, and if the uploading success rate of the uploading node for the terminal is lower, the lower the distribution weight setting of the uploading node for the distribution weight of the terminal is when the distribution weight is adjusted.
In a possible implementation manner, on the basis of the file uploading method provided in the foregoing embodiment, the method may further include: and acquiring a resource path of the file to be uploaded.
In this embodiment, the resource path of the file to be uploaded is obtained, and the specific storage location of the file to be uploaded can be determined according to the resource path, so that the file to be uploaded can be conveniently searched subsequently.
Fig. 4 is a block diagram of a file uploading apparatus provided in an embodiment of the present invention, where the apparatus is applied to a server, and as shown in fig. 4, the apparatus may include:
a receiving module 401, configured to receive an upload parameter acquisition request sent by a client, where the upload parameter acquisition request includes location information of a terminal where the client is located and an identifier of the terminal;
a first determining module 402, configured to determine a node in an available state from a preset hybrid node library, where the hybrid node library includes a private cloud node and a public cloud node;
a second determining module 403, configured to determine, according to the location information of the terminal, the identifier of the terminal, and a preset node scheduling policy, an uploading node in the nodes in the available state, where the uploading node is configured to receive a file uploaded by the client;
an obtaining module 404, configured to obtain parameter information of the upload node;
a sending module 405, configured to send the parameter information of the upload node to the client, so that the client uploads a file to be uploaded to the upload node according to the parameter information.
The file uploading device provided by the embodiment of the invention is used for acquiring an uploading parameter acquisition request which is sent by a client and contains the position information of a terminal where the client is located and the identifier of the terminal, determining a node in an available state from a preset mixed node library containing a private cloud node and a public cloud node, determining an uploading node for receiving a file uploaded by the client from the nodes in the available state according to the position information of the terminal where the client is located, the identifier of the terminal and a preset node scheduling strategy, acquiring the parameter information of the uploading node and sending the parameter information to the client, so that the client uploads the file to be uploaded to the uploading node according to the parameter information. According to the scheme, the server determines the uploading node from the available public cloud nodes and/or private cloud nodes according to the position information of the terminal where the client is located and the terminal identification, and compared with the existing method that the uploading node is determined only from the private cloud nodes or only from the public cloud nodes, the method and the system increase the nodes for uploading files, improve the uploading success rate, and realize the optimal solution of multiple angles such as node number, distribution breadth, user access threshold, resource use cost and the like.
In a possible implementation manner, the second determining module 403 is specifically configured to:
determining a node corresponding to the position information in the nodes in the available state as a target node according to a preset corresponding relation between the node and the position information;
if the number of the target nodes is one, determining that the target nodes are uploading nodes;
if the number of the target nodes is multiple, determining preset distribution weight of each node in the target nodes aiming at the terminal according to the identification of the terminal, and randomly selecting and determining one node in the target nodes as an uploading node according to the distribution weight.
In one possible implementation, the apparatus further includes:
the adjusting module is used for receiving an uploading result which is sent by the client and is used for uploading the file to be uploaded to the uploading node, the uploading result shows that the file to be uploaded is uploaded successfully or unsuccessfully, recording the corresponding relation between the uploading result and the terminal, calculating the uploading success rate of the uploading node aiming at the terminal according to the uploading result, and adjusting the distribution weight of the uploading node aiming at the terminal according to the uploading success rate.
Fig. 5 is a block diagram of a file uploading apparatus provided in an embodiment of the present invention, where the apparatus is applied to a client, and as shown in fig. 5, the apparatus includes:
a sending module 501, configured to send an upload parameter acquisition request to a server, where the upload parameter acquisition request includes location information of a terminal where a client is located and an identifier of the terminal;
a receiving module 502, configured to receive parameter information of an upload node sent by a server in response to the upload parameter acquisition request, where the parameter information of the upload node includes an identifier and a file name of the upload node;
a renaming module 503, configured to rename the file to be uploaded according to the file name included in the parameter information of the upload node;
an upload node determination module 504, configured to determine an upload node according to an upload node identifier included in the parameter information of the upload node;
and an uploading module 505, configured to upload the renamed file to be uploaded to the uploading node.
The file uploading device provided by the embodiment of the invention sends an uploading parameter acquisition request comprising the position information of the terminal where the client is located and the identifier of the terminal to the server, so that the parameter information of the uploading node comprising the identifier of the uploading node and the file name sent by the server is acquired, and the file to be uploaded is renamed according to the file name, so that the problem that the renaming file is uploaded to the same uploading node due to the self naming of a user and the file coverage occurs is solved, and the renamed file with the uploading file is uploaded to the uploading node according to the identifier of the uploading node, so that the file uploading is completed. According to the file uploading method, the client communicates with the server, so that specific uploading nodes are determined from the mixed node library, compared with the existing method that the uploading nodes are determined only from public cloud nodes or only from private cloud nodes, the number of optional nodes is increased, and the uploading success rate is improved.
In one possible implementation, the apparatus further includes: and the feedback module is used for acquiring an uploading result of the file to be uploaded to the uploading node and sending the uploading result to the server so that the server adjusts the distribution weight of the uploading node for the terminal according to the uploading result.
In another embodiment of the present application, a computer device is further provided, as shown in fig. 6, including a processor 601, a communication interface 602, a memory 603, and a communication bus 604, where the processor 601, the communication interface 602, and the memory 603 complete communication with each other through the communication bus 604;
a memory 603 for storing a computer program;
the processor 601 is configured to implement the following steps when executing the program stored in the memory 603:
the method comprises the steps of receiving an uploading parameter obtaining request sent by a client, wherein the uploading parameter obtaining request comprises position information of a terminal where the client is located and an identification of the terminal, determining a node in an available state from a preset mixed node library, the mixed node library comprises a private cloud node and a public cloud node, determining an uploading node in the available state according to the position information of the terminal, the identification of the terminal and a preset node scheduling strategy, and the uploading node is used for receiving a file uploaded by the client, obtaining parameter information of the uploading node, and sending the parameter information of the uploading node to the client so that the client uploads the file to be uploaded to the uploading node according to the parameter information.
Or the like, or, alternatively,
the method comprises the steps of sending an uploading parameter acquisition request to a server, wherein the uploading parameter acquisition request comprises position information of a terminal where a client is located and an identification of the terminal, receiving parameter information of an uploading node sent by the server in response to the uploading parameter acquisition request, the parameter information of the uploading node comprises the identification and a file name of the uploading node, renaming a file to be uploaded according to the file name contained in the parameter information of the uploading node, determining the uploading node according to the uploading node identification contained in the parameter information of the uploading node, and uploading the renamed file to be uploaded to the uploading node.
The communication bus 604 mentioned above for the computer device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus 604 may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 6, but this is not intended to represent only one bus or type of bus.
The communication interface 602 is used for communication between the above-described computer device and other devices.
The Memory 603 may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor 601 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
In another embodiment of the present application, there is also provided a computer-readable storage medium having stored thereon a data processing method program which, when executed by a processor, implements the steps of:
the method comprises the steps of receiving an uploading parameter obtaining request sent by a client, wherein the uploading parameter obtaining request comprises position information of a terminal where the client is located and an identification of the terminal, determining a node in an available state from a preset mixed node library, the mixed node library comprises a private cloud node and a public cloud node, determining an uploading node in the available state according to the position information of the terminal, the identification of the terminal and a preset node scheduling strategy, and the uploading node is used for receiving a file uploaded by the client, obtaining parameter information of the uploading node, and sending the parameter information of the uploading node to the client so that the client uploads the file to be uploaded to the uploading node according to the parameter information.
Or the like, or, alternatively,
the method comprises the steps of sending an uploading parameter acquisition request to a server, wherein the uploading parameter acquisition request comprises position information of a terminal where a client is located and an identification of the terminal, receiving parameter information of an uploading node sent by the server in response to the uploading parameter acquisition request, the parameter information of the uploading node comprises the identification and a file name of the uploading node, renaming a file to be uploaded according to the file name contained in the parameter information of the uploading node, determining the uploading node according to the uploading node identification contained in the parameter information of the uploading node, and uploading the renamed file to be uploaded to the uploading node.
When the embodiment of the invention is specifically implemented, reference can be made to the above embodiments, and corresponding technical effects are achieved.
It is to be understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or any combination thereof. For a hardware implementation, the Processing units may be implemented within one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), general purpose processors, controllers, micro-controllers, microprocessors, other electronic units configured to perform the functions described herein, or a combination thereof.
For a software implementation, the techniques described herein may be implemented by means of units performing the functions described herein. The software codes may be stored in a memory and executed by a processor. The memory may be implemented within the processor or external to the processor.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present invention may be essentially implemented or make a contribution to the prior art, or may be implemented in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (12)

1. A file uploading method is applied to a server side, and comprises the following steps:
receiving an uploading parameter acquisition request sent by a client, wherein the uploading parameter acquisition request comprises position information of a terminal where the client is located and an identifier of the terminal;
determining nodes in an available state from a preset mixed node library, wherein the mixed node library comprises private cloud nodes and public cloud nodes;
determining an uploading node in the nodes in the available state according to the position information of the terminal, the identification of the terminal and a preset node scheduling strategy, wherein the uploading node is used for receiving the file uploaded by the client;
acquiring parameter information of the uploading node;
and sending the parameter information of the uploading node to the client so that the client uploads the file to be uploaded to the uploading node according to the parameter information.
2. The method of claim 1, wherein determining an upload node among the nodes in the available state according to the location information of the terminal, the identifier of the terminal, and a preset node scheduling policy comprises:
determining a node corresponding to the position information of the terminal in the nodes in the available state as a target node according to a preset corresponding relation between the node and the position information;
if the number of the target nodes is one, determining that the target nodes are uploading nodes;
if the number of the target nodes is multiple, determining preset distribution weight of each node in the target nodes aiming at the terminal according to the identification of the terminal, and randomly selecting one node in the target nodes as an uploading node according to the distribution weight.
3. The method of claim 1, further comprising:
receiving an uploading result which is sent by the client and is uploaded to the uploading node by the file to be uploaded, wherein the uploading result represents that the file to be uploaded is uploaded successfully or unsuccessfully;
recording the corresponding relation between the uploading result and the terminal;
calculating the uploading success rate of the uploading node aiming at the terminal according to the uploading result;
and adjusting the distribution weight of the uploading node aiming at the terminal according to the uploading success rate.
4. A file uploading method is applied to a client, and comprises the following steps:
sending an uploading parameter acquisition request to a server, wherein the uploading parameter acquisition request comprises the position information of a terminal where a client is located and the identifier of the terminal;
receiving parameter information of an uploading node sent by a server end in response to the uploading parameter acquisition request, wherein the parameter information of the uploading node comprises an identifier and a file name of the uploading node;
renaming the file to be uploaded according to the file name contained in the parameter information of the uploading node;
determining an uploading node according to an uploading node identifier contained in the parameter information of the uploading node;
and uploading the renamed file to be uploaded to the uploading node.
5. The method of claim 4, further comprising:
acquiring an uploading result of the file to be uploaded to the uploading node;
and sending the uploading result to the server side so that the server side adjusts the distribution weight of the uploading node for the terminal according to the uploading result.
6. A file uploading device is applied to a server side, and the device comprises:
the system comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for receiving an uploading parameter acquisition request sent by a client, and the uploading parameter acquisition request comprises position information of a terminal where the client is located and an identifier of the terminal;
the system comprises a first determining module, a second determining module and a third determining module, wherein the first determining module is used for determining nodes in an available state from a preset mixed node library, and the mixed node library comprises private cloud nodes and public cloud nodes;
a second determining module, configured to determine, according to the location information of the terminal, the identifier of the terminal, and a preset node scheduling policy, an uploading node among the nodes in the available state, where the uploading node is used to receive a file uploaded by the client;
the acquisition module is used for acquiring the parameter information of the uploading node;
and the sending module is used for sending the parameter information of the uploading node to the client so that the client uploads the file to be uploaded to the uploading node according to the parameter information.
7. The apparatus of claim 6, wherein the second determining module is specifically configured to:
determining a node corresponding to the position information in the nodes in the available state as a target node according to a preset corresponding relation between the node and the position information;
if the number of the target nodes is one, determining that the target nodes are uploading nodes;
if the number of the target nodes is multiple, determining preset distribution weight of each node in the target nodes aiming at the terminal according to the identification of the terminal, and randomly selecting and determining one node in the target nodes as an uploading node according to the distribution weight.
8. The apparatus of claim 6, further comprising:
the adjusting module is used for receiving an uploading result which is sent by the client and is used for uploading the file to be uploaded to the uploading node, the uploading result shows that the file to be uploaded is uploaded successfully or unsuccessfully, recording the corresponding relation between the uploading result and the terminal, calculating the uploading success rate of the uploading node aiming at the terminal according to the uploading result, and adjusting the distribution weight of the uploading node aiming at the terminal according to the uploading success rate.
9. An apparatus for uploading a file, applied to a client, the apparatus comprising:
the system comprises a sending module, a receiving module and a processing module, wherein the sending module is used for sending an uploading parameter acquisition request to a server side, and the uploading parameter acquisition request comprises the position information of a terminal where a client side is located and the identifier of the terminal;
the receiving module is used for receiving the parameter information of the uploading node sent by the server end in response to the uploading parameter acquisition request, wherein the parameter information of the uploading node comprises the identification and the file name of the uploading node;
the renaming module is used for renaming the file to be uploaded according to the file name contained in the parameter information of the uploading node;
the uploading node determining module is used for determining the uploading node according to the uploading node identifier contained in the parameter information of the uploading node;
and the uploading module is used for uploading the renamed file to be uploaded to the uploading node.
10. The apparatus of claim 9, further comprising: and the feedback module is used for acquiring an uploading result of the file to be uploaded to the uploading node and sending the uploading result to the server so that the server adjusts the distribution weight of the uploading node for the terminal according to the uploading result.
11. A computer device, comprising: a processor and a memory, the processor being configured to execute a data processing program stored in the memory to implement the file upload method of any of claims 1 to 3 or the file upload method of any of claims 4 to 5.
12. A storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement the file upload method of any one of claims 1 to 3 or the file upload method of any one of claims 4 to 5.
CN201911421143.9A 2019-12-31 2019-12-31 File uploading method and device, computer equipment and storage medium Active CN111083243B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911421143.9A CN111083243B (en) 2019-12-31 2019-12-31 File uploading method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911421143.9A CN111083243B (en) 2019-12-31 2019-12-31 File uploading method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111083243A true CN111083243A (en) 2020-04-28
CN111083243B CN111083243B (en) 2022-07-12

Family

ID=70321326

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911421143.9A Active CN111083243B (en) 2019-12-31 2019-12-31 File uploading method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111083243B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112699093A (en) * 2021-01-25 2021-04-23 浪潮通用软件有限公司 File storage method and equipment supporting hybrid multi-cloud

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102263825A (en) * 2011-08-08 2011-11-30 浪潮电子信息产业股份有限公司 Cloud-position-based hybrid cloud storage system data transmission method
CN102571991A (en) * 2012-03-27 2012-07-11 电子科技大学 Multistage-mapping-based large-scale multi-copy distributed storage system and application method thereof
US20160366240A1 (en) * 2015-06-10 2016-12-15 Ricoh Company, Ltd. Offline mobile capture
CN106600020A (en) * 2016-12-23 2017-04-26 北京万相融通科技股份有限公司 System used for scheduling station pickup services and method thereof
CN106713495A (en) * 2017-01-20 2017-05-24 北京海泰方圆科技股份有限公司 Uploading method and apparatus, access method and apparatus, and access system of IP geographic position
US20170206218A1 (en) * 2016-01-19 2017-07-20 Hope Bay Technologies, Inc Method and apparatus for data deduplication in cloud based storage system
CN110417860A (en) * 2019-06-21 2019-11-05 深圳壹账通智能科技有限公司 File transfer management method, apparatus, equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102263825A (en) * 2011-08-08 2011-11-30 浪潮电子信息产业股份有限公司 Cloud-position-based hybrid cloud storage system data transmission method
CN102571991A (en) * 2012-03-27 2012-07-11 电子科技大学 Multistage-mapping-based large-scale multi-copy distributed storage system and application method thereof
US20160366240A1 (en) * 2015-06-10 2016-12-15 Ricoh Company, Ltd. Offline mobile capture
US20170206218A1 (en) * 2016-01-19 2017-07-20 Hope Bay Technologies, Inc Method and apparatus for data deduplication in cloud based storage system
CN106600020A (en) * 2016-12-23 2017-04-26 北京万相融通科技股份有限公司 System used for scheduling station pickup services and method thereof
CN106713495A (en) * 2017-01-20 2017-05-24 北京海泰方圆科技股份有限公司 Uploading method and apparatus, access method and apparatus, and access system of IP geographic position
CN110417860A (en) * 2019-06-21 2019-11-05 深圳壹账通智能科技有限公司 File transfer management method, apparatus, equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
卢亮: "混合云存储架构的研究与设计", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112699093A (en) * 2021-01-25 2021-04-23 浪潮通用软件有限公司 File storage method and equipment supporting hybrid multi-cloud

Also Published As

Publication number Publication date
CN111083243B (en) 2022-07-12

Similar Documents

Publication Publication Date Title
US10880823B2 (en) Method and device method and device for obtaining access information of shared wireless access point
EP3069231B1 (en) Automated sdk ingestion
US9032081B1 (en) System and method for load balancing cloud-based accelerated transfer servers
CN105025086A (en) A cloud safe storing/retrieving method targeted at mobile intelligent terminals
JP2017509053A5 (en)
WO2017020554A1 (en) Method and device for providing wireless access point
CN104113870B (en) Network test method and mobile terminal
US9787560B2 (en) Effective service node traffic routing
CN111104675A (en) Method and device for detecting system security vulnerability
JP2018503307A5 (en)
CN111083243B (en) File uploading method and device, computer equipment and storage medium
CN103810010A (en) Information processing method and first electronic device terminal
CN103685176A (en) Terminal equipment, equipment management server and connection establishment method
US10455010B2 (en) Information processing apparatus and non-transitory computer readable medium
US20210141824A1 (en) Geolocation restricted content registration and publication
CN109756530B (en) Target application server and method and device for determining geographic position information
CN110677683B (en) Video storage and video access method and distributed storage and video access system
CN105530323A (en) File upgrading method, related equipment and system
CN108737493B (en) Address allocation method and device and electronic equipment
DE102015105010B4 (en) Method and device for determining an application to be recommended
US20190042991A1 (en) Resource physical positioning planning tool
CN110830540A (en) Method for accessing smart television to cloud server, storage medium and application server
CN110463154A (en) Distributed Scans
CN108780488B (en) Method, system and device for determining uploading permission of substance detection information
CN110677544B (en) PCRF location script updating method, device, equipment and storage medium

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
GR01 Patent grant
GR01 Patent grant