CN116055464B - Download and save path selection method, device and medium - Google Patents

Download and save path selection method, device and medium Download PDF

Info

Publication number
CN116055464B
CN116055464B CN202310182121.1A CN202310182121A CN116055464B CN 116055464 B CN116055464 B CN 116055464B CN 202310182121 A CN202310182121 A CN 202310182121A CN 116055464 B CN116055464 B CN 116055464B
Authority
CN
China
Prior art keywords
path
download
downloaded
save
file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310182121.1A
Other languages
Chinese (zh)
Other versions
CN116055464A (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.)
China United Network Communications Group Co Ltd
Original Assignee
China United Network Communications Group 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 China United Network Communications Group Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN202310182121.1A priority Critical patent/CN116055464B/en
Publication of CN116055464A publication Critical patent/CN116055464A/en
Application granted granted Critical
Publication of CN116055464B publication Critical patent/CN116055464B/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/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 
    • 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]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本发明提供一种下载保存路径选择方法、装置及介质,涉及计算机技术领域,用于解决现有技术不能预测用户期望的下载保存地址,经常需要手动修改地址,影响下载效率的问题,所述方法包括:接收待下载文件的下载指令;确定当前时间所属的第一预设时段;获取历史下载保存路径在第一预设时段的第一历史保存次数;根据第一历史保存次数从历史下载保存路径中选择待下载文件的默认保存路径。本发明通过用户以往在不同时段下载文件的保存路径,预测用户当前对待下载文件的期望保存路径,以此获得待下载文件的默认保存路径,满足用户对下载文件分类保存的需求,减少用户修改保存地址的机率,提高下载效率。

The present invention provides a download saving path selection method, device and medium, which relates to the field of computer technology and is used to solve the problem that the prior art cannot predict the download saving address expected by the user, and the address often needs to be manually modified, which affects the download efficiency. The method includes: receiving a download instruction of a file to be downloaded; determining the first preset time period to which the current time belongs; obtaining the first historical save times of the historical download saving path in the first preset time period; and selecting the default save path of the file to be downloaded from the historical download saving path according to the first historical save times. The present invention predicts the user's current expected save path for the downloaded file through the save paths of the files downloaded by the user in different time periods in the past, thereby obtaining the default save path of the file to be downloaded, meeting the user's demand for classified saving of downloaded files, reducing the probability of the user modifying the save address, and improving the download efficiency.

Description

下载保存路径选择方法、装置及介质Download and save path selection method, device and medium

技术领域Technical Field

本发明涉及计算机技术领域,尤其涉及一种下载保存路径选择方法、装置及计算机可读存储介质。The present invention relates to the field of computer technology, and in particular to a download and save path selection method, device and computer-readable storage medium.

背景技术Background technique

现有技术中,用户下载资料时,通常会有自动填写下载保存地址的功能,可供用户按照自动填写的地址保存下载资料。目前自动填写的下载保存地址,通常是填写“上次保存的路径”,但是本次下载的文件,很可能会保存到其他的路径,这样就得手动重新选择路径,比较麻烦,影响了下载效率。In the prior art, when a user downloads data, there is usually a function of automatically filling in the download save address, allowing the user to save the downloaded data according to the automatically filled address. Currently, the automatically filled download save address is usually filled in with "the last saved path", but the file downloaded this time may be saved to another path, so the path must be manually reselected, which is troublesome and affects the download efficiency.

发明内容Summary of the invention

本发明所要解决的技术问题是针对现有技术的上述不足,提供一种下载保存路径选择方法、装置及计算机可读存储介质,以解决现有技术不能预测用户期望的下载保存地址,经常需要手动修改地址,影响下载效率的问题。The technical problem to be solved by the present invention is to provide a download save path selection method, device and computer-readable storage medium in response to the above-mentioned shortcomings of the prior art, so as to solve the problem that the prior art cannot predict the download save address expected by the user, and often requires manual modification of the address, which affects the download efficiency.

第一方面,本发明提供一种下载保存路径选择方法,所述方In a first aspect, the present invention provides a method for selecting a download save path.

法包括:The law includes:

S1、接收待下载文件的下载指令;S1, receiving a download instruction for a file to be downloaded;

S12、确定当前时间所属的第一预设时段;S12, determining the first preset time period to which the current time belongs;

S13、获取历史下载保存路径在第一预设时段的第一历史保存次数;S13, obtaining a first historical save count of the historical download save path in a first preset time period;

S14、根据第一历史保存次数从历史下载保存路径中选择待下载文件的默认保存路径。S14: Select a default saving path for the file to be downloaded from the historical download saving paths according to the first historical saving times.

可选地,在步骤S1之后,所述方法还包括:Optionally, after step S1, the method further includes:

S22、确定待下载文件的来源路径;S22, determining the source path of the file to be downloaded;

S23、获取可用下载保存路径与所述来源路径的名称近似度;S23, obtaining the name similarity between the available download saving path and the source path;

S24、根据所述名称近似度从可用下载保存路径中选择待下载文件的默认保存路径。S24: Select a default saving path for the file to be downloaded from available download saving paths according to the name similarity.

可选地,所述方法:Optionally, the method:

先执行步骤S22-S24,如果S24没有选择到待下载文件的默认保存路径,则执行步骤S12-S14;或者,First, execute steps S22-S24. If S24 does not select the default save path for the file to be downloaded, then execute steps S12-S14; or,

先执行步骤S12-S14,如果S14没有选择到待下载文件的默认保存路径,则执行步骤S22-S24。First, execute steps S12-S14. If S14 does not select the default save path for the file to be downloaded, execute steps S22-S24.

可选地,在步骤S1之后,所述方法还包括:Optionally, after step S1, the method further includes:

S33、获取历史下载保存路径在全部时段的第二历史保存次数;S33, obtaining the second historical save count of the historical download save path in all time periods;

S34、根据第二历史保存次数从历史下载保存路径中选择待下载文件的默认保存路径。S34. Select a default saving path for the file to be downloaded from the historical download saving paths according to the second historical saving number.

可选地,所述方法:Optionally, the method:

先执行步骤S33-S34,如果S34没有选择到待下载文件的默认保存路径,则执行步骤S12-S14;或者,First, execute steps S33-S34. If S34 does not select the default save path for the file to be downloaded, then execute steps S12-S14; or,

先执行步骤S12-S14,如果S14没有选择到待下载文件的默认保存路径,则执行步骤S33-S34。First, execute steps S12-S14. If S14 does not select the default save path for the file to be downloaded, execute steps S33-S34.

可选地,步骤S1之前,所述方法还包括:Optionally, before step S1, the method further includes:

设定多个预设时段;Set multiple preset time periods;

建立表格,记录历史下载保存路径、每次使用历史下载保存路径对应的预设时段、以及在每个预设时段内每一历史下载保存路径的历史保存次数。A table is established to record the historical download saving path, the preset time period corresponding to each use of the historical download saving path, and the number of historical saves for each historical download saving path within each preset time period.

可选地,步骤S14具体包括:Optionally, step S14 specifically includes:

判断第一历史保存次数最多的第一历史下载保存路径的使用率是否大于第一预设阈值;Determine whether the usage rate of the first history download saving path with the largest number of first history saving times is greater than a first preset threshold;

如果是,则选择第一历史下载保存路径作为待下载文件的默认保存路径。If yes, the first historical download saving path is selected as the default saving path for the file to be downloaded.

可选地,所述待下载文件为待下载网盘文件,所述来源路径为待下载网盘文件的网盘存储路径,所述可用下载保存路径为除预设黑名单之外的所有本地存储路径。Optionally, the file to be downloaded is a network disk file to be downloaded, the source path is a network disk storage path of the network disk file to be downloaded, and the available download save path is all local storage paths except a preset blacklist.

可选地,步骤S24具体包括:Optionally, step S24 specifically includes:

判断所述名称近似度最高的第一可用下载保存路径是否唯一;Determine whether the first available download saving path with the highest name similarity is unique;

如果是,则选择第一可用下载保存路径作为待下载文件的默认保存路径,以及,If yes, then select the first available download save path as the default save path for the file to be downloaded, and,

如果否,则从第一可用下载保存路径中选择第一历史保存次数最多的第二可用下载保存路径,以第二可用下载保存路径作为待下载文件的默认保存路径。If not, then a second available download saving path with the largest number of first history save times is selected from the first available download saving path, and the second available download saving path is used as a default saving path for the file to be downloaded.

第二方面,本发明提供一种下载保存路径选择装置,所述装In a second aspect, the present invention provides a download and save path selection device, the device

置包括:The settings include:

接收模块,用于接收待下载文件的下载指令;A receiving module, used for receiving a download instruction of a file to be downloaded;

确定模块,与所述接收模块连接,用于确定当前时间所属的第一预设时段;A determination module, connected to the receiving module, for determining the first preset time period to which the current time belongs;

获取模块,与所述确定模块连接,用于获取历史下载保存路径在第一预设时段的第一历史保存次数;An acquisition module, connected to the determination module, for acquiring a first history saving number of the history download saving path in a first preset time period;

选择模块,与所述获取模块连接,用于根据第一历史保存次数从历史下载保存路径中选择待下载文件的默认保存路径。The selection module is connected to the acquisition module and is used to select a default saving path for the file to be downloaded from the historical download saving paths according to the first historical saving times.

第三方面,本发明提供一种计算机可读存储介质,其上存储有计算机程序,当所述计算机程序被处理器运行时,实现如上所述的下载保存路径选择方法。In a third aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the download and save path selection method as described above is implemented.

本发明提供一种下载保存路径选择方法、装置及计算机可读存储介质,通过用户以往在不同时段下载文件的保存路径,预测用户当前对待下载文件的期望保存路径,以此获得待下载文件的默认保存路径,满足用户对下载文件分类保存的需求,减少用户修改保存地址的机率,提高下载效率。The present invention provides a download saving path selection method, device and computer-readable storage medium, which predicts the user's current expected saving path for the downloaded files through the saving paths of the files downloaded by the user in different time periods in the past, thereby obtaining the default saving path of the files to be downloaded, meeting the user's demand for classified saving of downloaded files, reducing the probability of the user modifying the saving address, and improving download efficiency.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

图1是本发明实施例的一种下载保存路径选择方法的流程图;FIG1 is a flow chart of a method for selecting a download and save path according to an embodiment of the present invention;

图2是本发明实施例的一种下载保存路径选择方法的多方案可选流程图;2 is a flowchart of multiple optional solutions for a method for selecting a download and save path according to an embodiment of the present invention;

图3是本发明实施例的一种下载保存路径选择方法的选定方案示例流程图;3 is a flowchart of an example of a selected solution of a method for selecting a download and save path according to an embodiment of the present invention;

图4是本发明实施例的一种下载保存路径选择装置的结构示意图。FIG. 4 is a schematic diagram of the structure of a download and save path selection device according to an embodiment of the present invention.

具体实施方式Detailed ways

为使本领域技术人员更好地理解本发明的技术方案,下面将结合附图对本发明实施方式作进一步地详细描述。In order to enable those skilled in the art to better understand the technical solution of the present invention, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.

可以理解的是,此处描述的具体实施例和附图仅仅用于解释本发明,而非对本发明的限定。It should be understood that the specific embodiments and drawings described herein are only used to explain the present invention rather than to limit the present invention.

可以理解的是,在不冲突的情况下,本发明中的各实施例及实施例中的各特征可相互组合。It can be understood that, in the absence of conflict, the various embodiments of the present invention and the various features in the embodiments can be combined with each other.

可以理解的是,为便于描述,本发明的附图中仅示出了与本发明相关的部分,而与本发明无关的部分未在附图中示出。It can be understood that, for the convenience of description, the drawings of the present invention only show the parts related to the present invention, while the parts irrelevant to the present invention are not shown in the drawings.

可以理解的是,本发明的实施例中所涉及的每个单元、模块可仅对应一个实体结构,也可由多个实体结构组成,或者,多个单元、模块也可集成为一个实体结构。It can be understood that each unit and module involved in the embodiments of the present invention may correspond to only one physical structure, or may be composed of multiple physical structures, or multiple units and modules may be integrated into one physical structure.

可以理解的是,在不冲突的情况下,本发明的流程图和框图中所标注的功能、步骤可根据不同于附图中所标注的顺序发生。It can be understood that, in the absence of conflict, the functions and steps marked in the flowcharts and block diagrams of the present invention may occur in an order different from that marked in the drawings.

可以理解的是,本发明的流程图和框图中,示出了根据本发明各实施例的系统、装置、设备、方法的可能实现的体系架构、功能和操作。其中,流程图或框图中的每个方框可代表一个单元、模块、程序段、代码,其包含用于实现规定的功能的可执行指令。而且,框图和流程图中的每个方框或方框的组合,可用实现规定的功能的基于硬件的系统实现,也可用硬件与计算机指令的组合来实现。It is understood that the flowcharts and block diagrams of the present invention illustrate the possible architectures, functions, and operations of the systems, devices, equipment, and methods according to the various embodiments of the present invention. Each box in the flowchart or block diagram may represent a unit, module, program segment, or code, which contains executable instructions for implementing the specified functions. Moreover, each box or combination of boxes in the block diagram and flowchart may be implemented by a hardware-based system that implements the specified functions, or by a combination of hardware and computer instructions.

可以理解的是,本发明实施例中所涉及的单元、模块可通过软件的方式实现,也可通过硬件的方式来实现,例如单元、模块可位于处理器中。It can be understood that the units and modules involved in the embodiments of the present invention can be implemented by software or hardware. For example, the units and modules can be located in a processor.

实施例1:Embodiment 1:

如图1所示,本发明实施例1提供一种下载保存路径选择方法,所述方法包括:As shown in FIG. 1 , Embodiment 1 of the present invention provides a method for selecting a download and save path, the method comprising:

S1、接收待下载文件的下载指令;S1, receiving a download instruction for a file to be downloaded;

S12、确定当前时间所属的第一预设时段;S12, determining the first preset time period to which the current time belongs;

S13、获取历史下载保存路径在第一预设时段的第一历史保存次数;S13, obtaining a first historical save count of the historical download save path in a first preset time period;

S14、根据第一历史保存次数从历史下载保存路径中选择待下载文件的默认保存路径。S14: Select a default saving path for the file to be downloaded from the historical download saving paths according to the first historical saving count.

具体而言,本实施例依托的原理(一)为:Specifically, the principle (I) on which this embodiment relies is:

在不同的时段,用户需要下载保存的文件类型可能是不一样的,对文件保存地址的要求也因此而不同,有相对较大的概率用户下载文件与时间具有关联性,例如:工作日的工作时间,下载的内容可能是与工作相关的;而非工作时间,下载的文件可能是跟工作不相关的。所以周一上午下载的内容可能和周二上午下载的内容关联性大一点,而和周日下载的内容关联性小一点。再如一些规律性较强的工作,可能要求在具体的时段进行具体的资料下载等。因此,时段和在对应时段内的历史下载保存记录这两个维度可以作为默认下载保存路径的参考。In different time periods, the types of files that users need to download and save may be different, and the requirements for the file saving address are also different. There is a relatively high probability that the user's downloading of files is related to time. For example, during working hours on weekdays, the downloaded content may be work-related; during non-working hours, the downloaded files may be unrelated to work. Therefore, the content downloaded on Monday morning may be more related to the content downloaded on Tuesday morning, and less related to the content downloaded on Sunday. For example, some work with strong regularity may require specific data downloads in specific time periods. Therefore, the two dimensions of time period and historical download and save records in the corresponding time period can be used as references for the default download and save path.

基于上述原理(一),本实施例提出一种根据当前时间所属的时段,为用户的待下载文件自动选择默认保存路径的方法,通过统计在用户的历史下载保存记录中,当前时间所属的时段使用的历史下载保存路径的次数作为默认保存路径的选择依据,从而实现对用户当前待下载文件的期望保存路径的预测,满足用户对下载文件分类保存的需求,减少用户修改保存地址的机率,提高下载效率。Based on the above principle (I), this embodiment proposes a method for automatically selecting a default save path for the user's to-be-downloaded files according to the time period to which the current time belongs. By counting the number of historical download save paths used in the time period to which the current time belongs in the user's historical download save records as a basis for selecting the default save path, the expected save path of the user's current to-be-downloaded files can be predicted, thereby meeting the user's demand for classified storage of downloaded files, reducing the probability of the user modifying the save address, and improving download efficiency.

可选地,步骤S1之前,所述方法还包括:Optionally, before step S1, the method further includes:

设定多个预设时段;Set multiple preset time periods;

建立表格,记录历史下载保存路径、每次使用历史下载保存路径对应的预设时段、以及在每个预设时段内每一历史下载保存路径的历史保存次数。A table is established to record the historical download saving path, the preset time period corresponding to each use of the historical download saving path, and the number of historical saves for each historical download saving path within each preset time period.

可选地,步骤S14具体包括:Optionally, step S14 specifically includes:

判断第一历史保存次数最多的第一历史下载保存路径的使用率是否大于第一预设阈值;Determine whether the usage rate of the first history download saving path with the largest number of first history saving times is greater than a first preset threshold;

如果是,则选择第一历史下载保存路径作为待下载文件的默认保存路径。If yes, the first historical download saving path is selected as the default saving path for the file to be downloaded.

具体而言,本实施例依托于原理(一)更详细的实现方式是:首先设定多个预设时段,对每个预设时段设置对应的时间特征描述,在用户每次下载文件时,以表格的形式记录用户每次下载文件对应的时段、最终的实际保存路径,如果该路径在该时段已有记录,在记录的保存次数在原有基础上加1,否则作为一条新纪录加入表格中。并设定第一预设阈值,作为后续选择历史下载保存路径的依据,例如设置为50%,表示某一条历史下载保存路径在某一预设时段内的历史保存次数与该时段内总历史保存次数的比值超过50%时,预测用户在该时段内选择该历史下载保存路径的机率较大,因此,以其为本次下载的默认保存路径,50%的具体数值可根据使用习惯进行调整。在完成上述准备工作后,则可以应用该记录的表格作为后续为待下载文件选择默认保存路径的依据,在接收到用户点击待下载文件而获得下载指令后,先获取当前时间,确定当前时间所属的预设时段,读取预先记录的表格中,在当前时段有对应保存记录的历史下载保存路径,读取全部有对应保存记录的历史下载保存路径的保存次数,计算其中保存次数最多的一条历史下载保存路径的保存次数占总保存次数的比值,如果比值大于50%,则选择该历史下载保存路径为默认下载保存路径,如果小于50%,则还可以增加其它判断依据以选择默认保存路径。Specifically, the present embodiment relies on principle (I) in a more detailed implementation method: first, multiple preset time periods are set, and a corresponding time feature description is set for each preset time period. Each time a user downloads a file, the time period corresponding to each time the user downloads the file and the final actual saving path are recorded in the form of a table. If the path has been recorded in the time period, the number of saved times in the record is increased by 1 on the original basis, otherwise it is added to the table as a new record. A first preset threshold is set as the basis for subsequent selection of the historical download saving path. For example, it is set to 50%, indicating that when the ratio of the number of historical save times of a certain historical download saving path in a certain preset time period to the total number of historical save times in the time period exceeds 50%, it is predicted that the user has a greater probability of selecting the historical download saving path in the time period. Therefore, it is used as the default saving path for this download. The specific value of 50% can be adjusted according to usage habits. After completing the above preparations, the recorded table can be used as the basis for selecting the default save path for the file to be downloaded. After receiving the download instruction when the user clicks on the file to be downloaded, first obtain the current time, determine the preset time period to which the current time belongs, read the historical download save path with corresponding save records in the pre-recorded table in the current time period, read the save times of all historical download save paths with corresponding save records, calculate the ratio of the save times of the historical download save path with the most save times to the total save times, if the ratio is greater than 50%, select the historical download save path as the default download save path, if it is less than 50%, other judgment criteria can be added to select the default save path.

可选地,如图2所示,在步骤S1之后,所述方法还包括:Optionally, as shown in FIG2 , after step S1, the method further includes:

S22、确定待下载文件的来源路径;S22, determining the source path of the file to be downloaded;

S23、获取可用下载保存路径与所述来源路径的名称近似度;S23, obtaining the name similarity between the available download saving path and the source path;

S24、根据所述名称近似度从可用下载保存路径中选择待下载文件的默认保存路径。S24: Select a default saving path for the file to be downloaded from available download saving paths according to the name similarity.

可选地,所述方法先执行步骤S22-S24,如果S24没有选择到待下载文件的默认保存路径,则执行步骤S12-S14。Optionally, the method first executes steps S22-S24, and if S24 does not select a default save path for the file to be downloaded, then executes steps S12-S14.

可选地,所述方法先执行步骤S12-S14,如果S14没有选择到待下载文件的默认保存路径,则执行步骤S22-S24。Optionally, the method first executes steps S12-S14, and if S14 does not select a default save path for the file to be downloaded, then executes steps S22-S24.

可选地,所述待下载文件为待下载网盘文件,所述来源路径为待下载网盘文件的网盘存储路径,所述可用下载保存路径为除预设黑名单之外的所有本地存储路径。Optionally, the file to be downloaded is a network disk file to be downloaded, the source path is a network disk storage path of the network disk file to be downloaded, and the available download save path is all local storage paths except a preset blacklist.

可选地,步骤S24具体包括:Optionally, step S24 specifically includes:

判断所述名称近似度最高的第一可用下载保存路径是否唯一;Determine whether the first available download saving path with the highest name similarity is unique;

如果是,则选择第一可用下载保存路径作为待下载文件的默认保存路径,以及,If yes, then select the first available download save path as the default save path for the file to be downloaded, and,

如果否,则从第一可用下载保存路径中选择第一历史保存次数最多的第二可用下载保存路径,以第二可用下载保存路径作为待下载文件的默认保存路径。If not, then a second available download saving path with the largest number of first history save times is selected from the first available download saving path, and the second available download saving path is used as a default saving path for the file to be downloaded.

具体而言,本实施例还可以依托的原理(二)实现更准确的用户期望保存路径预测,原理(二)为:Specifically, this embodiment can also rely on principle (ii) to achieve more accurate prediction of the user's desired saving path. Principle (ii) is:

用户对待下载文件的期望保存路径可能与待下载文件的来源有关。以用户待下载网盘文件为例,网盘的存储空间是树形结构的模式,这和电脑上的存储方式是近似的。如果在网盘上,待下载文件存在/work/file/work1下面,同时在电脑上也有../file/work1这个文件夹,那文件下载后保存在../file/work1下面的可能性就很大,可以把电脑上的../file/work1作为本次下载的候选默认下载路径。但是在电脑上,可能存在c/work/file/work1,也可能存在d/新建文件夹/file/work1,也可能没有file/work1,而是有一个d/新建文件夹/work1等情况。也就是说,本地存储路径和网盘上的有点像,但又不完全一样,这些情况就需要分别处理。优先找跟网盘上的路径相似度最大的,比如work/file/work1,如果没有,再找file/work1,要是还没有,就找work1。上述步骤中,可能路径相似度相同的结果不止一个,例如电脑同时存在c/test/work1,d/work/work1这两个文件夹,那应该选哪个,就需要作出判断。有些路径下默认是不放下载文件的,比如c/windows、C:\Program Files等等,可以把这些路径做成黑名单,系统将不再考虑这些路径。The user's expected save path for the downloaded file may be related to the source of the file to be downloaded. Take the network disk file to be downloaded by the user as an example. The storage space of the network disk is in a tree structure mode, which is similar to the storage method on the computer. If the file to be downloaded is stored under /work/file/work1 on the network disk, and there is also a folder ../file/work1 on the computer, then the possibility that the file will be saved under ../file/work1 after downloading is very high. You can use ../file/work1 on the computer as the candidate default download path for this download. However, on the computer, there may be c/work/file/work1, or there may be d/New Folder/file/work1, or there may be no file/work1, but there is a d/New Folder/work1, etc. In other words, the local storage path is a bit similar to that on the network disk, but not exactly the same, and these situations need to be handled separately. Give priority to finding the path with the greatest similarity to the network disk, such as work/file/work1. If not, then find file/work1. If not, then find work1. In the above steps, there may be more than one result with the same path similarity. For example, if there are two folders c/test/work1 and d/work/work1 on the computer, which one should be selected? You need to make a judgment. Some paths do not store downloaded files by default, such as c/windows, C:\Program Files, etc. These paths can be blacklisted and the system will no longer consider these paths.

依托于原理(二),本实施例的具体做法是:首先把常见系统目录加入黑名单,在接收到用户点击待下载文件的下载指令后,获得除黑名单以外的所有电脑上的存储路径,同时,获取待下载网盘文件在网盘上的存储路径,寻找与网盘存储路径最近似的本地存储路径,如果只有一条最近似的本地存储路径,则以这条路径作为默认保存路径,如果不止一条,则还需要结合其它依据进行选择,此时可以利用原理(一)获得的第一历史保存次数作为进一步判断的依据,原理(一)和原理(二)对应步骤的执行顺序并不受限制。例如,可以是先执行原理(一)对应的步骤S12-S14,然后在S14判断出第一历史保存次数最多的历史下载保存地址也没有达到第一预设阈值的前提下,执行步骤S22-S24,选择名称近似度最高的可用下载保存作为默认保存地址;也可以是先执行原理(二)对应的步骤S22-S24,然后再S24判断出名称近似度最高的可用下载保存地址不止一条的情况下,再执行步骤S12-S14选择第一历史保存次数最多且名称近似度最高的可用下载保存地址作为默认地址;还可以是,原理(一)和原理(二)交叉应用,如,先执行步骤S12-S14,如果没有选择到默认保存路径,再执行步骤S22-S24,如果还没有选择到默认保存路径,再根据步骤S12-S14选择第一历史保存次数最多的历史下载保存地址作为默认地址,而不再要求这条地址的第一历史保存次数占比达到第一预设阈值,等等。Based on principle (ii), the specific approach of this embodiment is: first, add common system directories to the blacklist, and after receiving the download instruction of the user clicking the file to be downloaded, obtain the storage paths on all computers except those on the blacklist, and at the same time, obtain the storage path of the network disk file to be downloaded on the network disk, and find the local storage path that is most similar to the network disk storage path. If there is only one most similar local storage path, this path is used as the default save path. If there is more than one, it is necessary to combine other criteria for selection. At this time, the first historical save count obtained by principle (i) can be used as the basis for further judgment. The execution order of the corresponding steps of principle (i) and principle (ii) is not restricted. For example, the steps S12-S14 corresponding to principle (I) may be executed first, and then, if S14 determines that the historical download save address with the largest number of first historical save times has not reached the first preset threshold, steps S22-S24 may be executed to select the available download save address with the highest name similarity as the default save address; or, the steps S22-S24 corresponding to principle (II) may be executed first, and then, if S24 determines that there is more than one available download save address with the highest name similarity, steps S12-S14 may be executed to select the available download save address with the largest number of first historical save times and the highest name similarity as the default address; or, the principles (I) and (II) may be applied crosswise, such as, first executing steps S12-S14, and if the default save path is not selected, then executing steps S22-S24, and if the default save path is not selected, then selecting the historical download save address with the largest number of first historical save times as the default address according to steps S12-S14, and no longer requiring the proportion of the first historical save times of this address to reach the first preset threshold, and so on.

可选地,如图2所示,在步骤S1之后,所述方法还包括:Optionally, as shown in FIG2 , after step S1, the method further includes:

S33、获取历史下载保存路径在全部时段的第二历史保存次数;S33, obtaining the second historical save count of the historical download save path in all time periods;

S34、根据第二历史保存次数从历史下载保存路径中选择待下载文件的默认保存路径。S34. Select a default saving path for the file to be downloaded from the historical download saving paths according to the second historical saving number.

可选地,先执行步骤S33-S34,如果S34没有选择到待下载文件的默认保存路径,则执行步骤S12-S14。Optionally, steps S33-S34 are performed first, and if S34 does not select a default save path for the file to be downloaded, steps S12-S14 are performed.

可选地,先执行步骤S12-S14,如果S14没有选择到待下载文件的默认保存路径,则执行步骤S33-S34。Optionally, steps S12-S14 are performed first, and if S14 does not select a default save path for the file to be downloaded, steps S33-S34 are performed.

具体而言,本实施例还可以依托的原理(三)实现更准确的用户期望保存路径预测,原理(三)为:针对某些用户会将下载文件保存在固定位置,比如桌面、或者download文件夹中,可以通过最近一段时间(如一个月、半年,该时间可设置)的保存次数,获取用户偏高的默认路径。基于原理(三)的实现步骤S33-S34可以理解为简化的步骤S12-S14,不再考虑时间特性,而仅以历史保存次数作为选择默认保存路径的依据。具体实现时,也可以是预先建立表格记录全部时段的全路历史下载保存路径、以及每一历史下载保存路径在全部时段的历史保存次数,该表格也可以不单独记录,而依托于原理(一)建立的表格,将不同时段同一历史下载保存路径的第一历史保存次数加和获得,在判断是否以全部时段的历史保存次数作为默认路径的选择依据时,也可以设置一个第二预设阈值,在全部历史保存次数最多的历史下载保存路径的占比大于第二预设阈值时,则选择该历史下载保存路径,否则可以结合原理(一)和(二)进一步判断。Specifically, the present embodiment can also rely on principle (iii) to achieve a more accurate prediction of the user's expected saving path. Principle (iii) is: for some users who will save the downloaded files in a fixed location, such as the desktop or the download folder, the default path that the user prefers can be obtained through the number of saves in the recent period (such as one month, half a year, and the time can be set). The implementation steps S33-S34 based on principle (iii) can be understood as simplified steps S12-S14, no longer considering the time characteristics, and only using the historical save times as the basis for selecting the default save path. In specific implementation, it is also possible to pre-establish a table to record the entire path of historical download saving paths for all time periods, and the historical save times of each historical download saving path in all time periods. The table may not be recorded separately, but relying on the table established by principle (i), the first historical save times of the same historical download saving path in different time periods are summed up to obtain. When judging whether to use the historical save times of all time periods as the basis for selecting the default path, a second preset threshold can also be set. When the proportion of the historical download saving path with the largest number of historical save times is greater than the second preset threshold, the historical download saving path is selected. Otherwise, it can be further judged in combination with principles (i) and (ii).

图2提供了本发明的多种可选方案流程,图3展示了一种具体的选定方案流程,本发明在图2中S1之后的步骤执行流程具体可以包括以下几种情况:FIG. 2 provides multiple optional solution processes of the present invention, and FIG. 3 shows a specific selected solution process. The execution process of the steps after S1 in FIG. 2 of the present invention may specifically include the following situations:

先执行步骤S12-S14,S14选择到待下载文件的默认保存路径,流程结束;First, execute steps S12-S14, S14 selects the default save path for the file to be downloaded, and the process ends;

先执行步骤S12-S14,S14没有选择到待下载文件的默认保存路径,则执行步骤S22-S24,S24选择到待下载文件的默认保存路径,流程结束;First, execute steps S12-S14. If the default saving path for the file to be downloaded is not selected in S14, then execute steps S22-S24. S24 selects the default saving path for the file to be downloaded, and the process ends.

先执行步骤S12-S14,S14没有选择到待下载文件的默认保存路径,则执行步骤S33-S34,S34选择到待下载文件的默认保存路径,流程结束;First, execute steps S12-S14. If S14 does not select the default save path for the file to be downloaded, then execute steps S33-S34. S34 selects the default save path for the file to be downloaded, and the process ends.

先执行步骤S12-S14,S14没有选择到待下载文件的默认保存路径,则执行步骤S22-S24,S24没有选择到待下载文件的默认保存路径,则执行步骤S33-S34,S34选择到待下载文件的默认保存路径,流程结束;First, execute steps S12-S14. If S14 does not select the default save path for the file to be downloaded, then execute steps S22-S24. If S24 does not select the default save path for the file to be downloaded, then execute steps S33-S34. S34 selects the default save path for the file to be downloaded, and the process ends.

先执行步骤S12-S14,S14没有选择到待下载文件的默认保存路径,则执行步骤S33-S34,S34没有选择到待下载文件的默认保存路径,则执行步骤S22-S24,S24选择到待下载文件的默认保存路径,流程结束;First, execute steps S12-S14. If S14 does not select the default save path for the file to be downloaded, then execute steps S33-S34. If S34 does not select the default save path for the file to be downloaded, then execute steps S22-S24. S24 selects the default save path for the file to be downloaded, and the process ends.

先执行步骤S22-S24,S24没有选择到待下载文件的默认保存路径,则执行步骤S12-S14,S14选择到待下载文件的默认保存路径,流程结束;First, execute steps S22-S24. If S24 does not select the default save path for the file to be downloaded, then execute steps S12-S14. S14 selects the default save path for the file to be downloaded, and the process ends.

先执行步骤S22-S24,S24没有选择到待下载文件的默认保存路径,则执行步骤S12-S14,S14没有选择到待下载文件的默认保存路径,则执行步骤S33-S34,S34选择到待下载文件的默认保存路径,流程结束;First, execute steps S22-S24. If S24 does not select the default save path for the file to be downloaded, then execute steps S12-S14. If S14 does not select the default save path for the file to be downloaded, then execute steps S33-S34. S34 selects the default save path for the file to be downloaded, and the process ends.

先执行步骤S22-S24,S24没有选择到待下载文件的默认保存路径,则执行步骤S33-S34,S34没有选择到待下载文件的默认保存路径,则执行步骤S12-S14,S14选择到待下载文件的默认保存路径,流程结束;First, execute steps S22-S24. If S24 does not select the default save path for the file to be downloaded, then execute steps S33-S34. If S34 does not select the default save path for the file to be downloaded, then execute steps S12-S14. S14 selects the default save path for the file to be downloaded, and the process ends.

先执行步骤S33-S34,S34没有选择到待下载文件的默认保存路径,则执行步骤S12-S14,S14选择到待下载文件的默认保存路径,流程结束;First, execute steps S33-S34. If the default save path for the file to be downloaded is not selected in S34, then execute steps S12-S14. S14 selects the default save path for the file to be downloaded, and the process ends.

先执行步骤S33-S34,S34没有选择到待下载文件的默认保存路径,则执行步骤S12-S14,S14没有选择到待下载文件的默认保存路径,则执行步骤S22-S24,S24选择到待下载文件的默认保存路径,流程结束;First, execute steps S33-S34. If S34 does not select the default save path for the file to be downloaded, then execute steps S12-S14. If S14 does not select the default save path for the file to be downloaded, then execute steps S22-S24. S24 selects the default save path for the file to be downloaded, and the process ends.

先执行步骤S33-S34,S34没有选择到待下载文件的默认保存路径,则执行步骤S22-S24,S24没有选择到待下载文件的默认保存路径,则执行步骤S12-S14,S14选择到待下载文件的默认保存路径,流程结束。First execute steps S33-S34. If S34 does not select the default save path for the files to be downloaded, then execute steps S22-S24. If S24 does not select the default save path for the files to be downloaded, then execute steps S12-S14. S14 selects the default save path for the files to be downloaded, and the process ends.

原理(一)、(二)、(三)各自对应的步骤之间执行的先后顺序不需要进行限制,可以按照任意顺序执行,也可以交叉执行,一个具体的示例如下:There is no need to limit the order in which the steps corresponding to principles (I), (II) and (III) are executed. They can be executed in any order or in an interleaved manner. A specific example is as follows:

(1)制作黑名单:把常见系统目录加入黑名单,如:C:\Program Files、C:\Windows、C:\Program Files(x86),并且黑名单可以有用户修改,这样,在选择默认路径的时候,就不考虑黑名单中的这些路径及其子路径了;(1) Create a blacklist: Add common system directories to the blacklist, such as C:\Program Files, C:\Windows, and C:\Program Files(x86). The blacklist can be modified by the user. In this way, when selecting the default path, these paths and their sub-paths in the blacklist are not considered;

(2)获取可用下载保存路径:获得电脑上除黑名单以外的所有存储路径作为可用下载保存路径;(2) Obtain available download saving paths: obtain all storage paths on the computer except those in the blacklist as available download saving paths;

(3)设定预设时段:设定两个预设时段“工作时间”和“非工作时间”,如“工作日早8:30到晚5:00”为工作时间,其余为非工作时间;(3) Set preset time periods: Set two preset time periods, "working time" and "non-working time", such as "8:30 am to 5:00 pm on weekdays" as working time and the rest as non-working time;

(4)记录历史下载保存路径和保存次数:可以分别建立如下所示的表1和表2,表1用于记录全部时段的历史下载路径和保存次数,表2用于记录分预设时段的历史下载路径和保存次数,并在每次下载时,对表1和表2进行更新,如果表中没有本次保存的新目录,则新增一行,如表1和表2中加粗所示:(4) Recording the historical download saving path and saving times: Table 1 and Table 2 as shown below can be established respectively. Table 1 is used to record the historical download path and saving times of all time periods, and Table 2 is used to record the historical download path and saving times of preset time periods. Table 1 and Table 2 are updated each time a download is made. If there is no new directory saved this time in the table, a new row is added, as shown in bold in Table 1 and Table 2:

表1全部时段的历史下载路径和保存次数Table 1 Historical download paths and save times for all periods

目录Table of contents 保存次数Number of saves 桌面desktop 1414 downloaddownload 1313 C:C: 55 C:\workC:\work 11

表2分预设时段的历史下载路径和保存次数Table 2 Historical download paths and save times for different preset time periods

目录Table of contents 保存次数Number of saves 下载时间Download time 桌面desktop 1010 工作时间operating hours 桌面desktop 44 非工作时间Non-working hours downloaddownload 1313 非工作时间Non-working hours C:C: 55 工作时间operating hours C:\workC:\work 11 工作时间operating hours

(5)基于上述三种判断下载路径的依据,在接收到用户发出的对待下载文件的下载指令时,通过不同的组合,确定默认下载路径是什么;(5) Based on the above three bases for determining the download path, when receiving a download instruction from a user to download a file, determine what the default download path is through different combinations;

(6)首先读取表1,如果其中保存次数最多的一条,超过总保存次数的50%,则将其定义为本次默认保存路径,本方案结束;如达不到50%,说明不符合方案依托的原理(三)的情况,则执行下一步;50%可根据使用习惯进行调整;(6) First, read Table 1. If the entry with the most save times exceeds 50% of the total save times, it is defined as the default save path for this time, and this plan ends. If it does not reach 50%, it means that the principle (III) on which the plan is based is not met, and the next step is executed. 50% can be adjusted according to usage habits.

(7)读取表2,如果当前时间为工作时间,且表中“工作时间”的下载记录中,保存次数最多的一条,超过“工作时间”总保存次数的50%,则将其定义为本次默认保存路径,本方案结束;类似的,如果当前时间为非工作时间,进行类似判断;如达不到50%,说明不符合方案依托的原理(一)的情况,则执行下一步;50%可根据使用习惯进行调整;(7) Read Table 2. If the current time is working time, and the one with the most number of saves in the download records of "working time" in the table exceeds 50% of the total number of saves in "working time", it is defined as the default save path for this time, and this solution ends. Similarly, if the current time is non-working time, a similar judgment is made. If it does not reach 50%, it means that the principle (I) on which the solution is based is not met, and the next step is executed. 50% can be adjusted according to usage habits.

(8)把方案依托的原理(二)作为主要的参考依据,把(一)和(三)作为次要参考依据,进行补充,例如:待下载的网盘文件在网盘上的存储路径为网盘/work/file/work1,先检查电脑上有没有work/file/work1,如果有一条,那就直接作为默认保存路径;如果有多条,比如同时有c/work/file/work1,d/work/file/work1,则读取表1,判断这两条路径的下载保存次数,选择多的一条作为默认路径;如果表1中次数相同,则读取表2,根据当前时间和下载保存次数,选择多的一条作为默认路径;如果还相同,则随机选一条;如果一条都没有,则再检查file/work1,也就是网盘路径去掉第一级,对结果的处理与上一步相同;如果还是没有这个相似程度的目录,则重复上一步,直到仅剩下一级目录,比如本例仅剩下work1,重复与前述相同的处理;如果还是无法选出,则根据当前时间,在表2中选下载保存次数最多的那一条作为默认路径。(8) Take principle (ii) on which the scheme is based as the main reference, and take (i) and (iii) as secondary references for supplementation. For example, the storage path of the network disk file to be downloaded on the network disk is network disk/work/file/work1. First check whether there is work/file/work1 on the computer. If there is one, then use it as the default save path. If there are multiple paths, such as c/work/file/work1 and d/work/file/work1, then read Table 1, determine the number of downloads and saves of these two paths, and select the one with the larger number as the default. Recognize the path; if the number of times in Table 1 is the same, read Table 2 and select the one with the largest number of downloads and saves as the default path according to the current time and the number of downloads and saves; if they are still the same, select one at random; if none of them are found, check file/work1 again, that is, the network disk path without the first level, and process the result in the same way as the previous step; if there is still no directory with this degree of similarity, repeat the previous step until only the next level of directory remains, such as only work1 in this example, and repeat the same process as above; if it still cannot be selected, select the one with the largest number of downloads and saves in Table 2 as the default path according to the current time.

本发明实施例1提供的一种下载保存路径选择方法,一方面提供依据下载文件的时间特性预测用户的期望下载保存路径,另一方面依据待下载文件的来源预测用户的期望下载保存路径,同时还可以结合用户使用过的历史下载保存路径的次数提高对用户的期望下载保存路径预测的准确率,满足用户对下载文件分类保存的需求,减少用户修改保存地址的机率,提高下载效率。A download saving path selection method provided in Example 1 of the present invention, on the one hand, provides a method for predicting a user's expected download saving path based on the time characteristics of the downloaded file, and on the other hand, predicts the user's expected download saving path based on the source of the file to be downloaded. At the same time, it can also improve the accuracy of predicting the user's expected download saving path based on the number of historical download saving paths used by the user, meet the user's demand for classified storage of downloaded files, reduce the probability of the user modifying the storage address, and improve download efficiency.

实施例2:Embodiment 2:

如图1-4所示,本发明实施例2提供一种下载保存路径选择装置,所述装置包括:As shown in FIG. 1-4, Embodiment 2 of the present invention provides a download and save path selection device, the device comprising:

接收模块1,用于执行步骤S1接收待下载文件的下载指令;Receiving module 1, used for executing step S1 to receive a download instruction of a file to be downloaded;

确定模块2,与所述接收模块1连接,用于执行步骤S12确定当前时间所属的第一预设时段;A determination module 2, connected to the receiving module 1, configured to execute step S12 to determine the first preset time period to which the current time belongs;

获取模块3,与所述确定模块2连接,用于执行步骤S13获取历史下载保存路径在第一预设时段的第一历史保存次数;An acquisition module 3, connected to the determination module 2, is used to execute step S13 to acquire a first history saving number of the history download saving path in a first preset time period;

选择模块4,与所述获取模块3连接,用于执行步骤S14根据第一历史保存次数从历史下载保存路径中选择待下载文件的默认保存路径。The selection module 4 is connected to the acquisition module 3 and is used to execute step S14 to select a default saving path for the file to be downloaded from the historical download saving paths according to the first historical saving times.

可选地,Optionally,

确定模块2,还用于执行步骤S22确定待下载文件的来源路径;The determination module 2 is further used to execute step S22 to determine the source path of the file to be downloaded;

获取模块3,还用于执行步骤S23获取可用下载保存路径与所述来源路径的名称近似度;The acquisition module 3 is further used to execute step S23 to obtain the name similarity between the available download saving path and the source path;

选择模块4,还用于执行步骤S24根据所述名称近似度从可用下载保存路径中选择待下载文件的默认保存路径。The selection module 4 is further configured to execute step S24 to select a default saving path for the file to be downloaded from the available download saving paths according to the name similarity.

可选地,Optionally,

确定模块2、获取模块3、选择模块4先用于执行步骤S22-S24,如果S24没有选择到待下载文件的默认保存路径,则执行步骤S12-S14。The determination module 2, the acquisition module 3 and the selection module 4 are first used to execute steps S22-S24. If S24 does not select the default saving path of the file to be downloaded, steps S12-S14 are executed.

可选地,Optionally,

确定模块2、获取模块3、选择模块4先用于执行步骤S12-S14,如果S14没有选择到待下载文件的默认保存路径,则执行步骤S22-S24。The determination module 2, the acquisition module 3 and the selection module 4 are first used to execute steps S12-S14. If S14 does not select the default saving path of the file to be downloaded, steps S22-S24 are executed.

可选地,Optionally,

获取模块3,还用于执行步骤S33获取历史下载保存路径在全部时段的第二历史保存次数;The acquisition module 3 is further used to execute step S33 to obtain the second history saving times of the history download saving path in all time periods;

选择模块4,还用于执行步骤S34根据第二历史保存次数从历史下载保存路径中选择待下载文件的默认保存路径。The selection module 4 is further used to execute step S34 to select a default saving path for the file to be downloaded from the historical download saving paths according to the second historical saving times.

可选地,Optionally,

获取模块3、选择模块4先用于执行步骤S33-S34,如果S34没有选择到待下载文件的默认保存路径,则执行步骤S12-S14。The acquisition module 3 and the selection module 4 are first used to execute steps S33-S34. If S34 does not select the default saving path of the file to be downloaded, steps S12-S14 are executed.

可选地,Optionally,

获取模块3、选择模块4先用于执行步骤S12-S14,如果S14没有选择到待下载文件的默认保存路径,则执行步骤S33-S34。The acquisition module 3 and the selection module 4 are first used to execute steps S12-S14. If S14 does not select the default saving path of the file to be downloaded, steps S33-S34 are executed.

可选地,所述装置还包括:Optionally, the device further comprises:

预设模块,用于设定多个预设时段;A preset module, used to set multiple preset time periods;

记录模块,与所述预设模块连接,用于建立表格,记录历史下载保存路径、每次使用历史下载保存路径对应的预设时段、以及在每个预设时段内每一历史下载保存路径的历史保存次数。The recording module is connected to the preset module and is used to establish a table to record the historical download saving path, the preset time period corresponding to each use of the historical download saving path, and the number of historical saves of each historical download saving path in each preset time period.

可选地,选择模块4具体包括:Optionally, the selection module 4 specifically includes:

判断单元,用于判断第一历史保存次数最多的第一历史下载保存路径的使用率是否大于第一预设阈值;A determination unit, configured to determine whether a usage rate of a first history download saving path having the largest number of first history saving times is greater than a first preset threshold;

选择单元,与所述判断单元连接,如果是,则选择第一历史下载保存路径作为待下载文件的默认保存路径。The selection unit is connected to the judgment unit, and if yes, selects the first historical download saving path as the default saving path for the file to be downloaded.

可选地,所述待下载文件为待下载网盘文件,所述来源路径为待下载网盘文件的网盘存储路径,所述可用下载保存路径为除预设黑名单之外的所有本地存储路径。Optionally, the file to be downloaded is a network disk file to be downloaded, the source path is a network disk storage path of the network disk file to be downloaded, and the available download save path is all local storage paths except a preset blacklist.

可选地,Optionally,

判断单元,还用于判断所述名称近似度最高的第一可用下载保存路径是否唯一;The judging unit is further used to judge whether the first available download saving path with the highest name similarity is unique;

选择单元,还用于如果是,则选择第一可用下载保存路径作为待下载文件的默认保存路径,以及,The selection unit is further configured to select the first available download saving path as the default saving path for the file to be downloaded if yes, and,

如果否,则从第一可用下载保存路径中选择第一历史保存次数最多的第二可用下载保存路径,以第二可用下载保存路径作为待下载文件的默认保存路径。If not, then a second available download saving path with the largest number of first history save times is selected from the first available download saving path, and the second available download saving path is used as a default saving path for the file to be downloaded.

本发明实施例2提供一种下载保存路径选择装置,通过预测用户当前对待下载文件的期望保存路径,为用户提供待下载文件的默认保存路径,满足用户对下载文件分类保存的需求,减少用户修改保存地址的机率,提高下载效率;实施例2是与实施例1的方法对应的装置,二者可以相互结合理解。Embodiment 2 of the present invention provides a download save path selection device, which provides the user with a default save path for the files to be downloaded by predicting the user's current expected save path for the downloaded files, thereby meeting the user's demand for classified save of downloaded files, reducing the probability of the user modifying the save address, and improving download efficiency; Embodiment 2 is a device corresponding to the method of Embodiment 1, and the two can be understood in combination with each other.

实施例3:Embodiment 3:

本发明实施例3提供一种计算机可读存储介质,其上存储有计算机程序,当所述计算机程序被处理器运行时,实现如实施例1所述的下载保存路径选择方法。Embodiment 3 of the present invention provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the download and save path selection method described in Embodiment 1 is implemented.

所述计算机可读存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、计算机程序模块或其他数据)的任何方法或技术中实施的易失性或非易失性、可移除或不可移除的介质。计算机可读存储介质包括但不限于RAM(Random Access Memory,随机存取存储器),ROM(Read-Only Memory,只读存储器),EEPROM(Electrically ErasableProgrammable read only memory,带电可擦可编程只读存储器)、闪存或其他存储器技术、CD-ROM(Compact Disc Read-Only Memory,光盘只读存储器),数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。The computer-readable storage medium includes volatile or non-volatile, removable or non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, computer program modules or other data). Computer-readable storage media include, but are not limited to, RAM (Random Access Memory), ROM (Read-Only Memory), EEPROM (Electrically Erasable Programmable read only memory), flash memory or other memory technology, CD-ROM (Compact Disc Read-Only Memory), digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer.

本发明实施例3提供一种计算机可读存储介质,其中存储的计算程序可运行于各类电子设备,包括但不限于手机、iPad、PC等,用于实现为用户当前的待下载文件提供默认存储路径,满足用户对下载文件分类保存的需求,减少用户修改保存地址的机率,提高下载效率。Embodiment 3 of the present invention provides a computer-readable storage medium, in which the computing program stored can be run on various electronic devices, including but not limited to mobile phones, iPads, PCs, etc., for providing a default storage path for the user's current files to be downloaded, meeting the user's needs for classified storage of downloaded files, reducing the probability of users modifying the saved address, and improving download efficiency.

另外,本发明还可以提供一种电子设备,包括存储器和处理器,所述存储器中存储有计算机程序,当所述处理器运行所述存储器存储的计算机程序时,所述处理器执行如实施例1所述的下载保存路径选择方法。In addition, the present invention may also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the processor runs the computer program stored in the memory, the processor executes the download and save path selection method as described in Example 1.

其中,存储器与处理器连接,存储器可采用闪存或只读存储器或其他存储器,处理器可采用中央处理器或单片机。The memory is connected to the processor, the memory may be a flash memory or a read-only memory or other memory, and the processor may be a central processing unit or a single-chip microcomputer.

本发明实施例1-3提供一种下载保存路径选择方法、装置及计算机可读存储介质,通过用户以往在不同时段下载文件的保存路径,预测用户当前对待下载文件的期望保存路径,以此获得待下载文件的默认保存路径,满足用户对下载文件分类保存的需求,减少用户修改保存地址的机率,提高下载效率。Embodiments 1-3 of the present invention provide a download save path selection method, device and computer-readable storage medium, which predict the user's current expected save path for the downloaded files through the save paths of the files downloaded by the user in different time periods in the past, thereby obtaining the default save path for the files to be downloaded, meeting the user's demand for classified save of downloaded files, reducing the probability of the user modifying the save address, and improving download efficiency.

可以理解的是,以上实施方式仅仅是为了说明本发明的原理而采用的示例性实施方式,然而本发明并不局限于此。对于本领域内的普通技术人员而言,在不脱离本发明的精神和实质的情况下,可以做出各种变型和改进,这些变型和改进也视为本发明的保护范围。It is to be understood that the above embodiments are merely exemplary embodiments used to illustrate the principles of the present invention, but the present invention is not limited thereto. For those skilled in the art, various modifications and improvements can be made without departing from the spirit and essence of the present invention, and these modifications and improvements are also considered to be within the scope of protection of the present invention.

Claims (9)

1. A download save path selection method, the method comprising:
s1, receiving a downloading instruction of a file to be downloaded;
s12, determining a first preset period to which the current time belongs;
s13, acquiring first history storage times of a history downloading storage path in a first preset period;
s14, selecting a default saving path of the file to be downloaded from the history downloading saving paths according to the first history saving times;
prior to step S1, the method further comprises:
setting a plurality of preset time periods;
establishing a table, and recording a history download storage path, a preset period corresponding to each use of the history download storage path and the history storage times of each history download storage path in each preset period;
the step S14 specifically includes:
judging whether the utilization rate of a first history download save path with the largest first history save times is larger than a first preset threshold value;
if so, selecting the first historical download save path as a default save path for the file to be downloaded.
2. The method according to claim 1, characterized in that after step S1, the method further comprises:
s22, determining a source path of a file to be downloaded;
s23, acquiring the name approximation degree of the available download storage path and the source path;
s24, selecting a default saving path of the file to be downloaded from the available downloading saving paths according to the name similarity.
3. The method according to claim 2, characterized in that it comprises:
step S22-S24 is executed first, if the default saving path of the file to be downloaded is not selected in the step S24, step S12-S14 is executed; or,
steps S12-S14 are performed first, and if step S14 does not select the default save path to the file to be downloaded, steps S22-S24 are performed.
4. A method according to any one of claims 1-3, characterized in that after step S1, the method further comprises:
s33, acquiring second historical preservation times of the historical download preservation path in all time periods;
s34, selecting a default saving path of the file to be downloaded from the historical downloading saving paths according to the second historical saving times.
5. The method according to claim 4, characterized in that it comprises:
step S33-S34 is executed first, if the default saving path of the file to be downloaded is not selected in the step S34, step S12-S14 is executed; or,
steps S12-S14 are performed first, and if step S14 does not select the default save path to the file to be downloaded, steps S33-S34 are performed.
6. A method according to any of claims 2-3, wherein the file to be downloaded is a network disk file to be downloaded, the source path is a network disk storage path of the network disk file to be downloaded, and the available download save paths are all local storage paths except a preset blacklist.
7. A method according to any one of claims 2-3, characterized in that step S24 comprises in particular:
judging whether the first available download save path with the highest name similarity is unique or not;
if so, the first available download save path is selected as the default save path for the file to be downloaded, and,
if not, selecting a second available download save path with the largest first historical save times from the first available download save paths, and taking the second available download save path as a default save path of the file to be downloaded.
8. A download save path selection apparatus, the apparatus comprising:
the receiving module is used for receiving a downloading instruction of the file to be downloaded;
the determining module is connected with the receiving module and is used for determining a first preset period to which the current time belongs;
the acquisition module is connected with the determination module and is used for acquiring the first history storage times of the history downloading storage path in a first preset period;
the selection module is connected with the acquisition module and is used for selecting a default saving path of the file to be downloaded from the history downloading saving paths according to the first history saving times;
the preset module is used for setting a plurality of preset time periods;
the recording module is connected with the preset module and used for establishing a table, recording a history download storage path, preset time periods corresponding to each use of the history download storage path and history storage times of each history download storage path in each preset time period;
the selection module specifically comprises:
the judging unit is used for judging whether the utilization rate of the first history download save path with the largest first history save times is larger than a first preset threshold value;
and the selection unit is connected with the judgment unit, and if the judgment result of the judgment unit is yes, the first historical download saving path is selected as a default saving path of the file to be downloaded.
9. A computer readable storage medium, having stored thereon a computer program which, when executed by a processor, implements a download preservation path selection method as claimed in any one of claims 1-7.
CN202310182121.1A 2023-02-20 2023-02-20 Download and save path selection method, device and medium Active CN116055464B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310182121.1A CN116055464B (en) 2023-02-20 2023-02-20 Download and save path selection method, device and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310182121.1A CN116055464B (en) 2023-02-20 2023-02-20 Download and save path selection method, device and medium

Publications (2)

Publication Number Publication Date
CN116055464A CN116055464A (en) 2023-05-02
CN116055464B true CN116055464B (en) 2024-04-05

Family

ID=86123878

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310182121.1A Active CN116055464B (en) 2023-02-20 2023-02-20 Download and save path selection method, device and medium

Country Status (1)

Country Link
CN (1) CN116055464B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101226534A (en) * 2007-12-29 2008-07-23 深圳华为通信技术有限公司 Method, terminal and system for searching relevant document
CN102289475A (en) * 2011-07-29 2011-12-21 宇龙计算机通信科技(深圳)有限公司 Terminal and method for storing file
US8286085B1 (en) * 2009-10-04 2012-10-09 Jason Adam Denise Attachment suggestion technology
CN110019018A (en) * 2017-09-22 2019-07-16 三星Sds株式会社 File recommended method and file recommendation apparatus
CN110324416A (en) * 2019-06-28 2019-10-11 百度在线网络技术(北京)有限公司 Download path tracking, device, server, terminal and medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7899831B2 (en) * 2008-03-25 2011-03-01 International Business Machines Corporation Method and system for folder recommendation in a file operation
US20200142973A1 (en) * 2018-11-05 2020-05-07 International Business Machines Corporation Recommending a target location when relocating a file
US11093447B2 (en) * 2018-11-30 2021-08-17 International Business Machines Corporation Suggesting a destination folder for a file to be saved

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101226534A (en) * 2007-12-29 2008-07-23 深圳华为通信技术有限公司 Method, terminal and system for searching relevant document
US8286085B1 (en) * 2009-10-04 2012-10-09 Jason Adam Denise Attachment suggestion technology
CN102289475A (en) * 2011-07-29 2011-12-21 宇龙计算机通信科技(深圳)有限公司 Terminal and method for storing file
CN110019018A (en) * 2017-09-22 2019-07-16 三星Sds株式会社 File recommended method and file recommendation apparatus
CN110324416A (en) * 2019-06-28 2019-10-11 百度在线网络技术(北京)有限公司 Download path tracking, device, server, terminal and medium

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
A mail based recommender system;G. Kaushik Ram等;《2017 IEEE International Conference on Smart Technologies and Management for Computing, Communication, Controls, Energy and Materials (ICSTM)》;20171030;全文 *
FolderPredictor: Reducing the cost of reaching the right folder;Xinlong Bao等;《 ACM Transactions on Intelligent Systems and Technology》;20110124;全文 *
MailCat: an intelligent assistant for organizing e-mail;Segal, R.B等;《Proceedings of the Third International Conference on Autonomous Agents》;19990101;全文 *
一种基于RFID技术的路径推荐算法;金春华;;物流技术;20131015(第19期);全文 *

Also Published As

Publication number Publication date
CN116055464A (en) 2023-05-02

Similar Documents

Publication Publication Date Title
CN106407207B (en) Real-time newly-added data updating method and device
CN109033360B (en) Data query method, device, server and storage medium
CN109669709B (en) Data migration method and data migration system for block chain upgrading
JP2002229825A (en) Computer memory
EP3432157A1 (en) Data table joining mode processing method and apparatus
CN105468642A (en) Data storage method and apparatus
WO2018214905A1 (en) Data storage method, apparatus, medium and device
WO2018006721A1 (en) Method and apparatus for storing log file
US12105696B2 (en) Dynamic index management for computing storage resources
CN109240607B (en) File reading method and device
CN110287152B (en) Data management method and related device
CN108399175A (en) A kind of storage of data, querying method and its device
CN110990366A (en) Index allocation method and device for improving performance of log system based on ES
CN112840334A (en) Method, device, management node, and storage medium for managing data in partition table
CN112612865A (en) Document storage method and device based on elastic search
CN116055464B (en) Download and save path selection method, device and medium
CN110955639A (en) Data processing method and device
CN110688065A (en) Storage space management method, system, electronic equipment and storage medium
CN112241396B (en) Spark-based method and system for merging small files of Delta
CN110554922A (en) System resource allocation method and device
CN112100143B (en) File compression storage method, device, equipment and storage medium
CN114020193A (en) Cross-page checking determination method and device, electronic equipment and storage medium
CN113010514A (en) Hot loading method and device
CN116893981A (en) Memory operation method and device, storage medium and electronic device
US11733899B2 (en) Information handling system storage application volume placement tool

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