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.
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.