Movatterモバイル変換


[0]ホーム

URL:


CN112667579A - File storage method, device, equipment and storage medium - Google Patents

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

Info

Publication number
CN112667579A
CN112667579ACN202011630459.1ACN202011630459ACN112667579ACN 112667579 ACN112667579 ACN 112667579ACN 202011630459 ACN202011630459 ACN 202011630459ACN 112667579 ACN112667579 ACN 112667579A
Authority
CN
China
Prior art keywords
file
node
target
storage
uploading
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
CN202011630459.1A
Other languages
Chinese (zh)
Other versions
CN112667579B (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.)
Hangzhou Qulian Technology Co Ltd
Original Assignee
Hangzhou Qulian 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 Hangzhou Qulian Technology Co LtdfiledCriticalHangzhou Qulian Technology Co Ltd
Priority to CN202011630459.1ApriorityCriticalpatent/CN112667579B/en
Publication of CN112667579ApublicationCriticalpatent/CN112667579A/en
Application grantedgrantedCritical
Publication of CN112667579BpublicationCriticalpatent/CN112667579B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Classifications

Landscapes

Abstract

The application discloses a file storage method, a file storage device, file storage equipment and a file storage medium, and belongs to the technical field of storage. Applied to a terminal, comprising: displaying a file uploading page, wherein the file uploading page comprises a common uploading control and an accelerated uploading control; acquiring a file input on a file uploading page; if the trigger operation aiming at the common uploading control is detected, the file is stored to a target storage node in a file system, and the target storage node is a node for storing the file; and if the trigger operation aiming at the accelerated uploading control is detected, the file is sent to a target acceleration node in a file system, and the target acceleration node stores the file to a target storage node after receiving the file. In the application, the load rate of the target acceleration node is usually lower than that of the target storage node dedicated to file storage, so that when the terminal uploads the file to the target acceleration node, the file transmission speed is high, and the file uploading delay is low.

Description

File storage method, device, equipment and storage medium
Technical Field
The present application relates to the field of storage technologies, and in particular, to a file storage method, apparatus, device, and storage medium.
Background
At present, a centralized server can be used for building a file storage system, and a user can directly access the same file storage system from multiple places, directly upload files to the file storage system, or download files from the file storage system.
However, when multiple users upload files simultaneously, in a high concurrency scenario, the processing pressure of the file storage system is large, the file transfer speed is reduced, and the file upload delay is increased.
Disclosure of Invention
The embodiment of the application provides a file storage method, a file storage device, file storage equipment and a file storage medium, and file uploading delay can be reduced. The technical scheme is as follows:
in a first aspect, a file storage method is provided, which is applied to a terminal, and the method includes:
displaying a file uploading page, wherein the file uploading page comprises a common uploading control and an accelerated uploading control;
acquiring a file input by the file uploading page;
if the trigger operation aiming at the common uploading control is detected, storing the file to a target storage node in a file system, wherein the target storage node is a node for storing the file;
and if the trigger operation aiming at the accelerated uploading control is detected, the file is sent to a target acceleration node in the file system, and the target acceleration node stores the file to the target storage node after receiving the file.
In the application, when the terminal uploads the file, the file can be uploaded to the target acceleration node first, and then the target acceleration node stores the file to the target storage node. Since the target storage node is a node dedicated to storing the file, the load rate of the target acceleration node is usually lower than that of the target storage node, and thus when the terminal uploads the file to the target acceleration node, the file transmission speed is high, and the file uploading delay is low. Therefore, the problem that the file uploading delay is high under the high concurrency condition can be solved, and the bandwidth pressure of the target storage node is relieved. Therefore, the method can be applied to scenes with high reliability and high reliability requirements on files.
Optionally, the storing the file to a target storage node in a file system includes:
sending a first storage request carrying the file to the target storage node according to an IP (Internet Protocol) address of the target storage node, wherein the first storage request is used for requesting the target storage node to store the file;
the sending the file to a target acceleration node in the file system includes:
and sending a second storage request carrying the file to the target acceleration node according to the IP address of the target acceleration node, wherein the second storage request is used for requesting the target acceleration node to store the file to the target storage node.
Optionally, before the displaying the file and uploading the page, the method further includes:
sending a file uploading page request to the file system;
receiving a response message returned by the file system, wherein the response message carries the page data of the file uploading page and the IP address of the target storage node;
the display file uploading page comprises:
and displaying the file uploading page according to the page data.
Optionally, the response message further carries an IP address of the target acceleration node, where the IP address of the target acceleration node is carried in the response message by the file system when the load rate of the target storage node is greater than the load rate threshold.
Optionally, before sending, to the target acceleration node, the second storage request carrying the file according to the IP address of the target acceleration node, the method further includes:
if the trigger operation aiming at the accelerated uploading control is detected, an accelerated storage request is sent to the file system;
and receiving the IP address of the target acceleration node returned by the file system, wherein the target acceleration node is selected from a plurality of acceleration nodes by the file system according to the load rate.
Optionally, the target storage node is one of a plurality of storage nodes in distributed deployment included in the file system, and the second storage request further carries an IP address of the target storage node.
Optionally, after sending the file to the target acceleration node in the file system, the method further includes:
according to the IP address of the target storage node, sending a file acquisition request to the target storage node, returning the file to the terminal by the target storage node when the file is stored, and acquiring the file from the target acceleration node and returning the file to the terminal when the file is not stored;
and receiving the file returned by the target storage node.
In a second aspect, there is provided a file storage apparatus applied to a terminal, the apparatus including:
the display module is used for displaying a file uploading page, and the file uploading page comprises a common uploading control and an accelerated uploading control;
the acquisition module is used for acquiring a file input by the file uploading page;
the first storage module is used for storing the file to a target storage node in a file system under the condition that the trigger operation aiming at the common uploading control is detected, wherein the target storage node is a node for storing the file;
and the second storage module is used for sending the file to a target acceleration node in the file system under the condition that the trigger operation aiming at the acceleration uploading control is detected, and storing the file to the target storage node after the target acceleration node receives the file.
Optionally, the first storage module is configured to:
sending a first storage request carrying the file to the target storage node according to the IP address of the target storage node, wherein the first storage request is used for requesting the target storage node to store the file;
the second storage module is configured to:
and sending a second storage request carrying the file to the target acceleration node according to the IP address of the target acceleration node, wherein the second storage request is used for requesting the target acceleration node to store the file to the target storage node.
Optionally, the apparatus further comprises:
the sending module is used for sending a file uploading page request to the file system;
the receiving module is used for receiving a response message returned by the file system, wherein the response message carries the page data of the file uploading page and the IP address of the target storage node;
the display module is used for:
and displaying the file uploading page according to the page data.
Optionally, the response message further carries an IP address of the target acceleration node, where the IP address of the target acceleration node is carried in the response message by the file system when the load rate of the target storage node is greater than the load rate threshold.
Optionally, the apparatus further comprises:
the sending module is used for sending an accelerated storage request to the file system under the condition that the triggering operation aiming at the accelerated uploading control is detected;
a receiving module, configured to receive an IP address of the target acceleration node returned by the file system, where the target acceleration node is selected by the file system from multiple acceleration nodes according to a load rate.
Optionally, the target storage node is one of a plurality of storage nodes in distributed deployment included in the file system, and the second storage request further carries an IP address of the target storage node.
Optionally, the apparatus further comprises:
a sending module, configured to send a file acquisition request to the target storage node according to the IP address of the target storage node, where the target storage node returns the file to the terminal when storing the file, and acquires the file from the target acceleration node and returns the file to the terminal when not storing the file;
and the receiving module is used for receiving the file returned by the target storage node.
In a third aspect, a computer device is provided, the computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program, when executed by the processor, implementing the file storage method described above.
In a fourth aspect, a computer-readable storage medium is provided, which stores a computer program that, when executed by a processor, implements the file storage method described above.
In a fifth aspect, a computer program product containing instructions is provided, which when run on a computer, causes the computer to perform the steps of the file storage method described above.
It is to be understood that, for the beneficial effects of the second aspect, the third aspect, the fourth aspect and the fifth aspect, reference may be made to the description of the first aspect, and details are not described herein again.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic diagram of a file storage system provided by an embodiment of the present application;
FIG. 2 is a schematic diagram of another file storage system provided by an embodiment of the present application;
FIG. 3 is a flowchart of a file storage method according to an embodiment of the present application;
fig. 4 is a schematic diagram of a document upload page provided in an embodiment of the present application;
FIG. 5 is a flowchart of another file storage method provided in an embodiment of the present application;
FIG. 6 is a schematic structural diagram of a file storage device according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
It should be understood that reference to "a plurality" in this application means two or more. In addition, for the convenience of clearly describing the technical solutions of the present application, the terms "first", "second", and the like are used to distinguish the same items or similar items having substantially the same functions and actions. Those skilled in the art will appreciate that the terms "first," "second," etc. do not denote any order or quantity, nor do the terms "first," "second," etc. denote any order or importance.
The system architecture according to the embodiments of the present application is described below.
Fig. 1 is a schematic diagram of a file storage system according to an embodiment of the present application. Referring to fig. 1, the file storage system includes: a terminal 101 and afile system 102. The terminal 101 and thefile system 102 may communicate through a wired network or a wireless network.
The terminal 101 may be a device capable of interacting with a user. For example, the terminal 101 may be a desktop computer, a laptop computer, a palmtop computer, a mobile phone, a tablet computer, and the like, and the embodiment of the present application does not limit the type of the terminal 101.
TheFile System 102 is a server cluster composed of a plurality of servers, and for example, the File System may be an IPFS (internet File System). In the embodiment of the present application, the server in thefile system 102 is referred to as a node.Storage node 1021 andacceleration node 1022 are included infile system 102. Thestorage node 1021 is a node for storing a file.Acceleration node 1022 is a node that is used to facilitate file uploads and may temporarily store files in an accelerated upload mode.
As an example, referring to fig. 2, afile system 102 may include a plurality ofstorage nodes 1021 in a distributed deployment, and a plurality ofacceleration nodes 1022.Multiple storage nodes 102 may implement distributed storage of files. Thestorage nodes 1021 may be deployed in different geographic regions, and similarly, theacceleration nodes 1022 may be deployed in different geographic regions.
The terminal 101 and thefile system 102 may execute a file storage method described in the embodiment of fig. 3 below to store a file.
The following explains the file storage method provided in the embodiments of the present application in detail.
Fig. 3 is a flowchart of a file storage method according to an embodiment of the present application. Referring to fig. 3, the method includes the following steps.
Step 301: and the terminal sends a file uploading page request to the file system.
The file uploading page request is used for requesting to acquire page data of a file uploading page. The file upload request is a page for uploading a file. The user uploads the file to the file system by entering the file in the file upload page.
Specifically, the terminal may send a file upload page request to the file system when receiving a file upload page display instruction.
The file uploading page display instruction can be triggered by a user, and the user can trigger the file uploading page display instruction through operations such as clicking operation, sliding operation, voice operation, gesture operation and somatosensory operation.
Step 302: and after receiving a file uploading page request sent by the terminal, the file system sends a response message to the terminal.
After receiving a file uploading page request sent by the terminal, the file system can acquire page data of the file uploading page, can acquire an IP address of a target storage node, and sends the page data and the IP address of the target storage node to the terminal by carrying the page data and the IP address of the target storage node in a response message.
The target storage node is a storage node for storing the file uploaded by the terminal. After receiving a file uploading page request sent by the terminal, the file system can determine a target storage node and then acquire an IP address of the target storage node.
In a possible case, the target storage node is a storage node corresponding to the terminal, and the storage node corresponding to the terminal may be fixed, that is, for the terminal, whenever the terminal uploads a file, the uploaded file needs to be stored in the storage node corresponding to the terminal. For example, it may be set that files uploaded by terminals in a certain area all need to be stored in a storage node corresponding to the area.
In another possible case, the target storage node may be determined by the file system after receiving a file upload page request sent by the terminal. For example, after receiving a file upload page request sent by the terminal, the file system may select one storage node from a plurality of storage nodes deployed in a distributed manner included in the file system as a target storage node, and specifically may select an optimal storage node from the plurality of storage nodes as the target storage node according to a load rate of each storage node, a distance between each storage node and the terminal, and the like. In this case, for the terminal, files uploaded by the terminal at different times may be stored to different storage nodes.
Further, after determining the target storage node, the file system may also determine a load rate of the target storage node. If the load rate of the target storage node is greater than the preset load rate threshold, it indicates that the load of the target storage node is high, and the processing pressure of the target storage node is high. Therefore, in this case, the file system may determine the target acceleration node, then obtain the IP address of the target acceleration node, and send the IP address of the target acceleration node to the terminal also in the response message, so that the terminal may use the target acceleration node for accelerated upload subsequently. The target acceleration node is an acceleration node for assisting the terminal in uploading the file, and the target acceleration node can temporarily store the file in an acceleration uploading mode.
In a possible case, the target acceleration node is an acceleration node corresponding to the terminal, and the acceleration node corresponding to the terminal may be fixed, that is, for the terminal, whenever the terminal uploads a file, the acceleration node corresponding to the terminal may be used if the terminal needs to accelerate the upload. For example, a terminal in a certain area may be set to use an acceleration node corresponding to the area when accelerating uploading a file.
In another possible case, the target acceleration node may be determined by the file system after receiving a file upload page request sent by the terminal. For example, after receiving a file upload page request sent by the terminal, the file system may select one acceleration node from a plurality of acceleration nodes included in the file system as a target acceleration node, and specifically may select an optimal acceleration node from the plurality of acceleration nodes as the target acceleration node according to a load rate of each acceleration node, a distance between each acceleration node and the terminal, and the like. In this case, for the terminal to upload files at different times, different acceleration nodes may be used to accelerate the upload.
Step 303: the terminal displays a file upload page.
Specifically, the terminal may display the file upload file according to the page data of the file upload page returned by the file system.
The file uploading page comprises a common uploading control and an accelerated uploading control. And the common uploading control is used for normally uploading the file to the storage node. And the accelerated uploading control is used for accelerating the uploading of the file to the storage node.
For example, a general upload control and an accelerated upload control are included in the file upload page shown in fig. 4. The user may upload the file to the file system through one of a normal upload control and an accelerated upload control.
Step 304: the terminal acquires a file input on the file uploading page.
The file input on the file uploading page is the file which the user needs to upload to the file system.
Step 305: and if the terminal detects the trigger operation aiming at the common uploading control, storing the file to a target storage node in the file system.
And the trigger operation aiming at the ordinary uploading control is used for indicating that the file is uploaded to the file system by using an ordinary uploading mode. The triggering operation for the common uploading control can be executed by a user, for example, the triggering operation can be a clicking operation, a sliding operation, a voice operation, a gesture operation, a body sensing operation and the like of the user on the common uploading control, as long as the operation can trigger the common uploading control to upload the file.
When the terminal stores the file to a target storage node in the file system, the terminal may send a first storage request carrying the file to the target storage node according to an IP address of the target storage node.
The first storage request is for requesting the target storage node to store the file. After receiving the first storage request, the target storage node may store the file carried by the first storage request.
When the target storage node is one of the storage nodes distributed in the file system, the target storage node may further share the file to at least one other storage node after storing the file. For example, the target storage node may share the file to at least one storage node adjacent to the target storage node. Therefore, the system disaster tolerance capability can be improved by adopting multipoint storage.
Step 306: and if the terminal detects the trigger operation aiming at the accelerated uploading control, the file is sent to a target acceleration node in the file system.
The trigger operation for the accelerated upload control is used to instruct uploading of the file to the file system using an accelerated upload mode. The triggering operation for the accelerated uploading control can be executed by a user, for example, the triggering operation can be a clicking operation, a sliding operation, a voice operation, a gesture operation, a body sensing operation and the like of the user on the accelerated uploading control, as long as the operation can trigger the accelerated uploading control to upload the file.
After the terminal sends the file to the target acceleration node in the file system, the target acceleration node can store the file to the target storage node after receiving the file.
In the embodiment of the application, when the terminal uploads the file, the file can be uploaded to the target acceleration node first, and then the target acceleration node stores the file to the target storage node. Since the target storage node is a node dedicated to storing the file, the load rate of the target acceleration node is usually lower than that of the target storage node, and thus when the terminal uploads the file to the target acceleration node, the file transmission speed is high, and the file uploading delay is low. Therefore, the problem that the file uploading delay is high under the high concurrency condition can be solved, and the bandwidth pressure of the target storage node is relieved. Therefore, the method can be applied to scenes with high reliability and high reliability requirements on files.
When the terminal sends the file to the target acceleration node in the file system, the terminal can send a second storage request carrying the file to the target acceleration node according to the IP address of the target acceleration node.
It should be noted that, if the response message carries the IP address of the target acceleration node, after detecting the trigger operation for the acceleration upload control, the terminal may directly send the second storage request carrying the file to the target acceleration node according to the IP address of the target acceleration node.
If the response message does not carry the IP address of the target acceleration node, the terminal may send an acceleration storage request to the file system first after detecting the trigger operation for the acceleration upload control. After receiving the acceleration storage request sent by the terminal, the file system can determine the target acceleration node, then acquire the IP address of the target acceleration node, and return the IP address of the target acceleration node to the terminal. The terminal may receive the IP address of the target acceleration node returned by the file system. And then, the terminal can send a second storage request carrying the file to the target acceleration node according to the IP address of the target acceleration node.
The way of determining the target acceleration node by the file system is the same as the way of determining the target acceleration node by the file system in step 302, which is not described in this embodiment.
The second storage request is used for requesting the target acceleration node to store the file to the target storage node. After receiving the second storage request, the target acceleration node may cache the file and then store the file to the target storage node.
If the target storage node is one of the storage nodes deployed in a distributed manner in the file system, the second storage request may also carry an IP address of the target storage node, so that the target acceleration node may accurately know to which storage node of the storage nodes the file carried by the second storage request needs to be stored.
After the target acceleration node stores the file in the target storage node, the file can be cached for a certain period of time and then deleted.
When the target storage node is one of the storage nodes distributed in the file system, the target storage node may further share the file to at least one other storage node after storing the file. For example, the target storage node may share the file to at least one storage node adjacent to the target storage node. Therefore, the system disaster tolerance capability can be improved by adopting multipoint storage.
In a possible case, after detecting the trigger operation for the accelerated uploading control, the terminal may store the file to the target storage node, and may also store the hash value of the file to the target storage node.
When the terminal stores the hash value of the file to the target storage node, the terminal can send the hash value of the file to the target storage node according to the IP address of the target storage node. When the target storage node receives the hash value sent by the terminal, the hash value can be stored.
It should be noted that, since the data size of the hash value of the file is much smaller than the data size of the file, the delay is low when the terminal stores the hash value of the file to the target storage node. And after the subsequent target storage node acquires the file from the target acceleration node, the acquired file can be verified according to the stored hash value, and after the verification is passed, the acquired file is stored.
Specifically, the target storage node may calculate a hash value of the received file as a first hash value and use the stored hash value as a second hash value after receiving the file sent by the target acceleration node. If the first hash value is the same as the second hash value, the target storage node may determine that the file is verified, and store the file. If the first hash value is different from the second hash value, the target storage node may determine that the file fails to be verified, and discard the file.
Further, after the terminal uploads the file to the file system, the file can be downloaded from the file system.
Specifically, the terminal may send a file acquisition request to the target storage node according to the IP address of the target storage node, where the file acquisition request is used to request to acquire a file previously stored in the file system. After receiving the file acquisition request sent by the terminal, the target storage node may return the file to the terminal when the file is locally stored, and acquire the file from the target acceleration node and return the file to the terminal when the file is not locally stored. The terminal may receive the file returned by the target storage node.
After the target storage node acquires the file from the target acceleration node, the file acquired from the target acceleration node can be verified according to the locally stored hash value, and after the file is verified, the file is returned to the terminal.
Specifically, after acquiring a file from the target acceleration node, the target storage node may calculate a hash value of the acquired file as a first hash value, and use the stored hash value as a second hash value. If the first hash value is the same as the second hash value, the target storage node may determine that the file is verified, and return the file to the terminal. If the first hash value is different from the second hash value, the target storage node may determine that the file fails to be verified, discard the file, and return a download failure notification message to the terminal.
In the embodiment of the application, after the terminal displays the file uploading page, the file input on the file uploading page is obtained. And then, if the terminal detects the trigger operation aiming at the common uploading control in the file uploading page, storing the file to a target storage node in the file system. And if the trigger operation aiming at the accelerated uploading control in the file uploading page is detected, the file is sent to a target acceleration node in the file system, and the target acceleration node stores the file to a target storage node after receiving the file. Since the target storage node is a node dedicated to storing the file, the load rate of the target acceleration node is usually lower than that of the target storage node, and thus when the terminal uploads the file to the target acceleration node, the file transmission speed is high, and the file uploading delay is low. Therefore, the problem that the file uploading delay is high under the high concurrency condition can be solved, and the bandwidth pressure of the target storage node is relieved.
Fig. 5 is a flowchart of a file storage method according to an embodiment of the present application. The method is applied to a terminal, which may be the terminal 101 described above in the embodiments of fig. 1-2. Referring to fig. 5, the method may include the steps of:
step 501: and displaying a file uploading page, wherein the file uploading page comprises a common uploading control and an accelerated uploading control.
The related content ofstep 501 has already been described in detail in step 303 in the embodiment of fig. 3, and this is not described again in this embodiment of the present application.
Step 502: and acquiring the file input by the uploading page of the file.
The related content ofstep 502 has already been described in detail in step 304 in the embodiment of fig. 3, and is not described again in this embodiment of the present application.
Step 503: and if the trigger operation aiming at the common uploading control is detected, storing the file to a target storage node in the file system, wherein the target storage node is a node for storing the file.
The related content of step 503 has already been described in detail in step 305 in the embodiment of fig. 3, and is not described again in this embodiment of the present application.
Step 504: and if the trigger operation aiming at the accelerated uploading control is detected, the file is sent to a target acceleration node in the file system, and the target acceleration node stores the file to a target storage node after receiving the file.
The related content ofstep 504 is already described in detail in step 306 in the embodiment of fig. 3, and is not described again in this embodiment of the application.
In the embodiment of the application, after the terminal displays the file uploading page, the file input on the file uploading page is obtained. And then, if the terminal detects the trigger operation aiming at the common uploading control in the file uploading page, storing the file to a target storage node in the file system. And if the trigger operation aiming at the accelerated uploading control in the file uploading page is detected, the file is sent to a target acceleration node in the file system, and the target acceleration node stores the file to a target storage node after receiving the file. Since the target storage node is a node dedicated to storing the file, the load rate of the target acceleration node is usually lower than that of the target storage node, and thus when the terminal uploads the file to the target acceleration node, the file transmission speed is high, and the file uploading delay is low. Therefore, the problem that the file uploading delay is high under the high concurrency condition can be solved, and the bandwidth pressure of the target storage node is relieved.
Fig. 6 is a schematic structural diagram of a file storage device according to an embodiment of the present application, where the method is applied to a terminal, which may be the terminal 101 described in the embodiments of fig. 1 to fig. 2 above. Referring to fig. 6, the apparatus includes: adisplay module 601, a first obtainingmodule 602, afirst storage module 603 and asecond storage module 604.
Thedisplay module 601 is configured to display a file upload page, where the file upload page includes a common upload control and an accelerated upload control;
an obtainingmodule 602, configured to obtain a file input on a file upload page;
afirst storage module 603, configured to store a file to a target storage node in a file system when a trigger operation for a common upload control is detected, where the target storage node is a node for storing the file;
thesecond storage module 604 is configured to send the file to a target acceleration node in the file system when a trigger operation for the acceleration upload control is detected, and store the file to the target storage node after the target acceleration node receives the file.
Optionally, thefirst storage module 603 is configured to:
sending a first storage request carrying files to a target storage node according to the IP address of the target storage node, wherein the first storage request is used for requesting the target storage node to store the files;
thesecond storage module 604 is configured to:
and sending a second storage request carrying the file to the target acceleration node according to the IP address of the target acceleration node, wherein the second storage request is used for requesting the target acceleration node to store the file to the target storage node.
Optionally, the apparatus further comprises:
the sending module is used for sending a file uploading page request to the file system;
the receiving module is used for receiving a response message returned by the file system, wherein the response message carries page data of a file uploading page and an IP address of a target storage node;
thedisplay module 601 is configured to:
and displaying the file uploading page according to the page data.
Optionally, the response message further carries an IP address of the target acceleration node, where the IP address of the target acceleration node is carried in the response message by the file system when the load rate of the target storage node is greater than the load rate threshold.
Optionally, the apparatus further comprises:
the sending module is used for sending an accelerated storage request to the file system under the condition that the triggering operation aiming at the accelerated uploading control is detected;
and the receiving module is used for receiving the IP address of the target acceleration node returned by the file system, and the target acceleration node is selected from a plurality of acceleration nodes by the file system according to the load rate.
Optionally, the target storage node is one of a plurality of storage nodes in distributed deployment included in the file system, and the second storage request further carries an IP address of the target storage node.
Optionally, the apparatus further comprises:
the sending module is used for sending a file obtaining request to the target storage node according to the IP address of the target storage node, returning the file to the terminal when the target storage node stores the file, and obtaining the file from the target acceleration node and returning the file to the terminal when the file is not stored;
and the receiving module is used for receiving the file returned by the target storage node.
In the embodiment of the application, after the terminal displays the file uploading page, the file input on the file uploading page is obtained. And then, if the terminal detects the trigger operation aiming at the common uploading control in the file uploading page, storing the file to a target storage node in the file system. And if the trigger operation aiming at the accelerated uploading control in the file uploading page is detected, the file is sent to a target acceleration node in the file system, and the target acceleration node stores the file to a target storage node after receiving the file. Since the target storage node is a node dedicated to storing the file, the load rate of the target acceleration node is usually lower than that of the target storage node, and thus when the terminal uploads the file to the target acceleration node, the file transmission speed is high, and the file uploading delay is low. Therefore, the problem that the file uploading delay is high under the high concurrency condition can be solved, and the bandwidth pressure of the target storage node is relieved.
It should be noted that: in the file storage device provided in the above embodiment, when storing a file, only the division of each function module is illustrated, and in practical applications, the function distribution may be completed by different function modules according to needs, that is, the internal structure of the device is divided into different function modules to complete all or part of the functions described above.
Each functional unit and module in the above embodiments may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used to limit the protection scope of the embodiments of the present application.
The file storage device and the file storage method provided by the above embodiments belong to the same concept, and the specific working processes and technical effects brought by the units and modules in the above embodiments can be referred to the method embodiments, and are not described herein again.
Fig. 7 is a schematic structural diagram of a computer device according to an embodiment of the present application. As shown in fig. 7, thecomputer device 7 includes: aprocessor 70, amemory 71 and acomputer program 72 stored in thememory 71 and operable on theprocessor 70, the steps in the file storage method in the embodiment of fig. 5 above being implemented when theprocessor 70 executes thecomputer program 72.
Thecomputer device 7 may be a general purpose computer device or a special purpose computer device. In a specific implementation, thecomputer device 7 may be a desktop computer, a laptop computer, a palmtop computer, a mobile phone, a tablet computer, or the like, and the embodiment of the present application does not limit the type of thecomputer device 7. Those skilled in the art will appreciate that fig. 7 is only an example of thecomputer device 7, and does not constitute a limitation to thecomputer device 7, and may include more or less components than those shown, or combine some components, or different components, such as input and output devices, network access devices, etc.
TheProcessor 70 may be a Central Processing Unit (CPU), and theProcessor 70 may also be other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or any conventional processor.
Thestorage 71 may in some embodiments be an internal storage unit of thecomputer device 7, such as a hard disk or a memory of thecomputer device 7. Thememory 71 may also be an external storage device of thecomputer device 7 in other embodiments, such as a plug-in hard disk provided on thecomputer device 7, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like. Further, thememory 71 may also include both an internal storage unit of thecomputer device 7 and an external storage device. Thememory 71 is used for storing an operating system, an application program, a BootLoader (BootLoader), data, and other programs, such as program codes of a computer program. Thememory 71 may also be used to temporarily store data that has been output or is to be output.
An embodiment of the present application further provides a computer device, where the computer device includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, the processor implementing the steps of any of the various method embodiments described above when executing the computer program.
The embodiments of the present application also provide a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
The embodiments of the present application provide a computer program product, which when run on a computer causes the computer to perform the steps of the above-described method embodiments.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the above method embodiments may be implemented by a computer program, which may be stored in a computer readable storage medium and used by a processor to implement the steps of the above method embodiments. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include at least: any entity or apparatus capable of carrying computer program code to a photographing apparatus/terminal device, a recording medium, computer Memory, ROM (Read-Only Memory), RAM (Random Access Memory), CD-ROM (Compact Disc Read-Only Memory), magnetic tape, floppy disk, optical data storage device, etc. The computer-readable storage medium referred to herein may be a non-volatile storage medium, in other words, a non-transitory storage medium.
It should be understood that all or part of the steps for implementing the above embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. The computer instructions may be stored in the computer-readable storage medium described above.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
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 application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/computer device and method may be implemented in other ways. For example, the above-described apparatus/computer device embodiments are merely illustrative, and for example, a module or a unit may be divided into only one logical function, and may be implemented in other ways, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not implemented. 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.
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.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (10)

CN202011630459.1A2020-12-302020-12-30File storage method, device, equipment and storage mediumActiveCN112667579B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202011630459.1ACN112667579B (en)2020-12-302020-12-30File storage method, device, equipment and storage medium

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202011630459.1ACN112667579B (en)2020-12-302020-12-30File storage method, device, equipment and storage medium

Publications (2)

Publication NumberPublication Date
CN112667579Atrue CN112667579A (en)2021-04-16
CN112667579B CN112667579B (en)2023-07-28

Family

ID=75412918

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202011630459.1AActiveCN112667579B (en)2020-12-302020-12-30File storage method, device, equipment and storage medium

Country Status (1)

CountryLink
CN (1)CN112667579B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN117440099A (en)*2023-10-132024-01-23可之(宁波)人工智能科技有限公司Method for optimizing intelligent operation submission efficiency based on network monitoring

Citations (11)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20080320142A1 (en)*2007-04-302008-12-25Tom HicksMethod and apparatus for offloading network processes in a computer storage system
US20100281051A1 (en)*2004-12-082010-11-04B- Obvious Ltd.Bidirectional Data Transfer Optimization And Content Control For Networks
CN101986305A (en)*2010-11-012011-03-16华为技术有限公司File system operating method and communication device
CN102833337A (en)*2012-08-302012-12-19北京星网锐捷网络技术有限公司FTP (File Transfer Protocol) file uploading, downloading method and device
US20130097284A1 (en)*2010-06-292013-04-18Alcatel LucentMethod of file transmission based upon distributed storage in wireless communication system
CN103401946A (en)*2013-08-192013-11-20网宿科技股份有限公司HTTP (hyper text transfer protocol) uploading acceleration method and system
CN104320410A (en)*2014-11-112015-01-28南京优速网络科技有限公司All-service CDN system based on HTTP and working method thereof
CN105281987A (en)*2014-06-032016-01-27腾讯科技(深圳)有限公司Router and data upload method, device and system
US20160057201A1 (en)*2013-04-022016-02-25Huawei Technologies Co., Ltd.File Uploading Method, Client, and Application Server in Cloud Storage, and Cloud Storage System
CN106878366A (en)*2016-06-202017-06-20阿里巴巴集团控股有限公司A kind of file uploading method and device
CN109413207A (en)*2018-12-112019-03-01深圳市网心科技有限公司A kind of file uploading method, system, device and computer readable storage medium

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20100281051A1 (en)*2004-12-082010-11-04B- Obvious Ltd.Bidirectional Data Transfer Optimization And Content Control For Networks
US20080320142A1 (en)*2007-04-302008-12-25Tom HicksMethod and apparatus for offloading network processes in a computer storage system
US20130097284A1 (en)*2010-06-292013-04-18Alcatel LucentMethod of file transmission based upon distributed storage in wireless communication system
CN101986305A (en)*2010-11-012011-03-16华为技术有限公司File system operating method and communication device
CN102833337A (en)*2012-08-302012-12-19北京星网锐捷网络技术有限公司FTP (File Transfer Protocol) file uploading, downloading method and device
US20160057201A1 (en)*2013-04-022016-02-25Huawei Technologies Co., Ltd.File Uploading Method, Client, and Application Server in Cloud Storage, and Cloud Storage System
CN103401946A (en)*2013-08-192013-11-20网宿科技股份有限公司HTTP (hyper text transfer protocol) uploading acceleration method and system
CN105281987A (en)*2014-06-032016-01-27腾讯科技(深圳)有限公司Router and data upload method, device and system
CN104320410A (en)*2014-11-112015-01-28南京优速网络科技有限公司All-service CDN system based on HTTP and working method thereof
CN106878366A (en)*2016-06-202017-06-20阿里巴巴集团控股有限公司A kind of file uploading method and device
CN109413207A (en)*2018-12-112019-03-01深圳市网心科技有限公司A kind of file uploading method, system, device and computer readable storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN117440099A (en)*2023-10-132024-01-23可之(宁波)人工智能科技有限公司Method for optimizing intelligent operation submission efficiency based on network monitoring

Also Published As

Publication numberPublication date
CN112667579B (en)2023-07-28

Similar Documents

PublicationPublication DateTitle
CN109496419B (en)File processing method, device and system
US20180121322A1 (en)Methods and Systems for Testing Versions of Applications
CN111163130B (en)Network service system and data transmission method thereof
EP2660761A1 (en)Timestamp management method for data synchronization and terminal therefor
CN108647317B (en)Incremental file generation method and device, storage medium and electronic equipment
KR20190076197A (en)Apparatus and method for storing data based on blockchain
CN112312222A (en)Video sending method and device and electronic equipment
CN111880996B (en)Bare metal data acquisition method, device, equipment and readable storage medium
CN109982034B (en)Access request processing method and device in video monitoring system
CN112817493A (en)Content sharing method and device, computer equipment and storage medium
CN103559091B (en)A kind of data dispatching method and split type terminal system
CN112667579B (en)File storage method, device, equipment and storage medium
CN114090927A (en)Page loading method and device, computer equipment and storage medium
CN111373384A (en)Server device, vehicle-mounted device, and data communication method
CN111078437B (en)Remote calling method and device for verification codes, electronic equipment and readable storage medium
CN110198349B (en)File transmission method and device, storage medium and electronic device
CN111159244A (en)Data query method and device
CN112799608B (en)Blood glucose data storage method and system and electronic equipment
CN108009247B (en)Information pushing method and device
CN110300182A (en)Network node dispatching method and device, computer installation and storage medium
CN107203915B (en)Data storage method and device
CN110912953A (en) A file storage system and method
CN117992535A (en) Cross-device data synchronization method, device and storage medium
CN111131497B (en)File transmission method and device, electronic equipment and storage medium
CN115344422A (en)Method and device for bidirectional mapping of erasure correction block copy to three copies and electronic equipment

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp