CN107147702B - File downloading method and device - Google Patents

File downloading method and device Download PDF

Info

Publication number
CN107147702B
CN107147702B CN201710262899.8A CN201710262899A CN107147702B CN 107147702 B CN107147702 B CN 107147702B CN 201710262899 A CN201710262899 A CN 201710262899A CN 107147702 B CN107147702 B CN 107147702B
Authority
CN
China
Prior art keywords
file
downloading
privacy
downloaded
preset
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.)
Active
Application number
CN201710262899.8A
Other languages
Chinese (zh)
Other versions
CN107147702A (en
Inventor
汤进
赵建凯
陈信吉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software 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 Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201710262899.8A priority Critical patent/CN107147702B/en
Publication of CN107147702A publication Critical patent/CN107147702A/en
Application granted granted Critical
Publication of CN107147702B publication Critical patent/CN107147702B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • G06F16/9566URL specific, e.g. using aliases, detecting broken or misspelled links
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6245Protecting personal data, e.g. for financial or medical purposes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]

Abstract

The disclosure relates to a file downloading method and device. The method comprises the following steps: the method comprises the steps of obtaining downloading characteristics corresponding to a file to be downloaded, determining whether the downloading characteristics comprise preset characteristics matched with a privacy file, and downloading the file to be downloaded to a privacy space when the downloading characteristics comprise the preset characteristics, wherein the privacy space is a space for storing the privacy file. Whether the file to be downloaded needs to be downloaded to the privacy space is determined through the downloading characteristics corresponding to the file to be downloaded, the file downloading efficiency is effectively improved, and the user experience is improved.

Description

File downloading method and device
Technical Field
The present disclosure relates to the field of information security technologies, and in particular, to a file downloading method and apparatus.
Background
The internet facilitates users in obtaining and downloading various types of files, many of which are related to user privacy or security issues, such as confidential work documents, private seed files, etc. Users have a need to encrypt files during downloading and storage. At present, a user manually encrypts a file after downloading the file.
Disclosure of Invention
In order to overcome the problems in the related art, embodiments of the present disclosure provide a file downloading method and apparatus. The technical scheme is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a file downloading method, including:
acquiring downloading characteristics corresponding to a file to be downloaded;
determining whether the downloading characteristics comprise preset characteristics matched with the privacy file or not;
and when the download characteristics are determined to include preset characteristics, downloading the file to be downloaded into a privacy space, wherein the privacy space is a space for storing the privacy file.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: the method comprises the steps of obtaining downloading characteristics corresponding to a file to be downloaded, determining whether the downloading characteristics comprise preset characteristics matched with a privacy file, and downloading the file to be downloaded to a privacy space when the downloading characteristics comprise the preset characteristics, wherein the privacy space is a space for storing the privacy file. Whether the file to be downloaded needs to be downloaded to the privacy space is determined through the downloading characteristics corresponding to the file to be downloaded, the file downloading efficiency is effectively improved, and the user experience is improved.
In an embodiment, the obtaining of the download characteristics corresponding to the file to be downloaded includes:
acquiring a Uniform Resource Locator (URL) corresponding to a file to be downloaded;
the determining whether the download features include preset features matched with the privacy files includes:
determining whether the URL comprises preset key characters matched with a privacy file;
when the download characteristics are determined to include the preset characteristics, downloading the file to be downloaded into a privacy space, wherein the privacy space is a space for storing the privacy file and comprises:
and downloading the file to be downloaded to the privacy space when the URL is determined to comprise preset key characters matched with the privacy file.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: the method comprises the steps of obtaining a URL corresponding to a file to be downloaded, determining whether preset key characters matched with a privacy file exist in the URL, and downloading the file to be downloaded to a privacy space when the URL includes the preset key characters. Whether preset key characters are included in the URL can be directly detected to determine whether the file to be downloaded is stored in the privacy space, and a user does not need to judge whether the file to be downloaded is stored in the privacy space, so that the file downloading efficiency is effectively improved, and the user experience is improved.
In one embodiment, the method further comprises:
acquiring a plurality of historical downloading URLs, wherein the historical downloading URLs are URLs corresponding to files which are placed into a privacy space by a user after downloading is completed in a historical downloading task;
and acquiring the preset key characters according to the plurality of historical downloading URLs, and uploading the preset key characters to a server.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: the preset key characters are obtained according to the historical downloading URL, so that the obtained preset key characters are more accurate, and the accuracy of judging whether the file to be downloaded needs to be stored in the privacy space is higher.
In one embodiment, the obtaining the preset key character according to the plurality of historical download URLs includes:
performing directory segmentation on each historical download URL to obtain a plurality of directory names;
acquiring a directory name of which the occurrence frequency is greater than or equal to a first preset threshold value in a plurality of directory names;
and taking the directory name with the occurrence frequency larger than or equal to a first preset threshold value as the preset key character.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: the preset key characters are obtained according to the directory names in the historical downloading URLs, so that the obtained preset key characters are more accurate, and the accuracy of judging whether the files to be downloaded need to be stored in the privacy space is higher.
In one embodiment, the method further comprises:
acquiring a plurality of historical downloading URLs, wherein the historical downloading URLs are URLs corresponding to files which are placed into a privacy space by a user after downloading is completed in a historical downloading task;
and uploading the plurality of historical download URLs to a server.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: the preset key characters are obtained through the server according to the historical download URL, and therefore efficiency of obtaining the preset key characters is improved.
In an embodiment, the obtaining of the download characteristics corresponding to the file to be downloaded includes:
acquiring file characteristics in a seed file corresponding to a file to be downloaded, wherein the file characteristics in the seed file comprise: file characteristic values recorded in the seed file;
the determining whether the download features include preset features matched with the privacy files includes:
determining whether the characteristic value in the seed file is the same as a preset characteristic value matched with a privacy file or not;
when the download characteristics are determined to include the preset characteristics, downloading the file to be downloaded into a privacy space, wherein the privacy space is a space for storing the privacy file and comprises:
and downloading the file to be downloaded to the privacy space when the characteristic value in the seed file is determined to be the same as the preset characteristic value matched with the privacy file.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: and acquiring file characteristics in the seed file corresponding to the file to be downloaded, and downloading the file to be downloaded to the privacy space when the characteristic value in the seed file is determined to be the same as the preset characteristic value matched with the privacy file. Because whether the file to be downloaded is stored in the privacy space can be directly determined according to the characteristic value in the seed file, the user does not need to judge whether the file to be downloaded is stored in the privacy space, the file downloading efficiency is effectively improved, and the user experience is improved.
In one embodiment, the method further comprises:
acquiring file characteristic values of a plurality of historical seed files, wherein the file characteristic values of the historical seed files are corresponding to seed files which are placed into a privacy space by a user after downloading is completed in a historical downloading task;
and acquiring the preset characteristic values according to the file characteristic values of the plurality of historical seed files, and uploading the preset characteristic values to a server.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: the preset characteristic value is obtained according to the file characteristic value of the historical seed file, so that the obtained preset characteristic value is more accurate, and the accuracy of judging whether the file to be downloaded needs to be stored in the privacy space is higher.
According to a second aspect of the embodiments of the present disclosure, there is provided a file downloading apparatus including:
the first acquisition module is used for acquiring downloading characteristics corresponding to a file to be downloaded;
the determining module is used for determining whether the downloading characteristics acquired by the first acquiring module include preset characteristics matched with the privacy file;
and the downloading module is used for downloading the file to be downloaded into a privacy space when the determining module determines that the downloading characteristics acquired by the acquiring module comprise preset characteristics, wherein the privacy space is a space for storing the privacy file.
In one embodiment, the obtaining module comprises: a first obtaining sub-module, the determining module comprising: a first determination submodule, the download module comprising: a first down-link sub-module;
the first obtaining submodule is used for obtaining a Uniform Resource Locator (URL) corresponding to a file to be downloaded;
the first determining submodule is used for determining whether the URL acquired by the first acquiring submodule comprises preset key characters matched with a privacy file;
the first download submodule is configured to download the file to be downloaded to the privacy space when the first determining submodule determines that the URL includes a preset key character matching a privacy file.
In one embodiment, the apparatus further comprises: the system comprises a second acquisition module, a third acquisition module and a first uploading module;
the second acquisition module is used for acquiring a plurality of historical downloading URLs, wherein the historical downloading URLs are URLs corresponding to files which are placed into a privacy space by a user after downloading is completed in a historical downloading task;
the third obtaining module is configured to obtain the preset key character according to the plurality of historical download URLs obtained by the second obtaining module;
the first uploading module is used for uploading the preset key character acquired by the third acquiring module to a server.
In one embodiment, the third obtaining module comprises: the segmentation sub-module, the second acquisition sub-module and the second determination sub-module;
the segmentation submodule is used for carrying out directory segmentation on each historical download URL acquired by the second acquisition module to obtain a plurality of directory names;
the second obtaining submodule is used for obtaining the directory names of which the occurrence times are more than or equal to a first preset threshold value in the plurality of directory names obtained by the splitting submodule;
the second determining submodule is configured to use the directory name determined by the second obtaining submodule and having the occurrence number greater than or equal to a first preset threshold as the preset key character.
In one embodiment, the apparatus further comprises: the fourth acquisition module and the second uploading module;
the fourth obtaining module is used for obtaining a plurality of historical downloading URLs, and the historical downloading URLs are URLs corresponding to files which are placed into a privacy space by a user after downloading is completed in a historical downloading task;
the second uploading module is configured to upload the plurality of historical download URLs acquired by the fourth acquiring module to a server.
In one embodiment, the first obtaining module comprises: a third obtaining sub-module, wherein the determining module comprises: a third determining sub-module, the downloading module comprising: a second download sub-module;
the third obtaining sub-module is configured to obtain file characteristics in a seed file corresponding to a file to be downloaded, where the file characteristics in the seed file include: file characteristic values recorded in the seed file;
the third determining submodule is configured to determine whether the feature value in the seed file acquired by the third acquiring submodule is the same as a preset feature value matched with the privacy file;
and the second downloading sub-module is used for downloading the file to be downloaded to the privacy space when the third determining sub-module determines that the characteristic value in the seed file is the same as the preset characteristic value matched with the privacy file.
In one embodiment, the apparatus further comprises: the device comprises a fifth acquisition module, a sixth acquisition module and a third uploading module;
the fifth obtaining module is configured to obtain file feature values of a plurality of historical seed files, where the file feature values of the historical seed files are file feature values corresponding to seed files that are placed into a privacy space by a user after downloading is completed in a historical downloading task;
the sixth obtaining module is configured to obtain the preset feature values according to the file feature values of the plurality of history seed files obtained by the fifth obtaining module;
and the third uploading module is used for uploading the preset characteristic value acquired by the sixth acquiring module to a server.
According to a third aspect of the embodiments of the present disclosure, there is provided a file downloading apparatus including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
acquiring downloading characteristics corresponding to a file to be downloaded;
determining whether the downloading characteristics comprise preset characteristics matched with the privacy file or not;
and when the download characteristics are determined to include preset characteristics, downloading the file to be downloaded into a privacy space, wherein the privacy space is a space for storing the privacy file.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer readable storage medium having stored thereon computer instructions which, when executed by a processor, implement the steps of:
acquiring downloading characteristics corresponding to a file to be downloaded;
determining whether the downloading characteristics comprise preset characteristics matched with the privacy file or not;
and when the download characteristics are determined to include preset characteristics, downloading the file to be downloaded into a privacy space, wherein the privacy space is a space for storing the privacy file.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a flow diagram illustrating a file download method according to an example embodiment.
Fig. 2 is a flowchart illustrating a file download method according to an exemplary embodiment.
FIG. 3 is a schematic diagram illustrating a handset interface display in accordance with an exemplary embodiment.
Fig. 4 is a flowchart illustrating a file download method according to an exemplary embodiment.
Fig. 5 is a flowchart illustrating a file download method according to an example embodiment.
Fig. 6 is a flowchart illustrating a file download method according to an exemplary embodiment.
Fig. 7 is a flowchart illustrating a file download method according to an example embodiment.
FIG. 8 is a block diagram illustrating a file download apparatus according to an example embodiment.
Fig. 9 is a block diagram illustrating a file downloading apparatus according to an exemplary embodiment.
Fig. 10 is a block diagram of a file download apparatus according to a third exemplary embodiment.
Fig. 11 is a block diagram of the third obtaining module 15 in the file downloading device according to the second exemplary embodiment.
Fig. 12 is a block diagram of a file download device according to an example embodiment.
Fig. 13 is a block diagram of a file download device according to an example embodiment.
Fig. 14 is a block diagram of a file download device according to an example embodiment.
Fig. 15 is a block diagram illustrating a file download apparatus 80 according to an exemplary embodiment.
Fig. 16 is a block diagram illustrating an apparatus 90 for file downloading according to an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
The internet facilitates users in obtaining and downloading various types of files, many of which are related to user privacy or security issues, such as confidential work documents, private seed files, etc. Users have a need to encrypt files during downloading and storage. At present, a user manually encrypts a file after downloading the file.
However, if the user encrypts the file manually after downloading the file, the workload of the user is large, the user is easy to forget, the efficiency of downloading the file is low, the user can only encrypt the downloaded file, the file in the downloading process cannot be encrypted or hidden, the file is likely to be peeped by others in the downloading process, and the privacy of the user is threatened.
The method includes the steps that whether preset characteristics matched with the privacy files are included in the downloading characteristics is determined by obtaining the downloading characteristics of the files to be downloaded, and when the preset characteristics are included in the downloading characteristics, the files to be downloaded are downloaded into the privacy space, wherein the privacy space is used for storing the privacy files. Through discernment treat the download characteristic of download file, and whether including the predetermined characteristic in the detection download characteristic, thereby can follow the root and directly judge whether should treat the download file is the privacy file, whether need carry out encryption processing, thereby the efficiency of encryption has been promoted, and when including the predetermined characteristic in the download characteristic, can directly download the file of treating to the privacy space in, thereby accomplish to treat that the whole download process of download file carries out privacy encryption, prevent to treat that the file of downloading is stolen secretly by other people in the download process, the security of file download has been promoted.
FIG. 1 is a flowchart illustrating a file download method according to an exemplary embodiment, and as shown in FIG. 1, the method includes the following steps S101-S103:
in step S101, a download feature corresponding to a file to be downloaded is obtained.
In step S102, it is determined whether the download features include preset features that match the privacy file.
In step S103, when it is determined that the download features include the preset features, the file to be downloaded is downloaded to a privacy space, where the privacy space is a space for storing the privacy file.
Illustratively, a privacy space is a space with permission verification or with hidden attributes, where files placed in the privacy space are not visible to users without permission. The privacy space may be a folder manually set by the user himself or may be a folder established or defaulted by the downloader. And the permission verification mode of the privacy space can include but is not limited to at least one of the following encryption modes: digital encryption, symbol encryption, text encryption, letter encryption, graphic encryption, fingerprint encryption, and the like; or the privacy space may also be provided in the form of a hidden folder.
In order to prevent the file from being peeped by others in the downloading process, the privacy of the user is threatened. Therefore, the file to be downloaded needs to be protected in the downloading process of the file to be downloaded. When the file to be downloaded needs to be protected in the downloading process, the downloading characteristics of the file to be downloaded need to be judged, and when the corresponding file to be downloaded is judged to be the file needing to be protected from the downloading characteristics, the file to be downloaded can be protected in the downloading process.
According to the method and the device, after the downloading characteristics of the file to be downloaded are obtained, whether the downloading characteristics comprise the preset characteristics matched with the privacy file or not is determined, when the downloading characteristics comprise the preset characteristics, the corresponding file to be downloaded is determined to be protected in the downloading process, the file to be downloaded is directly downloaded into the privacy space, whether the downloading characteristics corresponding to the downloading file comprise the preset characteristics matched with the privacy file or not can be detected, whether the file to be downloaded is stored into the privacy space or not is determined, a user does not need to judge whether the file to be downloaded is stored into the privacy space or not, the file downloading efficiency is effectively improved, and user experience is improved.
Because the privacy space is a space with authority verification or hidden attributes, the privacy space is generally protected, meanwhile, a transmission channel between the privacy space and the downloading source is also protected, and an ordinary person cannot peep the file transmitted in the transmission channel, when the downloading characteristics corresponding to the file to be downloaded include the preset characteristics matched with the privacy file, namely, the file to be downloaded is determined to be downloaded into the privacy space, the file to be downloaded can be transmitted through the transmission channel established between the downloading characteristics and the privacy space, the file to be downloaded is protected in the downloading process, and the downloading safety is effectively improved.
And because the file to be downloaded is finally downloaded into the privacy space, and the privacy space is a protected folder, the storage and the lookup of the downloaded file to be downloaded are correspondingly protected, and the file to be downloaded does not need to be manually encrypted after the downloading of the file to be downloaded is completed, so that the encryption efficiency and the downloading efficiency are effectively improved.
The embodiment of the disclosure provides a file downloading method, which includes: the method comprises the steps of obtaining downloading characteristics corresponding to a file to be downloaded, determining whether the downloading characteristics comprise preset characteristics matched with a privacy file, and downloading the file to be downloaded to a privacy space when the downloading characteristics comprise the preset characteristics, wherein the privacy space is a space for storing the privacy file. Whether the file to be downloaded needs to be downloaded to the privacy space is determined through the downloading characteristics corresponding to the file to be downloaded, the file downloading efficiency is effectively improved, and the user experience is improved.
In an embodiment, the download feature corresponding to the file to be downloaded may be a Uniform Resource Locator (URL) corresponding to the file to be downloaded.
In this case, as shown in fig. 2, the step S101 may be implemented as step S1011, the step S102 may be implemented as step S1021, and the step S103 may be implemented as step S1031:
in step S1011, a uniform resource locator URL corresponding to the file to be downloaded is obtained.
In an implementation mode, when a user needs to download a file, the user can directly input a URL corresponding to the file to be downloaded in a download task box of the downloader, and at this time, the URL can be directly acquired.
In another implementation manner, a user may determine a downloaded file by clicking, since the file to be downloaded corresponds to a URL in the server, the clicking operation may be used as a trigger condition for acquiring the URL, and after the user clicks the file to be downloaded, the URL is directly sent to the downloader. The server is used for generating, storing and pushing a white list containing preset characteristics.
For example: as shown in the mobile phone interface of fig. 3, when a user wants to download a movie, movie 1, movie 2, movie 3, movie 4, movie 5, and movie 6 are displayed in the movie library, and when the user wants to download movie 3, the user clicks the icon of movie 3, and when the user clicks the icon of movie 3, the URL corresponding to movie 3 is sent to the downloader.
In step S1021, it is determined whether a preset key character matching the privacy file is included in the URL.
In step S1031, when it is determined that the URL includes the preset key character matching the privacy file, the file to be downloaded is downloaded to the privacy space.
The key characters include, but are not limited to, the following three types:
the first method comprises the following steps: the key character may also be a complete URL.
And the second method comprises the following steps: the URL will carry a hash value, for example: the URL may be: com/? The "a # hash" is a hash value of the URL, and in this case, the hash value of the URL may be used as the key character.
And the third is that: the URL will carry a string consisting of%, #, &, letters, numbers, etc., for example: in http:// www.example.com/indexname ═ na% 26 me% 3d1& id ═ id2, "indexname ═ na% 26 me% 3d1& id ═ id 2", the above character string in the URL can be used as the above key character.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: the method comprises the steps of obtaining a URL corresponding to a file to be downloaded, determining whether preset key characters matched with a privacy file exist in the URL, and downloading the file to be downloaded to a privacy space when the URL includes the preset key characters. Whether preset key characters are included in the URL can be directly detected to determine whether the file to be downloaded is stored in the privacy space, and a user does not need to judge whether the file to be downloaded is stored in the privacy space, so that the file downloading efficiency is effectively improved, and the user experience is improved.
In one embodiment, the preset keyword may be directly obtained locally by the client of the downloader in the present disclosure.
And when a plurality of historical downloading URLs are obtained, the historical downloading URLs are URLs corresponding to files which are placed into the privacy space by a user after downloading is completed in the historical downloading tasks, and then preset key characters are obtained according to the plurality of historical downloading URLs.
And after the preset key character is obtained, the preset key character can be uploaded to a server.
In another embodiment, the preset key character may also be acquired by the server. At the moment, a plurality of historical download URLs are obtained, wherein the historical download URLs are URLs corresponding to files which are placed into a privacy space by a user after downloading is completed in a historical download task, and then the historical download URLs are uploaded to a server so that the server can obtain preset key characters according to the historical download URLs. And after the server acquires the preset key characters, pushing the preset key characters to the terminal equipment, so that the terminal equipment locally determines whether the file to be downloaded needs to be downloaded into the privacy space after acquiring the URL corresponding to the file to be downloaded. Certainly, the server may not push the preset key characters obtained by the server to the terminal device, and then, after the terminal device obtains the download features corresponding to the file to be downloaded, the download features may be uploaded to the server, so that the server performs the step of judging whether the file to be downloaded needs to be downloaded into the privacy space, and when the server determines that the file to be downloaded needs to be downloaded into the privacy space, a response message is sent to the terminal device, where the response message is used to instruct a downloader in the terminal device to download the file to be downloaded into the privacy space. Certainly, after the server obtains the preset key characters, a white list can be generated according to the preset key characters, and the white list is pushed to the client side and serves as a judgment basis.
In the above implementation manner, the plurality of historical download URLs are obtained, which may be obtained by a downloader actively detecting a download task of a user, or may be actively uploaded by the user.
The above-mentioned obtaining of the preset key character according to the plurality of historical download URLs may be implemented by the following several ways:
a first implementation manner for obtaining the preset key characters according to the plurality of historical download URLs is as follows: and acquiring the URL with the occurrence frequency exceeding a third preset threshold in the historical downloading URL in the privacy space as the preset key character.
For example: the third preset threshold is 2, and when the obtained historical download URL is: 111.222.333.444/521, 111.223.333.444/521, 111.222.333.444/521, 111.224.333.444/521 and 111.222.333.444/521, wherein the number of times 111.222.333.444/521 appears is 3, and the number exceeds a third preset threshold value 2, and then the 111.222.333.444/521 is determined to be a preset key character.
At this time, after the URL corresponding to the file to be downloaded is acquired, whether the key character identical to the URL exists in the plurality of preset key characters is directly determined, and when the key character identical to the URL exists in the plurality of preset key characters, the file to be downloaded is determined to be the file which needs to be stored in the privacy space.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: the preset key characters are obtained according to the complete historical download URL, so that the coverage range of the preset key characters is small, and the accuracy of judging whether the file to be downloaded needs to be stored in the privacy space is higher.
Since matching through a complete URL makes the matching granularity too large and the matching too coarse, the matching result is not accurate enough, so that some of the files that should be saved in the privacy space are ignored.
Taking the net disk as an example: the preset key character is "pan.baidu.com/xxx", and the URL corresponding to the file to be downloaded is "pan.baidu.com/x 11", and since the two URLs are different, it is determined that "pan.baidu.com/x 11" is not the file to be saved in the privacy space. And "pan.baidu.com/x 11" is actually a file that the user wishes to save to the private space.
A second way to obtain the preset key characters according to the plurality of historical download URLs can be implemented as follows: the step of obtaining preset key characters according to the plurality of historical download URLs comprises the following steps: segmenting each historical download URL to obtain a plurality of segmentation words; acquiring segmentation words of which the occurrence times exceed a fourth preset threshold value from the plurality of segmentation words; and taking the segmentation words exceeding a fourth preset threshold value as preset key characters.
After obtaining a plurality of historical download URLs, segmenting each historical download URL according to a preset rule to obtain a plurality of segmentation words, wherein the preset rule can be input by a user and can also be built in a downloader, and the method does not limit the acquisition mode of the preset rule. The preset rule can be used for segmenting a group of two words, a group of three words or the user, and the segmentation mode indicated in the preset rule is not limited by the disclosure.
For example: the fourth preset threshold is 2, and the following three historical download URLs are obtained: pan.baidu.com/xxx, pan.baidu.com/x11, pan.baidu.com/x12, segmenting the historical download URLs according to punctuation, the segmentations obtained by pan.baidu.com/xxx are: { pan, baidu, com, xxx }; com/x11 the resulting segmentations were: { pan, baidu, com, x11 }; com/x12 the resulting segmentations were: { pan, baidu, com, x12}, based on the above groups of segregants, judging that the number of occurrences of the segregant pan is 3, the number of occurrences of baidu is 3, the number of occurrences of com is 3, the number of occurrences of xxx is 1, the number of occurrences of x11 is 1, and the number of occurrences of x12 is 1; at this time, pan, baidu, and com may be used as the preset key characters.
At this time, when it is detected that the number of the preset key characters included in the URL corresponding to the file to be downloaded is greater than or equal to a fifth preset threshold, the file to be downloaded is downloaded to the privacy space.
For example: the fifth preset threshold is 3, the preset key characters are 111, 333 and 444, and when the obtained URL corresponding to the file to be downloaded is: 111.222.333.444/521, at this time, by detecting that the preset key characters included in the URL are 3 in total, it is determined that the file to be downloaded corresponding to the URL needs to be saved in the privacy space at this time.
For another example: the fifth preset threshold is 3, the preset key characters are 111, 333 and 444, and when the obtained URL corresponding to the file to be downloaded is: 111.222.111.444/521, at this time, by detecting that the preset key characters included in the URL are 3 in total, 111, and 444, it is also determined that the file to be downloaded corresponding to the URL needs to be saved in the privacy space at this time.
For example, the URL corresponding to the file to be downloaded may be scored, and when the score is greater than a preset score value, it is determined that the file to be downloaded corresponding to the URL needs to be stored in the privacy space.
The scoring criteria at this point may be: when the URL corresponding to the file to be downloaded comprises one preset key character, the score is 1, when the URL corresponding to the file to be downloaded comprises two preset key characters, the score is 2, and the rest is repeated, and when the score is larger than or equal to 3, the file to be downloaded corresponding to the URL is determined to be stored in the privacy space.
For example: presetting key characters as 111, 333 and 444, and when the obtained URL corresponding to the file to be downloaded is: 111.222.111.444/521, at this time, by detecting that the preset key characters included in the URL are 3 in total, the score of the URL is 3 at this time, it is determined that the file to be downloaded corresponding to the URL needs to be saved in the privacy space.
The scoring criteria at this time may also be: when the URL corresponding to the file to be downloaded comprises one preset key character, the score is 1, when the URL corresponding to the file to be downloaded comprises two preset key characters, the score is 2, and the rest is repeated, and when the score is greater than or equal to 2, the file to be downloaded corresponding to the URL is determined to be stored in the privacy space.
For example: presetting key characters as 111, 333 and 444, and when the obtained URL corresponding to the file to be downloaded is: 111.222.111.444/521, at this time, by detecting that the preset key characters included in the URL are 2 types in total, the score of the URL is 2, and it is determined that the file to be downloaded corresponding to the URL needs to be saved in the privacy space.
As can be seen from the above analysis, the "com" is a second-level domain name for the industrial and commercial financial enterprise, and therefore, the "com" is included in the URL address of the industrial and commercial financial enterprise, and therefore, it is not accurate enough to use the "com" alone as the preset key character. Therefore, a word composed of the first segmentation word exceeding a fourth preset threshold and the second segmentation word exceeding the fourth preset threshold can be used as a preset key character, wherein the first segmentation word and the second segmentation word belong to the same history download URL, and the first segmentation word and the second segmentation word belong to an adjacent relation.
Continuing with the above example, when a disjunct is obtained that exceeds a second preset threshold: after pan, baidu and com, judge pan and baidu first, because pan and baidu belong to the same historical download URL "pan.
Since the URL includes the directory names of the respective levels, taking pan.baidu.com/xxx as an example, the website root directory obtained after splitting according to the directory names is pan.baidu.com, and the next-level directory of the acquired website root directory is xxx. Thus. In another implementation manner, after obtaining a plurality of historical download URLs, each historical download URL is segmented according to a directory name to obtain a plurality of directory names, and then preset key characters are obtained according to the directory names.
As shown in fig. 4, a third implementation manner for obtaining the preset keyword according to the plurality of historical download URLs includes the following steps: in step S201: and performing directory segmentation on each historical download URL to obtain a plurality of directory names.
In step S202: and acquiring the directory names of which the occurrence times are greater than or equal to a first preset threshold value in the plurality of directory names.
In step S203: and taking the directory name with the occurrence frequency larger than or equal to a first preset threshold value as a preset key character.
For example: the first preset threshold is 2, and the following three URLs under history are obtained: pan.baidu.com/xxx, pan.baidu.com/x11, pan.baidu.com/x12, segmenting the historical download URL according to the directory name to obtain a plurality of directory names, and then segmenting pan.baidu.com/xxx according to the directory to obtain a plurality of directory names: { pan.baidu.com, xxx }; the names of a plurality of directories obtained by splitting pan.baidu.com/x11 according to the directories are as follows: com, x11 }; the names of a plurality of directories obtained by splitting pan.baidu.com/x12 according to the directories are as follows: { pan.baidu.com, x12}, based on the above-mentioned each group of directory names, it was judged that the number of occurrences of the directory name pan.baidu.com was 3, the number of occurrences of xxx was 1, the number of occurrences of x11 was 1, and the number of occurrences of x12 was 1; com is greater than a first preset threshold, and thus, is used as a preset key character.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: the preset key characters are obtained according to the directory names in the historical downloading URLs, so that the obtained preset key characters are more accurate, and the accuracy of judging whether the files to be downloaded need to be stored in the privacy space is higher.
A fourth achievable way of obtaining the preset key characters according to the plurality of historical download URLs is as follows: after the completion of the file downloading of the user is monitored, the user has the action of actively placing the downloaded file into the privacy space, which indicates that the downloaded file is most likely to be a URL related to privacy. Then, these collected URLs can be passed through and uploaded to the server. The server collects the URLs acquired by a plurality of users and judges whether the URLs are preset key characters.
For example: if more than 50% of users choose to put the file downloaded to the same URL into the privacy space, the URL is determined to be the preset key character.
At this time, a white list may be further preset in the server, and the preset key character is stored in the white list, so that after the server obtains the preset key character, the preset key character is added to the white list.
Because the client uploads the historical download URL to the server periodically or in real time, the server needs to update the white list according to the preset key characters determined in the later period, so that the coverage range of the white list is wider.
Since the white list is updated, the server needs to push the updated white list to the client in a certain period or in real time.
It should be noted that the step of determining whether to download the file to be downloaded into the privacy space may also be performed by a machine learning method in combination with the historical download URL and the URL corresponding to the file to be downloaded.
In another embodiment, the download feature corresponding to the file to be downloaded may be a file feature in a seed file corresponding to the file to be downloaded.
In this case, as shown in fig. 5, the step S101 may be implemented as the step S1012, the step S102 may be implemented as the step S1022, and the step S103 may be implemented as the step S1032:
in step S1012, file characteristics in a seed file corresponding to the file to be downloaded are obtained, where the file characteristics in the seed file include: file feature values recorded in the seed file.
In step S1022, it is determined whether the feature value in the seed file is the same as the preset feature value matched with the privacy file.
In step S1032, when it is determined that the feature value in the seed file is the same as the preset feature value matched with the privacy file, the file to be downloaded is downloaded to the privacy space.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: and acquiring file characteristics in the seed file corresponding to the file to be downloaded, and downloading the file to be downloaded to the privacy space when the characteristic value in the seed file is determined to be the same as the preset characteristic value matched with the privacy file. Because whether the file to be downloaded is stored in the privacy space can be directly determined according to the characteristic value in the seed file, the user does not need to judge whether the file to be downloaded is stored in the privacy space, the file downloading efficiency is effectively improved, and the user experience is improved.
When a user downloads a file, the file may be downloaded not only through the URL described above but also through a Bitstream (BT) seed.
For the seed file, the seed file itself is a text-like file. The file itself records the file characteristic value (e.g., digital digest value) of the file to be downloaded, and at this time, it can be determined whether the file to be downloaded needs to be downloaded into the privacy space according to the file characteristic value.
At this time, obtaining the preset feature value may be achieved by the following several ways:
1) after the file characteristic values of the plurality of historical seed files are obtained, the client side obtains preset characteristic values according to the file characteristic values of the plurality of historical seed files, and the client side locally stores the preset characteristic values.
At this time, when the file characteristics in the seed file corresponding to the file to be downloaded are obtained, the client may directly execute the above step of determining whether to download the file to be downloaded into the privacy space according to the preset characteristic value.
2) After the file characteristic values of the plurality of historical seed files are obtained, the client side obtains preset characteristic values according to the file characteristic values of the plurality of historical seed files, and the client side uploads the preset characteristic values to the server.
At this time, when the file characteristics in the seed file corresponding to the file to be downloaded are obtained, the client sends the file characteristics in the sub file to the server, so that the server executes the step of determining whether to download the file to be downloaded into the privacy space according to the preset characteristic value.
3) After the file characteristic values of the plurality of historical seed files are obtained, the client sends the file characteristic values of the historical seed files to the server, so that the server obtains preset characteristic values according to the file characteristic values of the plurality of historical seed files and locally stores the preset characteristic values.
At this time, when the file characteristics in the seed file corresponding to the file to be downloaded are obtained, the client sends the file characteristics in the sub file to the server, so that the server executes the step of determining whether to download the file to be downloaded into the privacy space according to the preset characteristic value.
4) After the file characteristic values of the plurality of historical seed files are obtained, the client sends the file characteristic values of the historical seed files to the server, so that the server obtains preset characteristic values according to the file characteristic values of the plurality of historical seed files, and the server pushes the preset characteristic values to the client.
At this time, when the file characteristics in the seed file corresponding to the file to be downloaded are obtained, the client may directly execute the above step of determining whether to download the file to be downloaded into the privacy space according to the preset characteristic value.
An example method for acquiring the preset feature value includes: after a user downloads a certain file through the seed file, if the user puts the downloaded file into the privacy space after the downloading is completed, the client reads the file characteristic value of the downloaded file from the seed file and reports the file characteristic value to the server. The server collects the information uploaded by a plurality of users, and if the users with the same file characteristic value are found to be put into the privacy space by more than a certain proportion of users, the file corresponding to the file characteristic value can be determined as the privacy file. This file characteristic value may be taken as a preset characteristic value.
At this time, the server may further preset a white list, and the white list stores the preset feature value, so that after the server obtains the preset feature value, the preset feature value is added to the white list.
The client uploads the file characteristic value of the history seed file to the server periodically or in real time, so that the server needs to update the white list according to the preset characteristic value determined in the later period, and the coverage range of the white list is larger.
Since the white list is updated, the server needs to push the updated white list to the client in a certain period or in real time.
The example method of obtaining the preset feature value may further include: after a user downloads a certain file through a seed file, if the user puts the downloaded file into a privacy space after the downloading is completed, the client reads the file characteristic value of the downloaded file from the seed file, collects the information uploaded by a plurality of users, and if the user who exceeds a certain proportion puts the file with the same file characteristic value into the privacy space, the file corresponding to the file characteristic value can be determined to be the privacy file. The client may take this file characteristic value as a preset characteristic value. And then, the client can upload the preset characteristic values to the server so as to store the preset characteristic values by the server.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: the preset characteristic value is obtained according to the file characteristic value of the historical seed file, so that the obtained preset characteristic value is more accurate, and the accuracy of judging whether the file to be downloaded needs to be stored in the privacy space is higher.
It is worth noting that whether the file to be downloaded needs to be downloaded into the privacy space can be determined by combining the file characteristic values of the plurality of historical seed files and the file characteristics in the seed file corresponding to the file to be downloaded, through a machine learning method.
The method for acquiring the file characteristics in the seed file corresponding to the file to be downloaded comprises the following steps: the file characteristics in the seed file are obtained through a Message Digest Algorithm fifth edition (MD 5 for short) 5, a hash Algorithm or a secure hash Algorithm.
Fig. 6 is a flowchart illustrating a file download method according to an exemplary embodiment, where the method includes the following steps, as shown in fig. 6:
in step S301: the downloader client obtains a plurality of historical download URLs.
Of course, the downloader client may actively obtain a plurality of historical download URLs, or may obtain the historical download URLs only after being authorized by the user.
In step S302: the client side of the downloader trains a judgment model through a machine learning method.
The judgment model can judge whether the file to be downloaded corresponding to the URL needs to be downloaded into the privacy space according to the score of the URL corresponding to the file to be downloaded.
In step S303: and the downloader client sets a storage path corresponding to the privacy space.
Optionally, a storage path as a privacy space and a default password of the privacy space are defaulted in the downloader client. In order to improve user experience, in this embodiment, a user may also manually set a storage path corresponding to the privacy space, and an encryption manner and a password of the privacy space.
In step S304: and the downloader client sets a storage path corresponding to the public space.
Optionally, a storage path as an open space is defaulted in the downloader client. In order to improve user experience, in this embodiment, a user may also manually set a storage path corresponding to the public space.
The public space is a space without encryption and access right.
In step S305: and the downloader client acquires the URL corresponding to the file to be downloaded input by the user.
In step S306: and the client side of the downloader judges the score of the URL through the judgment model and determines whether the file to be downloaded corresponding to the URL needs to be stored in the privacy space according to the corresponding relation between the score and the preset score. When the score is greater than or equal to the preset score, it is determined that the file to be downloaded corresponding to the URL needs to be saved in the privacy space, step S307 is executed, and when the score is less than the preset score, it is determined that the file to be downloaded corresponding to the URL does not need to be saved in the privacy space, step S308 is executed.
In step S307: and the downloader client downloads the file to be downloaded into the privacy space.
In step S308: and the downloader client downloads the file to be downloaded into the public space.
Fig. 7 is a flowchart illustrating a file download method according to an exemplary embodiment, as shown in fig. 7, the method including the steps of:
in step S401: the server corresponding to the downloader client obtains the historical download URLs of the files saved to the privacy space by each user who installs the downloader client.
In step S402: the server trains the judgment model through a machine learning method.
In step S403: and the user downloads the downloader client through the terminal equipment.
The downloader client can be downloaded in an application store, and the installation program of the downloader client can also be acquired in a code scanning mode.
In step S404: and setting a storage path corresponding to the privacy space in the downloader client.
After the downloader client is installed in the terminal device, a storage path as a privacy space and a default password of the privacy space are defaulted in the downloader client, and the default password is displayed to a user through the downloader APP. In order to improve user experience, in this embodiment, a user may also manually set a storage path corresponding to the privacy space, and an encryption manner and a password of the privacy space.
In step S405: and setting a storage path corresponding to the public space in the downloader client.
After the downloader client is installed in the mobile phone, a storage path serving as a public space is defaulted in the downloader client, and the storage path is displayed to a user through the downloader client. In order to improve user experience, in this embodiment, a user may also manually set a storage path corresponding to the public space.
The public space is a space without encryption and access right.
In step S406: and the user inputs the URL corresponding to the file to be downloaded in the client of the downloader.
In step S407: the downloader client sends the URL to the server.
In step S408: the server receives the URL.
In step S409: and after the server receives the URL, judging whether the URL comprises preset key characters or not through a judgment model. And when the URL is determined to include the preset key character according to the judgment model, executing the step S4010 to the step S4011, and when the URL is determined to not include the preset key character according to the judgment model, executing the step S4012 to the step S4013.
In step S4010: and the server sends a first response message to the downloader client, wherein the first response message is used for indicating that the file to be downloaded is downloaded into the privacy space.
In step S4011: and the downloader client downloads the file to be downloaded into the privacy space.
In step S4012: and the server sends a second response message to the downloader client, wherein the second response message is used for indicating that the file to be downloaded is downloaded into the public space.
In step S4013: and the downloader client downloads the file to be downloaded into the public space.
The following are embodiments of the disclosed apparatus that may be used to perform embodiments of the disclosed methods.
Fig. 8 is a block diagram illustrating a file download apparatus according to an exemplary embodiment, as shown in fig. 8, the file download apparatus comprising:
the first obtaining module 11 is configured to obtain a download characteristic corresponding to a file to be downloaded;
a determining module 12, configured to determine whether the download features acquired by the first acquiring module 11 include preset features that match the privacy file;
the downloading module 13 is configured to download the file to be downloaded to a privacy space when the determining module 12 determines that the downloading features acquired by the acquiring module include preset features, where the privacy space is a space for storing the privacy file.
In one embodiment, as shown in fig. 9, the obtaining module 11 includes: a first obtaining sub-module 111, wherein the determining module 12 comprises: a first determining sub-module 121, wherein the downloading module 13 includes: a first download sub-module 131;
the first obtaining sub-module 111 is configured to obtain a uniform resource locator URL corresponding to a file to be downloaded;
the first determining submodule 121 is configured to determine whether the URL acquired by the first acquiring submodule 111 includes preset key characters matched with a privacy file;
the first downloading submodule 131 is configured to download the file to be downloaded into the privacy space when the first determining submodule 121 determines that the URL includes a preset key character matching a privacy file.
In one embodiment, as shown in fig. 10, the apparatus further comprises: a second obtaining module 14, a third obtaining module 15 and a first uploading module 16;
the second obtaining module 14 is configured to obtain a plurality of historical download URLs, where the historical download URLs are URLs corresponding to files that are placed into the privacy space by the user after downloading is completed in the historical download task;
the third obtaining module 15 is configured to obtain the preset key character according to the plurality of historical download URLs obtained by the second obtaining module 14;
the first uploading module 16 is configured to upload the preset keyword acquired by the third acquiring module 15 to a server.
In one embodiment, as shown in fig. 11, the third obtaining module 15 includes: a splitting sub-module 151, a second obtaining sub-module 152, and a second determining sub-module 153;
the splitting sub-module 151 is configured to split the directory of each historical download URL acquired by the second acquiring module 14 to obtain a plurality of directory names;
the second obtaining sub-module 152 is configured to obtain a directory name of which the occurrence frequency is greater than or equal to a first preset threshold value from the directory names obtained by the splitting sub-module 151;
the second determining submodule 153 is configured to use the directory name determined by the second obtaining submodule 152, where the occurrence number is greater than or equal to a first preset threshold, as the preset key character.
In one embodiment, as shown in fig. 12, the apparatus further comprises: a fourth obtaining module 17 and a second uploading module 18;
the fourth obtaining module 17 is configured to obtain a plurality of historical download URLs, where the historical download URLs are URLs corresponding to files that are placed in the privacy space by the user after downloading is completed in the historical download task;
the second uploading module 18 is configured to upload the plurality of historical download URLs acquired by the fourth acquiring module 17 to a server.
In one embodiment, as shown in fig. 13, the first obtaining module 11 includes: a third obtaining sub-module 112, wherein the determining module 12 comprises: a third determining sub-module 122, wherein the downloading module 13 comprises: a second download sub-module 132;
the third obtaining sub-module 112 is configured to obtain file features in a seed file corresponding to a file to be downloaded, where the file features in the seed file include: file characteristic values recorded in the seed file;
the third determining sub-module 122 is configured to determine whether the feature value in the seed file acquired by the third acquiring sub-module 112 is the same as a preset feature value matched with a privacy file;
the second downloading sub-module 132 is configured to download the file to be downloaded to the privacy space when the third determining sub-module 122 determines that the feature value in the seed file is the same as the preset feature value matched with the privacy file.
In one embodiment, as shown in fig. 14, the apparatus further comprises: a fifth obtaining module 21, a sixth obtaining module 22 and a third uploading module 23;
the fifth obtaining module 21 is configured to obtain file feature values of a plurality of historical seed files, where the file feature values of the historical seed files are file feature values corresponding to seed files that are placed into a privacy space by a user after downloading is completed in a historical downloading task;
the sixth obtaining module 22 is configured to obtain the preset feature values according to the file feature values of the plurality of history seed files obtained by the fifth obtaining module 21;
the third uploading module 23 is configured to upload the preset feature value acquired by the sixth acquiring module 22 to a server.
According to a third aspect of the embodiments of the present disclosure, there is provided a file downloading apparatus including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
acquiring downloading characteristics corresponding to a file to be downloaded;
determining whether the downloading characteristics comprise preset characteristics matched with the privacy file or not;
and when the download characteristics are determined to include preset characteristics, downloading the file to be downloaded into a privacy space, wherein the privacy space is a space for storing the privacy file.
The processor may be further configured to:
the acquiring of the downloading characteristics corresponding to the file to be downloaded includes:
acquiring a Uniform Resource Locator (URL) corresponding to a file to be downloaded;
the determining whether the download features include preset features matched with the privacy files includes:
determining whether the URL comprises preset key characters matched with a privacy file;
when the download characteristics are determined to include the preset characteristics, downloading the file to be downloaded into a privacy space, wherein the privacy space is a space for storing the privacy file and comprises:
and downloading the file to be downloaded to the privacy space when the URL is determined to comprise preset key characters matched with the privacy file.
The method further comprises the following steps:
acquiring a plurality of historical downloading URLs, wherein the historical downloading URLs are URLs corresponding to files which are placed into a privacy space by a user after downloading is completed in a historical downloading task;
and acquiring the preset key characters according to the plurality of historical downloading URLs, and uploading the preset key characters to a server.
The obtaining the preset key characters according to the plurality of historical download URLs includes:
performing directory segmentation on each historical download URL to obtain a plurality of directory names;
acquiring a directory name of which the occurrence frequency is greater than or equal to a first preset threshold value in a plurality of directory names;
and taking the directory name with the occurrence frequency larger than or equal to a first preset threshold value as the preset key character.
The method further comprises the following steps:
acquiring a plurality of historical downloading URLs, wherein the historical downloading URLs are URLs corresponding to files which are placed into a privacy space by a user after downloading is completed in a historical downloading task;
and uploading the plurality of historical download URLs to a server.
The acquiring of the downloading characteristics corresponding to the file to be downloaded includes:
acquiring file characteristics in a seed file corresponding to a file to be downloaded, wherein the file characteristics in the seed file comprise: file characteristic values recorded in the seed file;
the determining whether the download features include preset features matched with the privacy files includes:
determining whether the characteristic value in the seed file is the same as a preset characteristic value matched with a privacy file or not;
when the download characteristics are determined to include the preset characteristics, downloading the file to be downloaded into a privacy space, wherein the privacy space is a space for storing the privacy file and comprises:
and downloading the file to be downloaded to the privacy space when the characteristic value in the seed file is determined to be the same as the preset characteristic value matched with the privacy file.
The method further comprises the following steps:
acquiring file characteristic values of a plurality of historical seed files, wherein the file characteristic values of the historical seed files are corresponding to seed files which are placed into a privacy space by a user after downloading is completed in a historical downloading task;
and acquiring the preset characteristic values according to the file characteristic values of the plurality of historical seed files, and uploading the preset characteristic values to a server.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 15 is a block diagram illustrating a file downloading apparatus 80 adapted to a terminal device according to an exemplary embodiment. For example, the apparatus 80 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
The apparatus 80 may include one or more of the following components: processing component 802, memory 804, power component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814, and communication component 816.
The processing component 802 generally controls overall operation of the device 80, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operations at the apparatus 80. Examples of such data include instructions for any application or method operating on the device 80, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 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.
The power supply component 806 provides power to the various components of the device 80. The power components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 80.
The multimedia component 808 includes a screen that provides an output interface between the device 80 and the 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 808 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 80 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 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the apparatus 80 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 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 assembly 814 includes one or more sensors for providing various aspects of state assessment for the device 80. For example, the sensor assembly 814 may detect the open/closed status of the device 80, the relative positioning of the components, such as a display and keypad of the device 80, the change in position of the device 80 or a component of the device 80, the presence or absence of user contact with the device 80, the orientation or acceleration/deceleration of the device 80, and the change in temperature of the device 80. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 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 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate wired or wireless communication between the apparatus 80 and other devices. The device 80 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 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 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 80 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 methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 804 comprising instructions, executable by the processor 820 of the apparatus 80 to perform the above-described method is also provided. 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, wherein instructions, when executed by a processor of an apparatus 80, enable the apparatus 80 to perform the file download method described above, the method comprising:
acquiring downloading characteristics corresponding to a file to be downloaded;
determining whether the downloading characteristics comprise preset characteristics matched with the privacy file or not;
and when the download characteristics are determined to include preset characteristics, downloading the file to be downloaded into a privacy space, wherein the privacy space is a space for storing the privacy file.
The acquiring of the downloading characteristics corresponding to the file to be downloaded includes:
acquiring a Uniform Resource Locator (URL) corresponding to a file to be downloaded;
the determining whether the download features include preset features matched with the privacy files includes:
determining whether the URL comprises preset key characters matched with a privacy file;
when the download characteristics are determined to include the preset characteristics, downloading the file to be downloaded into a privacy space, wherein the privacy space is a space for storing the privacy file and comprises:
and downloading the file to be downloaded to the privacy space when the URL is determined to comprise preset key characters matched with the privacy file.
The method further comprises the following steps:
acquiring a plurality of historical downloading URLs, wherein the historical downloading URLs are URLs corresponding to files which are placed into a privacy space by a user after downloading is completed in a historical downloading task;
and acquiring the preset key characters according to the plurality of historical downloading URLs, and uploading the preset key characters to a server.
The obtaining the preset key characters according to the plurality of historical download URLs includes:
performing directory segmentation on each historical download URL to obtain a plurality of directory names;
acquiring a directory name of which the occurrence frequency is greater than or equal to a first preset threshold value in a plurality of directory names;
and taking the directory name with the occurrence frequency larger than or equal to a first preset threshold value as the preset key character.
The method further comprises the following steps:
acquiring a plurality of historical downloading URLs, wherein the historical downloading URLs are URLs corresponding to files which are placed into a privacy space by a user after downloading is completed in a historical downloading task;
and uploading the plurality of historical download URLs to a server.
The acquiring of the downloading characteristics corresponding to the file to be downloaded includes:
acquiring file characteristics in a seed file corresponding to a file to be downloaded, wherein the file characteristics in the seed file comprise: file characteristic values recorded in the seed file;
the determining whether the download features include preset features matched with the privacy files includes:
determining whether the characteristic value in the seed file is the same as a preset characteristic value matched with a privacy file or not;
when the download characteristics are determined to include the preset characteristics, downloading the file to be downloaded into a privacy space, wherein the privacy space is a space for storing the privacy file and comprises:
and downloading the file to be downloaded to the privacy space when the characteristic value in the seed file is determined to be the same as the preset characteristic value matched with the privacy file.
The method further comprises the following steps:
acquiring file characteristic values of a plurality of historical seed files, wherein the file characteristic values of the historical seed files are corresponding to seed files which are placed into a privacy space by a user after downloading is completed in a historical downloading task;
and acquiring the preset characteristic values according to the file characteristic values of the plurality of historical seed files, and uploading the preset characteristic values to a server.
Fig. 16 is a block diagram illustrating an apparatus 90 for file downloading according to an example embodiment. For example, the apparatus 90 may be provided as a server. The apparatus 90 comprises a processing component 902 further comprising one or more processors, and memory resources, represented by memory 903, for storing instructions, e.g., applications, executable by the processing component 902. The application programs stored in memory 903 may include one or more modules that each correspond to a set of instructions. Further, the processing component 902 is configured to execute instructions to perform the above-described methods.
The apparatus 90 may also include a power component 906 configured to perform power management of the apparatus 90, a wired or wireless network interface 905 configured to connect the apparatus 90 to a network, and an input/output (I/O) interface 908. The apparatus 90 may operate based on an operating system stored in the memory 903, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, or the like.
A non-transitory computer readable storage medium having instructions therein which, when executed by a processor of the apparatus 90, enable the apparatus 90 to perform the file download method described above.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure 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 present disclosure is limited only by the appended claims.

Claims (14)

1. A method for downloading a file, comprising:
acquiring downloading characteristics corresponding to a file to be downloaded;
determining whether the downloading characteristics comprise preset characteristics matched with the privacy file or not;
when the download characteristics are determined to include preset characteristics, downloading the file to be downloaded into a privacy space, wherein the privacy space is a space for storing the privacy file;
the acquiring of the downloading characteristics corresponding to the file to be downloaded includes:
acquiring file characteristics in a seed file corresponding to a file to be downloaded, wherein the file characteristics in the seed file comprise: file characteristic values recorded in the seed file;
the determining whether the download features include preset features matched with the privacy files includes:
determining whether the characteristic value in the seed file is the same as a preset characteristic value matched with a privacy file or not;
when the download characteristics are determined to include the preset characteristics, downloading the file to be downloaded into a privacy space, wherein the privacy space is a space for storing the privacy file and comprises:
and downloading the file to be downloaded to the privacy space when the characteristic value in the seed file is determined to be the same as the preset characteristic value matched with the privacy file.
2. The method according to claim 1, wherein the obtaining of the download features corresponding to the file to be downloaded comprises:
acquiring a Uniform Resource Locator (URL) corresponding to a file to be downloaded;
the determining whether the download features include preset features matched with the privacy files includes:
determining whether the URL comprises preset key characters matched with a privacy file;
when the download characteristics are determined to include the preset characteristics, downloading the file to be downloaded into a privacy space, wherein the privacy space is a space for storing the privacy file and comprises:
and downloading the file to be downloaded to the privacy space when the URL is determined to comprise preset key characters matched with the privacy file.
3. The method of claim 2, further comprising:
acquiring a plurality of historical downloading URLs, wherein the historical downloading URLs are URLs corresponding to files which are placed into a privacy space by a user after downloading is completed in a historical downloading task;
and acquiring the preset key characters according to the plurality of historical downloading URLs, and uploading the preset key characters to a server.
4. The method of claim 3, wherein the obtaining the predetermined keyword from the plurality of historical download URLs comprises:
performing directory segmentation on each historical download URL to obtain a plurality of directory names;
acquiring a directory name of which the occurrence frequency is greater than or equal to a first preset threshold value in a plurality of directory names;
and taking the directory name with the occurrence frequency larger than or equal to a first preset threshold value as the preset key character.
5. The method of claim 2, further comprising:
acquiring a plurality of historical downloading URLs, wherein the historical downloading URLs are URLs corresponding to files which are placed into a privacy space by a user after downloading is completed in a historical downloading task;
and uploading the plurality of historical download URLs to a server.
6. The method of claim 1, further comprising:
acquiring file characteristic values of a plurality of historical seed files, wherein the file characteristic values of the historical seed files are corresponding to seed files which are placed into a privacy space by a user after downloading is completed in a historical downloading task;
and acquiring the preset characteristic values according to the file characteristic values of the plurality of historical seed files, and uploading the preset characteristic values to a server.
7. A file downloading apparatus, comprising:
the first acquisition module is used for acquiring downloading characteristics corresponding to a file to be downloaded;
the determining module is used for determining whether the downloading characteristics acquired by the first acquiring module include preset characteristics matched with the privacy file;
the downloading module is used for downloading the file to be downloaded into a privacy space when the determining module determines that the downloading characteristics acquired by the acquiring module comprise preset characteristics, wherein the privacy space is a space for storing the privacy file;
the first obtaining module comprises: a third obtaining sub-module, wherein the determining module comprises: a third determining sub-module, the downloading module comprising: a second download sub-module;
the third obtaining sub-module is configured to obtain file characteristics in a seed file corresponding to a file to be downloaded, where the file characteristics in the seed file include: file characteristic values recorded in the seed file;
the third determining submodule is configured to determine whether the feature value in the seed file acquired by the third acquiring submodule is the same as a preset feature value matched with the privacy file;
and the second downloading sub-module is used for downloading the file to be downloaded to the privacy space when the third determining sub-module determines that the characteristic value in the seed file is the same as the preset characteristic value matched with the privacy file.
8. The apparatus of claim 7, wherein the obtaining module comprises: a first obtaining sub-module, the determining module comprising: a first determination submodule, the download module comprising: a first down-link sub-module;
the first obtaining submodule is used for obtaining a Uniform Resource Locator (URL) corresponding to a file to be downloaded;
the first determining submodule is used for determining whether the URL acquired by the first acquiring submodule comprises preset key characters matched with a privacy file;
the first download submodule is configured to download the file to be downloaded to the privacy space when the first determining submodule determines that the URL includes a preset key character matching a privacy file.
9. The apparatus of claim 8, further comprising: the system comprises a second acquisition module, a third acquisition module and a first uploading module;
the second acquisition module is used for acquiring a plurality of historical downloading URLs, wherein the historical downloading URLs are URLs corresponding to files which are placed into a privacy space by a user after downloading is completed in a historical downloading task;
the third obtaining module is configured to obtain the preset key character according to the plurality of historical download URLs obtained by the second obtaining module;
the first uploading module is used for uploading the preset key character acquired by the third acquiring module to a server.
10. The apparatus of claim 9, wherein the third obtaining module comprises: the segmentation sub-module, the second acquisition sub-module and the second determination sub-module;
the segmentation submodule is used for carrying out directory segmentation on each historical download URL acquired by the second acquisition module to obtain a plurality of directory names;
the second obtaining submodule is used for obtaining the directory names of which the occurrence times are more than or equal to a first preset threshold value in the plurality of directory names obtained by the splitting submodule;
the second determining submodule is configured to use the directory name determined by the second obtaining submodule and having the occurrence number greater than or equal to a first preset threshold as the preset key character.
11. The apparatus of claim 8, further comprising: the fourth acquisition module and the second uploading module;
the fourth obtaining module is used for obtaining a plurality of historical downloading URLs, and the historical downloading URLs are URLs corresponding to files which are placed into a privacy space by a user after downloading is completed in a historical downloading task;
the second uploading module is configured to upload the plurality of historical download URLs acquired by the fourth acquiring module to a server.
12. The apparatus of claim 7, further comprising: the device comprises a fifth acquisition module, a sixth acquisition module and a third uploading module;
the fifth obtaining module is configured to obtain file feature values of a plurality of historical seed files, where the file feature values of the historical seed files are file feature values corresponding to seed files that are placed into a privacy space by a user after downloading is completed in a historical downloading task;
the sixth obtaining module is configured to obtain the preset feature values according to the file feature values of the plurality of history seed files obtained by the fifth obtaining module;
and the third uploading module is used for uploading the preset characteristic value acquired by the sixth acquiring module to a server.
13. A file downloading apparatus, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
acquiring downloading characteristics corresponding to a file to be downloaded;
determining whether the downloading characteristics comprise preset characteristics matched with the privacy file or not;
when the download characteristics are determined to include preset characteristics, downloading the file to be downloaded into a privacy space, wherein the privacy space is a space for storing the privacy file;
the acquiring of the downloading characteristics corresponding to the file to be downloaded includes:
acquiring file characteristics in a seed file corresponding to a file to be downloaded, wherein the file characteristics in the seed file comprise: file characteristic values recorded in the seed file;
the determining whether the download features include preset features matched with the privacy files includes:
determining whether the characteristic value in the seed file is the same as a preset characteristic value matched with a privacy file or not;
when the download characteristics are determined to include the preset characteristics, downloading the file to be downloaded into a privacy space, wherein the privacy space is a space for storing the privacy file and comprises:
and downloading the file to be downloaded to the privacy space when the characteristic value in the seed file is determined to be the same as the preset characteristic value matched with the privacy file.
14. A computer readable storage medium having computer instructions stored thereon which, when executed by a processor, perform the steps of:
acquiring downloading characteristics corresponding to a file to be downloaded;
determining whether the downloading characteristics comprise preset characteristics matched with the privacy file or not;
when the download characteristics are determined to include preset characteristics, downloading the file to be downloaded into a privacy space, wherein the privacy space is a space for storing the privacy file;
the acquiring of the downloading characteristics corresponding to the file to be downloaded includes:
acquiring file characteristics in a seed file corresponding to a file to be downloaded, wherein the file characteristics in the seed file comprise: file characteristic values recorded in the seed file;
the determining whether the download features include preset features matched with the privacy files includes:
determining whether the characteristic value in the seed file is the same as a preset characteristic value matched with a privacy file or not;
when the download characteristics are determined to include the preset characteristics, downloading the file to be downloaded into a privacy space, wherein the privacy space is a space for storing the privacy file and comprises:
and downloading the file to be downloaded to the privacy space when the characteristic value in the seed file is determined to be the same as the preset characteristic value matched with the privacy file.
CN201710262899.8A 2017-04-20 2017-04-20 File downloading method and device Active CN107147702B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710262899.8A CN107147702B (en) 2017-04-20 2017-04-20 File downloading method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710262899.8A CN107147702B (en) 2017-04-20 2017-04-20 File downloading method and device

Publications (2)

Publication Number Publication Date
CN107147702A CN107147702A (en) 2017-09-08
CN107147702B true CN107147702B (en) 2021-03-30

Family

ID=59775323

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710262899.8A Active CN107147702B (en) 2017-04-20 2017-04-20 File downloading method and device

Country Status (1)

Country Link
CN (1) CN107147702B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101859306A (en) * 2009-04-07 2010-10-13 日电(中国)有限公司 Method and equipment for generating blind index table, and united keyword search method and equipment
CN101986663A (en) * 2010-11-29 2011-03-16 北京卓微天成科技咨询有限公司 OTP-based cloud storage data storing method, device and system
CN103873521A (en) * 2012-12-14 2014-06-18 江南大学 Cloud architecture-based mobile phone privacy file protection system and method
CN104966031A (en) * 2015-07-01 2015-10-07 复旦大学 Method for identifying permission-irrelevant private data in Android application program

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1815958A (en) * 2005-01-31 2006-08-09 华为技术有限公司 Apparatus and method for control setting download document terminal
US10574729B2 (en) * 2011-06-08 2020-02-25 Workshare Ltd. System and method for cross platform document sharing
CN103678692B (en) * 2013-12-26 2018-04-27 北京奇虎科技有限公司 A kind of security sweep method and device for downloading file
CN104168277A (en) * 2014-08-15 2014-11-26 小米科技有限责任公司 File security maintaining method and device
CN104462900A (en) * 2014-12-05 2015-03-25 来安县新元机电设备设计有限公司 Method and system for protecting private pictures in mobile terminal
CN106375366A (en) * 2016-05-31 2017-02-01 深圳市美贝壳科技有限公司 File privacy protection system
CN106503586B (en) * 2016-11-18 2019-08-13 北京安云世纪科技有限公司 A kind of method and mobile communication terminal handling application file

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101859306A (en) * 2009-04-07 2010-10-13 日电(中国)有限公司 Method and equipment for generating blind index table, and united keyword search method and equipment
CN101986663A (en) * 2010-11-29 2011-03-16 北京卓微天成科技咨询有限公司 OTP-based cloud storage data storing method, device and system
CN103873521A (en) * 2012-12-14 2014-06-18 江南大学 Cloud architecture-based mobile phone privacy file protection system and method
CN104966031A (en) * 2015-07-01 2015-10-07 复旦大学 Method for identifying permission-irrelevant private data in Android application program

Also Published As

Publication number Publication date
CN107147702A (en) 2017-09-08

Similar Documents

Publication Publication Date Title
EP2960823B1 (en) Method, device and system for managing authority
EP2985975B1 (en) Method, apparatus and system for authenticating access and computer program
CN106170004B (en) Method and device for processing verification code
US10607035B2 (en) Method of displaying content on a screen of an electronic processing device
CN103914520B (en) Data query method, terminal device and server
US11004163B2 (en) Terminal-implemented method, server-implemented method and terminal for acquiring certification document
EP3157198A1 (en) Method and apparatus for network connection
CN104168277A (en) File security maintaining method and device
CN107070654B (en) Information acquisition method and device
CN107959757B (en) User information processing method and device, APP server and terminal equipment
CN103914541A (en) Information search method and device
CN106603815B (en) Message processing method and device
CN109672666B (en) Network attack detection method and device
CN108900553B (en) Communication method, device and computer readable storage medium
CN112528185A (en) Comment information display method and device, server and terminal
CN107423146B (en) Method, device and system for controlling mutual calling of application programs
US9667784B2 (en) Methods and devices for providing information in voice service
CN107493255B (en) Communication message access control method and device
CN105681365B (en) Method and apparatus for file transmission
CN113055169B (en) Data encryption method and device, electronic equipment and storage medium
CN108664216B (en) Data storage method and device
CN110928425A (en) Information monitoring method and device
CN112243000B (en) Application data processing method and device, computer equipment and storage medium
CN105095296B (en) File management method and device
CN111338971B (en) Application testing method and device, electronic equipment and storage medium

Legal Events

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