[go: up one dir, main page]

CN107147702A - File download method and device - Google Patents

File download method and device Download PDF

Info

Publication number
CN107147702A
CN107147702A CN201710262899.8A CN201710262899A CN107147702A CN 107147702 A CN107147702 A CN 107147702A CN 201710262899 A CN201710262899 A CN 201710262899A CN 107147702 A CN107147702 A CN 107147702A
Authority
CN
China
Prior art keywords
file
downloaded
download
private
url
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201710262899.8A
Other languages
Chinese (zh)
Other versions
CN107147702B (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

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 OR CALCULATING; 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 OR CALCULATING; 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]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Data Mining & Analysis (AREA)
  • Medical Informatics (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The disclosure is directed to document down loading method and device.This method includes:Obtain the corresponding download features of file to be downloaded, the default feature for whether including matching with private file in download features is determined, when it is determined that download features include default feature, file to be downloaded is downloaded in private space, wherein, private space is the space of storage private file.Determine whether the file to be downloaded needs to be downloaded to private space by the corresponding download features of file to be downloaded, the efficiency of effective lifting file download, and improve Consumer's Experience.

Description

文件下载方法及装置File download method and device

技术领域technical field

本公开涉及信息安全技术领域,尤其涉及文件下载方法及装置。The present disclosure relates to the technical field of information security, in particular to a file downloading method and device.

背景技术Background technique

互联网方便了用户获取和下载各类文件,其中很多文件类型涉及到用户隐私或涉及到安全问题,比如涉密的工作文档、私人种子文件等。用户在下载和存储过程中有对文件进行加密的需求。目前,都是用户在下载文件后手动的对文件进行加密。The Internet facilitates users to obtain and download various files, many of which involve user privacy or security issues, such as confidential work documents and private seed files. Users need to encrypt files during download and storage. Currently, users manually encrypt files after downloading them.

发明内容Contents of the invention

为克服相关技术中存在的问题,本公开实施例提供文件下载方法及装置。所述技术方案如下:In order to overcome the problems existing in the related technologies, the embodiments of the present disclosure provide a file downloading method and device. Described technical scheme is as follows:

根据本公开实施例的第一方面,提供一种文件下载方法,包括:According to a first aspect of an embodiment of the present disclosure, a method for downloading a file is provided, including:

获取待下载文件对应的下载特征;Obtain the download feature corresponding to the file to be downloaded;

确定所述下载特征中是否包括与隐私文件匹配的预设特征;Determine whether the download features include preset features matching the privacy file;

在确定所述下载特征中包括预设特征时,将所述待下载文件下载至隐私空间中,所述隐私空间为存储隐私文件的空间。When it is determined that the download feature includes a preset feature, download the file to be downloaded into a private space, where the private space is a space for storing private files.

本公开的实施例提供的技术方案可以包括以下有益效果:获取待下载文件对应的下载特征,确定下载特征中是否包括与隐私文件匹配的预设特征,在确定下载特征中包括预设特征时,将待下载文件下载至隐私空间中,其中,隐私空间为存储隐私文件的空间。通过待下载文件对应的下载特征确定该待下载文件是否需要下载至隐私空间,有效的提升文件下载的效率,并提升了用户体验。The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: obtain the download feature corresponding to the file to be downloaded, determine whether the download feature includes a preset feature that matches the private file, and when it is determined that the download feature includes the preset feature, Downloading the file to be downloaded to the private space, wherein the private space is a space for storing private files. Whether the file to be downloaded needs to be downloaded to the private space is determined by the download feature corresponding to the file to be downloaded, which effectively improves the efficiency of file downloading and improves user experience.

在一个实施例中,所述获取待下载文件对应的下载特征包括:In one embodiment, the obtaining the download feature corresponding to the file to be downloaded includes:

获取待下载文件对应的统一资源定位符URL;Obtain the Uniform Resource Locator URL corresponding to the file to be downloaded;

所述确定所述下载特征中是否包括与隐私文件匹配的预设特征,包括:The determining whether the downloading features include preset features matching the privacy file includes:

确定所述URL中是否包括与隐私文件匹配的预设关键字符;Determine whether the URL includes preset key characters matching the privacy file;

所述在确定所述下载特征中包括预设特征时,将所述待下载文件下载至隐私空间中,所述隐私空间为存储隐私文件的空间包括:When it is determined that the downloading features include preset features, downloading the file to be downloaded into a private space, the private space is a space for storing private files including:

在确定所述URL中包括与隐私文件匹配的预设关键字符时,将所述待下载文件下载至所述隐私空间中。When it is determined that the URL includes preset key characters matching the private file, the file to be downloaded is downloaded into the private space.

本公开的实施例提供的技术方案可以包括以下有益效果:获取待下载文件对应的URL,并确定URL中是否与隐私文件匹配的预设关键字符,在确定到URL中包括预设关键字符时,将待下载文件下载至隐私空间中。由于可以直接检测该URL中是否包括预设关键字符,以确定是否将待下载文件保存至隐私空间中,而无需用户自己去判定是否要将该待下载文件存储至隐私空间中,有效提升了文件下载的效率,并提升了用户体验。The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: obtain the URL corresponding to the file to be downloaded, and determine whether the preset key characters in the URL match the private file, and when it is determined that the URL includes the preset key characters, Download the file to be downloaded to the private space. Since it is possible to directly detect whether the URL includes preset key characters to determine whether to save the file to be downloaded in the private space, it is not necessary for the user to determine whether to store the file to be downloaded in the private space, which effectively improves the quality of the file. Download efficiency and improve user experience.

在一个实施例中,所述方法还包括:In one embodiment, the method also includes:

获取多个历史下载URL,所述历史下载URL为历史下载任务中完成下载后被用户放置入至隐私空间中的文件对应的URL;Obtain a plurality of historical download URLs, the historical download URLs are URLs corresponding to files placed into the private space by the user after the download is completed in the historical download task;

根据所述多个历史下载URL获取所述预设关键字符,并上传至服务器。The preset key characters are obtained according to the plurality of historical download URLs, and uploaded to the server.

本公开的实施例提供的技术方案可以包括以下有益效果:根据历史下载URL获取预设关键字符,从而使得获取到的预设关键字符更加精确,进而使得判断待下载文件是否需要保存至隐私空间的精度更高。The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: the preset key characters are obtained according to the historical download URL, so that the obtained preset key characters are more accurate, and then it is possible to judge whether the file to be downloaded needs to be saved to the private space Higher precision.

在一个实施例中,所述根据所述多个历史下载URL获取所述预设关键字符包括:In one embodiment, the obtaining the preset key characters according to the plurality of historical download URLs includes:

将各个所述历史下载URL进行目录切分得到多个目录名;performing directory segmentation on each of the historical download URLs to obtain multiple directory names;

获取多个所述目录名中出现次数大于或等于第一预设阈值的目录名;Obtaining directory names whose occurrence times are greater than or equal to a first preset threshold among the plurality of directory names;

将所述出现次数大于或等于第一预设阈值的目录名作为所述预设关键字符。The directory names whose occurrence times are greater than or equal to a first preset threshold are used as the preset key characters.

本公开的实施例提供的技术方案可以包括以下有益效果:根据历史下载URL中的目录名获取预设关键字符,从而使得获取到的预设关键字符更加精确,进而使得判断待下载文件是否需要保存至隐私空间的精度更高。The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: obtain the preset key characters according to the directory name in the historical download URL, so that the obtained preset key characters are more accurate, and then make it possible to judge whether the file to be downloaded needs to be saved Higher precision to privacy spaces.

在一个实施例中,所述方法还包括:In one embodiment, the method also includes:

获取多个历史下载URL,所述历史下载URL为历史下载任务中完成下载后被用户放置入隐私空间中的文件对应的URL;Obtain a plurality of historical download URLs, where the historical download URLs are URLs corresponding to files placed in the private space by the user after the download is completed in the historical download task;

将所述多个历史下载URL上传至服务器。uploading the multiple historical download URLs to the server.

本公开的实施例提供的技术方案可以包括以下有益效果:通过服务器根据历史下载URL获取预设关键字符,从而提升了获取预设关键字符的效率。The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects: the server acquires preset key characters according to historical download URLs, thereby improving the efficiency of acquiring preset key characters.

在一个实施例中,所述获取待下载文件对应的下载特征包括:In one embodiment, the obtaining the download feature corresponding to the file to be downloaded includes:

获取待下载文件对应的种子文件中的文件特征,所述种子文件中的文件特征包括:种子文件中记录的文件特征值;Obtain the file feature in the seed file corresponding to the file to be downloaded, the file feature in the seed file includes: the file feature value recorded in the seed file;

所述确定所述下载特征中是否包括与隐私文件匹配的预设特征,包括:The determining whether the downloading features include preset features matching the privacy file includes:

确定所述种子文件中的特征值是否与隐私文件匹配的预设特征值相同;Determine whether the feature value in the seed file is the same as the preset feature value matched by the privacy file;

所述在确定所述下载特征中包括预设特征时,将所述待下载文件下载至隐私空间中,所述隐私空间为存储隐私文件的空间包括:When it is determined that the downloading features include preset features, downloading the file to be downloaded into a private space, the private space is a space for storing private files including:

在确定所述种子文件中的特征值与隐私文件匹配的预设特征值相同时,将所述待下载文件下载至所述隐私空间中。When it is determined that the feature value in the seed file is the same as the preset feature value matched by the private file, download the file to be downloaded into the private space.

本公开的实施例提供的技术方案可以包括以下有益效果:获取待下载文件对应的种子文件中的文件特征,并在确定种子文件中的特征值与隐私文件匹配的预设特征值相同时,将待下载文件下载至隐私空间中。由于可以直接根据该种子文件中的特征值确定是否将待下载文件保存至隐私空间中,而无需用户自己去判定是否要将该待下载文件存储至隐私空间中,有效提升了文件下载的效率,并提升了用户体验。The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects: obtain the file features in the seed file corresponding to the file to be downloaded, and when it is determined that the feature value in the seed file is the same as the preset feature value matching the private file, the The file to be downloaded is downloaded to the private space. Since it is possible to directly determine whether to store the file to be downloaded in the private space according to the characteristic value in the seed file, it is not necessary for the user to determine whether to store the file to be downloaded in the private space, which effectively improves the efficiency of file downloading. And improve the user experience.

在一个实施例中,所述方法还包括:In one embodiment, the method also includes:

获取多个历史种子文件的文件特征值,所述历史种子文件的文件特征值为历史下载任务中完成下载后被用户放置入至隐私空间中的种子文件对应的文件特征值;Obtain the file characteristic value of a plurality of historical seed files, the file characteristic value of the historical seed file is the file characteristic value corresponding to the seed file placed into the private space by the user after completing the download in the historical download task;

根据所述多个历史种子文件的文件特征值获取所述预设特征值,并上传至服务器。The preset feature values are obtained according to the file feature values of the plurality of historical seed files, and uploaded to the server.

本公开的实施例提供的技术方案可以包括以下有益效果:根据历史种子文件的文件特征值获取预设特征值,从而使得获取到的预设特征值更加精确,进而使得判断待下载文件是否需要保存至隐私空间的精度更高。The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects: Acquire preset feature values according to file feature values of historical seed files, so that the acquired preset feature values are more accurate, and then it is judged whether the file to be downloaded needs to be saved Higher precision to privacy spaces.

根据本公开实施例的第二方面,提供一种文件下载装置,包括:According to a second aspect of an embodiment of the present disclosure, a file downloading device is provided, including:

第一获取模块,用于获取待下载文件对应的下载特征;The first obtaining module is used to obtain the download feature corresponding to the file to be downloaded;

确定模块,用于确定所述第一获取模块获取的所述下载特征中是否包括与隐私文件匹配的预设特征;A determination module, configured to determine whether the download features acquired by the first acquisition module include preset features matching the privacy file;

下载模块,用于在所述确定模块确定所述获取模块获取的所述下载特征中包括预设特征时,将所述待下载文件下载至隐私空间中,所述隐私空间为存储隐私文件的空间。A downloading module, configured to download the file to be downloaded into a private space when the determining module determines that the downloading feature acquired by the acquiring module includes a preset feature, and the private space is a space for storing private files .

在一个实施例中,所述获取模块包括:第一获取子模块,所述确定模块包括:第一确定子模块,所述下载模块包括:第一下载子模块;In one embodiment, the acquiring module includes: a first acquiring submodule, the determining module includes: a first determining submodule, and the downloading module includes: a first downloading submodule;

所述第一获取子模块,用于获取待下载文件对应的统一资源定位符URL;The first obtaining submodule is used to obtain the Uniform Resource Locator URL corresponding to the file to be downloaded;

所述第一确定子模块,用于确定所述第一获取子模块获取的所述URL中是否包括与隐私文件匹配的预设关键字符;The first determination submodule is configured to determine whether the URL acquired by the first acquisition submodule includes preset key characters matching the privacy file;

所述第一下载子模块,用于在所述第一确定子模块确定所述URL中包括与隐私文件匹配的预设关键字符时,将所述待下载文件下载至所述隐私空间中。The first downloading submodule is configured to download the file to be downloaded into the private space when the first determining submodule determines that the URL includes preset key characters matching the private file.

在一个实施例中,所述装置还包括:第二获取模块、第三获取模块和第一上传模块;In one embodiment, the device further includes: a second acquiring module, a third acquiring module and a first uploading module;

所述第二获取模块,用于获取多个历史下载URL,所述历史下载URL为历史下载任务中完成下载后被用户放置入至隐私空间中的文件对应的URL;The second obtaining module is used to obtain a plurality of historical download URLs, and the historical download URLs are URLs corresponding to files placed into the private space by the user after the download is completed in the historical download task;

所述第三获取模块,用于根据所述第二获取模块获取的所述多个历史下载URL获取所述预设关键字符;The third obtaining module is configured to obtain the preset key characters according to the plurality of historical download URLs obtained by the second obtaining module;

所述第一上传模块,用于将所述第三获取模块获取的所述预设关键字符上传至服务器。The first uploading module is configured to upload the preset key characters obtained by the third obtaining module to a server.

在一个实施例中,所述第三获取模块包括:切分子模块、第二获取子模块和第二确定子模块;In one embodiment, the third acquisition module includes: a cutting submodule, a second acquisition submodule and a second determination submodule;

所述切分子模块,用于将所述第二获取模块获取的各个所述历史下载URL进行目录切分得到多个目录名;The sub-slicing module is configured to perform directory segmentation on each of the historical download URLs obtained by the second obtaining module to obtain multiple directory names;

所述第二获取子模块,用于获取所述切分子模块得到的多个所述目录名中出现次数大于或等于第一预设阈值的目录名;The second acquiring submodule is configured to acquire the directory names whose occurrence times are greater than or equal to a first preset threshold among the plurality of directory names obtained by the cutting submodule;

所述第二确定子模块,用于将所述第二获取子模块确定的所述出现次数大于或等于第一预设阈值的目录名作为所述预设关键字符。The second determination submodule is configured to use the directory name whose occurrence times determined by the second acquisition submodule is greater than or equal to a first preset threshold as the preset key character.

在一个实施例中,所述装置还包括:第四获取模块和第二上传模块;In one embodiment, the device further includes: a fourth acquiring module and a second uploading module;

所述第四获取模块,用于获取多个历史下载URL,所述历史下载URL为历史下载任务中完成下载后被用户放置入隐私空间中的文件对应的URL;The fourth obtaining module is used to obtain a plurality of historical download URLs, and the historical download URLs are URLs corresponding to files placed in the private space by the user after downloading in the historical download task;

所述第二上传模块,用于将所述第四获取模块获取的所述多个历史下载URL上传至服务器。The second uploading module is configured to upload the plurality of historical download URLs obtained by the fourth obtaining module to a server.

在一个实施例中,所述第一获取模块包括:第三获取子模块,所述确定模块包括:第三确定子模块,所述下载模块包括:第二下载子模块;In one embodiment, the first acquiring module includes: a third acquiring submodule, the determining module includes: a third determining submodule, and the downloading module includes: a second downloading submodule;

所述第三获取子模块,用于获取待下载文件对应的种子文件中的文件特征,所述种子文件中的文件特征包括:种子文件中记录的文件特征值;The third acquiring submodule is used to acquire the file feature in the seed file corresponding to the file to be downloaded, the file feature in the seed file includes: the file feature value recorded in the seed file;

所述第三确定子模块,用于确定所述第三获取子模块获取的所述种子文件中的特征值是否与隐私文件匹配的预设特征值相同;The third determining submodule is used to determine whether the characteristic value in the seed file obtained by the third obtaining submodule is the same as the preset characteristic value matched by the privacy file;

所述第二下载子模块,用于在所述第三确定子模块确定所述种子文件中的特征值与隐私文件匹配的预设特征值相同时,将所述待下载文件下载至所述隐私空间中。The second downloading submodule is used to download the file to be downloaded to the privacy file when the third determination submodule determines that the feature value in the seed file is the same as the preset feature value matching the privacy file. in space.

在一个实施例中,所述装置还包括:第五获取模块、第六获取模块和第三上传模块;In one embodiment, the device further includes: a fifth acquiring module, a sixth acquiring module and a third uploading module;

所述第五获取模块,用于获取多个历史种子文件的文件特征值,所述历史种子文件的文件特征值为历史下载任务中完成下载后被用户放置入至隐私空间中的种子文件对应的文件特征值;The fifth obtaining module is used to obtain file feature values of multiple historical seed files, and the file feature values of the historical seed files correspond to the seed files placed into the private space by the user after downloading in the historical download task file characteristic value;

所述第六获取模块,用于根据所述第五获取模块获取的所述多个历史种子文件的文件特征值获取所述预设特征值;The sixth obtaining module is configured to obtain the preset characteristic value according to the file characteristic values of the plurality of historical seed files obtained by the fifth obtaining module;

所述第三上传模块,用于将所述第六获取模块获取的所述预设特征值上传至服务器。The third uploading module is configured to upload the preset characteristic value obtained by the sixth obtaining module to a server.

根据本公开实施例的第三方面,提供一种文件下载装置,包括:According to a third aspect of an embodiment of the present disclosure, a file downloading device is provided, including:

处理器;processor;

用于存储处理器可执行指令的存储器;memory for storing processor-executable instructions;

其中,所述处理器被配置为:Wherein, the processor is configured as:

获取待下载文件对应的下载特征;Obtain the download feature corresponding to the file to be downloaded;

确定所述下载特征中是否包括与隐私文件匹配的预设特征;Determine whether the download features include preset features matching the privacy file;

在确定所述下载特征中包括预设特征时,将所述待下载文件下载至隐私空间中,所述隐私空间为存储隐私文件的空间。When it is determined that the download feature includes a preset feature, download the file to be downloaded into a private space, where the private space is a space for storing private files.

根据本公开实施例的第四方面,提供一种计算机可读存储介质,其上存储有计算机指令,该指令被处理器执行时实现以下步骤:According to a fourth aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium, on which computer instructions are stored, and when the instructions are executed by a processor, the following steps are implemented:

获取待下载文件对应的下载特征;Obtain the download feature corresponding to the file to be downloaded;

确定所述下载特征中是否包括与隐私文件匹配的预设特征;Determine whether the download features include preset features matching the privacy file;

在确定所述下载特征中包括预设特征时,将所述待下载文件下载至隐私空间中,所述隐私空间为存储隐私文件的空间。When it is determined that the download feature includes a preset feature, download the file to be downloaded into a private space, where the private space is a space for storing private files.

应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。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 present disclosure.

附图说明Description of drawings

此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description serve to explain the principles of the disclosure.

图1是根据一示例性实施例一示出的文件下载方法的流程图。Fig. 1 is a flow chart of a file downloading method according to a first exemplary embodiment.

图2是根据一示例性实施例二示出的文件下载方法的流程图。Fig. 2 is a flow chart of a file downloading method according to a second exemplary embodiment.

图3是根据一示例性实施例示出的手机界面显示示意图。Fig. 3 is a schematic diagram showing a mobile phone interface according to an exemplary embodiment.

图4是根据一示例性实施例三示出的文件下载方法的流程图。Fig. 4 is a flow chart of a file downloading method according to a third exemplary embodiment.

图5是根据一示例性实施例六示出的文件下载方法的流程图。Fig. 5 is a flow chart of a file downloading method according to a sixth exemplary embodiment.

图6是根据一示例性实施例七示出的文件下载方法的流程图。Fig. 6 is a flow chart of a file downloading method according to a seventh exemplary embodiment.

图7是根据一示例性实施例八示出的文件下载方法的流程图。Fig. 7 is a flow chart of a file downloading method according to an eighth exemplary embodiment.

图8是根据一示例性实施例一示出的文件下载装置的框图。Fig. 8 is a block diagram of a file downloading device according to a first exemplary embodiment.

图9是根据一示例性实施例二示出的文件下载装置的框图。Fig. 9 is a block diagram of a file downloading device according to a second exemplary embodiment.

图10是根据一示例性实施例三示出的文件下载装置的框图。Fig. 10 is a block diagram of a file downloading device according to a third exemplary embodiment.

图11是根据一示例性实施例二示出的文件下载装置中第三获取模块15的框图。Fig. 11 is a block diagram of a third acquiring module 15 in a file downloading device according to a second exemplary embodiment.

图12是根据一示例性实施例四示出的文件下载装置的框图。Fig. 12 is a block diagram of a file downloading device according to a fourth exemplary embodiment.

图13是根据一示例性实施例五示出的文件下载装置的框图。Fig. 13 is a block diagram of a file downloading device according to a fifth exemplary embodiment.

图14是根据一示例性实施例六示出的文件下载装置的框图。Fig. 14 is a block diagram of a file downloading device according to a sixth exemplary embodiment.

图15是根据一示例性实施例示出的一种用于文件下载装置80的框图。Fig. 15 is a block diagram of a file downloading device 80 according to an exemplary embodiment.

图16是根据一示例性实施例示出的一种用于文件下载的装置90的框图。Fig. 16 is a block diagram of a device 90 for downloading files according to an exemplary 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, the same numerals in different drawings refer to the same or similar elements unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatuses and methods consistent with aspects of the present disclosure as recited in the appended claims.

互联网方便了用户获取和下载各类文件,其中很多文件类型涉及到用户隐私或涉及到安全问题,比如涉密的工作文档、私人种子文件等。用户在下载和存储过程中有对文件进行加密的需求。目前,都是用户在下载文件后手动的对文件进行加密。The Internet facilitates users to obtain and download various files, many of which involve user privacy or security issues, such as confidential work documents and private seed files. Users need to encrypt files during download and storage. Currently, users manually encrypt files after downloading them.

但如果用户在下载文件后手动的对文件进行加密,用户的工作量较大,且容易忘记,文件下载的效率比较低,且用户只能对下载后的文件进行加密,无法对下载过程中的文件进行加密或隐藏处理,很可能造成文件在下载过程中被他人偷窥到,从而使得用户隐私受到威胁。However, if the user manually encrypts the file after downloading the file, the user's workload is large, and it is easy to forget, the efficiency of file download is relatively low, and the user can only encrypt the downloaded file, and cannot Files are encrypted or hidden, which is likely to cause files to be peeped by others during the download process, thus threatening user privacy.

本公开通过获取待下载文件的下载特征,确定下载特征中是否包括与隐私文件匹配的预设特征,在确定下载特征中包括预设特征时,将待下载文件下载至隐私空间中,其中,隐私空间为存储隐私文件的空间。通过识别待下载文件的下载特征,并检测下载特征中是否包括预设特征,从而可以从根源上直接判断该待下载文件是否为隐私文件,是否需要进行加密处理,从而提升了加密的效率,并且在下载特征中包括预设特征时,可以直接将待下载文件下载至隐私空间中,从而做到对待下载文件的整个下载过程都进行隐私加密,防止待下载文件在下载过程中被他人窃密,提升了文件下载的安全性。The disclosure determines whether the download features include preset features that match the private file by acquiring the download features of the files to be downloaded, and downloads the files to be downloaded to the private space when it is determined that the download features include the preset features, wherein, privacy The space is the space for storing private files. By identifying the download feature of the file to be downloaded and detecting whether the download feature includes a preset feature, it is possible to directly determine whether the file to be downloaded is a private file and whether encryption processing is required from the source, thereby improving the encryption efficiency, and When the download feature includes the preset feature, you can directly download the file to be downloaded to the private space, so that the entire download process of the file to be downloaded is encrypted for privacy, preventing the file to be downloaded from being stolen by others during the download process, and improving security for file downloads.

图1是根据一示例性实施例一示出的文件下载方法的流程图,如图1所示,该方法包括以下步骤S101-S103:Fig. 1 is a flowchart of a file downloading method according to an exemplary embodiment 1. As shown in Fig. 1, the method includes the following steps S101-S103:

在步骤S101中,获取待下载文件对应的下载特征。In step S101, the download feature corresponding to the file to be downloaded is obtained.

在步骤S102中,确定下载特征中是否包括与隐私文件匹配的预设特征。In step S102, it is determined whether the downloading features include preset features matching the private file.

在步骤S103中,在确定下载特征中包括预设特征时,将待下载文件下载至隐私空间中,其中,隐私空间为存储隐私文件的空间。In step S103, when it is determined that the download feature includes the preset feature, the file to be downloaded is downloaded to the private space, where the private space is a space for storing private files.

示例的,隐私空间是一种带有权限验证或带有隐藏属性的空间,放入隐私空间中的文件对于不具有权限的用户不可见。隐私空间可以为用户自己手动设定的文件夹,也可以为下载器建立或默认的文件夹。且该隐私空间的权限验证方式可以包括但不限于至少一种以下的加密方式:数字加密、符号加密、文字加密、字母加密、图形加密、指纹加密等;或者隐私空间也可以被设置为隐藏文件夹的形式。For example, the private space is a space with permission verification or hidden attributes, and files placed in the private space are invisible to users without permission. The private space can be a folder manually set by the user, or a folder created or defaulted by the downloader. And the permission verification method of the private space may include but not limited to at least one of the following encryption methods: digital encryption, symbol encryption, text encryption, letter encryption, graphic encryption, fingerprint encryption, etc.; or the private space can also be set as a hidden file in the form of clips.

为了防止文件在下载过程中被他人偷窥到,从而使得用户隐私受到威胁。因此,在待下载文件下载的过程中就需要对待下载文件进行保护。而要在下载的过程中对待下载文件进行保护,就需要对该待下载文件的下载特征进行判断,当从下载特征判断出对应的待下载文件为需要进行保护的文件后,才可以在下载的过程中对待下载文件进行保护。In order to prevent files from being peeped by others during the download process, the user privacy is threatened. Therefore, the file to be downloaded needs to be protected during the downloading process of the file to be downloaded. To protect the downloaded file during the download process, it is necessary to judge the download feature of the file to be downloaded. After judging from the download feature that the corresponding file to be downloaded is a file that needs to be protected, it can be downloaded. During the process, the files to be downloaded are protected.

本公开中在获取到待下载文件的下载特征后,确定下载特征中是否包括与隐私文件匹配的预设特征,在确定下载特征中包括预设特征时,则确定对应的待下载文件需要在下载的过程中进行保护,那么就直接将该待下载文件下载至隐私空间中,其中,可以通过检测下载文件对应的下载特征中是否包括与隐私文件匹配的预设特征,以确定是否将待下载文件保存至隐私空间中,而无需用户自己去判定是否要将该待下载文件存储至隐私空间中,有效提升了文件下载的效率,并提升了用户体验。In the present disclosure, after obtaining the download feature of the file to be downloaded, it is determined whether the download feature includes the preset feature matching the private file, and when it is determined that the download feature includes the preset feature, it is determined that the corresponding file to be downloaded needs to be downloaded protection during the process of downloading, then directly download the file to be downloaded to the private space, wherein, it can be determined whether the file to be downloaded Saving to the private space does not require the user to decide whether to store the file to be downloaded in the private space, which effectively improves the efficiency of file downloading and improves user experience.

由于隐私空间是一种带有权限验证或带有隐藏属性的空间,且隐私空间一般都会被保护,而同时隐私空间与下载源之间的传输通道也就被保护,一般人是无法偷窥到该传输通道中传输的文件的,因此当确定了待下载文件对应的下载特征中包括与隐私文件匹配的预设特征后,也即,确定了需要将该待下载文件下载至隐私空间中,此时会通过该下载特征与隐私空间之间建立的传输通道来传输该待下载文件,从而对待下载文件需要在下载的过程中进行保护,有效提升了下载的安全性。Since the private space is a space with permission verification or hidden attributes, and the private space is generally protected, and at the same time the transmission channel between the private space and the download source is also protected, ordinary people cannot peep into the transmission. Therefore, when it is determined that the download feature corresponding to the file to be downloaded includes the preset feature matching the private file, that is, it is determined that the file to be downloaded needs to be downloaded to the private space, the The file to be downloaded is transmitted through the transmission channel established between the download feature and the private space, so that the file to be downloaded needs to be protected during the downloading process, effectively improving the security of downloading.

且由于将待下载文件最终下载到了隐私空间中,而隐私空间是一个受到保护的文件夹,从而使得对下载完成后的待下载文件的存储和查阅也进行了相应保护,而不用在对待下载文件下载完成后,手动对其进行加密,有效提升了加密的效率和下载的效率。And because the files to be downloaded are finally downloaded to the private space, and the private space is a protected folder, so that the storage and consultation of the files to be downloaded after the download is completed are also protected accordingly, and there is no need to treat the downloaded files After the download is complete, manually encrypt it, which effectively improves the efficiency of encryption and downloading.

本公开实施例提供一种文件下载方法,包括:获取待下载文件对应的下载特征,确定下载特征中是否包括与隐私文件匹配的预设特征,在确定下载特征中包括预设特征时,将待下载文件下载至隐私空间中,其中,隐私空间为存储隐私文件的空间。通过待下载文件对应的下载特征确定该待下载文件是否需要下载至隐私空间,有效的提升文件下载的效率,并提升了用户体验。An embodiment of the present disclosure provides a method for downloading a file, including: acquiring the download feature corresponding to the file to be downloaded, determining whether the download feature includes a preset feature that matches the private file, and when determining that the download feature includes the preset feature, the The downloaded file is downloaded to the private space, wherein the private space is a space for storing private files. Whether the file to be downloaded needs to be downloaded to the private space is determined by the download feature corresponding to the file to be downloaded, which effectively improves the efficiency of file downloading and improves user experience.

在一个实施例中,上述的待下载文件对应的下载特征可以为待下载文件对应的统一资源定位符(Uniform Resource Locator,简称为:URL)。In an embodiment, the above-mentioned download feature corresponding to the file to be downloaded may be a Uniform Resource Locator (Uniform Resource Locator, URL for short) corresponding to the file to be downloaded.

此时,如图2所示,上述的步骤S101可以实施为步骤S1011,上述的步骤S102可以实施为步骤S1021,上述的步骤S103可以实施为步骤S1031:At this time, as shown in Figure 2, the above step S101 can be implemented as step S1011, the above step S102 can be implemented as step S1021, and the above step S103 can be implemented as step S1031:

在步骤S1011中,获取待下载文件对应的统一资源定位符URL。In step S1011, the Uniform Resource Locator URL corresponding to the file to be downloaded is acquired.

在一种可实现方式中,当用户需要下载文件时,当用户可以在下载器的下载任务框中直接输入待下载文件对应的URL,此时便可以直接获取到URL。In a practicable manner, when the user needs to download a file, the user can directly input the URL corresponding to the file to be downloaded in the download task box of the downloader, and the URL can be obtained directly at this time.

在另一种可实现方式中,用户可以通过点击确定下载的文件,由于该待下载文件在服务器中对应了一个URL,此时该点击操作可以作为URL获取的触发条件,当用户点击该待下载文件后,则直接向下载器发送该URL。其中,服务器为用于生成、保存、推送包含有预设特征的白名单的服务器。In another practicable way, the user can confirm the downloaded file by clicking. Since the file to be downloaded corresponds to a URL in the server, the click operation can be used as a trigger condition for obtaining the URL. When the user clicks the file to be downloaded file, the URL is sent directly to the downloader. Wherein, the server is a server used to generate, save, and push a white list containing preset features.

例如:如图3所示的手机界面,当用户想要下载电影时,在电影片库中显示了电影1、电影2、电影3、电影4、电影5、电影6,此时如果用户想要下载电影3,则用户点击电影3的图标,当接收到用户点击电影3的图标后,则将电影3对应的URL发送给下载器。For example: on the mobile phone interface as shown in Figure 3, when the user wants to download movies, Movie 1, Movie 2, Movie 3, Movie 4, Movie 5, and Movie 6 are displayed in the movie library. To download movie 3, the user clicks on the icon of movie 3, and when it is received that the user clicks on the icon of movie 3, the URL corresponding to movie 3 is sent to the downloader.

在步骤S1021中,确定URL中是否包括与隐私文件匹配的预设关键字符。In step S1021, it is determined whether the URL includes preset key characters matching the privacy file.

在步骤S1031中,在确定URL中包括与隐私文件匹配的预设关键字符时,将待下载文件下载至隐私空间中。In step S1031, when it is determined that the URL includes preset key characters matching the private file, the file to be downloaded is downloaded to the private space.

上述的关键字符包括但不限于以下三种:The key characters mentioned above include but are not limited to the following three types:

第一种:关键字符还有可能是完整的URL。The first type: the key character may also be a complete URL.

第二种:URL会携带哈希值,例如:URL可以为:“http://domain.com/?search=a#hash”,其中,#hash即为该URL中的哈希值,此时,可以使用URL中的哈希值作为上述的关键字符。The second type: the URL will carry the hash value, for example: the URL can be: "http://domain.com/?search=a#hash", where #hash is the hash value in the URL, at this time , you can use the hash value in the URL as the key character above.

第三种:URL会携带由%、#、&、字母、数字等组成的字符串,例如:http://www.example.com/index?name=na%26me%3d1&id=id2中的“index?name=na%26me%3d1&id=id2”,此时,可以使用URL中的上述字符串作为上述的关键字符。The third type: the URL will carry a string composed of %, #, &, letters, numbers, etc., for example: http://www.example.com/index? "index?name=na%26me%3d1&id=id2" in name=na%26me%3d1&id=id2, at this time, the above-mentioned character string in the URL can be used as the above-mentioned key character.

本公开的实施例提供的技术方案可以包括以下有益效果:获取待下载文件对应的URL,并确定URL中是否与隐私文件匹配的预设关键字符,在确定到URL中包括预设关键字符时,将待下载文件下载至隐私空间中。由于可以直接检测该URL中是否包括预设关键字符,以确定是否将待下载文件保存至隐私空间中,而无需用户自己去判定是否要将该待下载文件存储至隐私空间中,有效提升了文件下载的效率,并提升了用户体验。The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: obtain the URL corresponding to the file to be downloaded, and determine whether the preset key characters in the URL match the private file, and when it is determined that the URL includes the preset key characters, Download the file to be downloaded to the private space. Since it is possible to directly detect whether the URL includes preset key characters to determine whether to save the file to be downloaded in the private space, it is not necessary for the user to determine whether to store the file to be downloaded in the private space, which effectively improves the quality of the file. Download efficiency and improve user experience.

在一个实施例中,本公开中可以通过下载器的客户端本地直接获取预设关键字符。In an embodiment, in the present disclosure, the preset key characters can be directly acquired locally through the client of the downloader.

当获取多个历史下载URL,该历史下载URL为历史下载任务中完成下载后被用户放置入至隐私空间中的文件对应的URL,进而根据多个历史下载URL获取预设关键字符。When multiple historical download URLs are acquired, the historical download URLs are URLs corresponding to files placed in the private space by the user after downloading in the historical download tasks, and then the preset key characters are obtained according to the multiple historical download URLs.

而当获取到上述的预设关键字符后,还可以将预设关键字符上传至服务器。And after the above-mentioned preset key characters are obtained, the preset key characters can also be uploaded to the server.

在另一个实施例中,还可以通过服务器获取预设关键字符。此时,获取多个历史下载URL,该历史下载URL为历史下载任务中完成下载后被用户放置入隐私空间中的文件对应的URL,进而将多个历史下载URL上传至服务器,以使服务器根据多个历史下载URL获取预设关键字符。当服务器获取到预设关键字符后,还可以将该些预设关键字符推送给终端设备,以使终端设备在获取到待下载文件对应的URL后,在本地确定该待下载文件是否需要下载至隐私空间中的步骤。当然,服务器也可以不向终端设备推送自身获取到的预设关键字符,那么,当终端设备获取到待下载文件对应的下载特征后,可以将该下载特征上传至服务器,使得服务器执行判断待下载文件是否需要下载至隐私空间中的步骤,当服务器确定待下载文件需要下载至隐私空间中,则向终端设备发送响应消息,该响应消息用于指示终端设备中的下载器将该待下载文件下载至隐私空间中。当然,在服务器获取到预设关键字符后,还可以根据该些预设关键字符生成一白名单,并向客户端推送该白名单,以此白名单作为判断依据。In another embodiment, the preset key characters can also be acquired through the server. At this point, a plurality of historical download URLs are obtained, which are URLs corresponding to files placed in the private space by the user after the download is completed in the historical download task, and then multiple historical download URLs are uploaded to the server, so that the server according to Multiple historical download URLs get preset key characters. After the server obtains the preset key characters, it can also push these preset key characters to the terminal device, so that after the terminal device obtains the URL corresponding to the file to be downloaded, it can locally determine whether the file to be downloaded needs to be downloaded to Steps in a private space. Of course, the server may not push the preset key characters obtained by itself to the terminal device. Then, when the terminal device obtains the download feature corresponding to the file to be downloaded, it can upload the download feature to the server, so that the server executes the judgment to be downloaded. The step of whether the file needs to be downloaded to the private space, when the server determines that the file to be downloaded needs to be downloaded to the private space, then sends a response message to the terminal device, and the response message is used to instruct the downloader in the terminal device to download the file to be downloaded to a private space. Of course, after the server obtains the preset key characters, it can also generate a white list according to the preset key characters, and push the white list to the client, using the white list as a judgment basis.

在上述实现方式中,获取多个历史下载URL,可以为下载器主动检测用户的下载任务而获取的,也可以为用户主动上传的,本公开不对获取历史下载URL的实现方式加以限制。In the above implementation manner, the acquisition of multiple historical download URLs may be obtained by the downloader actively detecting the user's download tasks, or may be actively uploaded by the user. This disclosure does not limit the implementation manner of obtaining the historical download URLs.

上述根据多个历史下载URL获取预设关键字符可以通过以下几种方式实现:The above acquisition of preset key characters based on multiple historical download URLs can be achieved in the following ways:

根据多个历史下载URL获取预设关键字符的第一种可实现方式为:获取在隐私空间中的历史下载URL中出现次数超过第三预设阈值的URL为上述的预设关键字符。A first implementable manner of acquiring preset key characters according to multiple historical download URLs is: acquiring URLs whose occurrence times exceed a third preset threshold among historical download URLs in the private space are the aforementioned preset key characters.

例如:第三预设阈值为2,当获取到的历史下载URL为:111.222.333.444/521、111.223.333.444/521、111.222.333.444/521、111.224.333.444/521、111.222.333.444/521、其中,111.222.333.444/521出现的次数为3,超出第三预设阈值2,则此时确定该111.222.333.444/521为预设关键字符。For example: the third preset threshold is 2, when the obtained historical download URLs are: 111.222.333.444/521, 111.223.333.444/521, 111.222.333.444/521, 111.224.333.444/521, 111.222.333.444/521, where , the number of occurrences of 111.222.333.444/521 is 3, which exceeds the third preset threshold of 2, and the 111.222.333.444/521 is determined to be the preset key character at this time.

此时,当获取到待下载文件对应的URL后,直接在多个预设关键字符中确定是否有与该URL相同的关键字符,当确定在多个预设关键字符中有与该URL相同的关键字符时,则确定该待下载文件为需要保存至隐私空间中的文件。At this point, after obtaining the URL corresponding to the file to be downloaded, directly determine whether there is a key character identical to the URL among a plurality of preset key characters, and when it is determined that there is a key character identical to the URL among the multiple preset key characters key character, then it is determined that the file to be downloaded is a file that needs to be saved in the private space.

本公开的实施例提供的技术方案可以包括以下有益效果:根据完整的历史下载URL来获取预设关键字符,从而使得预设关键字符的涵盖范围较小,进而使得判断的待下载文件是否需要保存至隐私空间的精度更高。The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects: the preset key characters are obtained according to the complete historical download URL, so that the coverage of the preset key characters is small, and then it is judged whether the file to be downloaded needs to be saved Higher precision to privacy spaces.

由于通过一个完整的URL匹配会使得匹配的粒度太大,匹配太粗糙,使得匹配结果不够精确,从而使得一些本该被保存在隐私空间中的文件中的文件被忽略。Because the matching granularity is too large and the matching is too rough through a complete URL matching, the matching result is not accurate enough, so that some files that should be stored in the private space are ignored.

以网盘为例:预设关键字符为“pan.baidu.com/xxx”,而待下载文件对应的URL为“pan.baidu.com/x11”,由于该两个URL是不相同的,因此,确定“pan.baidu.com/x11”不是要保存至隐私空间中的文件。而其实“pan.baidu.com/x11”也是一个用户希望保存至隐私空间中的文件。Take the network disk as an example: the default key character is "pan.baidu.com/xxx", and the URL corresponding to the file to be downloaded is "pan.baidu.com/x11". Since the two URLs are different, therefore , make sure that "pan.baidu.com/x11" is not the file to be saved in the private space. In fact, "pan.baidu.com/x11" is also a file that the user wishes to save in the private space.

根据多个历史下载URL获取预设关键字符的第二种可实现方式为:根据多个历史下载URL获取预设关键字符包括:将各个历史下载URL进行切分得到多个切分词;获取多个切分词中出现次数超过第四预设阈值的切分词;将超过第四预设阈值的切分词作为预设关键字符。The second achievable way of obtaining preset key characters according to multiple historical download URLs is: obtaining preset key characters according to multiple historical download URLs includes: segmenting each historical download URL to obtain multiple segmentation words; obtaining multiple Segmented words whose occurrence times exceed the fourth preset threshold in the segmented words; use the segmented words exceeding the fourth preset threshold as preset key characters.

当得到多个历史下载URL后,对于每个历史下载URL按照预设规则进行切分,以得到多个切分词,其中,预设规则可以为用户自己输入的,也可以下载器中内置的,本公开不对预设规则的获取方式加以限制。而预设规则可以为两个词一组进行切分,也可以为三个词一组进行切分,也可以为用户自己进行切分,本公开不对预设规则中指示的切分方式加以限制。After obtaining multiple historical download URLs, segment each historical download URL according to preset rules to obtain multiple segmented words, wherein the preset rules can be input by the user or built in the downloader, The present disclosure does not limit the way of obtaining the preset rules. The preset rules can be segmented for two-word groups, three-word groups, or for users themselves. This disclosure does not limit the segmentation methods indicated in the preset rules. .

例如:第四预设阈值为2,获取到以下三个历史下载URL分别为:pan.baidu.com/xxx、pan.baidu.com/x11、pan.baidu.com/x12,对历史下载URL按照标点进行切分,则pan.baidu.com/xxx得到的切分词为:{pan、baidu、com、xxx};pan.baidu.com/x11得到的切分词为:{pan、baidu、com、x11};pan.baidu.com/x12得到的切分词为:{pan、baidu、com、x12},基于上述各组切分词,判断出切分词pan出现的次数为3、baidu出现的次数为3、com出现的次数为3、xxx出现的次数为1、x11出现的次数为1、x12出现的次数为1;此时可以使用pan、baidu和com作为预设关键字符。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, and the historical download URLs are Segmentation by punctuation, the segmented words obtained by pan.baidu.com/xxx are: {pan, baidu, com, xxx}; the segmented words obtained by pan.baidu.com/x11 are: {pan, baidu, com, x11 };pan.baidu.com/x12 The segmented words obtained are: {pan, baidu, com, x12}, based on the above groups of segmented words, it is judged that the number of occurrences of the segmented word pan is 3, and the number of occurrences of baidu is 3, Com appears 3 times, xxx appears 1, x11 appears 1, and x12 appears 1; at this time, pan, baidu and com can be used as preset key characters.

此时,在检测到待下载文件对应的URL中包括的预设关键字符的数量大于或等于第五预设阈值时,则将待下载文件下载至隐私空间中。At this time, when it is detected that the number of preset key characters included in the URL corresponding to the file to be downloaded is greater than or equal to the fifth preset threshold, the file to be downloaded is downloaded to the private space.

例如:第五预设阈值为3,预设关键字符为111、333、444,当获取到的待下载文件对应的URL为:111.222.333.444/521,此时,经过检测该URL中包括的预设关键字符为111、333和444共3个,那么此时确定该URL对应的待下载文件需要保存至隐私空间中。For example: the fifth preset threshold is 3, and the preset key characters are 111, 333, 444. When the URL corresponding to the acquired file to be downloaded is: 111.222. Assuming that the key characters are 111, 333 and 444, it is determined that the file to be downloaded corresponding to the URL needs to be saved in the private space.

再例如:第五预设阈值为3,预设关键字符为111、333、444,当获取到的待下载文件对应的URL为:111.222.111.444/521,此时,经过检测该URL中包括的预设关键字符为111、111和444共3个,那么此时也会确定该URL对应的待下载文件需要保存至隐私空间中。Another example: the fifth preset threshold value is 3, and the preset key characters are 111, 333, 444. When the URL corresponding to the obtained file to be downloaded is: 111.222.111.444/521, at this time, after detecting the URL included in the URL The preset key characters are 111, 111 and 444, and at this time, it is also determined that the file to be downloaded corresponding to the URL needs to be saved in the private space.

示例的,还可以对待下载文件对应的URL进行评分,当评分大于预设评分值时,则确定该URL对应的待下载文件需要保存至隐私空间中。For example, the URL corresponding to the file to be downloaded may also 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 saved in the private space.

此时的评分标准可以为:当待下载文件对应的URL中包括一个预设关键字符时,评分为1分,当待下载文件对应的URL中包括两个预设关键字符时,评分为2分,依次类推,而当评分大于或等于3分时,则确定该URL对应的待下载文件需要保存至隐私空间中。The scoring standard at this time may be: when the URL corresponding to the file to be downloaded includes a preset key character, the score is 1 point; when the URL corresponding to the file to be downloaded includes two preset key characters, the score is 2 points , and so on, and when the score is greater than or equal to 3 points, it is determined that the file to be downloaded corresponding to the URL needs to be saved in the private space.

例如:预设关键字符为111、333、444,当获取到的待下载文件对应的URL为:111.222.111.444/521,此时,经过检测该URL中包括的预设关键字符为111、111和444共3个,那么此时该URL的评分为3分,便会确定该URL对应的待下载文件需要保存至隐私空间中。For example: the preset key characters are 111, 333, 444, when the obtained URL corresponding to the file to be downloaded is: 111.222. There are 3 in total 444, then the score of this URL is 3 points at this time, it will be determined that the file to be downloaded corresponding to this URL needs to be saved in the private space.

此时的评分标准还可以为:当待下载文件对应的URL中包括一种预设关键字符时,评分为1分,当待下载文件对应的URL中包括两种预设关键字符时,评分为2分,依次类推,而当评分大于或等于2分时,则确定该URL对应的待下载文件需要保存至隐私空间中。The scoring standard at this time can also be: when the URL corresponding to the file to be downloaded includes a preset key character, the score is 1 point; when the URL corresponding to the file to be downloaded includes two preset key characters, the score is 1 2 points, and so on, and when the score is greater than or equal to 2 points, it is determined that the file to be downloaded corresponding to the URL needs to be saved in the private space.

例如:预设关键字符为111、333、444,当获取到的待下载文件对应的URL为:111.222.111.444/521,此时,经过检测该URL中包括的预设关键字符为111、111和444共2种,那么此时该URL的评分为2分,便会确定该URL对应的待下载文件需要保存至隐私空间中。For example: the preset key characters are 111, 333, 444, when the obtained URL corresponding to the file to be downloaded is: 111.222. There are two types of 444, then the score of this URL is 2 points at this time, it will be determined that the file to be downloaded corresponding to this URL needs to be saved in the private space.

通过上述的分析可知,其中“com”是一个用于工商金融企业的二级域名,因此在工商金融企业的URL地址中都是会包括“com”的,因此将“com”单独作为预设关键字符是不够精确的。因此,可以将超过第四预设阈值的第一切分词和超过第四预设阈值的第二切分词组成的词作为预设关键字符,其中,第一切分词和第二切分词属于同一个历史下载URL,且第一切分词和第二切分词属于相邻的关系。From the above analysis, it can be known that "com" is a second-level domain name used for industrial and commercial financial enterprises, so "com" will be included in the URL addresses of industrial and commercial financial enterprises, so "com" is used as the default key alone Characters are imprecise. Therefore, the word formed by the first segmented word exceeding the fourth preset threshold and the second segmented word exceeding the fourth preset threshold can be used as the preset key character, wherein the first segmented word and the second segmented word belong to the same The historical download URL, and the first segmented word and the second segmented word belong to the adjacent relationship.

继续按照上述的例子,当得到超过第二预设阈值的的切分词:pan、baidu和com后,先判断pan和baidu,由于该pan和baidu属于同一个历史下载URL“pan.baidu.com”,且pan和baidu在该历史下载URL中属于相邻的关系,那么可以将pan.baidu作为预设关键字符,继续判断baidu和com,由于pan和baidu属于同一个历史下载URL“pan.baidu.com”,且pan和baidu在该历史下载URL中属于相邻的关系,那么就可以将pan.baidu.com作为预设关键字符。Continuing with the above example, when the segmented words exceeding the second preset threshold are obtained: pan, baidu and com, judge pan and baidu first, because the pan and baidu belong to the same historical download URL "pan.baidu.com" , and pan and baidu belong to the adjacent relationship in the historical download URL, then pan.baidu can be used as the preset key character to continue to judge baidu and com, because pan and baidu belong to the same historical download URL "pan.baidu. com", and pan and baidu are adjacent in the historical download URL, then pan.baidu.com can be used as the default key character.

由于URL中包括了各级的目录名,以pan.baidu.com/xxx为例,按照目录名切分后获取到的网站根目录为pan.baidu.com、获取到的网站根目录的下一级目录为xxx。因此。在另一种可实现方式中,当得到多个历史下载URL后,对于每个历史下载URL根据目录名进行切分,以得到多个目录名,进而根据该些目录名获取预设关键字符。Because the URL includes directory names at all levels, taking pan.baidu.com/xxx as an example, the root directory of the website obtained after splitting according to the directory name is pan.baidu.com, and the next step of the root directory of the obtained website is The level directory is xxx. therefore. In another practicable manner, after obtaining multiple historical download URLs, each historical download URL is segmented according to the directory name to obtain multiple directory names, and then preset key characters are obtained according to the directory names.

如图4所示,根据多个历史下载URL获取预设关键字符的第三种可实现方式包括以下步骤:在步骤S201中:将各个历史下载URL进行目录切分得到多个目录名。As shown in FIG. 4 , the third implementable way of obtaining preset key characters according to multiple historical download URLs includes the following steps: In step S201 : segment each historical download URL into directories to obtain multiple directory names.

在步骤S202中:获取多个目录名中出现次数大于或等于第一预设阈值的目录名。In step S202: Obtain the directory name whose occurrence times is greater than or equal to the first preset threshold among the plurality of directory names.

在步骤S203中:将出现次数大于或等于第一预设阈值的目录名作为预设关键字符。In step S203: the directory name whose occurrence times are greater than or equal to the first preset threshold is used as a preset key character.

例如:第一预设阈值为2,获取到以下三个历史下URL分别为:pan.baidu.com/xxx、pan.baidu.com/x11、pan.baidu.com/x12,对历史下载URL按照目录名进行切分得到多个目录名,则对pan.baidu.com/xxx按照目录进行切分得到的多个目录名为:{pan.baidu.com、xxx};对pan.baidu.com/x11按照目录进行切分得到的多个目录名为:pan.baidu.com、x11};对pan.baidu.com/x12按照目录进行切分得到的多个目录名为:{pan.baidu.com、x12},基于上述各组目录名,判断出目录名pan.baidu.com出现的次数为3、xxx出现的次数为1、x11出现的次数为1、x12出现的次数为1;pan.baidu.com出现的次数大于第一预设阈值,因此,使用pan.baidu.com作为预设关键字符。For example: the first preset threshold is 2, and the following three historical URLs are obtained: pan.baidu.com/xxx, pan.baidu.com/x11, pan.baidu.com/x12, and the historical download URLs are as follows: The directory name is divided to obtain multiple directory names, and the multiple directory names obtained by dividing pan.baidu.com/xxx according to the directory are: {pan.baidu.com, xxx}; for pan.baidu.com/ The multiple directory names obtained by splitting x11 according to the directory are: pan.baidu.com, x11}; the multiple directory names obtained by splitting pan.baidu.com/x12 according to the directory are: {pan.baidu.com , x12}, based on the above groups of directory names, it is determined that the directory name pan.baidu.com has 3 occurrences, xxx 1 occurrences, x11 1 occurrences, x12 1 occurrences; pan.baidu The number of occurrences of .com is greater than the first preset threshold, therefore, pan.baidu.com is used as the preset key character.

本公开的实施例提供的技术方案可以包括以下有益效果:根据历史下载URL中的目录名获取预设关键字符,从而使得获取到的预设关键字符更加精确,进而使得判断待下载文件是否需要保存至隐私空间的精度更高。The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: obtain the preset key characters according to the directory name in the historical download URL, so that the obtained preset key characters are more accurate, and then make it possible to judge whether the file to be downloaded needs to be saved Higher precision to privacy spaces.

根据多个历史下载URL获取预设关键字符的第四种可实现方式为:在监测到用户下载文件完成后,有主动将下载文件放置入隐私空间的行为,说明这极有可能是一个涉及隐私的URL。那么,可以通过收集到的这些URL,并上传到服务器。服务器收集由众多用户处获取到的上述URL,对这些URL是否为预设关键字符进行判断。The fourth possible way to obtain preset key characters based on multiple historical download URLs is: after monitoring that the user downloads the file, there is a behavior of actively placing the downloaded file into the private space, indicating that this is most likely a privacy-related issue. URL. Then, these URLs can be collected and uploaded to the server. The server collects the above-mentioned URLs obtained from many users, and judges whether these URLs are preset key characters.

例如:如果有大于50%的用户选择将同一URL下载到的文件放入隐私空间,那么,确定该URL为预设关键字符。For example: if more than 50% of the users choose to put the files downloaded from the same URL into the private space, then the URL is determined to be the preset key character.

此时,在服务器还可以预设一白名单,该白名单中保存预设关键字符,所以,在服务器得到上述的预设关键字符后,会将该预设关键字符加入至白名单中。At this time, a white list can also be preset on the server, and the preset key characters are stored in the white list. Therefore, after the server obtains the above-mentioned preset key characters, it will add the preset key characters to the white list.

由于客户端会周期性或实时的向服务器上传上述历史下载URL,因此,服务器就需要根据后期确定的预设关键字符更新上述的白名单,从而使得白名单覆盖的范围更大。Since the client will upload the above historical download URLs to the server periodically or in real time, the server needs to update the above white list according to the preset key characters determined later, so that the coverage of the white list is larger.

由于白名单被更新了,因此,服务器就需要以一定的周期或实时的将更新后的白名单推动给客户端。Since the whitelist is updated, the server needs to push the updated whitelist to the client at a certain period or in real time.

值得注意的是,还可以通过机器学习的方法结合历史下载URL和待下载文件对应的URL执行上述确定是否将待下载文件下载至隐私空间中的步骤。It is worth noting that the above step of determining whether to download the file to be downloaded to the private space can also be performed by combining the historical download URL and the URL corresponding to the file to be downloaded by using a machine learning method.

在另一个实施例中,上述的待下载文件对应的下载特征可以为待下载文件对应的种子文件中的文件特征。In another embodiment, the above-mentioned download feature corresponding to the file to be downloaded may be a file feature in the seed file corresponding to the file to be downloaded.

此时,如图5所示,上述的步骤S101可以实施为步骤S1012,上述的步骤S102可以实施为步骤S1022,上述的步骤S103可以实施为步骤S1032:At this time, as shown in Figure 5, the above step S101 can be implemented as step S1012, the above step S102 can be implemented as step S1022, and the above step S103 can be implemented as step S1032:

在步骤S1012中,获取待下载文件对应的种子文件中的文件特征,该种子文件中的文件特征包括:种子文件中记录的文件特征值。In step S1012, the file feature in the torrent file corresponding to the file to be downloaded is acquired, and the file feature in the torrent file includes: the file feature value recorded in the torrent file.

在步骤S1022中,确定种子文件中的特征值是否与隐私文件匹配的预设特征值相同。In step S1022, it is determined whether the characteristic value in the seed file is the same as the preset characteristic value matched by the private file.

在步骤S1032中,在确定种子文件中的特征值与隐私文件匹配的预设特征值相同时,将待下载文件下载至隐私空间中。In step S1032, when it is determined that the feature value in the seed file is the same as the preset feature value matching the private file, the file to be downloaded is downloaded to the private space.

本公开的实施例提供的技术方案可以包括以下有益效果:获取待下载文件对应的种子文件中的文件特征,并在确定种子文件中的特征值与隐私文件匹配的预设特征值相同时,将待下载文件下载至隐私空间中。由于可以直接根据该种子文件中的特征值确定是否将待下载文件保存至隐私空间中,而无需用户自己去判定是否要将该待下载文件存储至隐私空间中,有效提升了文件下载的效率,并提升了用户体验。The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects: obtain the file features in the seed file corresponding to the file to be downloaded, and when it is determined that the feature value in the seed file is the same as the preset feature value matching the private file, the The file to be downloaded is downloaded to the private space. Since it is possible to directly determine whether to store the file to be downloaded in the private space according to the characteristic value in the seed file, it is not necessary for the user to determine whether to store the file to be downloaded in the private space, which effectively improves the efficiency of file downloading. And improve the user experience.

在用户下载文件时,不仅可以通过上述的URL进行下载,也可以通过比特流(BitTorrent,简称为:BT)种子的方式下载。When a user downloads a file, not only the download can be performed through the above-mentioned URL, but also the download can be performed through a BitTorrent (abbreviated as: BT) seed.

对于种子文件来说,种子文件本身其实是个类文本的文件。其文件本身中就记载有待下载文件的文件特征值(例如:数字摘要值),此时,便可以根据该文件特征值来进行判断待下载文件是否需要下载至隐私空间中。For the torrent file, the torrent file itself is actually a text-like file. The file itself records the file feature value (for example: digital summary value) of the file to be downloaded. At this time, it can be judged according to the file feature value whether the file to be downloaded needs to be downloaded to the private space.

此时,获取上述的预设特征值可以通过以下几种方式实现:At this point, obtaining the above-mentioned preset characteristic values can be achieved in the following ways:

1)获取多个历史种子文件的文件特征值后,客户端根据多个历史种子文件的文件特征值获取预设特征值,客户端本地保存该些预设特征值。1) After obtaining the file characteristic values of multiple historical seed files, the client obtains preset characteristic values according to the file characteristic values of the multiple historical seed files, and the client locally saves these preset characteristic values.

此时,当获取到待下载文件对应的种子文件中的文件特征,客户端可以直接根据预设特征值执行上述确定是否将待下载文件下载至隐私空间中的步骤。At this point, when the file feature in the torrent file corresponding to the file to be downloaded is obtained, the client can directly perform the above step of determining whether to download the file to be downloaded to the private space according to the preset feature value.

2)获取多个历史种子文件的文件特征值后,客户端根据多个历史种子文件的文件特征值获取预设特征值,客户端将该些预设特征值上传至服务器。2) After obtaining the file characteristic values of multiple historical seed files, the client obtains preset characteristic values according to the file characteristic values of the multiple historical seed files, and the client uploads these preset characteristic values to the server.

此时,当获取到待下载文件对应的种子文件中的文件特征,客户端将子文件中的文件特征发送给服务器,以使服务器根据预设特征值执行上述确定是否将待下载文件下载至隐私空间中的步骤,当服务器确定需要将待下载文件下载至隐私空间中时,服务器可以向客户端发送指示消息,该指示消息用于指示将待下载文件下载至隐私空间中。At this time, when the file feature in the torrent file corresponding to the file to be downloaded is obtained, the client sends the file feature in the sub-file to the server, so that the server performs the above determination according to the preset feature value whether to download the file to be downloaded to the private Step in the space, when the server determines that the file to be downloaded needs to be downloaded to the private space, the server may send an indication message to the client, where the indication message is used to instruct downloading the file to be downloaded to the private space.

3)获取多个历史种子文件的文件特征值后,客户端将该些历史种子文件的文件特征值发送给服务器,以使服务器根据多个历史种子文件的文件特征值获取预设特征值,并且服务器本地保存。3) After obtaining the file characteristic values of a plurality of historical seed files, the client sends the file characteristic values of these historical seed files to the server, so that the server obtains a preset characteristic value according to the file characteristic values of a plurality of historical seed files, and Save locally on the server.

此时,当获取到待下载文件对应的种子文件中的文件特征,客户端将子文件中的文件特征发送给服务器,以使服务器根据预设特征值执行上述确定是否将待下载文件下载至隐私空间中的步骤,当服务器确定需要将待下载文件下载至隐私空间中时,服务器可以向客户端发送指示消息,该指示消息用于指示将待下载文件下载至隐私空间中。At this time, when the file feature in the torrent file corresponding to the file to be downloaded is obtained, the client sends the file feature in the sub-file to the server, so that the server performs the above determination according to the preset feature value whether to download the file to be downloaded to the private Step in the space, when the server determines that the file to be downloaded needs to be downloaded to the private space, the server may send an indication message to the client, where the indication message is used to instruct downloading the file to be downloaded to the private space.

4)获取多个历史种子文件的文件特征值后,客户端将该些历史种子文件的文件特征值发送给服务器,以使服务器根据多个历史种子文件的文件特征值获取预设特征值,并且服务器将预设特征值推送给客户端。4) after obtaining the file characteristic value of a plurality of historical seed files, the client sends the file characteristic value of these historical seed files to the server, so that the server obtains the preset characteristic value according to the file characteristic value of a plurality of historical seed files, and The server pushes the preset characteristic value to the client.

此时,当获取到待下载文件对应的种子文件中的文件特征,客户端可以直接根据预设特征值执行上述确定是否将待下载文件下载至隐私空间中的步骤。At this point, when the file feature in the torrent file corresponding to the file to be downloaded is obtained, the client can directly perform the above step of determining whether to download the file to be downloaded to the private space according to the preset feature value.

示例的,获取预设特征值的方法包括:在用户通过种子文件下载某一文件后,若用户在下载完成后将其放入了隐私空间中,客户端会在种子文件中读出这个已下载文件的文件特征值,并汇报给服务器。服务器收集众多用户上传的上述信息,若发现超过一定比例的用户将具有同一文件特征值的文件放入了隐私空间中,则可认定这个文件特征值对应的文件为隐私文件。则可以将这个文件特征值作为预设特征值。For example, the method for obtaining the preset feature value includes: after the user downloads a certain file through the torrent file, if the user puts it in the private space after the download is completed, the client will read the downloaded file in the torrent file. The file feature value of the file and report it to the server. The server collects the above-mentioned information uploaded by many users. If it is found that more than a certain percentage of users have put files with the same file feature value into the private space, the file corresponding to the file feature value can be determined as a private file. Then this file feature value can be used as a preset feature value.

此时,在服务器还可以预设以白名单,该白名单中保存预设特征值,所以,在服务器得到上述的预设特征值后,会将该预设特征值加入至白名单中。At this time, the server may also preset a white list, and the white list stores preset characteristic values. Therefore, after the server obtains the above-mentioned preset characteristic values, it will add the preset characteristic values to the white list.

由于客户端会周期性或实时的向服务器上传上述历史种子文件的文件特征值,因此,服务器就需要根据后期确定的预设特征值更新上述的白名单,从而使得白名单覆盖的范围更大。Since the client will upload the file feature values of the above-mentioned historical seed files to the server periodically or in real time, the server needs to update the above-mentioned white list according to the preset feature values determined later, so that the coverage of the white list is larger.

由于白名单被更新了,因此,服务器就需要以一定的周期或实时的将更新后的白名单推动给客户端。Since the whitelist is updated, the server needs to push the updated whitelist to the client at a certain period or in real time.

示例的获取预设特征值的方法还可以包括:在用户通过种子文件下载某一文件后,若用户在下载完成后将其放入了隐私空间中,客户端会在种子文件中读出这个已下载文件的文件特征值,客户端收集众多用户上传的上述信息,若发现超过一定比例的用户将具有同一文件特征值的文件放入了隐私空间中,则可认定这个文件特征值对应的文件为隐私文件。则客户端可以将这个文件特征值作为预设特征值。之后,客户端还可以将该些预设特征值上传给服务器,以使服务器保存。The example method for obtaining preset feature values may also include: after the user downloads a certain file through the seed file, if the user puts the file in the private space after the download is completed, the client will read the already downloaded file in the seed file. Download the file feature value of the file. The client collects the above information uploaded by many users. If it is found that more than a certain percentage of users have put the file with the same file feature value into the private space, it can be determined that the file corresponding to the file feature value is Privacy document. Then the client can use this file feature value as a preset feature value. Afterwards, the client can also upload these preset characteristic values to the server, so that the server can save them.

本公开的实施例提供的技术方案可以包括以下有益效果:根据历史种子文件的文件特征值获取预设特征值,从而使得获取到的预设特征值更加精确,进而使得判断待下载文件是否需要保存至隐私空间的精度更高。The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects: Acquire preset feature values according to file feature values of historical seed files, so that the acquired preset feature values are more accurate, and then it is judged whether the file to be downloaded needs to be saved Higher precision to privacy spaces.

值得注意的是,还可以通过机器学习的方法结合多个历史种子文件的文件特征值和获取待下载文件对应的种子文件中的文件特征确定该待下载文件是否需要下载至隐私空间中。It is worth noting that it is also possible to determine whether the file to be downloaded needs to be downloaded to the private space by combining the file feature values of multiple historical torrent files and the file features in the torrent file corresponding to the file to be downloaded through the machine learning method.

其中,获取待下载文件对应的种子文件中的文件特征包括:通过消息摘要算法第五版(Message Digest Algorithm5,简称为:MD5)、哈希算法或安全哈希算法获取种子文件中的文件特征。Wherein, obtaining the file features in the torrent file corresponding to the file to be downloaded includes: obtaining the file features in the torrent file by using the fifth version of Message Digest Algorithm (MD5), a hash algorithm or a secure hash algorithm.

图6是根据一示例性实施例七示出的文件下载方法的流程图,如图6所示,该方法包括以下步骤:Fig. 6 is a flowchart of a method for downloading a file according to an exemplary embodiment 7. As shown in Fig. 6, the method includes the following steps:

在步骤S301中:该下载器客户端获取多个历史下载URL。In step S301: the downloader client acquires multiple historical download URLs.

当然,该下载器客户端可以主动获取多个历史下载URL,也可以在经过用户的授权后才获取上述历史下载URL。Of course, the downloader client can actively obtain multiple historical download URLs, or obtain the above-mentioned historical download URLs only after being authorized by the user.

在步骤S302中:该下载器客户端通过机器学习的方法训练判断模型。In step S302: the downloader client trains the judgment model by means of machine learning.

该判断模型可以根据待下载文件对应的URL的评分来判定是否需要将URL对应的待下载文件下载至隐私空间中。The judgment model can judge whether to download the file to be downloaded corresponding to the URL to the private space according to the score of the URL corresponding to the file to be downloaded.

在步骤S303中:下载器客户端设置隐私空间对应的存储路径。In step S303: the downloader client sets the storage path corresponding to the private space.

可选的,该下载器客户端中会默认一条作为隐私空间的存储路径,以及该隐私空间的默认密码。为了提升用户体验,本实施例中还可以用户手动设定该隐私空间对应的存储路径,以及该隐私空间的加密方式以及密码。Optionally, the downloader client will default to a storage path as a private space and a default password of the private space. In order to improve user experience, in this embodiment, the user can also manually set the storage path corresponding to the private space, as well as the encryption method and password of the private space.

在步骤S304中:下载器客户端设置公开空间对应的存储路径。In step S304: the downloader client sets a storage path corresponding to the public space.

可选的,该下载器客户端中会默认一条作为公开空间的存储路径。为了提升用户体验,本实施例中还可以用户手动设定该公开空间对应的存储路径。Optionally, the downloader client will default to a storage path as a public space. In order to improve user experience, in this embodiment, the user can also manually set the storage path corresponding to the public space.

其中,公开空间为无需加密、无访问权限的空间。Among them, the public space is a space that does not need to be encrypted and has no access rights.

在步骤S305中:下载器客户端获取用户输入的待下载文件对应的URL。In step S305: the downloader client acquires the URL corresponding to the file to be downloaded input by the user.

在步骤S306中:下载器客户端通过判断模型判断该URL的评分,并根据评分与预设分值的对应关系确定该URL对应的待下载文件是否需要保存至隐私空间中。当该评分大于或等于预设分值时,确定该URL对应的待下载文件需要保存至隐私空间,则执行步骤S307,当该评分小于预设分值时,确定该URL对应的待下载文件不需要保存至隐私空间,则执行步骤S308。In step S306: the downloader client 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 saved in the private space according to the correspondence 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 to the private space, and then step S307 is performed, and when the score is less than the preset score, it is determined that the file to be downloaded corresponding to the URL is not If it needs to be saved to the private space, execute step S308.

在步骤S307中:下载器客户端将该待下载文件下载至隐私空间中。In step S307: the downloader client downloads the file to be downloaded to the private space.

在步骤S308中:下载器客户端将该待下载文件下载至公开空间中。In step S308: the downloader client downloads the file to be downloaded to the public space.

图7是根据一示例性实施例八示出的文件下载方法的流程图,如图7所示,该方法包括以下步骤:Fig. 7 is a flowchart of a method for downloading a file according to an eighth exemplary embodiment. As shown in Fig. 7, the method includes the following steps:

在步骤S401中:该下载器客户端对应的服务器会获取各个安装了该下载器客户端的用户保存至隐私空间中的文件的历史下载URL。In step S401: the server corresponding to the downloader client obtains the historical download URLs of files saved in the private space by each user who has installed the downloader client.

在步骤S402中:该服务器通过机器学习的方法训练判断模型。In step S402: the server trains the judgment model by means of machine learning.

在步骤S403中:用户通过终端设备下载该下载器客户端。In step S403: the user downloads the downloader client through the terminal device.

可以在应用商店中下载该下载器客户端,也可以通过扫码的方式获取该下载器客户端的安装程序。The downloader client can be downloaded in the application store, or the installer of the downloader client can be obtained by scanning the code.

在步骤S404中:在下载器客户端中设置隐私空间对应的存储路径。In step S404: setting the storage path corresponding to the private space in the downloader client.

在终端设备中安装了该下载器客户端后,该下载器客户端中会默认一条作为隐私空间的存储路径,以及该隐私空间的默认密码并通过该下载器APP向用户展示。为了提升用户体验,本实施例中还可以用户手动设定该隐私空间对应的存储路径,以及该隐私空间的加密方式以及密码。After the downloader client is installed in the terminal device, there will be a storage path as a private space by default in the downloader client, and the default password of the private space will be displayed to the user through the downloader APP. In order to improve user experience, in this embodiment, the user can also manually set the storage path corresponding to the private space, as well as the encryption method and password of the private space.

在步骤S405中:在下载器客户端中设置公开空间对应的存储路径。In step S405: setting the storage path corresponding to the public space in the downloader client.

在手机中安装了该下载器客户端后,该下载器客户端中会默认一条作为公开空间的存储路径,并通过该下载器客户端向用户展示。为了提升用户体验,本实施例中还可以用户手动设定该公开空间对应的存储路径。After the downloader client is installed in the mobile phone, there will be a default storage path as a public space in the downloader client, and it will be displayed to the user through the downloader client. In order to improve user experience, in this embodiment, the user can also manually set the storage path corresponding to the public space.

其中,公开空间为无需加密、无访问权限的空间。Among them, the public space is a space that does not need to be encrypted and has no access rights.

在步骤S406中:用户在该下载器客户端中输入待下载文件对应的URL。In step S406: the user inputs the URL corresponding to the file to be downloaded in the downloader client.

在步骤S407中:下载器客户端将该URL发送给服务器。In step S407: the downloader client sends the URL to the server.

在步骤S408中:服务器接收该URL。In step S408: the server receives the URL.

在步骤S409中:当服务器接收到该URL后,通过判断模型判断该URL中是否包括预设关键字符。当根据判断模型确定该URL中包括预设关键字符时,则执行步骤S4010-步骤S4011,当根据判断模型确定该URL中不包括预设关键字符时,则执行步骤S4012-步骤S4013。In step S409: after receiving the URL, the server judges whether the URL includes preset key characters through a judgment model. When it is determined according to the judgment model that the URL includes preset key characters, then step S4010-step S4011 is performed; when it is determined according to the judgment model that the URL does not include preset key characters, then step S4012-step S4013 is performed.

在步骤S4010中:服务器向下载器客户端发送第一响应消息,其中,第一响应消息用于指示将该待下载文件下载至隐私空间中。In step S4010: the server sends a first response message to the downloader client, wherein the first response message is used to instruct to download the file to be downloaded into the private space.

在步骤S4011中:下载器客户端将该待下载文件下载至隐私空间中。In step S4011: the downloader client downloads the file to be downloaded to the private space.

在步骤S4012中:服务器向下载器客户端发送第二响应消息,其中,第二响应消息用于指示将该待下载文件下载至公开空间中。In step S4012: the server sends a second response message to the downloader client, wherein the second response message is used to instruct to download the file to be downloaded into the public space.

在步骤S4013中:下载器客户端将该待下载文件下载至公开空间中。In step S4013: the downloader client downloads the file to be downloaded to the public space.

下述为本公开装置实施例,可以用于执行本公开方法实施例。The following are device embodiments of the present disclosure, which can be used to implement the method embodiments of the present disclosure.

图8是根据一示例性实施例一示出的文件下载装置的框图,如图8所示,该文件下载装置包括:Fig. 8 is a block diagram of a file downloading device according to an exemplary embodiment 1. As shown in Fig. 8, the file downloading device includes:

第一获取模块11,用于获取待下载文件对应的下载特征;The first obtaining module 11 is used to obtain the download feature corresponding to the file to be downloaded;

确定模块12,用于确定所述第一获取模块11获取的所述下载特征中是否包括与隐私文件匹配的预设特征;A determination module 12, configured to determine whether the download features acquired by the first acquisition module 11 include preset features matching the privacy file;

下载模块13,用于在所述确定模块12确定所述获取模块获取的所述下载特征中包括预设特征时,将所述待下载文件下载至隐私空间中,所述隐私空间为存储隐私文件的空间。The download module 13 is configured to download the file to be downloaded into a private space when the determining module 12 determines that the download feature acquired by the acquisition module includes preset features, and the private space is for storing private files Space.

在一个实施例中,如图9所示,所述获取模块11包括:第一获取子模块111,所述确定模块12包括:第一确定子模块121,所述下载模块13包括:第一下载子模块131;In one embodiment, as shown in FIG. 9 , the acquiring module 11 includes: a first acquiring submodule 111, the determining module 12 includes: a first determining submodule 121, and the downloading module 13 includes: a first downloading Submodule 131;

所述第一获取子模块111,用于获取待下载文件对应的统一资源定位符URL;The first acquiring submodule 111 is configured to acquire the Uniform Resource Locator URL corresponding to the file to be downloaded;

所述第一确定子模块121,用于确定所述第一获取子模块111获取的所述URL中是否包括与隐私文件匹配的预设关键字符;The first determination submodule 121 is configured to determine whether the URL acquired by the first acquisition submodule 111 includes preset key characters matching the privacy file;

所述第一下载子模块131,用于在所述第一确定子模块121确定所述URL中包括与隐私文件匹配的预设关键字符时,将所述待下载文件下载至所述隐私空间中。The first downloading submodule 131 is configured to download the file to be downloaded into the private space when the first determining submodule 121 determines that the URL includes preset key characters matching the private file .

在一个实施例中,如图10所示,所述装置还包括:第二获取模块14、第三获取模块15和第一上传模块16;In one embodiment, as shown in FIG. 10 , the device further includes: a second acquiring module 14, a third acquiring module 15, and a first uploading module 16;

所述第二获取模块14,用于获取多个历史下载URL,所述历史下载URL为历史下载任务中完成下载后被用户放置入至隐私空间中的文件对应的URL;The second obtaining module 14 is used to obtain a plurality of historical download URLs, and the historical download URLs are URLs corresponding to files placed into the private space by the user after the download is completed in the historical download task;

所述第三获取模块15,用于根据所述第二获取模块14获取的所述多个历史下载URL获取所述预设关键字符;The third obtaining module 15 is configured to obtain the preset key characters according to the plurality of historical download URLs obtained by the second obtaining module 14;

所述第一上传模块16,用于将所述第三获取模块15获取的所述预设关键字符上传至服务器。The first uploading module 16 is configured to upload the preset key characters acquired by the third acquiring module 15 to a server.

在一个实施例中,如图11所示,所述第三获取模块15包括:切分子模块151、第二获取子模块152和第二确定子模块153;In one embodiment, as shown in FIG. 11 , the third acquiring module 15 includes: a cutting submodule 151, a second acquiring submodule 152 and a second determining submodule 153;

所述切分子模块151,用于将所述第二获取模块14获取的各个所述历史下载URL进行目录切分得到多个目录名;The sub-cutting module 151 is configured to perform directory segmentation on each of the historical download URLs obtained by the second obtaining module 14 to obtain a plurality of directory names;

所述第二获取子模块152,用于获取所述切分子模块151得到的多个所述目录名中出现次数大于或等于第一预设阈值的目录名;The second acquiring submodule 152 is configured to acquire the directory names whose occurrence times are greater than or equal to a first preset threshold among the plurality of directory names obtained by the cutting submodule 151;

所述第二确定子模块153,用于将所述第二获取子模块152确定的所述出现次数大于或等于第一预设阈值的目录名作为所述预设关键字符。The second determination sub-module 153 is configured to use the directory name whose occurrence times determined by the second acquisition sub-module 152 is greater than or equal to a first preset threshold as the preset key character.

在一个实施例中,如图12所示,所述装置还包括:第四获取模块17和第二上传模块18;In one embodiment, as shown in FIG. 12 , the device further includes: a fourth acquiring module 17 and a second uploading module 18;

所述第四获取模块17,用于获取多个历史下载URL,所述历史下载URL为历史下载任务中完成下载后被用户放置入隐私空间中的文件对应的URL;The fourth acquiring module 17 is configured to acquire a plurality of historical download URLs, and the historical download URLs are URLs corresponding to files that are placed into the private space by the user after the download is completed in the historical download task;

所述第二上传模块18,用于将所述第四获取模块17获取的所述多个历史下载URL上传至服务器。The second uploading module 18 is configured to upload the plurality of historical download URLs obtained by the fourth obtaining module 17 to a server.

在一个实施例中,如图13所示,所述第一获取模块11包括:第三获取子模块112,所述确定模块12包括:第三确定子模块122,所述下载模块13包括:第二下载子模块132;In one embodiment, as shown in FIG. 13 , the first acquiring module 11 includes: a third acquiring submodule 112, the determining module 12 includes: a third determining submodule 122, and the downloading module 13 includes: Two download sub-module 132;

所述第三获取子模块112,用于获取待下载文件对应的种子文件中的文件特征,所述种子文件中的文件特征包括:种子文件中记录的文件特征值;The third acquisition sub-module 112 is configured to acquire file features in the seed file corresponding to the file to be downloaded, where the file features in the seed file include: file feature values recorded in the seed file;

所述第三确定子模块122,用于确定所述第三获取子模块112获取的所述种子文件中的特征值是否与隐私文件匹配的预设特征值相同;The third determining submodule 122 is configured to determine whether the characteristic value in the seed file obtained by the third obtaining submodule 112 is the same as the preset characteristic value matched with the private file;

所述第二下载子模块132,用于在所述第三确定子模块122确定所述种子文件中的特征值与隐私文件匹配的预设特征值相同时,将所述待下载文件下载至所述隐私空间中。The second downloading submodule 132 is configured to download the file to be downloaded to the said to-be-downloaded file when the third determination submodule 122 determines that the characteristic value in the seed file is the same as the preset characteristic value matching the privacy file. in the private space described above.

在一个实施例中,如图14所示,所述装置还包括:第五获取模块21、第六获取模块22和第三上传模块23;In one embodiment, as shown in FIG. 14 , the device further includes: a fifth acquiring module 21, a sixth acquiring module 22, and a third uploading module 23;

所述第五获取模块21,用于获取多个历史种子文件的文件特征值,所述历史种子文件的文件特征值为历史下载任务中完成下载后被用户放置入至隐私空间中的种子文件对应的文件特征值;The fifth obtaining module 21 is configured to obtain file feature values of a plurality of historical seed files, and the file feature values of the historical seed files correspond to the seed files placed into the private space by the user after downloading in the historical download task The file feature value;

所述第六获取模块22,用于根据所述第五获取模块21获取的所述多个历史种子文件的文件特征值获取所述预设特征值;The sixth obtaining module 22 is configured to obtain the preset characteristic value according to the file characteristic values of the plurality of historical seed files obtained by the fifth obtaining module 21;

所述第三上传模块23,用于将所述第六获取模块22获取的所述预设特征值上传至服务器。The third uploading module 23 is configured to upload the preset characteristic value obtained by the sixth obtaining module 22 to a server.

根据本公开实施例的第三方面,提供一种文件下载装置,包括:According to a third aspect of an embodiment of the present disclosure, a file downloading device is provided, including:

处理器;processor;

用于存储处理器可执行指令的存储器;memory for storing processor-executable instructions;

其中,处理器被配置为:where the processor is configured as:

获取待下载文件对应的下载特征;Obtain the download feature corresponding to the file to be downloaded;

确定所述下载特征中是否包括与隐私文件匹配的预设特征;Determine whether the download features include preset features matching the privacy file;

在确定所述下载特征中包括预设特征时,将所述待下载文件下载至隐私空间中,所述隐私空间为存储隐私文件的空间。When it is determined that the download feature includes a preset feature, download the file to be downloaded into a private space, where the private space is a space for storing private files.

上述处理器还可被配置为:The above processors can also be configured as:

所述获取待下载文件对应的下载特征包括:The download feature corresponding to the acquisition of the file to be downloaded includes:

获取待下载文件对应的统一资源定位符URL;Obtain the Uniform Resource Locator URL corresponding to the file to be downloaded;

所述确定所述下载特征中是否包括与隐私文件匹配的预设特征,包括:The determining whether the downloading features include preset features matching the privacy file includes:

确定所述URL中是否包括与隐私文件匹配的预设关键字符;Determine whether the URL includes preset key characters matching the privacy file;

所述在确定所述下载特征中包括预设特征时,将所述待下载文件下载至隐私空间中,所述隐私空间为存储隐私文件的空间包括:When it is determined that the downloading features include preset features, downloading the file to be downloaded into a private space, the private space is a space for storing private files including:

在确定所述URL中包括与隐私文件匹配的预设关键字符时,将所述待下载文件下载至所述隐私空间中。When it is determined that the URL includes preset key characters matching the private file, the file to be downloaded is downloaded into the private space.

所述方法还包括:The method also includes:

获取多个历史下载URL,所述历史下载URL为历史下载任务中完成下载后被用户放置入至隐私空间中的文件对应的URL;Obtain a plurality of historical download URLs, the historical download URLs are URLs corresponding to files placed into the private space by the user after the download is completed in the historical download task;

根据所述多个历史下载URL获取所述预设关键字符,并上传至服务器。The preset key characters are obtained according to the plurality of historical download URLs, and uploaded to the server.

所述根据所述多个历史下载URL获取所述预设关键字符包括:The acquisition of the preset key characters according to the plurality of historical download URLs includes:

将各个所述历史下载URL进行目录切分得到多个目录名;performing directory segmentation on each of the historical download URLs to obtain multiple directory names;

获取多个所述目录名中出现次数大于或等于第一预设阈值的目录名;Obtaining directory names whose occurrence times are greater than or equal to a first preset threshold among the plurality of directory names;

将所述出现次数大于或等于第一预设阈值的目录名作为所述预设关键字符。The directory names whose occurrence times are greater than or equal to a first preset threshold are used as the preset key characters.

所述方法还包括:The method also includes:

获取多个历史下载URL,所述历史下载URL为历史下载任务中完成下载后被用户放置入隐私空间中的文件对应的URL;Obtain a plurality of historical download URLs, where the historical download URLs are URLs corresponding to files placed in the private space by the user after the download is completed in the historical download task;

将所述多个历史下载URL上传至服务器。uploading the multiple historical download URLs to the server.

所述获取待下载文件对应的下载特征包括:The download feature corresponding to the acquisition of the file to be downloaded includes:

获取待下载文件对应的种子文件中的文件特征,所述种子文件中的文件特征包括:种子文件中记录的文件特征值;Obtain the file feature in the seed file corresponding to the file to be downloaded, the file feature in the seed file includes: the file feature value recorded in the seed file;

所述确定所述下载特征中是否包括与隐私文件匹配的预设特征,包括:The determining whether the downloading features include preset features matching the privacy file includes:

确定所述种子文件中的特征值是否与隐私文件匹配的预设特征值相同;Determine whether the feature value in the seed file is the same as the preset feature value matched by the privacy file;

所述在确定所述下载特征中包括预设特征时,将所述待下载文件下载至隐私空间中,所述隐私空间为存储隐私文件的空间包括:When it is determined that the downloading features include preset features, downloading the file to be downloaded into a private space, the private space is a space for storing private files including:

在确定所述种子文件中的特征值与隐私文件匹配的预设特征值相同时,将所述待下载文件下载至所述隐私空间中。When it is determined that the feature value in the seed file is the same as the preset feature value matched by the private file, download the file to be downloaded into the private space.

所述方法还包括:The method also includes:

获取多个历史种子文件的文件特征值,所述历史种子文件的文件特征值为历史下载任务中完成下载后被用户放置入至隐私空间中的种子文件对应的文件特征值;Obtain the file characteristic value of a plurality of historical seed files, the file characteristic value of the historical seed file is the file characteristic value corresponding to the seed file placed into the private space by the user after completing the download in the historical download task;

根据所述多个历史种子文件的文件特征值获取所述预设特征值,并上传至服务器。The preset feature values are obtained according to the file feature values of the plurality of historical seed files, and uploaded to the server.

关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Regarding the apparatus in the foregoing embodiments, the specific manner in which each module executes operations has been described in detail in the embodiments related to the method, and will not be described in detail here.

图15是根据一示例性实施例示出的一种用于文件下载装置80的框图,该装置适用于终端设备。例如,装置80可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等。Fig. 15 is a block diagram showing an apparatus 80 for downloading a file according to an exemplary embodiment, and the apparatus is suitable for a terminal device. For example, the device 80 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, and the like.

装置80可以包括以下一个或多个组件:处理组件802,存储器804,电源组件806,多媒体组件808,音频组件810,输入/输出(I/O)的接口812,传感器组件814,以及通信组件816。Apparatus 80 may include one or more of the following components: processing component 802, memory 804, power supply component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814, and communication component 816 .

处理组件802通常控制装置80的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件802可以包括一个或多个处理器820来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件802可以包括一个或多个模块,便于处理组件802和其他组件之间的交互。例如,处理组件802可以包括多媒体模块,以方便多媒体组件808和处理组件802之间的交互。Processing component 802 generally controls the overall operations of device 80, such as those associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above method. Additionally, processing component 802 may include one or more modules that facilitate interaction between processing component 802 and other components. For example, processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802 .

存储器804被配置为存储各种类型的数据以支持在装置80的操作。这些数据的示例包括用于在装置80上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器804可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。Memory 804 is configured to store various types of data to support operations at device 80 . Examples of such data include instructions for any application or method operating on device 80, contact data, phonebook data, messages, pictures, videos, and the like. The memory 804 can be implemented by any type of volatile or non-volatile storage device or their combination, 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 Disk.

电源组件806为装置80的各种组件提供电力。电源组件806可以包括电源管理系统,一个或多个电源,及其他与为装置80生成、管理和分配电力相关联的组件。The power supply component 806 provides power to the various components of the device 80 . 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 device 80 .

多媒体组件808包括在所述装置80和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件808包括一个前置摄像头和/或后置摄像头。当装置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 input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may not only sense a boundary of a touch or swipe action, but also detect duration and pressure associated with the touch or swipe action. In some embodiments, the multimedia component 808 includes a front camera and/or a rear camera. When the device 80 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have focal length and optical zoom capability.

音频组件810被配置为输出和/或输入音频信号。例如,音频组件810包括一个麦克风(MIC),当装置80处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器804或经由通信组件816发送。在一些实施例中,音频组件810还包括一个扬声器,用于输出音频信号。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 device 80 is in operating modes, such as call mode, recording mode and voice recognition mode. Received audio signals may be further stored in memory 804 or sent via communication component 816 . In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.

I/O接口812为处理组件802和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。The I/O interface 812 provides an interface between the processing component 802 and a peripheral interface module, which may be a keyboard, a click wheel, a button, and the like. These buttons may include, but are not limited to: a home button, volume buttons, start button, and lock button.

传感器组件814包括一个或多个传感器,用于为装置80提供各个方面的状态评估。例如,传感器组件814可以检测到装置80的打开/关闭状态,组件的相对定位,例如所述组件为装置80的显示器和小键盘,传感器组件814还可以检测装置80或装置80一个组件的位置改变,用户与装置80接触的存在或不存在,装置80方位或加速/减速和装置80的温度变化。传感器组件814可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件814还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件814还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。Sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for device 80 . For example, the sensor component 814 can detect the open/closed state of the device 80, the relative positioning of components, such as the display and keypad of the device 80, and the sensor component 814 can also detect a change in the position of the device 80 or a component of the device 80 , the presence or absence of user contact with the device 80 , the device 80 orientation or acceleration/deceleration and the temperature change of the device 80 . Sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact. Sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor component 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor.

通信组件816被配置为便于装置80和其他设备之间有线或无线方式的通信。装置80可以接入基于通信标准的无线网络,如WiFi,2G或3G,或它们的组合。在一个示例性实施例中,通信组件816经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件816还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。Communications component 816 is configured to facilitate wired or wireless communications between apparatus 80 and other devices. The device 80 can 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 broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wide Band (UWB) technology, Bluetooth (BT) technology and other technologies.

在示例性实施例中,装置80可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子组件实现,用于执行上述方法。In an exemplary embodiment, apparatus 80 may be programmed by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable A gate array (FPGA), controller, microcontroller, microprocessor or other electronic component implementation for performing the methods described above.

在示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器804,上述指令可由装置80的处理器820执行以完成上述方法。例如,所述非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。In an exemplary embodiment, there is also provided a non-transitory computer-readable storage medium including instructions, such as the memory 804 including instructions, which can be executed by the processor 820 of the device 80 to implement the above method. For example, the non-transitory computer readable storage medium may be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, and the like.

一种非临时性计算机可读存储介质,当所述存储介质中的指令由装置80的处理器执行时,使得装置80能够执行上述的文件下载方法,所述方法包括:A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by the processor of the device 80, the device 80 can execute the above-mentioned file downloading method, the method includes:

获取待下载文件对应的下载特征;Obtain the download feature corresponding to the file to be downloaded;

确定所述下载特征中是否包括与隐私文件匹配的预设特征;Determine whether the download features include preset features matching the privacy file;

在确定所述下载特征中包括预设特征时,将所述待下载文件下载至隐私空间中,所述隐私空间为存储隐私文件的空间。When it is determined that the download feature includes a preset feature, download the file to be downloaded into a private space, where the private space is a space for storing private files.

所述获取待下载文件对应的下载特征包括:The download feature corresponding to the acquisition of the file to be downloaded includes:

获取待下载文件对应的统一资源定位符URL;Obtain the Uniform Resource Locator URL corresponding to the file to be downloaded;

所述确定所述下载特征中是否包括与隐私文件匹配的预设特征,包括:The determining whether the downloading features include preset features matching the privacy file includes:

确定所述URL中是否包括与隐私文件匹配的预设关键字符;Determine whether the URL includes preset key characters matching the privacy file;

所述在确定所述下载特征中包括预设特征时,将所述待下载文件下载至隐私空间中,所述隐私空间为存储隐私文件的空间包括:When it is determined that the downloading features include preset features, downloading the file to be downloaded into a private space, the private space is a space for storing private files including:

在确定所述URL中包括与隐私文件匹配的预设关键字符时,将所述待下载文件下载至所述隐私空间中。When it is determined that the URL includes preset key characters matching the private file, the file to be downloaded is downloaded into the private space.

所述方法还包括:The method also includes:

获取多个历史下载URL,所述历史下载URL为历史下载任务中完成下载后被用户放置入至隐私空间中的文件对应的URL;Obtain a plurality of historical download URLs, the historical download URLs are URLs corresponding to files placed into the private space by the user after the download is completed in the historical download task;

根据所述多个历史下载URL获取所述预设关键字符,并上传至服务器。The preset key characters are obtained according to the plurality of historical download URLs, and uploaded to the server.

所述根据所述多个历史下载URL获取所述预设关键字符包括:The acquisition of the preset key characters according to the plurality of historical download URLs includes:

将各个所述历史下载URL进行目录切分得到多个目录名;performing directory segmentation on each of the historical download URLs to obtain multiple directory names;

获取多个所述目录名中出现次数大于或等于第一预设阈值的目录名;Obtaining directory names whose occurrence times are greater than or equal to a first preset threshold among the plurality of directory names;

将所述出现次数大于或等于第一预设阈值的目录名作为所述预设关键字符。The directory names whose occurrence times are greater than or equal to a first preset threshold are used as the preset key characters.

所述方法还包括:The method also includes:

获取多个历史下载URL,所述历史下载URL为历史下载任务中完成下载后被用户放置入隐私空间中的文件对应的URL;Obtain a plurality of historical download URLs, where the historical download URLs are URLs corresponding to files placed in the private space by the user after the download is completed in the historical download task;

将所述多个历史下载URL上传至服务器。uploading the multiple historical download URLs to the server.

所述获取待下载文件对应的下载特征包括:The download feature corresponding to the acquisition of the file to be downloaded includes:

获取待下载文件对应的种子文件中的文件特征,所述种子文件中的文件特征包括:种子文件中记录的文件特征值;Obtain the file feature in the seed file corresponding to the file to be downloaded, the file feature in the seed file includes: the file feature value recorded in the seed file;

所述确定所述下载特征中是否包括与隐私文件匹配的预设特征,包括:The determining whether the downloading features include preset features matching the privacy file includes:

确定所述种子文件中的特征值是否与隐私文件匹配的预设特征值相同;Determine whether the feature value in the seed file is the same as the preset feature value matched by the privacy file;

所述在确定所述下载特征中包括预设特征时,将所述待下载文件下载至隐私空间中,所述隐私空间为存储隐私文件的空间包括:When it is determined that the downloading features include preset features, downloading the file to be downloaded into a private space, the private space is a space for storing private files including:

在确定所述种子文件中的特征值与隐私文件匹配的预设特征值相同时,将所述待下载文件下载至所述隐私空间中。When it is determined that the feature value in the seed file is the same as the preset feature value matched by the private file, download the file to be downloaded into the private space.

所述方法还包括:The method also includes:

获取多个历史种子文件的文件特征值,所述历史种子文件的文件特征值为历史下载任务中完成下载后被用户放置入至隐私空间中的种子文件对应的文件特征值;Obtain the file characteristic value of a plurality of historical seed files, the file characteristic value of the historical seed file is the file characteristic value corresponding to the seed file placed into the private space by the user after completing the download in the historical download task;

根据所述多个历史种子文件的文件特征值获取所述预设特征值,并上传至服务器。The preset feature values are obtained according to the file feature values of the plurality of historical seed files, and uploaded to the server.

图16是根据一示例性实施例示出的一种用于文件下载的装置90的框图。例如,装置90可以被提供为一服务器。装置90包括处理组件902,其进一步包括一个或多个处理器,以及由存储器903所代表的存储器资源,用于存储可由处理组件902的执行的指令,例如应用程序。存储器903中存储的应用程序可以包括一个或一个以上的每一个对应于一组指令的模块。此外,处理组件902被配置为执行指令,以执行上述方法。Fig. 16 is a block diagram of a device 90 for downloading files according to an exemplary embodiment. For example, device 90 may be provided as a server. Apparatus 90 includes a processing component 902 , which further includes one or more processors, and a memory resource, represented by memory 903 , for storing instructions executable by processing component 902 , such as application programs. The application program stored in memory 903 may include one or more modules each corresponding to a set of instructions. In addition, the processing component 902 is configured to execute instructions to perform the above method.

装置90还可以包括一个电源组件906被配置为执行装置90的电源管理,一个有线或无线网络接口905被配置为将装置90连接到网络,和一个输入输出(I/O)接口908。装置90可以操作基于存储在存储器903的操作系统,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM或类似。Device 90 may also include a power component 906 configured to perform power management of device 90 , a wired or wireless network interface 905 configured to connect device 90 to a network, and an input-output (I/O) interface 908 . The device 90 can operate based on an operating system stored in the memory 903, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™ or the like.

一种非临时性计算机可读存储介质,当所述存储介质中的指令由装置90的处理器执行时,使得装置90能够执行上述的文件下载方法。A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by the processor of the device 90, the device 90 can execute the above-mentioned file downloading method.

本领域技术人员在考虑说明书及实践这里公开的公开后,将容易想到本公开的其它实施方案。本申请旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由下面的权利要求指出。Other embodiments of the present disclosure will be readily 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 modification, use or adaptation of the present disclosure, and these modifications, uses or adaptations follow the general principles of the present disclosure and include common knowledge or conventional technical means in the technical field not disclosed in the present disclosure . The specification and examples are to be considered exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限制。It should be understood that the present disclosure is not limited to the precise constructions which have been described above and shown in the drawings, and 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 (16)

1. a kind of document down loading method, it is characterised in that including:
Obtain the corresponding download features of file to be downloaded;
Determine the default feature for whether including matching with private file in the download features;
When it is determined that the download features include default feature, the file to be downloaded is downloaded in private space, it is described Private space is the space of storage private file.
2. according to the method described in claim 1, it is characterised in that described to obtain the corresponding download features bag of file to be downloaded Include:
Obtain the corresponding uniform resource position mark URL of file to be downloaded;
The default feature for determining whether to include matching with private file in the download features, including:
Determine the preset keyword symbol for whether including matching with private file in the URL;
It is described that the file to be downloaded is downloaded in private space when it is determined that the download features include default feature, The private space includes for the space of storage private file:
When it is determined that the URL includes the preset keyword symbol matched with private file, the file to be downloaded is downloaded to In the private space.
3. method according to claim 2, it is characterised in that methods described also includes:
Obtain multiple history and download URL, the history downloads URL to complete to be placed into by user after downloading in history downloading task The corresponding URL of file into private space;
URL is downloaded according to the multiple history and obtains the preset keyword symbol, and is uploaded onto the server.
4. method according to claim 3, it is characterised in that described according to the multiple history downloads URL acquisitions Preset keyword symbol includes:
Each described history download URL is entered into column catalogue cutting and obtains multiple directory names;
Obtain the directory name that occurrence number in multiple directory names is more than or equal to the first predetermined threshold value;
The directory name that the occurrence number is more than or equal to the first predetermined threshold value is accorded with as the preset keyword.
5. method according to claim 2, it is characterised in that methods described also includes:
Obtain multiple history and download URL, the history downloads URL to complete to be placed into by user after downloading in history downloading task The corresponding URL of file in private space;
The multiple history download URL is uploaded onto the server.
6. according to the method described in claim 1, it is characterised in that described to obtain the corresponding download features bag of file to be downloaded Include:
The file characteristic obtained in the file characteristic in the corresponding seed file of file to be downloaded, the seed file includes:Kind The file characteristic value recorded in subfile;
The default feature for determining whether to include matching with private file in the download features, including:
Determine whether the characteristic value in the seed file is identical with the default characteristic value that private file is matched;
It is described that the file to be downloaded is downloaded in private space when it is determined that the download features include default feature, The private space includes for the space of storage private file:
, will be described to be downloaded when it is determined that the characteristic value in the seed file is identical with the default characteristic value that private file is matched File download is into the private space.
7. method according to claim 6, it is characterised in that methods described also includes:
The file characteristic value of multiple history seed files is obtained, the file characteristic value of the history seed file is downloaded for history appoints Complete to be placed into the corresponding file characteristic value of seed file into private space by user after downloading in business;
The default characteristic value is obtained according to the file characteristic value of the multiple history seed file, and uploaded onto the server.
8. a kind of file downloading device, it is characterised in that including:
First acquisition module, for obtaining the corresponding download features of file to be downloaded;
Determining module, for determining whether include and private file in the download features that first acquisition module is obtained The default feature matched somebody with somebody;
Download module, for determining that the download features that the acquisition module is obtained include default spy in the determining module When levying, the file to be downloaded is downloaded in private space, the private space is the space of storage private file.
9. device according to claim 8, it is characterised in that the acquisition module includes:First acquisition submodule, it is described Determining module includes:First determination sub-module, the download module includes:First downloads submodule;
First acquisition submodule, for obtaining the corresponding uniform resource position mark URL of file to be downloaded;
First determination sub-module, for determine whether to include in the URL that first acquisition submodule is obtained with it is hidden The preset keyword symbol of private file matching;
Described first downloads submodule, for determining that the URL includes and private file in first determination sub-module During the preset keyword symbol matched somebody with somebody, the file to be downloaded is downloaded in the private space.
10. device according to claim 9, it is characterised in that described device also includes:Second acquisition module, the 3rd obtain Modulus block and the first uploading module;
Second acquisition module, downloads URL, the history downloads URL in history downloading task for obtaining multiple history Complete to be placed into the corresponding URL of file into private space by user after downloading;
3rd acquisition module, the multiple history for being obtained according to second acquisition module downloads URL and obtains institute State preset keyword symbol;
First uploading module, the preset keyword symbol for the 3rd acquisition module to be obtained is uploaded to service Device.
11. device according to claim 10, it is characterised in that the 3rd acquisition module includes:Cutting submodule, Two acquisition submodules and the second determination sub-module;
The cutting submodule, each described history download URL for second acquisition module to be obtained enters column catalogue and cut Get multiple directory names;
Second acquisition submodule is big for obtaining occurrence number in multiple directory names that the cutting submodule is obtained In or equal to the first predetermined threshold value directory name;
Second determination sub-module, is more than or equal to for the occurrence number that determines second acquisition submodule The directory name of one predetermined threshold value is accorded with as the preset keyword.
12. device according to claim 9, it is characterised in that described device also includes:On 4th acquisition module and second Transmission module;
4th acquisition module, downloads URL, the history downloads URL in history downloading task for obtaining multiple history Complete the corresponding URL of file being placed into after downloading by user in private space;
Second uploading module, the multiple history for the 4th acquisition module to be obtained downloads URL and is uploaded to clothes Business device.
13. device according to claim 8, it is characterised in that first acquisition module includes:3rd obtains submodule Block, the determining module includes:3rd determination sub-module, the download module includes:Second downloads submodule;
3rd acquisition submodule, for obtaining the file characteristic in the corresponding seed file of file to be downloaded, the seed File characteristic in file includes:The file characteristic value recorded in seed file;
3rd determination sub-module, for determining the characteristic value in the seed file that the 3rd acquisition submodule is obtained It is whether identical with the default characteristic value that private file is matched;
It is described second download submodule, for determining the seed file in the 3rd determination sub-module in characteristic value with it is hidden When the default characteristic value of private file matching is identical, the file to be downloaded is downloaded in the private space.
14. device according to claim 13, it is characterised in that described device also includes:5th acquisition module, the 6th obtain Modulus block and the 3rd uploading module;
5th acquisition module, the file characteristic value for obtaining multiple history seed files, the history seed file File characteristic value be complete in history downloading task after downloading to be placed into seed file into private space by user it is corresponding File characteristic value;
6th acquisition module, for the file of the multiple history seed file obtained according to the 5th acquisition module Characteristic value obtains the default characteristic value;
3rd uploading module, the default characteristic value for the 6th acquisition module to be obtained uploads onto the server.
15. a kind of file downloading device, it is characterised in that including:
Processor;
Memory for storing processor-executable instruction;
Wherein, the processor is configured as:
Obtain the corresponding download features of file to be downloaded;
Determine the default feature for whether including matching with private file in the download features;
When it is determined that the download features include default feature, the file to be downloaded is downloaded in private space, it is described Private space is the space of storage private file.
16. a kind of computer-readable recording medium, is stored thereon with computer instruction, it is characterised in that the instruction is by processor Following steps are realized during execution:
Obtain the corresponding download features of file to be downloaded;
Determine the default feature for whether including matching with private file in the download features;
When it is determined that the download features include default feature, the file to be downloaded is downloaded in private space, it is described Private space is the space of storage private 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 true CN107147702A (en) 2017-09-08
CN107147702B 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 (11)

* 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
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
CN103678692A (en) * 2013-12-26 2014-03-26 北京奇虎科技有限公司 Safety scanning method and device of downloaded file
CN103873521A (en) * 2012-12-14 2014-06-18 江南大学 Cloud architecture-based mobile phone privacy file protection system and method
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
CN104966031A (en) * 2015-07-01 2015-10-07 复旦大学 Method for identifying permission-irrelevant private data in Android application program
CN106375366A (en) * 2016-05-31 2017-02-01 深圳市美贝壳科技有限公司 File privacy protection system
CN106503586A (en) * 2016-11-18 2017-03-15 北京奇虎科技有限公司 A kind of method for processing application file and mobile communication terminal
US20170099344A1 (en) * 2011-06-08 2017-04-06 Workshare, Ltd. System and method for cross platform document sharing

Patent Citations (11)

* 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
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
US20170099344A1 (en) * 2011-06-08 2017-04-06 Workshare, Ltd. System and method for cross platform document sharing
CN103873521A (en) * 2012-12-14 2014-06-18 江南大学 Cloud architecture-based mobile phone privacy file protection system and method
CN103678692A (en) * 2013-12-26 2014-03-26 北京奇虎科技有限公司 Safety scanning method and device of downloaded 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
CN104966031A (en) * 2015-07-01 2015-10-07 复旦大学 Method for identifying permission-irrelevant private data in Android application program
CN106375366A (en) * 2016-05-31 2017-02-01 深圳市美贝壳科技有限公司 File privacy protection system
CN106503586A (en) * 2016-11-18 2017-03-15 北京奇虎科技有限公司 A kind of method for processing application file and mobile communication terminal

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
赵晓晖: "基于内容的敏感图片过滤技术的研究及其在IE浏览器中的实现", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Also Published As

Publication number Publication date
CN107147702B (en) 2021-03-30

Similar Documents

Publication Publication Date Title
US10963584B2 (en) Method and system for collaborative editing of a remotely stored document
KR20190102308A (en) Data content filter
CN103914520B (en) Data query method, terminal device and server
CN103617382A (en) Privacy protection method and device
US11501019B2 (en) Securing digital content using separately authenticated hidden folders
US11004163B2 (en) Terminal-implemented method, server-implemented method and terminal for acquiring certification document
US9659189B2 (en) Systems and methods of safeguarding user information while interacting with online service providers
WO2017166667A1 (en) Method of pushing message on lock screen on mobile terminal, device, and electronic apparatus
CN106790172A (en) A kind of file sharing method and server, client
CN108985095A (en) A kind of non-public file access method, system and electronic equipment and storage medium
CN103036852B (en) A kind of method and device realizing network entry
CN108900553B (en) A communication method, apparatus and computer-readable storage medium
US10218505B1 (en) Server based settings for client software with asymmetric signing
CN107154977B (en) Information push method and device
CN107526960B (en) System and method for protecting mobile contact information
WO2019011083A1 (en) Private information processing method and apparatus, and mobile terminal
CN109861979B (en) Program processing method, electronic device, and computer-readable storage medium
CN106874718A (en) Privacy processing method, device and terminal
CN106066968A (en) Data guard method and device
CN109800583B (en) Electronic device including display and method for encrypting information
CN107040547A (en) Method, device and the terminal device of administrator password
CN106529338A (en) Safe processing method and equipment of data file
Kim et al. I’ve Got Your Number: Harvesting users’ personal data via contacts sync for the KakaoTalk messenger
CN106933666B (en) Method for calling information input program and electronic equipment
CN112800442B (en) Method, device and medium for detecting encrypted file

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