Disclosure of Invention
Aiming at the technical defects in the prior art, the invention aims to provide a control method for short video cache cleaning and a corresponding control device. Specifically, the method comprises the following steps:
a. receiving a short video cache directory from a short video server;
b. and cleaning the short video cache in the user equipment according to the short video cache directory.
Preferably, the method further comprises the following steps before the step a:
i. and sending request information to the short video server for obtaining the short video cache directory.
Preferably, the step b comprises the steps of:
b1. determining a short video reservation list;
b2. and deleting the short videos in the short video cache directory outside the short video reservation list.
Preferably, the step b1 includes the following steps:
b11. sending hot short video list request information to the short video server;
b12. receiving a popular short video list from the short video server, and using the popular short video list as the short video reserved list.
Preferably, the step b1 includes the following steps:
b11', acquiring short video program information in short video caches in a plurality of user equipment;
b12'. counting the short video program information;
b13', using the short video information of the top three names as the short video reservation list.
Preferably, the step b13' includes the following steps:
b13, weighting the ranking information of the short video and the playing time length of the short video;
b 14' according to the weighting process result, and using the top three short video information as the short video reservation list.
Preferably, the following steps are included before the step b:
-determining whether the available storage space of the user equipment is below a first threshold;
-performing said step b if said available storage space is below said first threshold.
According to another aspect of the present invention, there is also provided a control device for short video buffer cleaning, including the following devices:
first receiving means for receiving a short video cache directory from a short video server;
and the first processing device is used for cleaning the short video cache in the user equipment according to the short video cache directory.
Preferably, the first processing means comprises the following means:
first determining means for determining a short video hold list;
first deleting means for deleting the short videos in the short video cache directory outside the short video reservation list.
Preferably, the control device further comprises the following means:
first determining means for determining whether an available storage space of the user equipment is lower than a first threshold; and
second processing means for starting the first processing means when the available storage space is below the first threshold.
The invention discloses a control method for short video cache cleaning, which can realize the cleaning of short videos in a local mobile terminal through the butt joint with a short video server or other background servers, thereby saving a large amount of storage space. The invention has the advantages of improving the accuracy of short video cleaning, having high efficiency, generating no side effect, being convenient for popularization and being capable of quickly occupying the market.
Detailed Description
In order to better and clearly show the technical scheme of the invention, the invention is further described with reference to the attached drawings.
The technical problem is solved by the invention, and the invention discloses a control method for short video cache cleaning, which determines how to clean short videos through interaction with a background server, thereby improving the efficiency and accuracy of cleaning storage space.
Specifically, in one embodiment, the control method may be implemented by:
step a, receiving a short video cache directory from a short video server. Preferably, a short video server sends the cache directory for storing the short video of the short video application program corresponding to the short video server to a control device (not shown in fig. 1 and 2) provided by the present invention, so that the control device obtains the corresponding short video cache directory.
And then, executing the step b, and cleaning the short video cache in the user equipment according to the short video cache directory. In the case that an accurate short video cache directory has been determined, all short videos in the short video cache directory china are preferably deleted directly, thereby achieving the release of the storage space.
Further, those skilled in the art understand that in other embodiments, the short video cache directory may come from a third-party backend server, for example, a backend server specially arranges the short video cache directories corresponding to various short video applications, so that a plurality of short video cache directories may be provided at one time, which does not affect the essence of the present invention and is not described herein.
Further, those skilled in the art understand that, in the step a, the short video cache directories corresponding to the short video servers may be obtained from the plurality of short video servers, so as to finally determine the plurality of short video cache directories, such as a tremble short video, a fast-hand short video, and so on, which is not described herein again.
Further, those skilled in the art will understand that in another embodiment, the following steps are included before step a: and sending request information to the short video server for obtaining the short video cache directory. Namely, the control device firstly sends request information to one or more short video zone servers, and the request information originally requests to obtain the corresponding short video cache directory. Correspondingly, after receiving the requests, the short video server sends the corresponding short video cache directory to the control device.
Further, those skilled in the art will appreciate that, for improved security, the request message from the control device should include a handshake signal, so that the short video server determines that this is not a malicious request message. Such variations are within the scope of the present invention and are not described herein.
Further, fig. 1 shows a detailed flowchart of a control method for short video cache cleaning according to a first embodiment of the present invention, which specifically includes the following steps:
first, the process proceeds to step S101, where a short video cache directory from a short video server is received. Specifically, the step a may be implemented by referring to the above, which is not described herein again.
Then, step S102 is executed to determine a short video reservation list. Not every short video will be deleted for different implementation needs. For example, in this embodiment, a portion of the short video is retained, and the specific short video is preferably retained according to a short video retention list. Therefore, in this step, a short video hold list is determined. The short video hold list may be confirmed in a number of ways, for example a dialog box may pop up, the user may be asked to select the short video that he wishes to leave, etc. There is also a description that follows regarding implementations of this content.
And finally, entering step S103, deleting the short videos in the short video cache directory outside the short video reservation list. And deleting all the short videos outside the list according to the short video reservation list. Preferably, the deletion is an unrecoverable delete operation.
Further, as will be appreciated by those skilled in the art, in a preferred embodiment, the control means issues a hot short video list request message to the short video server and accordingly receives a hot short video list from the short video server and treats the hot short video list as the short video hold list. In this way, a reserved list of short videos that need to be reserved can be easily obtained.
Based on the embodiment shown in fig. 1, fig. 2 is a schematic flowchart illustrating a control method for short video buffer cleaning according to a second embodiment of the present invention.
Specifically, regarding the step S102, how to determine the short video reserved list can be implemented by the following steps:
first, S201 is executed to obtain short video program information in short video buffers in a plurality of user equipments. Those skilled in the art will understand that, by means of p2p and other technical means, communication of multiple user terminals can be realized, so as to realize sharing short video program information in short video applications in multiple user terminals, respectively. Such a technical scheme of p2p can be realized by the control device provided by the present invention, and will not be described herein.
Then, step S202 is performed to count the short video program information, that is, count and count the short video program information in the multiple pieces of user equipment.
And finally, executing step S203, and using the short video information with the top three ranking numbers as the short video reservation list. Through a simple ranking mode, a short video reservation list which is most worthy of being reserved is determined.
In another preferred embodiment, the step S203 can be further detailed as follows:
firstly, step b13 ″ is executed, and the ranking information of the short videos and the playing time length of the short videos are weighted. Besides ranking the short videos, at least two short videos are adopted for weighting processing according to the playing time of the short videos.
And then, entering a step b 14', ranking according to the weighting processing result, and taking the short video information with the top three names as the short video reserved list. In this way, short videos with longer or shorter playing time duration are more easily retained.
Referring to the above-mentioned embodiments shown in fig. 1 and fig. 2, it is understood by those skilled in the art that, preferably, before step b or step S103 is performed, the following steps are further performed:
and c, judging whether the available storage space of the user equipment is lower than a first threshold value, and if the available storage space is lower than the first threshold value, executing the operation of deleting the short video, namely executing the step b or the step S103. Through the steps, the operation of clearing the played short video can be realized only when the storage space is relatively short.
Further, referring to the embodiment and the variation shown in fig. 1 and fig. 2, it is understood by those skilled in the art that the present invention also provides a control device for short video buffer cleaning, which preferably includes the following devices:
first receiving means for receiving a short video cache directory from a short video server;
and the first processing device is used for cleaning the short video cache in the user equipment according to the short video cache directory.
Specifically, the above apparatus can be implemented with reference to the descriptions of step a and step b, which are not described herein again.
Still further, in a preferred embodiment, the first processing means includes the following means:
first determining means for determining a short video hold list;
first deleting means for deleting the short videos in the short video cache directory outside the short video reservation list. Accordingly, the apparatus can also be implemented with reference to the description of the above steps, which is not described herein again.
Further, in a preferred embodiment, the control device further includes the following means:
first determining means for determining whether an available storage space of the user equipment is lower than a first threshold; and
second processing means for starting the first processing means when the available storage space is below the first threshold. Accordingly, the apparatus can also be implemented with reference to the description of the above steps, which is not described herein again.
The foregoing description of specific embodiments of the present invention has been presented. It is to be understood that the present invention is not limited to the specific embodiments described above, and that various changes and modifications may be made by one skilled in the art within the scope of the appended claims without departing from the spirit of the invention.