CN110765080A - File data processing method, device and equipment - Google Patents

File data processing method, device and equipment Download PDF

Info

Publication number
CN110765080A
CN110765080A CN201810837108.4A CN201810837108A CN110765080A CN 110765080 A CN110765080 A CN 110765080A CN 201810837108 A CN201810837108 A CN 201810837108A CN 110765080 A CN110765080 A CN 110765080A
Authority
CN
China
Prior art keywords
file
data
viewed
storage space
local
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810837108.4A
Other languages
Chinese (zh)
Inventor
陈小帅
张扬
马尔胡甫·曼苏尔
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Sogou Technology Development Co Ltd
Original Assignee
Beijing Sogou Technology Development Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Sogou Technology Development Co Ltd filed Critical Beijing Sogou Technology Development Co Ltd
Priority to CN201810837108.4A priority Critical patent/CN110765080A/en
Publication of CN110765080A publication Critical patent/CN110765080A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses a method, a device and equipment for processing file data, wherein the method comprises the following steps: the method comprises the steps of obtaining a current viewing position of a first file, wherein the first file is a local file which is viewed but not viewed completely, the obtained current viewing position represents a boundary between a viewed part and an unviewed part of the first file, segmenting file data of the first file according to the current viewing position of the first file, so that data of the viewed part and data of the unviewed part of the first file are obtained, deleting the data of the viewed part, or presenting prompt information for prompting deletion of the viewed part. Therefore, the terminal only deletes the file part which is viewed by the user, and keeps the file part which is not viewed by the user. Therefore, under the condition that the user is not influenced to view the complete local file, the terminal only stores the data of the file part which is not viewed by the user, and therefore the terminal can release more storage space.

Description

File data processing method, device and equipment
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a method, an apparatus, and a device for processing file data.
Background
In order to facilitate viewing videos anytime and anywhere, users often store videos locally at terminals. Typically, video has a large amount of data, and therefore, storage of video data typically takes up a large amount of storage space on the terminal. Once the local storage space of the terminal needs to be cleared, the video data is often deleted in order to release more storage space. In order not to affect the user's viewing of the video, the video deletion usually selects the video that the user has already viewed. However, some videos may have the user only viewing a portion. If these videos are deleted, the user will not be able to view the remaining unviewed portions of the videos.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide a method, an apparatus and a device for processing file data, so that only a part of files are viewed by a user, only the part of the files viewed by the user is deleted, and the part of the files not viewed by the user is reserved, thereby releasing more storage space without affecting the user viewing the complete files.
In a first aspect, to solve the foregoing technical problem, an embodiment of the present invention provides a method for processing file data, including:
acquiring a current viewing position of a first file, wherein the first file is a viewed local file but not viewed completely, and the current viewing position represents a boundary between a viewed part and an unviewed part of the first file;
segmenting the data of the first file according to the current viewing position to obtain the data of the viewed part and the data of the unviewed part;
deleting the data of the viewed part or presenting prompt information for prompting that the viewed part can be deleted.
In some possible embodiments, the method further comprises:
deleting data of a second file or presenting prompt information for prompting that the second file can be deleted, wherein the second file is a completely viewed local file.
In some possible embodiments, the deleting or presenting the data of the second file is used to prompt that the second file may be deleted, specifically: if the local residual storage space is smaller than the first storage space threshold, deleting the data of the second file or presenting prompt information for prompting that the second file can be deleted;
deleting the viewed part of the data or presenting prompt information for prompting that the viewed part can be deleted specifically as follows: if the local residual storage space is smaller than a second storage space threshold value, deleting the viewed part of data or presenting prompt information for prompting that the viewed part can be deleted;
wherein the first storage space threshold is greater than the second storage space threshold.
In some possible embodiments, the deleting or presenting the data of the second file is used to prompt the second deletable prompt message, specifically: if the local residual storage space is smaller than the third storage space threshold, deleting the data of the second file or presenting prompt information for prompting that the second file can be deleted;
deleting the viewed part of the data or presenting prompt information for prompting that the viewed part can be deleted specifically as follows: and under the condition that the completely viewed file does not exist in the local file, if the local residual storage space is smaller than the third storage space threshold, deleting the data of the viewed part or presenting prompt information for prompting that the viewed part can be deleted.
In some possible embodiments, the method further comprises:
segmenting the data of the unviewed part according to the data volume of the reserved part to obtain the data of the reserved part and the data of the non-reserved part, wherein the reserved part is the part, occupying the data volume, of the first file after the viewed part;
deleting the data of the non-reserved part or presenting prompt information for prompting that the non-reserved part can be deleted.
In some possible embodiments, the deleting or presenting the data of the viewed part is used to prompt the deleted prompt information of the viewed part, specifically: if the local residual storage space is smaller than a fourth storage space threshold value, deleting the viewed part of data or presenting prompt information for prompting that the viewed part can be deleted;
the deleting the data of the unreserved portion or presenting prompt information for prompting that the unreserved portion can be deleted specifically includes: if the local remaining storage space is smaller than the fifth storage space, deleting the data of the non-reserved part or presenting prompt information for prompting that the non-reserved part can be deleted;
wherein the fourth storage space threshold is greater than the fifth storage space threshold.
In some possible embodiments, the deleting or presenting the data of the viewed part is used to prompt the deleted prompt information of the viewed part, specifically: if the local residual storage space is smaller than a sixth storage space threshold value, deleting the viewed part of data or presenting prompt information for prompting that the viewed part can be deleted;
the deleting the data of the unreserved portion or presenting prompt information for prompting that the unreserved portion can be deleted specifically includes: and under the condition that the viewed part does not exist in the local file, if the local residual storage space is smaller than the sixth storage space threshold, deleting the data of the unreserved part or presenting prompt information for prompting that the unreserved part can be deleted.
In some possible implementations, the amount of data of the retained portion is determined from an amount of data viewed in the history file viewing behavior.
In some possible embodiments, the method further comprises:
acquiring a cleaning instruction of a local storage space;
and triggering the deletion of the viewed part of the data or presenting prompt information for prompting that the viewed part can be deleted according to the cleaning instruction.
In some possible embodiments, the first file is a video file, an audio file, an image file, or a file for presenting textual information.
In some possible embodiments, the deleting or presenting the data of the viewed part for prompting the notification information that the viewed part is deletable includes:
segmenting the viewed portion of data into a plurality of viewed sub-portion of data;
presenting prompting information for prompting that the plurality of viewed sub-portions are deletable;
deleting data of a target subsection in the plurality of viewed subsections in response to a selection operation that selects the target subsection.
In some possible embodiments, the deleting or presenting the data of the viewed part for prompting the notification information that the viewed part is deletable includes:
segmenting the viewed portion of data into a plurality of viewed sub-portion of data;
determining a target sub-portion among the plurality of viewed sub-portions based on the user historical viewing behavior and/or content type corresponding to the plurality of viewed sub-portions;
deleting the data of the target sub-part or presenting prompt information for prompting that the target sub-part can be deleted.
In a second aspect, an embodiment of the present invention further provides an apparatus for processing video data, where the apparatus includes:
the device comprises a first obtaining unit, a second obtaining unit and a third obtaining unit, wherein the first obtaining unit is used for obtaining a current viewing position of a first file, the first file is a viewed local file but not completely viewed local file, and the current viewing position represents a boundary between a viewed part and an unviewed part of the first file;
the first segmentation unit is used for segmenting the data of the first file according to the current viewing position to obtain the data of the viewed part and the data of the unviewed part;
and the first deleting unit is used for deleting the data of the viewed part or presenting prompt information for prompting that the viewed part can be deleted.
In some possible embodiments, the apparatus further comprises:
and the second deleting unit is used for deleting the data of the second file or presenting prompt information for prompting that the second file can be deleted, wherein the second file is a completely viewed local file.
In some possible embodiments, the second deleting unit is specifically configured to delete data of the second file or present a prompt message for prompting that the second file is deletable if the local remaining storage space is smaller than the first storage space threshold;
the first deleting unit is specifically configured to delete the viewed part of the data or present a prompt message for prompting that the viewed part is deletable if the local remaining storage space is smaller than a second storage space threshold;
wherein the first storage space threshold is greater than the second storage space threshold.
In some possible embodiments, the second deleting unit is specifically configured to delete the data of the second file or present a prompt message for prompting that the second file is deletable if the local remaining storage space is smaller than a third storage space threshold;
the first deleting unit is specifically configured to, in the case that there is no completely viewed file in the local file, delete the viewed part of the data or present prompt information for prompting that the viewed part is deletable if the local remaining storage space is smaller than the third storage space threshold.
In some possible embodiments, the apparatus further comprises:
a second splitting unit, configured to split data of the unviewed portion according to a data amount of a reserved portion to obtain data of the reserved portion and data of an unreleased portion, where the reserved portion is a portion of the first file that occupies the data amount after the viewed portion;
and the third deleting unit is used for deleting the data of the non-reserved part or presenting prompt information for prompting that the non-reserved part can be deleted.
In some possible embodiments, the first deleting unit is specifically configured to delete the data of the viewed portion or present a prompt message for prompting that the viewed portion is deletable if the local remaining storage space is smaller than a fourth storage space threshold;
the third deleting unit is specifically configured to delete the data of the unreserved portion or present a prompt message for prompting that the unreserved portion is deletable if the local remaining storage space is smaller than the fifth storage space;
wherein the fourth storage space threshold is greater than the fifth storage space threshold.
In some possible embodiments, the first deleting unit is specifically configured to delete the data of the viewed portion or present a prompt message for prompting that the viewed portion is deletable if the local remaining storage space is smaller than a sixth storage space threshold;
the third deleting unit is specifically configured to, under the condition that no viewed part exists in the local file, delete the data of the non-reserved part or present a prompt message for prompting that the non-reserved part can be deleted if the local remaining storage space is smaller than the sixth storage space threshold.
In some possible implementations, the amount of data of the retained portion is determined from an amount of data viewed in the history file viewing behavior.
In some possible embodiments, the apparatus further comprises:
the acquisition unit is used for acquiring a cleaning instruction of the local storage space;
and the triggering unit is used for triggering the deletion of the viewed part of the data or presenting prompt information for prompting the deletable viewed part according to the cleaning instruction.
In some possible embodiments, the first file is a video file, an audio file, an image file, or a file for presenting textual information.
In some possible embodiments, the first deleting unit includes:
a first segmentation unit for segmenting the viewed portion of data into a plurality of viewed sub-portions of data;
a presentation subunit configured to present a prompt message prompting that the plurality of viewed sub-portions are deletable;
a first deletion subunit operable to delete data of a target subsection in response to a selection operation of selecting the target subsection among the plurality of viewed subsections.
In some possible embodiments, the first deleting unit includes:
a second slicing subunit operable to slice the viewed portion of data into a plurality of viewed sub-portion of data;
a determining subunit, configured to determine a target sub-portion among the plurality of viewed sub-portions based on user historical viewing behaviors and/or content types corresponding to the plurality of viewed sub-portions;
and the second deleting subunit is used for deleting the data of the target sub-part or presenting prompt information for prompting that the target sub-part can be deleted.
In a third aspect, an embodiment of the present invention further provides a video data processing apparatus, including a memory, and one or more programs, where the one or more programs are stored in the memory, and configured to be executed by the one or more processors includes a processing method for executing the file data according to the first aspect.
In a fourth aspect, an embodiment of the present invention further provides a non-transitory computer-readable storage medium, where instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the method for processing file data according to the first aspect.
Compared with the prior art, the embodiment of the invention has the following advantages:
in the embodiment of the present invention, a current viewing position of a first file may be obtained, where the first file is a viewed but not completely viewed local file, and the obtained current viewing position indicates a boundary between a viewed part and an unviewed part of the first file, then, according to the current viewing position of the first file, file data of the first file is segmented, so as to obtain data of the viewed part and data of the unviewed part of the first file, and delete the data of the viewed part, or present a prompt message for prompting that the viewed part can be deleted, so that a user deletes the data of the viewed part in the first file according to the prompt message. Therefore, when the file data locally stored in the terminal needs to be deleted, the terminal can only delete the file part which is viewed by the user aiming at the local file which is only viewed by the user, and the file part which is not viewed by the user can be continuously stored in the local storage space of the terminal, so that the user can continuously view the unviewed part of the local file in the later period. In this way, the terminal can only store the data of the file part which is not viewed by the user under the condition that the user is not influenced to view the complete local file, so that the terminal can release more storage space.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a block diagram of an exemplary application scenario in an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a method for processing document data according to an embodiment of the present invention;
FIG. 3 is a schematic view of an interface between a viewed portion and an unviewed portion of a first file;
FIG. 4 is a flowchart illustrating a method for processing file data according to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of a device for processing document data according to an embodiment of the present invention;
FIG. 6 is a schematic structural diagram of a device for processing file data according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a server in an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The inventor has found that, since a video downloaded to a local terminal usually has a large data volume, and occupies a large storage space of the terminal when the video is stored, when the storage space of the local terminal needs to be cleared, the video data stored in the local terminal often becomes an object that needs to be cleared intensively in order to release more storage space. In the prior art, a local video watched by a user is generally deleted as a whole, but for a video of which the user only watches a part of content, in order to not affect the watching of the user on the remaining part of content of the video, a terminal generally stores complete video data of the video, that is, the terminal continues to store not only video data of a part of the video that is not played, but also video data of a part of the video that is played. Therefore, in this way, the video data of the played part of the video still occupies a large amount of storage space of the terminal.
In order to solve the above problem, an embodiment of the present invention provides a method for processing file data, where when data of a local file, such as audio, video, image, or text information, locally stored in a terminal needs to be deleted, only a part of the file viewed by a user may be deleted for the local file in which the user views only a part of content, and the part of the file not viewed by the user may be continuously stored in a local storage space of the terminal, so that the user may continue to view the unviewed part of the local file at a later stage. In this way, the terminal can only store the data of the file part which is not viewed by the user under the condition that the user is not influenced to view the complete local file, so that the terminal can release more storage space.
For example, embodiments of the present invention may be applied to the scenario shown in FIG. 1. In this scenario, the user 101 may clean the local storage space on the terminal 102, specifically, the user 101 may perform a trigger operation of cleaning the local storage space on the terminal 102, and the terminal 102, in response to the trigger operation, deletes the local file stored locally and viewed completely, and at the same time, may obtain a current viewing position of the viewed but not viewed completely local file, where the current viewing position represents a boundary between a viewed portion and an unviewed portion of the local file, and segment the data of the local file according to the local current viewing position to obtain data of the viewed portion and data of the unviewed portion, and then the terminal 102 may delete the data of the viewed portion, or present prompt information for prompting that the viewed portion is deletable to the user 101, so that the user 101 may, according to the prompt information presented by the terminal 102, the viewed portion of data stored on the terminal 102 is deleted.
It should be noted that the above application scenarios are only presented to facilitate understanding of the present invention, and the embodiments of the present invention are not limited in any way in this respect. Rather, embodiments of the present invention may be applied to any scenario where applicable.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, embodiments accompanying the drawings are described in detail below.
Referring to fig. 2, fig. 2 is a schematic flowchart illustrating a method for data processing in an embodiment of the present invention, where the method specifically may include:
s201: the method comprises the steps of obtaining a current viewing position of a first file, wherein the first file is a viewed but not completely viewed local file, and the current viewing position represents a boundary between a viewed part and an unviewed part of the first file.
The embodiment can be applied to a scene of cleaning the local storage space of the terminal, and in the scene, the cleaning of the local storage space can be triggered by a user, or the cleaning of the local storage space can be automatically triggered by the terminal. Specifically, when a user triggers the cleaning of the local storage space, the user may execute a trigger operation of cleaning the storage space on the terminal, so that the terminal responds to the trigger operation and starts to clean the storage space of the terminal; when the terminal automatically triggers the cleaning of the local storage space, a monitoring program on the terminal can monitor the storage space of the terminal, and when the storage space of the terminal reaches a certain threshold value or the residual storage space is lower than a preset threshold value, the cleaning of the storage space can be automatically triggered. Then, the terminal may obtain a current viewing position of the stored local file, where the current viewing position is a boundary between a viewed part and an unviewed part of the local file.
It should be noted that the boundary between the viewed part and the unviewed part specifically refers to the end of the viewed part and is also the beginning of the unviewed part. Taking the first file as a video file as an example, as shown in fig. 3, a left portion of a playing progress bar of the video file represents a played portion in the video file, a right portion of the playing progress bar represents an unplayed portion in the video file, and a connection location between the played portion and the unplayed portion is a boundary between the played portion and the unplayed portion.
In practical application, because a corresponding viewing record usually exists when a local file is viewed, the viewing record indicates a viewing progress of the local file, and a viewed part and an unviewed part of the local file can be distinguished, in some possible implementation scenarios, the viewing record of the local file can be used as a current viewing position of the local file. For example, for a local video with a duration of 30 minutes, the playing record is 10 minutes and 25 seconds, then the part of the local video from 00 minutes and 00 seconds to 10 minutes and 25 seconds is the played part (i.e., the viewed part) of the local video, the part of the local video from 10 minutes and 25 seconds to 30 minutes and 0 seconds is the unplayed part (i.e., the unviewed part) of the local video, and the playing record is 10 minutes and 25 seconds, i.e., the current viewing position of the local video.
In this embodiment, the first file refers to a file that has been viewed but has not been viewed completely in a local file stored in the terminal, and in practical application, the first file may specifically be a video file, an audio file, an image file, or a file for presenting text information, and the like. In some possible embodiments of determining the first file, the first file may be determined from a local file stored in the terminal according to a current viewing location of the file. Specifically, it may be determined whether the current viewing position of each local file is located at the beginning and the end of the local file, and if the current viewing position is located neither at the beginning nor at the end of the local file, it is characterized that the local file is a viewed but not completely viewed local file, that is, the local file is the first file in this embodiment, and the local file has an unviewed portion, and the terminal may perform the next processing on the local file. Of course, if the current viewing position is located at the beginning of the local file, the local file is represented as an unviewed local file, and no viewed part exists, the local file can be stored on the terminal; if the current viewing position is located at the end of the local file, the local file is represented as the completely viewed local file, no unviewed part exists, and the terminal can delete the local file to release the local storage space of the terminal.
It should be noted that besides the above embodiment of determining that the local file is a viewed but not fully viewed file, there may be other embodiments, for example, a corresponding identifier may be set for the viewed but not fully viewed local file, and the terminal may determine which local files are viewed but not fully viewed local files from the local files stored on the terminal according to the identifier.
S202: and segmenting the data of the first file according to the acquired current viewing position to obtain the data of the viewed part and the data of the unviewed part.
In this embodiment, since the current viewing position may represent a boundary between a viewed part and an unviewed part in the first file, the file data of the first file may be divided into two parts according to the current viewing position, where the two parts include data of the viewed part and data of the unviewed part, where the data of the viewed part is data corresponding to the file part that has been viewed by the user, and the data of the unviewed part is data corresponding to the file part that has not been viewed by the user.
For example, for a local video with a duration of 60 minutes, if a user has watched 25 minutes and 30 seconds, the local video may be divided into video data corresponding to a video segment a with a duration of 00 minutes and 00 seconds to 25 minutes and 30 seconds and video data corresponding to a video segment B with a duration of 25 minutes and 30 seconds to 60 minutes and 0 seconds, where the video data corresponding to the video segment a is data of a viewed portion and the video data corresponding to the video segment B is data of an unviewed portion, and the video data corresponding to the local video may be a current viewing position of the local video, and the video data corresponding to the local video segment a is divided into video data corresponding to the video segment a with a duration of 25 minutes and 30 seconds to 25 minutes and 0 seconds.
S203: deleting the data of the viewed part, or presenting prompt information for prompting that the viewed part can be deleted.
In practical application, the deletion of the file data or the presentation of the prompt message can be triggered by the cleaning instruction. As an example, if the terminal determines that the local storage space needs to be cleaned, a cleaning instruction of the local storage space may be obtained, and according to the cleaning instruction, deletion of the viewed part of the file data in the first file is triggered, and only the unviewed part of the file data of the first file is reserved, so that the user may continue to view the unviewed part of the first file; or, according to the clearing instruction, the terminal is triggered to present prompt information for prompting that the viewed part in the first file is deletable to the user, for example, the terminal may present a selection button for prompting whether to delete the file data of the viewed part to the user, so that the user can decide whether to delete the file data of the viewed part after seeing the prompt information presented by the terminal. The step of acquiring the cleaning instruction by the terminal may be, before the step of deleting the viewed part of the file data or presenting the prompt information by the terminal, for example, before the step of acquiring the current viewing position of the first file by the terminal, or after the step of segmenting the file data of the first file by the terminal, acquiring the cleaning instruction, where the step of acquiring the cleaning instruction by the terminal may be set according to the needs of the actual situation in the actual application, and is not limited herein.
In practical application, a user may selectively retain and delete a part of the content in the viewed part. For example, a user may be interested in a portion of content in a viewed portion, and if the user wishes to be able to view the content repeatedly later, the user may retain the portion of content; and if another part of the viewed content is not interested and the requirement of subsequent repeated viewing does not exist, the part of the content can be deleted. Based on this, in some possible embodiments, the content that does not need to be retained in the viewed part may be deleted by the user, specifically, the data of the viewed part may be divided into data of a plurality of viewed sub parts, and prompt information for prompting that the plurality of viewed sub parts are deletable is presented to the user, and then, in response to a selection operation of the target sub part needing to be deleted by the user among the plurality of viewed sub parts, the data of the target sub part is deleted, while the data of the viewed sub part that the user wishes to retain is retained.
In other scenarios, for content of the content type belonging to entertainment nature type such as a variety program in the viewed part, or content belonging to teaching type, etc., the user may repeatedly view the content for many times, and the file data belonging to these content types may be retained, while for files belonging to other content types, the user may not need to retain the data of such files for reasons such as no interest in the content of such files. Based on this, in other possible embodiments, the data of the viewed part may be divided into data of a plurality of viewed sub parts, and based on the content types corresponding to the plurality of viewed sub parts, a target sub part is determined from the plurality of viewed sub parts, and the determined target sub part is deleted, or prompt information for prompting that the target sub part can be deleted is presented; of course, the target sub-portion to be deleted may also be determined based on the user's historical viewing behavior corresponding to the viewed sub-portion, for example, the viewed sub-portion whose number of repeated viewing times exceeds a certain threshold may be determined to be retained by the user, and the viewed sub-portion whose number of repeated viewing times does not exceed a certain threshold may be deleted by the user.
In addition, for a local file that has been completely viewed by the user, the terminal may not need to store the local file again, and in order to release more storage space, in this embodiment, not only the file data of the viewed part in the first file may be deleted, but also the file data of a second file may be deleted, where the second file is the completely viewed local file. Of course, the terminal may also present prompt information for prompting that the second file is deletable to the user, so that the user can determine whether to delete the second file according to the prompt information.
In this embodiment, in addition to deleting the file data of the viewed part in the first file and the file data of the second file, in other embodiments, in order to further release the local storage space of the terminal, partial deletion may be performed on the file data of the unviewed part in the first file. Specifically, the terminal may segment the data of the unviewed portion according to the data amount of the reserved portion to obtain the data of the reserved portion and the data of the unreserved portion, where the reserved portion is a portion of the first file that occupies the data amount of the reserved portion after the unviewed portion, and correspondingly, the unreserved portion is a portion of the unviewed portion other than the reserved portion. In this way, after the terminal determines the data of the non-reserved part in the unviewed part, the terminal can directly delete the data and only store the data of the reserved part in the unviewed part, so that the user can continuously view the file of the reserved part in the unviewed part; of course, prompt information for prompting that the non-reserved portion in the unviewed portion is delectable may also be presented to the user, for example, the terminal may present a popup window to the user whether to delete the non-reserved portion in the unviewed portion, so that the user determines whether to delete the data of the non-reserved portion after seeing the prompt information presented by the terminal.
It can be understood that when the user views the first file again, the terminal may cache the file data after the reserved portion in the first file, so that the user may continue to view the file content corresponding to the non-reserved portion from the viewing breakpoint, thereby enabling the user to view all the file contents of the first file completely.
In some possible embodiments, if the first file is an audio file or a video file, the data amount of the reserved portion may specifically be the data amount of an audio/video portion that is a certain time period after the viewed portion. Taking a video file with a duration of 65 minutes 30 seconds as an example, assuming that a user views 25 minutes 30 seconds, the file data of a video clip from 25 minutes 30 seconds to 65 minutes 30 seconds is data of an unviewed portion, and the data of the video clip from 25 minutes 30 seconds to 65 minutes 30 seconds is divided according to the data amount of a video portion 20 minutes after the viewed portion, so that video file data with a video clip from 25 minutes 30 seconds to 45 minutes 30 seconds and video file data with a video clip from 45 minutes 30 seconds to 65 minutes 30 seconds can be obtained, the video file data with a video clip from 25 minutes 30 seconds to 45 minutes 30 seconds is data of a reserved portion which is continuously stored by the terminal, and the video file data with a video clip from 45 minutes 30 seconds to 65 minutes 30 seconds is data of a non-reserved portion which is required to be deleted by the terminal.
In practical application, the data amount of the reserved part can be determined according to the file viewing time in the historical viewing behavior of the user. For example, in the historical viewing behavior of the user, the user stops viewing the video for 30 minutes, and the data amount of the reserved portion may be the data amount of the video data with the duration of 30 minutes. For a local video with a duration of 60 minutes, the user currently watches 15 minutes and 25 seconds, and according to the historical watching behavior that the user often continuously watches 30 minutes of video, the video data between 15 minutes and 25 seconds (15 minutes and 25 seconds +30 minutes and 00 seconds) can be used as the data of the reserved part, and the reserved part is the video part between 15 minutes and 25 seconds and 45 minutes and 25 seconds.
It is noted that in some possible embodiments, the amount of data of the reserved portion may also be adjusted according to the content of the first file based on the strength of association of the content of the first file. Specifically, an initial data amount of the reserved portion may be determined, and an initial reserved portion in the unviewed portion may be determined based on the initial data amount, and then, the content of the initial reserved portion and the content of the non-initial reserved portion in the first file may be analyzed to determine whether the content of the non-initial reserved portion is associated with the content of the initial reserved portion. If the data exists, the data belonging to the associated content in the non-initial reserved portion can be determined as the data needing to be reserved, namely, the data volume of the reserved portion is increased; if not, the initial amount of data may be taken as the final amount of data for the reserved portion. In this way, the consistency of the content viewed by the user may be enhanced.
For example, when the first file is an audio file, it may be determined whether the last content of the audio in the reserved portion and the starting content of the audio in the non-reserved portion constitute complete lyrics or sentences, and if so, it indicates that the data size of the reserved portion needs to be increased, so that the audio content in the reserved portion is a complete lyric or sentence, and thus, the consistency of viewing the user content may be enhanced; of course, if not, the amount of data in the reserved portion may not be adjusted.
In some practical scenarios, if the first file is a video file or an audio file, the unviewed portion of the first file may be further divided into a plurality of file segments with equal viewing duration according to a certain viewing duration, where the viewing duration of the last file segment may be less than or equal to the viewing durations of the other file segments. Then, K consecutive file segments after the viewed portion may be retained according to the viewing order, the file data of the K file segments is the file data of the retained portion in the unviewed portion, and the remaining file segments of the unviewed portion are the file segments of the non-retained portion. And K is a preset positive integer, and specifically may be a ratio of the viewing time of the reserved portion to the certain viewing duration.
For example, assuming that the unviewed portion of the video is a video clip of 25 min 00 s to 59 min 48 s, the video clip of the unviewed portion may be segmented according to the playing time length of 30 s, so as to obtain video clips of 25 min 00 s to 25 min 30 s, 25 min 30 s to 26 min 00 s, 26 min 00 s to 26 min 30 s, …, 59 min 00 s to 59 min 30 s, and 59 min 30 s to 59 min 48 s. Then, 20 video clips, specifically, video clips of 25 min 00 sec to 25 min 30 sec, 25 min 30 sec to 26 min 00 sec, …, 34 min 00 sec to 34 min 30 sec, and 34 min 30 sec to 35 min 00 sec may be reserved in the playing order, the video data of the 20 video clips, that is, the file data of the reserved portion in the viewed portion, and the video data of the video clips of 35 min 00 sec to 35 min 30 sec, …, 59 min 30 sec to 59 min 48 sec, that is, the data of the unreserved portion in the viewed portion.
In some practical scenarios, the terminal may determine whether to delete the file data of the second file in the local file and the file data of the viewed portion in the first file by comparing the local remaining storage space of the terminal with a threshold value, so as to release the storage space of the terminal. As an example, when the local remaining storage space is smaller than a preset first storage space threshold, it indicates that a condition for triggering deletion of locally stored file data is reached, and file data of a second file locally stored by a terminal needs to be cleaned, the file data of the second file stored by the terminal may be deleted to release the local storage space of the terminal, specifically, the file data of the second file may be directly deleted, or prompt information for prompting that the file data of the second file may be deleted is presented to a user, so that the user determines to delete the file data of the second file on the terminal according to the prompt information. And when the local remaining storage space is smaller than the preset second storage space threshold, it indicates that the local storage space of the terminal is occupied too much, and in order to release the local storage space of the terminal as much as possible, the data of the viewed part in the first file may be deleted, or prompt information for prompting that the file data of the viewed part in the first file can be deleted is presented to the user, so that the user determines to delete the file data of the viewed part in the first file according to the prompt information, and the local storage space of the terminal can be released as much as possible. The preset second storage space threshold is smaller than the preset first storage space threshold, and the preset first storage space threshold and the preset second storage space threshold may be values set by a user, or fixed values set by a technician in advance, which is not limited herein.
The method includes that if the terminal automatically deletes file data of the second files, the terminal can detect whether the local residual storage space of the terminal is still smaller than a preset first storage space threshold value after deleting the file data of each second file, if so, the terminal can continuously delete the file data of the first file to continuously release the local storage space of the terminal, and if not, the local storage space of the terminal is indicated to be relatively abundant, the second file does not need to be cleaned, and the second file which is not deleted can be reserved.
If the file data of the second file is deleted by the user control terminal, the terminal can present the local files stored by the terminal to the user, then the user selects the second file to be deleted, and in the process of deleting the file data of the second file, the terminal can detect whether the local residual storage space of the terminal is still smaller than the preset first storage space threshold value every time the file data of one second file is deleted, when the local residual storage space is smaller than the preset first storage space threshold value, the terminal can reflect the local residual storage space to the user, and the user determines whether to continue deleting the file data of the rest second files which are not deleted.
In the foregoing exemplary implementation process of deleting the viewed part of the file data in the first file and the file data in the second file, when the local remaining storage space of the terminal reaches different storage space thresholds, deletion of file data of different types is triggered, and in other scenarios of practical application, deletion of file data of different types may be triggered by the same storage space threshold. It should be noted that, since the data amount of the viewed part of the partially unfinished viewed local file may be generally smaller than the data amount of the fully viewed local file, the file data of the second file in the local file stored by the terminal may be preferentially deleted, and if the second file does not exist in the local file, the remaining storage space local to the terminal is still insufficient, the file data of the viewed part of the partially unfinished viewed local file may be deleted.
In an exemplary embodiment, if it is determined that the local remaining storage space of the terminal is smaller than the preset third storage space threshold, which indicates that the local remaining storage space is insufficient, it may be detected whether the local file includes the second file. If the local file contains the second file, the local storage space of the terminal can be released by deleting the file data of the locally stored second file, specifically, the file data of the second file can be directly deleted by the terminal, or prompt information for prompting that the second file can be deleted is presented, and the file data of the second file is deleted by the user according to the prompt information; of course, if the local remaining storage space is not less than the preset third storage space threshold, it indicates that the local remaining storage space is relatively abundant, and the local storage space of the terminal may not be cleared temporarily. If the local file does not contain the second file, or the second file in the local file is completely deleted, it may be determined whether the local remaining storage space is still smaller than a preset third storage space threshold value by monitoring the local remaining storage space of the terminal, and if the local remaining storage space is still smaller than the third storage space threshold value under the condition that the completely viewed file does not exist in the local file, in order to further release the local storage space of the terminal, the viewed part of the file data in the first file may be deleted, or prompt information for prompting the deletable part of the file data in the first file is presented, so that the user deletes the viewed part of the file data in the first file on the terminal according to the prompt information.
The preset third storage space threshold may be a value set by the user, or may be a fixed value preset by a technician, which is not limited herein.
It should be noted that there are various embodiments for determining the local file (i.e., the second file) that has been completely viewed from the local files stored in the terminal, and the following exemplary embodiments are provided in this embodiment:
in some examples, the viewing progress of each local file may be detected, and if the viewing progress of a local file reaches 100%, the local file is indicated as a completely viewed local file. For example, by detecting the viewing progress of the local files a and B, it is known that the viewing progress of the local file a is "85%" already viewed, and the viewing progress of the local file B is "100%" already viewed, and it can be determined that the local file a is not completely viewed, and the local file B is a completely viewed local file.
In other examples, if the first file is an audio file or a video file, the total time length of each local file and the viewing time point of the local file may also be detected, and if the viewing time point of the local file reaches the total time length of the local file, the local file is determined to be a completely viewed local file. For example, by detecting the viewing time points and the total duration of the local files a and B, it is known that the total duration of the local file a is 45 minutes 28 seconds, the viewing time point of the local file a is 45 minutes 28 seconds, the total duration of the local file B is 50 minutes 16 seconds, and the viewing time point of the local file B is 26 minutes 37 seconds, that is, the viewing time point of the local file a reaches the total duration, it may be determined that the local file a is a completely viewed local file, and the viewing time point of the local file B does not reach the total duration, it may be determined that the local file B is not a completely viewed local file.
In the above embodiment, the terminal determines whether to delete the file data of the second file and the file data of the viewed part in the first file by comparing the local remaining storage space of the terminal with the threshold size, so as to release the storage space of the terminal. However, in other possible application scenarios, the terminal may also determine whether to delete part of the file data in the viewed part of the first file and part of the file data in the unviewed part of the first file by comparing the remaining storage space local to the terminal with the threshold size, so as to release the storage space of the terminal.
In an example, when the local remaining storage space is smaller than the preset fourth storage space threshold, a condition that deletion of locally stored file data is triggered is reached, which indicates that data of a viewed part in a first file locally stored by the terminal needs to be cleaned, the data of the viewed part in the first file may be deleted, so as to release the local storage space of the terminal, specifically, the data of the viewed part in the first file may be directly deleted, or prompt information for prompting that the data of the viewed part in the first file may be deleted is presented to the user, so that the user determines to delete the data of the viewed part in the first file according to the prompt information. And when the local remaining storage space is smaller than the preset fifth storage space threshold, it indicates that the local storage space of the terminal is occupied too much, and in order to release the local storage space of the terminal as much as possible, the data of the non-reserved portion in the unviewed portion may be deleted, or prompt information for prompting that the data of the non-reserved portion in the unviewed portion can be deleted is presented to the user, so that the user determines to delete the data of the non-reserved portion in the unviewed portion according to the prompt information, and the local storage space of the terminal is released as much as possible. The preset fifth storage space threshold is smaller than the preset fourth storage space threshold, and the preset fourth storage space threshold and the preset fifth storage space threshold may be values set by a user, or fixed values set by a technician in advance, which is not limited herein.
Certainly, in the process of deleting the checked part of the data in the first file by the terminal, each time the checked part of the data in one first file is deleted, the terminal may detect the local remaining storage space, and determine whether the local remaining storage space is still smaller than the preset fourth storage space threshold, if so, the checked part of the data in the next first file may be continuously deleted to continuously release the local storage space of the terminal, otherwise, the local storage space of the current terminal is relatively abundant, and the deletion of the checked part of the data in the next first file may not be stopped, but the checked part of the data in the other undeleted first file is retained.
In the above exemplary implementation process of deleting the data of the viewed part and the data of the non-reserved part in the unviewed part in the first file, when the local remaining storage space of the terminal reaches different storage space thresholds, deletion of data of different types is triggered, and in other scenarios of practical application, deletion of data of different types may also be triggered by the same storage space threshold.
Specifically, in an exemplary embodiment, if it is determined that the local remaining storage space of the terminal is smaller than the preset sixth storage space threshold, which indicates that the local remaining storage space is insufficient, it may be detected whether the local file includes the data of the viewed portion of the first file. If the local file contains the viewed part of data, the local storage space of the terminal can be released by deleting the data, specifically, the terminal directly deletes the viewed part of data in the first file, or presents prompt information for prompting the deletable part of the viewed part of the first file, and the user deletes the data according to the prompt information; of course, if the local remaining storage space is not less than the preset sixth storage space threshold, it indicates that the local remaining storage space is relatively abundant, and the local storage space of the terminal may not be cleared temporarily. If the local file does not contain the data of the checked part, or the data of the checked part in the first file is completely deleted, it may be determined whether the local remaining storage space is still smaller than a preset sixth storage space threshold value by monitoring the local remaining storage space of the terminal, and if the local remaining storage space is still smaller than the sixth storage space threshold value under the condition that the data of the checked part does not exist in the local file, in order to further release the local storage space of the terminal, the data of the non-reserved part in the unchecked part may be deleted, or prompt information for prompting deletion of the data of the non-reserved part in the unchecked part is presented, so that the user deletes the data of the non-reserved part in the unchecked part on the terminal according to the prompt information. The preset sixth storage space threshold may be a value set by the user, or may be a fixed value preset by a technician, which is not limited herein.
In this embodiment, a current viewing position of the first file may be obtained, where the first file is a local file that has been viewed but is not viewed completely, and the obtained current viewing position indicates a boundary between a viewed part and an unviewed part of the first file, then, according to the current viewing position of the first file, file data of the first file is split, so as to obtain data of the viewed part and data of the unviewed part of the first file, and delete the data of the viewed part, or present prompt information for prompting that the viewed part can be deleted, so that a user deletes the data of the viewed part in the first file according to the prompt information. Therefore, when the file data locally stored in the terminal needs to be deleted, the terminal can only delete the file part which is viewed by the user aiming at the local file which is only viewed by the user, and the file part which is not viewed by the user can be continuously stored in the local storage space of the terminal, so that the user can continuously view the unviewed part of the local file in the later period. In this way, the terminal can only store the data of the file part which is not viewed by the user under the condition that the user is not influenced to view the complete local file, so that the terminal can release more storage space.
An exemplary scenario embodiment of the present invention will be described below with reference to a specific application scenario. Referring to fig. 4, fig. 4 is a flowchart illustrating a scenario embodiment of a file data processing method according to an embodiment of the present invention, in this scenario, the remaining local memory space of the mobile phone needs to be cleared to be not less than the preset memory space threshold, and in the cleaning process, the mobile phone preferentially deletes the video data of the second video stored locally, wherein, the second video is the video which has been completely played, after deleting the video data of the second video, if the local storage space of the mobile phone is still insufficient, the video data of the played part in the first video can be continuously deleted, wherein, the first video is the video which has been viewed but not completely viewed, if the local storage space of the mobile phone is still insufficient, the handset can further delete the video data of the non-reserved part in the unplayed part so as to release the local storage space of the handset as possible. The method specifically comprises the following steps:
s401: and monitoring the local residual storage space of the mobile phone.
In some possible embodiments, a monitoring program (such as a third-party plug-in, a software application, etc.) of a third party may be separately provided on the mobile phone, and the monitoring program is used for monitoring the residual storage space local to the mobile phone. Specifically, the mobile phone may generate an instruction for acquiring the local remaining storage space at the same time interval, and send the instruction to the operating system on the mobile phone, so that the operating system reads the local remaining storage space according to the instruction, and returns a specific value of the remaining storage space to the monitoring program, so that the monitoring program can determine the remaining amount of the local remaining storage space of the mobile phone. Of course, in other possible embodiments, the operating system on the mobile phone may monitor the remaining storage space locally on the mobile phone in real time.
For example, a mobile phone used by a user may be provided with a system-level application program such as "mobile phone assistant" and the like, and may monitor the local residual storage space of the mobile phone in real time and obtain the residual amount of the local storage space of the mobile phone in real time. In addition, the "mobile phone assistant" may also record playing records, such as playing time, playing progress and the like, of the local video when the user watches the local video, so as to facilitate the determination of the current playing position of the local video by the "mobile phone assistant".
S402: and judging whether the local residual storage space of the mobile phone is smaller than a preset storage space threshold value, if so, executing the step S403, and if not, executing the step S408.
In this embodiment, when the storage space on the mobile phone needs to be cleared, the local remaining storage space of the mobile phone and the preset storage space threshold may be determined, if the remaining storage space is smaller than the preset storage space threshold, the second video data on the mobile phone is deleted, and if the remaining storage space is not smaller than the preset storage space threshold, it indicates that the local remaining storage space of the mobile phone is relatively abundant, and the second video on the mobile phone may not be deleted temporarily. The preset storage space threshold may be set by the user on the mobile phone, or may be a fixed value preset by a technician.
It should be noted that there are various embodiments for triggering the cleaning of the storage space of the mobile phone in this embodiment, the cleaning of the storage space may be triggered by the user executing a trigger operation for cleaning the storage space on the mobile phone, or the cleaning of the storage space of the mobile phone may be periodically and automatically triggered by the operating system of the mobile phone, which is not limited herein.
S403: and determining a second video stored on the mobile phone, and deleting the video data of the second video, wherein the second video is a local video which is completely played on the mobile phone.
S404: and judging whether the local residual storage space of the mobile phone is smaller than a preset storage space threshold value or not after the second video is completely deleted, if so, executing the step S405, and if not, executing the step S408.
S405: deleting the played video data in the first video, wherein the first video is a local video which is played but not completely played.
In this embodiment, after deleting all the video data of the second video on the mobile phone, it may be continuously determined whether the local remaining storage space of the mobile phone is still smaller than the preset storage space threshold, and if the completely played video does not exist in the local video, the local remaining storage space of the mobile phone is still smaller than the preset storage space threshold, the played video data of the played part in the first video may be deleted, so as to further release the local storage space of the terminal. The video data of the first video can be divided into the video data of the played part and the video data of the unplayed part through the current playing position of the first video.
S406: and judging whether the local residual storage space of the mobile phone is smaller than a preset storage space threshold value or not after the played part in the first video is completely deleted, if so, executing the step S407, and if not, executing the step S408.
S407: and deleting the video data of the non-reserved part in the non-played part.
In this embodiment, after deleting all the played video data on the mobile phone, it may be continuously determined whether the local remaining storage space of the mobile phone is still smaller than the preset storage space threshold, and if the local video does not have the played video data, the local remaining storage space of the mobile phone is still smaller than the preset storage space threshold, the video data of the non-reserved portion of the non-played portion may be deleted, so as to further release the local storage space of the terminal.
S408: the memory space local to the mobile phone is refused to be cleaned.
It can be understood that, if the local remaining storage space of the mobile phone is not less than the preset storage space threshold, it indicates that the local remaining storage space of the mobile phone is relatively abundant, and the local storage space of the mobile phone may not be cleared temporarily.
In this embodiment, the mobile phone preferentially deletes the locally stored video data that has been completely played, and after deleting the video data of the second video, if the local storage space of the mobile phone is still insufficient, the mobile phone can continue to delete the video data of the played part in the incompletely played local video, and if the local storage space of the mobile phone is still insufficient, the mobile phone can further delete the video data of the non-retained part in the un-played part, so that the local storage space of the mobile phone can be released as much as possible.
In addition, an embodiment of the present invention further provides a video data processing apparatus, referring to fig. 5, fig. 5 shows a schematic structural diagram of a video data processing apparatus in an embodiment of the present invention, where the apparatus 500 may specifically include:
a first obtaining unit 501, configured to obtain a current viewing position of a first file, where the first file is a viewed but not completely viewed local file, and the current viewing position represents a boundary between a viewed part and an unviewed part of the first file;
a first segmenting unit 502, configured to segment the data of the first file according to the current viewing position, so as to obtain the data of the viewed part and the data of the unviewed part;
a first deleting unit 503, configured to delete the data of the viewed portion or present prompting information for prompting that the viewed portion is deletable.
In some possible embodiments, the apparatus 500 further comprises:
and the second deleting unit is used for deleting the data of the second file or presenting prompt information for prompting that the second file can be deleted, wherein the second file is a completely viewed local file.
In some possible embodiments, the second deleting unit is specifically configured to delete data of the second file or present a prompt message for prompting that the second file is deletable if the local remaining storage space is smaller than the first storage space threshold;
the first deleting unit 503 is specifically configured to delete the viewed part of the data or present a prompt message for prompting that the viewed part is deletable if the local remaining storage space is smaller than the second storage space threshold;
wherein the first storage space threshold is greater than the second storage space threshold.
In some possible embodiments, the second deleting unit is specifically configured to delete the data of the second file or present a prompt message for prompting that the second file is deletable if the local remaining storage space is smaller than a third storage space threshold;
the first deleting unit 503 is specifically configured to, in a case that there is no completely viewed file in the local file, delete the viewed part of the data or present prompt information for prompting that the viewed part is deletable if the local remaining storage space is smaller than the third storage space threshold.
In some possible embodiments, the apparatus 500 further comprises:
a second splitting unit, configured to split data of the unviewed portion according to a data amount of a reserved portion to obtain data of the reserved portion and data of an unreleased portion, where the reserved portion is a portion of the first file that occupies the data amount after the viewed portion;
and the third deleting unit is used for deleting the data of the non-reserved part or presenting prompt information for prompting that the non-reserved part can be deleted.
In some possible embodiments, the first deleting unit 503 is specifically configured to delete the data of the viewed portion or present a prompt message for prompting that the viewed portion is deletable if the local remaining storage space is smaller than a fourth storage space threshold;
the third deleting unit is specifically configured to delete the data of the unreserved portion or present a prompt message for prompting that the unreserved portion is deletable if the local remaining storage space is smaller than the fifth storage space;
wherein the fourth storage space threshold is greater than the fifth storage space threshold.
In some possible embodiments, the first deleting unit 503 is specifically configured to delete the data of the viewed portion or present a prompt message for prompting that the viewed portion is deletable if the local remaining storage space is smaller than a sixth storage space threshold;
the third deleting unit is specifically configured to, under the condition that no viewed part exists in the local file, delete the data of the non-reserved part or present a prompt message for prompting that the non-reserved part can be deleted if the local remaining storage space is smaller than the sixth storage space threshold.
In some possible implementations, the amount of data of the retained portion is determined from an amount of data viewed in the history file viewing behavior.
In some possible embodiments, the apparatus 500 further comprises:
the acquisition unit is used for acquiring a cleaning instruction of the local storage space;
and the triggering unit is used for triggering the deletion of the viewed part of the data or presenting prompt information for prompting the deletable viewed part according to the cleaning instruction.
In some possible embodiments, the first file is a video file, an audio file, an image file, or a file for presenting textual information.
In some possible embodiments, the first deleting unit 503 includes:
a first segmentation unit for segmenting the viewed portion of data into a plurality of viewed sub-portions of data;
a presentation subunit configured to present a prompt message prompting that the plurality of viewed sub-portions are deletable;
a first deletion subunit operable to delete data of a target subsection in response to a selection operation of selecting the target subsection among the plurality of viewed subsections.
In some possible embodiments, the first deleting unit 503 includes:
a second slicing subunit operable to slice the viewed portion of data into a plurality of viewed sub-portion of data;
a determining subunit, configured to determine a target sub-portion among the plurality of viewed sub-portions based on user historical viewing behaviors and/or content types corresponding to the plurality of viewed sub-portions;
and the second deleting subunit is used for deleting the data of the target sub-part or presenting prompt information for prompting that the target sub-part can be deleted.
In this embodiment, when file data stored locally in the terminal needs to be deleted, the terminal may delete only a part of the local file that is viewed by the user for the user, and may continue to store the part of the file that is not viewed by the user in the local storage space of the terminal, so that the user may continue to view the part of the local file that is not viewed in the later period. In this way, the terminal can only store the data of the file part which is not viewed by the user under the condition that the user is not influenced to view the complete local file, so that the terminal can release more storage space.
Referring to fig. 6, apparatus 600 may include one or more of the following components: processing component 602, memory 604, power component 606, multimedia component 608, audio component 610, input/output (I/O) interface 612, sensor component 614, and communication component 616.
The processing component 602 generally controls overall operation of the device 600, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 602 may include one or more processors 620 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 602 can include one or more modules that facilitate interaction between the processing component 602 and other components. For example, the processing component 602 can include a multimedia module to facilitate interaction between the multimedia component 608 and the processing component 602.
The memory 604 is configured to store various types of data to support operation at the device 600. Examples of such data include instructions for any application or method operating on device 600, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 604 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
Power supply component 606 provides power to the various components of device 600. The power components 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the apparatus 600.
The multimedia component 608 includes a screen that provides an output interface between the device 600 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 608 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the device 600 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 610 is configured to output and/or input audio signals. For example, audio component 610 includes a Microphone (MIC) configured to receive external audio signals when apparatus 600 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal may further be stored in the memory 604 or transmitted via the communication component 616. In some embodiments, audio component 610 further includes a speaker for outputting audio signals.
The I/O interface 612 provides an interface between the processing component 602 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor component 614 includes one or more sensors for providing status assessment of various aspects of the apparatus 600. For example, the sensor component 614 may detect the open/closed status of the device 600, the relative positioning of the components, such as the display and keypad of the apparatus 600, the sensor component 614 may also detect a change in the position of the apparatus 600 or a component of the apparatus 600, the presence or absence of user contact with the apparatus 600, the orientation or acceleration/deceleration of the apparatus 600, and a change in the temperature of the apparatus 600. The sensor assembly 614 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 614 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 614 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 616 is configured to facilitate communications between the apparatus 600 and other devices in a wired or wireless manner. The apparatus 600 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 616 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 616 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 600 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described file data processing methods.
Specifically, the present invention provides a device for processing file data, which may be embodied as an apparatus 600, including a memory 604, and one or more programs, where the one or more programs are stored in the memory 604, and configured to be executed by one or more processors 620, and the one or more programs include instructions for:
acquiring a current viewing position of a first file, wherein the first file is a viewed local file but not viewed completely, and the current viewing position represents a boundary between a viewed part and an unviewed part of the first file;
segmenting the data of the first file according to the current viewing position to obtain the data of the viewed part and the data of the unviewed part;
deleting the data of the viewed part or presenting prompt information for prompting that the viewed part can be deleted.
Optionally, the processor 620 is further configured to execute the one or more programs including instructions for:
deleting data of a second file or presenting prompt information for prompting that the second file can be deleted, wherein the second file is a completely viewed local file.
Optionally, the processor 620 is further configured to execute the one or more programs including instructions for:
deleting the data of the second file or presenting prompt information for prompting that the second file can be deleted specifically includes: if the local residual storage space is smaller than the first storage space threshold, deleting the data of the second file or presenting prompt information for prompting that the second file can be deleted;
deleting the viewed part of the data or presenting prompt information for prompting that the viewed part can be deleted specifically as follows: if the local residual storage space is smaller than a second storage space threshold value, deleting the viewed part of data or presenting prompt information for prompting that the viewed part can be deleted;
wherein the first storage space threshold is greater than the second storage space threshold.
Optionally, the processor 620 is further configured to execute the one or more programs including instructions for:
deleting the data of the second file or presenting prompt information for prompting the second deletable file, specifically: if the local residual storage space is smaller than the third storage space threshold, deleting the data of the second file or presenting prompt information for prompting that the second file can be deleted;
deleting the viewed part of the data or presenting prompt information for prompting that the viewed part can be deleted specifically as follows: and under the condition that the completely viewed file does not exist in the local file, if the local residual storage space is smaller than the third storage space threshold, deleting the data of the viewed part or presenting prompt information for prompting that the viewed part can be deleted.
Optionally, the processor 620 is further configured to execute the one or more programs including instructions for:
segmenting the data of the unviewed part according to the data volume of the reserved part to obtain the data of the reserved part and the data of the non-reserved part, wherein the reserved part is the part, occupying the data volume, of the first file after the viewed part;
deleting the data of the non-reserved part or presenting prompt information for prompting that the non-reserved part can be deleted.
Optionally, the processor 620 is further configured to execute the one or more programs including instructions for:
deleting the viewed part of the data or presenting prompt information for prompting that the viewed part can be deleted specifically as follows: if the local residual storage space is smaller than a fourth storage space threshold value, deleting the viewed part of data or presenting prompt information for prompting that the viewed part can be deleted;
the deleting the data of the unreserved portion or presenting prompt information for prompting that the unreserved portion can be deleted specifically includes: if the local remaining storage space is smaller than the fifth storage space, deleting the data of the non-reserved part or presenting prompt information for prompting that the non-reserved part can be deleted;
wherein the fourth storage space threshold is greater than the fifth storage space threshold.
Optionally, the processor 620 is further configured to execute the one or more programs including instructions for:
deleting the viewed part of the data or presenting prompt information for prompting that the viewed part can be deleted specifically as follows: if the local residual storage space is smaller than a sixth storage space threshold value, deleting the viewed part of data or presenting prompt information for prompting that the viewed part can be deleted;
the deleting the data of the unreserved portion or presenting prompt information for prompting that the unreserved portion can be deleted specifically includes: and under the condition that the viewed part does not exist in the local file, if the local residual storage space is smaller than the sixth storage space threshold, deleting the data of the unreserved part or presenting prompt information for prompting that the unreserved part can be deleted.
Optionally, the processor 620 is further configured to execute the one or more programs including instructions for:
the data amount of the reserved portion is determined according to the data amount viewed in the historical file viewing behavior.
Optionally, the processor 620 is further configured to execute the one or more programs including instructions for:
acquiring a cleaning instruction of a local storage space;
and triggering the deletion of the viewed part of the data or presenting prompt information for prompting that the viewed part can be deleted according to the cleaning instruction.
Optionally, the processor 620 is further configured to execute the one or more programs including instructions for:
the first file is a video file, an audio file, an image file or a file for presenting text information.
Optionally, the processor 620 is further configured to execute the one or more programs including instructions for:
the deleting the data of the viewed part or presenting prompt information for prompting the deletable viewed part comprises:
segmenting the viewed portion of data into a plurality of viewed sub-portion of data;
presenting prompting information for prompting that the plurality of viewed sub-portions are deletable;
deleting data of a target subsection in the plurality of viewed subsections in response to a selection operation that selects the target subsection.
Optionally, the processor 620 is further configured to execute the one or more programs including instructions for:
the deleting the data of the viewed part or presenting prompt information for prompting the deletable viewed part comprises:
segmenting the viewed portion of data into a plurality of viewed sub-portion of data;
determining a target sub-portion among the plurality of viewed sub-portions based on the user historical viewing behavior and/or content type corresponding to the plurality of viewed sub-portions;
deleting the data of the target sub-part or presenting prompt information for prompting that the target sub-part can be deleted.
Embodiments of the present invention also provide a non-transitory computer readable storage medium, such as the memory 604, comprising instructions executable by the processor 620 of the device 600 to perform the above-described method. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
A non-transitory computer readable storage medium having instructions therein which, when executed by a processor of an electronic device, enable the electronic device to perform a method of communication prompting, the method comprising:
acquiring a current viewing position of a first file, wherein the first file is a viewed local file but not viewed completely, and the current viewing position represents a boundary between a viewed part and an unviewed part of the first file;
segmenting the data of the first file according to the current viewing position to obtain the data of the viewed part and the data of the unviewed part;
deleting the data of the viewed part or presenting prompt information for prompting that the viewed part can be deleted.
Fig. 7 is a schematic structural diagram of a server in an embodiment of the present invention. The server 700 may vary significantly depending on configuration or performance, and may include one or more Central Processing Units (CPUs) 722 (e.g., one or more processors) and memory 732, one or more storage media 730 (e.g., one or more mass storage devices) storing applications 742 or data 744. Memory 732 and storage medium 730 may be, among other things, transient storage or persistent storage. The program stored in the storage medium 730 may include one or more modules (not shown), each of which may include a series of instruction operations for the server. Further, the central processor 722 may be configured to communicate with the storage medium 730, and execute a series of instruction operations in the storage medium 730 on the server 700.
The server 700 may also include one or more power supplies 726, one or more wired or wireless network interfaces 750, one or more input-output interfaces 758, one or more keyboards 756, and/or one or more operating systems 741, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is only limited by the appended claims
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (10)

1. A method for processing file data is characterized by comprising the following steps:
acquiring a current viewing position of a first file, wherein the first file is a viewed local file but not viewed completely, and the current viewing position represents a boundary between a viewed part and an unviewed part of the first file;
segmenting the data of the first file according to the current viewing position to obtain the data of the viewed part and the data of the unviewed part;
deleting the data of the viewed part or presenting prompt information for prompting that the viewed part can be deleted.
2. The method of claim 1, further comprising:
deleting data of a second file or presenting prompt information for prompting that the second file can be deleted, wherein the second file is a completely viewed local file.
3. The method of claim 2,
deleting the data of the second file or presenting prompt information for prompting that the second file can be deleted specifically includes: if the local residual storage space is smaller than the first storage space threshold, deleting the data of the second file or presenting prompt information for prompting that the second file can be deleted;
deleting the viewed part of the data or presenting prompt information for prompting that the viewed part can be deleted specifically as follows: if the local residual storage space is smaller than a second storage space threshold value, deleting the viewed part of data or presenting prompt information for prompting that the viewed part can be deleted;
wherein the first storage space threshold is greater than the second storage space threshold.
4. The method of claim 2,
deleting the data of the second file or presenting prompt information for prompting the second deletable file, specifically: if the local residual storage space is smaller than the third storage space threshold, deleting the data of the second file or presenting prompt information for prompting that the second file can be deleted;
deleting the viewed part of the data or presenting prompt information for prompting that the viewed part can be deleted specifically as follows: and under the condition that the completely viewed file does not exist in the local file, if the local residual storage space is smaller than the third storage space threshold, deleting the data of the viewed part or presenting prompt information for prompting that the viewed part can be deleted.
5. The method of claim 1, further comprising:
segmenting the data of the unviewed part according to the data volume of the reserved part to obtain the data of the reserved part and the data of the non-reserved part, wherein the reserved part is the part, occupying the data volume, of the first file after the viewed part;
deleting the data of the non-reserved part or presenting prompt information for prompting that the non-reserved part can be deleted.
6. The method of claim 5,
deleting the viewed part of the data or presenting prompt information for prompting that the viewed part can be deleted specifically as follows: if the local residual storage space is smaller than a fourth storage space threshold value, deleting the viewed part of data or presenting prompt information for prompting that the viewed part can be deleted;
the deleting the data of the unreserved portion or presenting prompt information for prompting that the unreserved portion can be deleted specifically includes: if the local remaining storage space is smaller than the fifth storage space, deleting the data of the non-reserved part or presenting prompt information for prompting that the non-reserved part can be deleted;
wherein the fourth storage space threshold is greater than the fifth storage space threshold.
7. The method of claim 5,
deleting the viewed part of the data or presenting prompt information for prompting that the viewed part can be deleted specifically as follows: if the local residual storage space is smaller than a sixth storage space threshold value, deleting the viewed part of data or presenting prompt information for prompting that the viewed part can be deleted;
the deleting the data of the unreserved portion or presenting prompt information for prompting that the unreserved portion can be deleted specifically includes: and under the condition that the viewed part does not exist in the local file, if the local residual storage space is smaller than the sixth storage space threshold, deleting the data of the unreserved part or presenting prompt information for prompting that the unreserved part can be deleted.
8. An apparatus for processing document data, comprising:
the device comprises a first obtaining unit, a second obtaining unit and a third obtaining unit, wherein the first obtaining unit is used for obtaining a current viewing position of a first file, the first file is a viewed local file but not completely viewed local file, and the current viewing position represents a boundary between a viewed part and an unviewed part of the first file;
the first segmentation unit is used for segmenting the data of the first file according to the current viewing position to obtain the data of the viewed part and the data of the unviewed part;
and the first deleting unit is used for deleting the data of the viewed part or presenting prompt information for prompting that the viewed part can be deleted.
9. A device for processing document data, comprising a memory, and one or more programs, wherein the one or more programs are stored in the memory, and wherein the one or more programs configured to be executed by the one or more processors comprise means for performing the method according to any one of the preceding claims 1 to 7.
10. A non-transitory computer readable storage medium having instructions therein which, when executed by a processor of an electronic device, enable the electronic device to perform the method of any of preceding claims 1 to 7.
CN201810837108.4A 2018-07-26 2018-07-26 File data processing method, device and equipment Pending CN110765080A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810837108.4A CN110765080A (en) 2018-07-26 2018-07-26 File data processing method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810837108.4A CN110765080A (en) 2018-07-26 2018-07-26 File data processing method, device and equipment

Publications (1)

Publication Number Publication Date
CN110765080A true CN110765080A (en) 2020-02-07

Family

ID=69326926

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810837108.4A Pending CN110765080A (en) 2018-07-26 2018-07-26 File data processing method, device and equipment

Country Status (1)

Country Link
CN (1) CN110765080A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060008242A1 (en) * 2004-07-08 2006-01-12 International Business Machines Corporation Segmented processing of data recordings
KR20070013782A (en) * 2005-07-27 2007-01-31 엘지전자 주식회사 Method for managing play list in digital video file
US20090010618A1 (en) * 2007-07-06 2009-01-08 At&T Knowledge Ventures, Lp System and method of storing video content
GB201420487D0 (en) * 2014-11-18 2014-12-31 Eshare Ltd Apparatus, method and system for determining a viewed status of a document
US20150381813A1 (en) * 2014-06-30 2015-12-31 Microsoft Corporation Message Storage
CN105845124A (en) * 2016-05-05 2016-08-10 北京小米移动软件有限公司 Audio processing method and device
CN106657573A (en) * 2016-09-19 2017-05-10 北京小米移动软件有限公司 Prompting method and apparatus
CN108304534A (en) * 2018-01-30 2018-07-20 努比亚技术有限公司 File management method, terminal and computer readable storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060008242A1 (en) * 2004-07-08 2006-01-12 International Business Machines Corporation Segmented processing of data recordings
KR20070013782A (en) * 2005-07-27 2007-01-31 엘지전자 주식회사 Method for managing play list in digital video file
US20090010618A1 (en) * 2007-07-06 2009-01-08 At&T Knowledge Ventures, Lp System and method of storing video content
US20150381813A1 (en) * 2014-06-30 2015-12-31 Microsoft Corporation Message Storage
GB201420487D0 (en) * 2014-11-18 2014-12-31 Eshare Ltd Apparatus, method and system for determining a viewed status of a document
CN105845124A (en) * 2016-05-05 2016-08-10 北京小米移动软件有限公司 Audio processing method and device
CN106657573A (en) * 2016-09-19 2017-05-10 北京小米移动软件有限公司 Prompting method and apparatus
CN108304534A (en) * 2018-01-30 2018-07-20 努比亚技术有限公司 File management method, terminal and computer readable storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
徐俊;何连跃;严巍巍;陈博;徐照淼;: "海量小文件系统中基于聚合单元的空间回收机制", 计算机应用, no. 1 *
罗斌;巴继东;: "基于Iframe内联框架的异步文件上传与删除", 电子设计工程, no. 12 *

Similar Documents

Publication Publication Date Title
CN106911961B (en) Multimedia data playing method and device
CN105338409B (en) Network video preloading method and device
CN105224349B (en) Application program deletion prompting method and device
CN105845124B (en) Audio processing method and device
EP3188066A1 (en) A method and an apparatus for managing an application
CN106941624B (en) Processing method and device for network video trial viewing
CN109245997B (en) Voice message playing method and device
CN111107421B (en) Video processing method and device, terminal equipment and storage medium
CN107562349B (en) Method and device for executing processing
CN111031177A (en) Screen recording method, device and readable storage medium
US11176192B2 (en) Method and apparatus for recalling image file, control method and apparatus for recalling image file, and mobile terminal
CN113556485A (en) Video generation method and device, electronic equipment and storage medium
CN111147882B (en) Video processing method and device, terminal equipment and storage medium
CN111641839A (en) Live broadcast method and device, electronic equipment and storage medium
CN112291631A (en) Information acquisition method, device, terminal and storage medium
CN109495765B (en) Video interception method and device
CN107632835B (en) Application installation method and device
CN113868467A (en) Information processing method, information processing device, electronic equipment and storage medium
CN110213062B (en) Method and device for processing message
CN107832377B (en) Image information display method, device and system, and storage medium
CN114339320B (en) Virtual resource processing method, device, equipment and storage medium
CN113467854B (en) Application program starting method and device, electronic equipment and storage medium
CN110765080A (en) File data processing method, device and equipment
CN110769282A (en) Short video generation method, terminal and server
CN110798721B (en) Episode management method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination