WO2022161273A1 - File saving method and apparatus, device, and storage medium - Google Patents

File saving method and apparatus, device, and storage medium Download PDF

Info

Publication number
WO2022161273A1
WO2022161273A1 PCT/CN2022/073176 CN2022073176W WO2022161273A1 WO 2022161273 A1 WO2022161273 A1 WO 2022161273A1 CN 2022073176 W CN2022073176 W CN 2022073176W WO 2022161273 A1 WO2022161273 A1 WO 2022161273A1
Authority
WO
WIPO (PCT)
Prior art keywords
folder
file
name
target
saving
Prior art date
Application number
PCT/CN2022/073176
Other languages
French (fr)
Chinese (zh)
Inventor
王博文
Original Assignee
维沃移动通信有限公司
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 维沃移动通信有限公司 filed Critical 维沃移动通信有限公司
Publication of WO2022161273A1 publication Critical patent/WO2022161273A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • G06F16/164File meta data generation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/14Details of searching files based on file metadata
    • G06F16/148File search processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/172Caching, prefetching or hoarding of files

Definitions

  • the present application belongs to the field of communication technologies, and in particular relates to a file storage method, device, device and storage medium.
  • the purpose of the embodiments of the present application is to provide a file saving method, device, equipment and storage medium, which can solve the tedious process of manually creating a folder and manually naming the folder before classifying and saving the file in the related art. question.
  • an embodiment of the present application provides a method for saving a file, the method comprising:
  • the name of the target folder is associated with the name of the first file.
  • an embodiment of the present application provides a file storage device, the device comprising:
  • a receiving module configured to receive the first input of the user to the first file
  • the creation module is configured to, in response to the first input, create a target folder in the first folder under the condition that the first folder corresponding to the default download path satisfies the preset condition;
  • a saving module for saving the first file to the target folder
  • the name of the target folder is associated with the name of the first file.
  • an embodiment of the present application provides an electronic device, the electronic device includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor.
  • the program or instruction is executed by the processor, the The steps of the method of the first aspect.
  • an embodiment of the present application provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or instruction is executed by a processor, the steps of the method of the first aspect are implemented.
  • an embodiment of the present application provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run programs or instructions to implement the method of the first aspect.
  • an embodiment of the present application provides a computer program product, the program product is stored in a storage medium, and the program product is executed by at least one processor to implement the file saving method of the first aspect.
  • an embodiment of the present application provides a terminal, including the terminal being configured to execute the file saving method of the first aspect.
  • the first input of the user for the first file is received; in the case that the first folder corresponding to the default download path satisfies the preset condition, in response to the first input, a target is created in the first folder folder; save the first file to the target folder; wherein, the name of the target folder is associated with the name of the first file.
  • the user does not need to manually create a folder, and the electronic device can automatically name the target folder according to the file name of the first file, and does not need to manually name the folder.
  • the tedious operation process of manually creating folders and manually naming folders improves the user experience.
  • FIG. 1 is a schematic flowchart of a file preservation method provided by an embodiment of the present application.
  • FIG. 2 is one of schematic interface diagrams of an electronic device provided by an embodiment of the present application.
  • FIG. 3 is a second schematic diagram of an interface of an electronic device provided by an embodiment of the present application.
  • FIG. 4 is a third schematic diagram of an interface of an electronic device provided by an embodiment of the present application.
  • FIG. 5 is a schematic flowchart of a method for creating a target folder provided by an embodiment of the present application
  • FIG. 6 is a schematic flowchart of determining that the first folder satisfies a preset condition provided by an embodiment of the present application
  • FIG. 7 is another schematic flowchart of determining that the first folder satisfies a preset condition provided by an embodiment of the present application.
  • FIG. 8 is a fourth schematic diagram of an interface of an electronic device provided by an embodiment of the present application.
  • FIG. 9 is a schematic structural diagram of a file storage device provided by an embodiment of the present application.
  • FIG. 10 is a schematic diagram of a hardware structure of an electronic device provided by an embodiment of the present application.
  • FIG. 11 is a schematic diagram of a hardware structure of another electronic device provided by an embodiment of the present application.
  • first, second, etc. in the description and claims of the present application are used to distinguish similar elements, and are not used to describe a specific order or sequence. It is to be understood that the data so used are interchangeable under appropriate circumstances so that the embodiments of the present application can be practiced in sequences other than those illustrated or described herein, and distinguish between “first”, “second”, etc.
  • the elements are usually of one type, and the number of elements is not limited.
  • the first element may be one or more than one.
  • “and/or” means at least one of the linked elements, and the character “/” generally means that the contextual elements are in an "or” relationship.
  • the file saving method provided by the embodiment of the present application can be applied to at least the following scenarios, which will be described in detail below.
  • a user before saving a file, a user needs to manually create folders of different categories and manually name the folders. For example, a user needs to download multiple episodes of TV series A and multiple episodes of TV series B. In order to avoid confusion between the two TV series in the same folder, the user can create a folder A in the storage location of the electronic device, name the folder A, and create a folder A. Folder B, and name it B.
  • the user can first download the multi-episode TV series A and the multi-episode TV series B to the folder C corresponding to the default path of the system, and then the user moves the multi-episode TV series A from the folder C to the folder A, and then the user downloads the multi-episode TV series A from the folder C to the folder A.
  • TV series B is moved from folder C to folder B.
  • the embodiments of the present application provide a file saving method.
  • a first input from a user to the first file is received; in the case that the first folder corresponding to the default download path satisfies the preset condition, in response to the first input, a target folder is created in the first folder; The first file is saved in the target folder; wherein, the name of the target folder is associated with the name of the first file.
  • the user does not need to manually create a folder, and the electronic device can automatically name the target folder according to the name of the first file, without requiring the user to manually name the folder, avoiding the need for manual naming of the folder.
  • the tedious operation process when manually creating a folder and manually naming a folder improves the user experience.
  • FIG. 1 is a schematic flowchart of a file saving method 100 provided by an embodiment of the present application.
  • the file saving method 100 provided by this embodiment of the present application may include: S101-S103.
  • S101 Receive a first input from a user to a first file.
  • the first input is the user's input to the first file, which can indicate that the first file needs to be saved.
  • the first input may be the user's click input on the download control corresponding to the TV series "AAA. Episode 1" in the browser webpage.
  • the first input may also be that the user drags the document "000001.txt" from the folder "Training Materials” to the folder "Qualification Examination”.
  • At least one file is included in the first file.
  • the default download path may be the path where the file is saved by default in the system, or may be a path preset by the user.
  • the user may need to classify the saved file, or may not need to classify the saved file.
  • the electronic device can determine the user's intention according to the first folder corresponding to the default download path.
  • the electronic device determines that the first file needs to be classified and saved, so as to create a target folder in the first folder.
  • the electronic device may determine that the files in the first folder are all classified and saved according to the categories of the subfolders. Therefore, when When the first folder includes subfolders and the name of each subfolder is not related to the name of the first file, the electronic device may determine that the folder needs to be recreated to save the first file.
  • the electronic device may determine that the first file needs to be classified and saved, and the electronic device needs to renew the file. Create a folder to hold the first file.
  • the name of the created target folder is related to the name of the first file, for example, the name of the target folder is the same as the name of the first file, or the name of the target folder may be the name of the first file some of the keywords in .
  • keywords contained in the file name of the first file may be identified. For example, after receiving the user's download operation for the TV series "AAA.Episode 1", by identifying the file name corresponding to the TV series “AAA.Episode 1", “AAA” in “AAA.Episode 1” is used as the key word.
  • the first file may include multiple files.
  • the electronic device can identify the file name of each file, so as to obtain the keywords in the file name of each file.
  • the same keyword may exist in multiple files, or each keyword may be different. For example, if the multiple files (two files) are the TV series "AAA.Episode 1" and “AAA.Episode 2", the key word of "AAA.Episode 1" is recognized as “AAA”, and "AAA. Episode 1" is recognized as "AAA”. AAA.
  • the second episode” has the same keyword as "AAA”.
  • the multiple files are the TV series “AAA.Episode 1", the TV series “BBB.Episode 1", and the TV series “CCC.Episode 4"
  • the identified "AAA.Episode 1” ” is “AAA”
  • the recognized keyword of “BBB. Episode 1” is “BBB”
  • the recognized keyword of “CCC. Episode 4” is “CCC”, that is, the three files of Each keyword is different.
  • the first input is the input of the user clicking the download controls of the TV series "AAA. Episode 1" and the TV series “AAA. Episode 2", and the default download path is "Internal Storage/Videos" ", the first folder corresponding to the default download path is "Movies”.
  • the subfolder "Titanic” and the subfolder “Underwater World” are included in the first folder “Movies", since the subfolder names "Titanic" and "Underwater World” are both the same as the identified No.
  • the first keyword "AAA" corresponding to a file is different.
  • a target folder named "AAA” is created in the first folder, and the TV series “AAA.Episode 1" and the TV series “AAA.Episode 2" are created in the first folder. " is saved in the destination folder "AAA”.
  • the electronic device in order to be able to classify and save the first file, when the first file includes M files, the electronic device can identify M keywords, as shown in FIG. 5 , and may also specifically include the following S501 and S502.
  • S501 Perform deduplication processing on the M keywords to obtain N different first keywords.
  • the electronic device After the electronic device recognizes the M keywords, it needs to perform deduplication processing on the M keywords, so as to obtain N different first keywords.
  • the M files (3 files) are respectively: “AAA.Episode 1", “AAA.Episode 2", and “CCC.Episode 1”
  • the keywords are "AAA”, " AAA” and "CCC”
  • two first keywords can be obtained, namely "AAA” and "CCC”.
  • S502 Create N target folders in the first folder by using each of the first keywords in the N different first keywords as the folder name respectively.
  • each first keyword is used as the name of the folder, and N target folders are created in the first folder.
  • the first keywords are "AAA” and "CCC" respectively, then two folders are created in the first folder: the folder “AAA” and the folder “CCC”.
  • the M files are the TV series “AAA.Episode 1", the TV series “AAA.Episode 2", the TV series “BBB.Episode 1", and the TV series “CCC.Episode 4", that is, M is equal to 4.
  • the file names of the four files recognized by the electronic device are "AAA. Episode 1", “AAA. Episode 2", “BBB. Episode 1” and “CCC. Episode 4", that is, four files can be obtained.
  • the keywords are "AAA”, “AAA” and “BBB”, “CCC”, respectively. After the four keywords are deduplicated, three first keywords can be obtained, namely "AAA", "BBB” and "CCC".
  • the first folder “Movies” includes the subfolder “Titanic” and the subfolder “Underwater World”, they are all related to the three first keywords "AAA”, “BBB” and “CCC” after deduplication. They are not the same. Therefore, a target folder named “AAA”, a target file named “BBB”, and a target folder named "CCC” are created in the first folder.
  • the electronic device can obtain keywords by recognizing the file names, and perform deduplication processing on the keywords, so as to obtain N first keywords, and then create N target files named after the first keywords
  • the N target folders with different names can classify and save multiple files, which is convenient for users to find files of different categories and improves the user experience.
  • S103 Save the first file into a target folder, where the name of the target folder is associated with the name of the first file.
  • the electronic device saves the first file in the target folder.
  • the first file includes multiple files
  • the first file is saved according to the keyword corresponding to the first file and the name of the target folder.
  • the first file includes the drama "AAA.Episode 1", the drama “AAA.Episode 2", the drama “BBB.Episode 5", the drama "BBB.Episode 6", and the target folder includes the folder "AAA.
  • the electronic device saves the TV series "AAA.Episode 1", the TV series “AAA.Episode 2" in the folder "AAA”, and the TV series "BBB.Episode 5" and TV series " BBB. Episode 6" is saved in the folder "BBB”.
  • S103 may further specifically include the following steps: for each file, according to the keyword corresponding to the file name , name the target folder with the keyword, and save the file to the corresponding target folder.
  • the plurality of files are the TV series "AAA.Episode 1", the TV series “AAA.Episode 2", the TV series “BBB.Episode 1", and the TV series “CCC.Episode 4", respectively.
  • the target folders are: folder AAA, folder BBB, and folder CCC.
  • the electronic device will save the TV series "AAA. Episode 1” and the TV series "AAA. Episode 2" to the folder AAA; .The first episode” is saved in the folder BBB; the TV series “CCC.The fourth episode” is saved in the folder CCC. Therefore, the electronic device can classify and save the files according to the name of the folder and the keywords in the file name of each file, which facilitates the user to find the file in the future and improves the user experience.
  • the user in the process of classifying and saving the first file, the user does not need to manually create a folder, and the electronic device can automatically name the target folder according to the file name of the first file, let alone manually Folder naming avoids the tedious operation process of manually creating folders and manually naming folders, and improves user experience.
  • the electronic device in order to identify whether the user wants to classify the file when saving the file, avoid the confusion of files in the first folder corresponding to the default download path, and make the saved file easier to find, the electronic device also needs to detect the first folder. Whether the preset conditions are met.
  • the preset conditions may include: the first folder includes subfolders and the name of the first file is not related to the name of the subfolder; or, the first folder is an empty folder and the name of the first file is related to the name of the first folder name is not relevant. The following describes in detail whether the electronic device detects whether the first folder satisfies the preset condition.
  • the following S601-S603 may also be included.
  • the keyword here can be the same as the folder name, or it can be partially the same.
  • the keyword of the first file is "AAA”
  • the subfolder name is "AAA”, "AAA. Episode 1”
  • the electronic device detects that the first folder includes subfolders, it can be determined that the user needs to classify and save the first file. Since the first folder includes subfolders, in order to avoid creating folders duplicated with the subfolders, the electronic device also detects whether the keyword in the name of the first file is the same as the name of the subfolder. For example, if the first file is "AAA.
  • Episode 1 that is, the keyword in the name of the first file is "AAA”
  • the electronic device detects that the keyword "AAA” in the name of the first file is the same as the name of the subfolder "AAA”, and determines that the preset condition is not met, and the target folder will not be created. If a subfolder named "AAA” is included, the electronic device detects that the keyword "AAA” in the first file name is not the same as the subfolder, determines that the preset condition is met, and creates a target folder.
  • the electronic device only creates a target folder named after the keyword when it detects that the keyword of the name of the first file is not the same as the name of the subfolder, so as to classify the first file Save it in the target folder to avoid confusion and duplication of files in the first folder corresponding to the default download path, making the saved files easier to find and improving the user experience.
  • the first folder is an empty folder and the name of the first file is not related to the name of the first folder.
  • the following S701-S703 may also be included.
  • S702 In the case where it is detected that the first folder is an empty folder, it is detected whether the keyword of the name of the first file is the same as the name of the first folder.
  • the keyword here may be the same as the folder name, or may be partially the same. For example, if the keyword of the first file is "AAA”, if the name of the first folder is “AAA” ", "AAA. The first episode”, they are considered the same.
  • an empty folder means that there are no documents, subfolders, etc. in the first folder.
  • the electronic device detects that the first folder is an empty folder, and the keyword is not the same as the name of the first folder, in order to ensure the cleanliness of the files in the first folder, the electronic device creates an empty folder in the first folder.
  • the target folder named after this keyword.
  • the name of the first folder is "Movies", and the first folder does not include any documents and subfolders.
  • the electronic device recognizes that the keyword of the first file name is "AAA”, since "Video” is different from “AAA”, a target folder named "AAA" is created in the first folder.
  • the electronic device when detecting that the keyword of the first file name is not the same as the name of the first folder, creates a target folder named after the keyword, so as to classify and save the first file In the target folder, the confusion of files in the first folder corresponding to the default download path is avoided, so that the saved files are easier to find, and the user experience is improved.
  • the first folder is an empty folder and the keyword of the name of the first file is the same as the name of the first folder, the first file is directly saved in the first folder.
  • the name of the first folder corresponding to the default download path is "AAA”
  • the first folder does not include any documents and subfolders.
  • the user may need to save a series of files of the same type, for example, to save multiple movies in a series.
  • a second input of the second file in the series of files is received again.
  • the electronic device will identify whether the file name of the second file is associated with the name of the target folder where the first file is saved. For example, the file name of the second file and the name of the target folder where the first file is saved have the same keyword, Then it is determined that the name of the second file is associated with the name of the target folder where the first file is located. In the case where the file name of the second file is associated with the name of the target folder in which the first file is saved, the second file is directly saved in the target folder.
  • the first file is “AAA.Episode 1" and the second file is “AAA.Episode 2".
  • the destination folder name for saving "AAA.Episode 1" is "AAA.Episode 1".
  • the name of the target folder "AAA.First episode” and the second file “AAA.Second episode” include the same keyword “AAA”, therefore, the electronic device saves the second file "AAA.Second episode” In the destination folder "AAA.Episode 1".
  • the electronic device may also update the name of the target folder according to the files saved in the target folder.
  • the name of the target folder will be updated according to the repeated keywords in the file name of the second file and the file name of the first file.
  • the first file is "AAA.Episode 1
  • the second file is "AAA.Episode 2"
  • the destination folder name for saving "AAA.Episode 1" is "AAA.Episode 1”.
  • the electronic device since the name of the target folder "AAA.Episode 1" and the second file "AAA.Episode 2" include the same keyword "AAA", the electronic device will update the name of the target folder to "AAA".
  • the electronic device continuously updates the name of the folder according to the files stored in the target folder, so that the name of the target folder is more associated with the file name in it, which improves the convenience for users to find files.
  • Determine whether the user needs to classify and save the first file first, display a prompt message, the prompt message is only whether the user creates a target folder. Secondly, a third input from the user is received, where the third input is used to instruct the user to confirm the creation of the folder, so that the electronic device can determine that the user needs to classify and save the first file.
  • the prompt information may be "whether to create a folder", or may be a prompt to the user whether to create a folder A, a folder B, and the like.
  • the prompt information can be "folder A, folder B, folder C”.
  • the prompt information can be displayed in the interface of the electronic device in the form of a floating window.
  • the keywords include AAA, BBB, and CCC.
  • the electronic device displays prompt information in the form of a floating window.
  • the floating window includes the first control 81 "Yes” and the second control 82 "No".
  • the first control 81 is used to instruct the user to determine to create a folder
  • the second control 82 is used to instruct the user not to create a folder.
  • the prompt information is shown in Figure 8, which are "AAA”, "BBB”, and "CCC" respectively.
  • the electronic device After receiving the third input that the user determines to create a folder, the electronic device responds to the third input to create a target folder. For example, if the prompt information is shown in FIG. 8 , the electronic device creates a folder AAA, a folder BBB, and a folder CCC.
  • the electronic device determines whether the user needs to classify and save the file through the prompt information, thereby more accurately identifying the user's requirement and improving the user's use experience.
  • S103 may further include the following steps: first, search for a target preset keyword matching the keyword in a preset keyword database ; secondly, when the target preset keyword is found and the first folder satisfies the preset condition, a target folder named after the first keyword is created in the first folder.
  • the preset keyword database may be stored in the electronic device.
  • the keyword is "AAA. Episode 1”
  • the electronic device finds the target preset keyword "AAA” in the keyword database, and the electronic device creates a target folder named "AAA”.
  • the keyword database can also be stored in the server. After the electronic device recognizes the keyword, it can send the keyword to the server.
  • the server may search for the target preset keyword matching the keyword in the keyword database, and send the target preset keyword to the electronic device. After receiving the target preset keyword, the electronic device creates a target folder named after the target preset keyword.
  • the keyword in the file name can be accurately identified through the keyword database, so that the name of the folder can be more accurately determined.
  • the file saving method receives the first input of the user for the first file; in response to the first input, in the case where the first folder corresponding to the default download path satisfies the preset condition, the first file is stored in the first folder.
  • Create a target folder in save the first file to the target folder; wherein, the name of the target folder is associated with the name of the first file.
  • the user does not need to manually create a folder, and the electronic device can automatically name the target folder according to the file name of the first file, and does not need to manually name the folder.
  • the tedious operation process of manually creating folders and manually naming folders improves the user experience.
  • the method for saving a file performed by an electronic device is used as an example to describe the method for saving a file provided by the embodiment of the present application.
  • the execution subject may be an electronic device, or may be a file storage device or a control module in the file storage device for executing the file storage method.
  • an embodiment of the present application further provides a file storage device.
  • the file storage device provided by the embodiment of the present application is described below by taking the file storage method performed by the file storage device as an example.
  • FIG. 9 is a schematic structural diagram of a file saving apparatus 900 provided by an embodiment of the present application.
  • the file saving apparatus 900 may include: a receiving module 901 , a creating module 902 , and a saving module 903 .
  • the receiving module 901 is configured to receive the first input of the first file by the user.
  • the creating module 902 is configured to, in response to the first input, create a target folder in the first folder under the condition that the first folder corresponding to the default download path satisfies the preset condition.
  • the saving module 903 is used for saving the first file to the target folder.
  • the name of the target folder is associated with the name of the first file.
  • the user does not need to manually create a folder, and the electronic device can automatically name the target folder according to the file name of the first file, and does not need to manually name the folder. It eliminates the tedious operation process when manually creating folders and manually naming folders, and improves the user experience.
  • the first folder corresponding to the default download path satisfies the preset conditions including:
  • the first folder includes subfolders, and the names of the subfolders are not related to the names of the first files, or the first folder is an empty folder.
  • the first file includes multiple files
  • the creation module 902 is specifically configured to create multiple target folders when the names of the multiple files are not related.
  • the saving module 903 is specifically configured to save each file into a corresponding target folder.
  • the first file includes M files, where M is an integer greater than 1.
  • the creation module 902 may be specifically configured to: perform deduplication processing on the M keywords obtained by identifying the file name of the first file, and obtain N different first keywords, where N is an integer greater than 1; Each of the first keywords is used as a folder name, and N target folders are created in the first folder.
  • the creating module 902 may be further configured to: obtain the name of the subfolder and the subfolder when it is detected that the first folder includes the subfolder The keyword in the name of the first file; when it is detected that the keyword in the name of the first file is different from the name of the subfolder, it is determined that the first folder satisfies the preset condition; or, in the case of detecting that the first folder is an empty folder, detect whether the keyword of the name of the first file is the same as the name of the first folder; In the case that the names of the first folders are the same, it is determined that the first folder satisfies the preset condition.
  • the saving module 903 may be further configured to: when the first folder is an empty folder, and the keyword of the name of the first file is the same as that of the first folder In the case of the same name, the first file is directly saved in the first folder.
  • the receiving module 901 is further configured to receive a second input of the second file by the user within a preset time period.
  • the saving module 902 is further configured to, in response to the second input, save the second file to the target folder under the condition that the name of the second file is associated with the name of the target folder.
  • the apparatus 900 further includes:
  • the update module is used to update the name of the target folder, wherein the name of the updated target folder is a keyword included in both the second file and the name of the target folder.
  • the file storage device provided by the embodiment of the present application electronically receives the first input of the user for the first file; in response to the first input, in the case where the first folder corresponding to the default download path satisfies the preset condition, the first file is stored in the first file.
  • the folder is manually created, and the electronic device can automatically name the target folder according to the file name of the first file, and no need to manually name the folder, which avoids the tedious operation process of manually creating a folder and manually naming a folder. Improve user experience.
  • the file storage device in this embodiment of the present application may be a device, or may be a component, an integrated circuit, or a chip in a terminal.
  • the apparatus may be a mobile electronic device or a non-mobile electronic device.
  • the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palmtop computer, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (personal digital assistant).
  • UMPC ultra-mobile personal computer
  • netbook or a personal digital assistant
  • non-mobile electronic devices can be servers, network attached storage (Network Attached Storage, NAS), personal computer (personal computer, PC), television (television, TV), teller machine or self-service machine, etc., this application Examples are not specifically limited.
  • Network Attached Storage NAS
  • personal computer personal computer, PC
  • television television
  • teller machine or self-service machine etc.
  • the file saving device in the embodiment of the present application may be a device having an operating system.
  • the operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, which are not specifically limited in the embodiments of the present application.
  • the file storage device provided in the embodiment of the present application can implement each process implemented by the file storage device in the embodiments of FIG. 1 , FIG. 5 , FIG. 6 , and FIG. 7 , and to avoid repetition, details are not repeated here.
  • an embodiment of the present application further provides an electronic device 1000, including a processor 1001, a memory 1002, a program or instruction stored in the memory 1002 and executable on the processor 1001, the program Or when the instruction is executed by the processor 1001, each process of the above-mentioned file saving method embodiment can be implemented, and the same technical effect can be achieved. To avoid repetition, details are not described here.
  • the electronic devices in the embodiments of the present application include the aforementioned mobile electronic devices and non-mobile electronic devices.
  • FIG. 11 is a schematic diagram of a hardware structure of an electronic device 1100 implementing an embodiment of the present application.
  • the electronic device 1100 includes but is not limited to: a radio frequency unit 1101, a network module 1102, an audio output unit 1103, an input unit 1104, a sensor 1105, a display unit 1106, a user input unit 1107, an interface unit 1108, a memory 1109, and a processor 1110, etc. part.
  • the input unit 1104 includes a graphics processor and a microphone.
  • the display unit 1106 includes a display panel.
  • the user input unit 1107 includes a touch panel and other input devices.
  • Memory 1109 includes application programs and an operating system.
  • the electronic device 1100 may also include a power source (such as a battery) for supplying power to various components, and the power source may be logically connected to the processor 1110 through a power management system, so that the power management system can manage charging, discharging, and power consumption. consumption management and other functions.
  • a power source such as a battery
  • the structure of the electronic device shown in FIG. 11 does not constitute a limitation on the electronic device.
  • the electronic device may include more or less components than those shown in the figure, or combine some components, or arrange different components, which will not be repeated here. .
  • the user input unit 1107 is used for receiving the first input of the user to the first file
  • the processor 1110 is configured to, in response to the first input, create a target folder in the first folder when the first folder corresponding to the default download path satisfies the preset condition;
  • the processor 1110 is configured to save the first file to the target folder.
  • the user does not need to manually create a folder, and the electronic device can automatically name the target folder according to the file name of the first file, and does not need to manually name the folder. It eliminates the tedious operation process when manually creating folders and manually naming folders, and improves the user experience.
  • the first folder corresponding to the default download path satisfying the preset conditions includes: the first folder includes subfolders, and the names of the subfolders are different from the names of the first files.
  • the first folder is an empty folder.
  • the first file includes multiple files
  • the processor 1110 is configured to create multiple target folders when the names of the multiple files are not related
  • the processor 1110 is configured to save each file into a corresponding target folder.
  • the user input unit 1107 is further configured to receive a second input from the user to the second file within a preset time period
  • the processor 1110 is further configured to, in response to the second input, save the second file to the target folder under the condition that the name of the second file is associated with the name of the target folder.
  • the processor 1110 is configured to update the name of the target folder, wherein the updated name of the target folder is included in the names of both the second file and the target folder Key words.
  • Embodiments of the present application further provide a readable storage medium, where a program or an instruction is stored on the readable storage medium.
  • a program or an instruction is stored on the readable storage medium.
  • the processor is the processor in the electronic device described in the foregoing embodiments.
  • the readable storage medium includes a computer-readable storage medium, such as a computer read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, and the like.
  • An embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction to implement the above-mentioned file saving method embodiments
  • the chip includes a processor and a communication interface
  • the communication interface is coupled to the processor
  • the processor is configured to run a program or an instruction to implement the above-mentioned file saving method embodiments
  • the chip mentioned in the embodiments of the present application may also be referred to as a system-on-chip, a system-on-chip, a system-on-a-chip, or a system-on-a-chip, or the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Library & Information Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

A file saving method and apparatus, a device, and a storage medium, relating to the technical field of communications. The method comprises: receiving a first input of a first file from a user (S101); in response to the first input, when a first folder corresponding to a default download path satisfies a preset condition, creating a target folder in the first folder (S102); and saving the first file into the target folder, wherein the name of the target folder is associated with the name of the first file (S103).

Description

文件保存方法、装置、设备及存储介质File preservation method, device, equipment and storage medium
相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS
本申请主张在2021年1月28日在中国提交的中国专利申请号202110121045.4的优先权,其全部内容通过引用包含于此。This application claims priority to Chinese Patent Application No. 202110121045.4 filed in China on Jan. 28, 2021, the entire contents of which are incorporated herein by reference.
技术领域technical field
本申请属于通信技术领域,具体涉及一种文件保存方法、装置、设备及存储介质。The present application belongs to the field of communication technologies, and in particular relates to a file storage method, device, device and storage medium.
背景技术Background technique
随着电子设备技术的发展,电子设备已经成为人们日常生活中保存文件的必要工具。例如,使用电子设备保存音乐、电视剧、图片等文件。With the development of electronic equipment technology, electronic equipment has become a necessary tool for people to save files in daily life. For example, use electronic devices to save files such as music, TV series, pictures, etc.
在相关技术中,用户习惯对一些文件进行分类保存,在对文件进行分类保存之前,用户需要手动创建不同类别的文件夹,并手动对文件夹命名,然后将文件保存在对应的文件夹中。In the related art, users are accustomed to classifying and saving some files. Before classifying and saving the files, the user needs to manually create folders of different categories, manually name the folders, and then save the files in the corresponding folders.
在实现本申请的过程中,发明人发现在相关技术中至少存在如下问题:用户在对文件进行分类保存之前手动创建文件夹且手动对文件夹命名的过程操作较为繁琐。In the process of realizing the present application, the inventor found that there are at least the following problems in the related art: the process of manually creating a folder and manually naming the folder before the user classifies and saves the file is cumbersome.
发明内容SUMMARY OF THE INVENTION
本申请实施例的目的是提供一种文件保存方法、装置、设备及存储介质,能够解决相关技术中用户在对文件进行分类保存之前手动创建文件夹且手动对文件夹命名的过程操作较为繁琐的问题。The purpose of the embodiments of the present application is to provide a file saving method, device, equipment and storage medium, which can solve the tedious process of manually creating a folder and manually naming the folder before classifying and saving the file in the related art. question.
为了解决上述技术问题,本申请是这样实现的:In order to solve the above technical problems, this application is implemented as follows:
第一方面,本申请实施例提供了一种文件保存方法,该方法包括:In a first aspect, an embodiment of the present application provides a method for saving a file, the method comprising:
接收用户对第一文件的第一输入;receiving a first input from the user to the first file;
响应于第一输入,在默认下载路径对应的第一文件夹满足预设条件的情况下,在第一文件夹中创建目标文件夹;In response to the first input, if the first folder corresponding to the default download path satisfies the preset condition, create a target folder in the first folder;
将第一文件保存至目标文件夹中;Save the first file to the target folder;
其中,目标文件夹的名称与第一文件的名称相关联。Wherein, the name of the target folder is associated with the name of the first file.
第二方面,本申请实施例提供了一种文件保存装置,该装置包括:In a second aspect, an embodiment of the present application provides a file storage device, the device comprising:
接收模块,用于接收用户对第一文件的第一输入;a receiving module, configured to receive the first input of the user to the first file;
创建模块,用于响应于第一输入,在默认下载路径对应的第一文件夹满足预设条件的情况下,在第一文件夹中创建目标文件夹;The creation module is configured to, in response to the first input, create a target folder in the first folder under the condition that the first folder corresponding to the default download path satisfies the preset condition;
保存模块,用于将第一文件保存至目标文件夹中;a saving module for saving the first file to the target folder;
其中,目标文件夹的名称与第一文件的名称相关联。Wherein, the name of the target folder is associated with the name of the first file.
第三方面,本申请实施例提供了一种电子设备,该电子设备包括处理器、存储器及存储在存储器上并可在处理器上运行的程序或指令,程序或指令被处理器执行时实现如第一方面的方法的步骤。In a third aspect, an embodiment of the present application provides an electronic device, the electronic device includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor. When the program or instruction is executed by the processor, the The steps of the method of the first aspect.
第四方面,本申请实施例提供了一种可读存储介质,该可读存储介质上存储程序或指令,程序或指令被处理器执行时实现如第一方面的方法的步骤。In a fourth aspect, an embodiment of the present application provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or instruction is executed by a processor, the steps of the method of the first aspect are implemented.
第五方面,本申请实施例提供了一种芯片,该芯片包括处理器和通信接口,通信接口和处理器耦合,处理器用于运行程序或指令,实现如第一方面的方法。In a fifth aspect, an embodiment of the present application provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run programs or instructions to implement the method of the first aspect.
第六方面,本申请实施例提供了一种计算机程序产品,程序产品被存储在存储介质中,程序产品被至少一个处理器执行以实现如第一方面的文件保存方法。In a sixth aspect, an embodiment of the present application provides a computer program product, the program product is stored in a storage medium, and the program product is executed by at least one processor to implement the file saving method of the first aspect.
第七方面,本申请实施例提供了一种终端,包括终端被配置成用于执行如第一方面的文件保存方法。In a seventh aspect, an embodiment of the present application provides a terminal, including the terminal being configured to execute the file saving method of the first aspect.
在本申请实施例中,接收用户对第一文件的第一输入;在默认下载路径对应的第一文件夹满足预设条件的情况下,响应于第一输入,在第一文件夹中创建目标文件夹;将第一文件保存至目标文件夹中;其中,目标文件夹的名称与第一文件的名称相关联。如此,用户对第一文件进行分类保存的过程中,不需要手动创建文件夹,而且电子设备能够根据第一文件的 文件名称自动对目标文件夹命名,更不需要手动对文件夹命名,避免了手动创建文件夹和手动对文件夹命名时繁琐的操作过程,提高用户的使用体验。In the embodiment of the present application, the first input of the user for the first file is received; in the case that the first folder corresponding to the default download path satisfies the preset condition, in response to the first input, a target is created in the first folder folder; save the first file to the target folder; wherein, the name of the target folder is associated with the name of the first file. In this way, in the process of classifying and saving the first file, the user does not need to manually create a folder, and the electronic device can automatically name the target folder according to the file name of the first file, and does not need to manually name the folder. The tedious operation process of manually creating folders and manually naming folders improves the user experience.
附图说明Description of drawings
图1是本申请实施例提供的一种文件保存方法的流程示意图;1 is a schematic flowchart of a file preservation method provided by an embodiment of the present application;
图2是本申请实施例提供的一种电子设备的界面示意图之一;FIG. 2 is one of schematic interface diagrams of an electronic device provided by an embodiment of the present application;
图3是本申请实施例提供的一种电子设备的界面示意图之二;3 is a second schematic diagram of an interface of an electronic device provided by an embodiment of the present application;
图4是本申请实施例提供的一种电子设备的界面示意图之三;4 is a third schematic diagram of an interface of an electronic device provided by an embodiment of the present application;
图5是本申请实施例提供的一种创建目标文件夹方法的流程示意图;5 is a schematic flowchart of a method for creating a target folder provided by an embodiment of the present application;
图6是本申请实施例提供的一种确定第一文件夹满足预设条件的流程示意图;6 is a schematic flowchart of determining that the first folder satisfies a preset condition provided by an embodiment of the present application;
图7是本申请实施例提供的另一种确定第一文件夹满足预设条件的流程示意图;7 is another schematic flowchart of determining that the first folder satisfies a preset condition provided by an embodiment of the present application;
图8是本申请实施例提供的一种电子设备的界面示意图之四;8 is a fourth schematic diagram of an interface of an electronic device provided by an embodiment of the present application;
图9是本申请实施例提供的一种文件保存装置的结构示意图;9 is a schematic structural diagram of a file storage device provided by an embodiment of the present application;
图10是本申请实施例提供的一种电子设备的硬件结构示意图;10 is a schematic diagram of a hardware structure of an electronic device provided by an embodiment of the present application;
图11是本申请实施例提供的另一种电子设备的硬件结构示意图。FIG. 11 is a schematic diagram of a hardware structure of another electronic device provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.
本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的元素,而不用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施,且“第一”、“第二”等所区分的元素通常为 一类,并不限定元素的个数,例如第一元素可以是一个,也可以是多个。此外,说明书以及权利要求中“和/或”表示所连接元素的至少其中之一,字符“/”,一般表示前后关联元素是一种“或”的关系。The terms "first", "second", etc. in the description and claims of the present application are used to distinguish similar elements, and are not used to describe a specific order or sequence. It is to be understood that the data so used are interchangeable under appropriate circumstances so that the embodiments of the present application can be practiced in sequences other than those illustrated or described herein, and distinguish between "first", "second", etc. The elements are usually of one type, and the number of elements is not limited. For example, the first element may be one or more than one. In addition, in the description and claims, "and/or" means at least one of the linked elements, and the character "/" generally means that the contextual elements are in an "or" relationship.
本申请实施例提供的文件保存方法至少可以应用于下述场景中,下面进行详细说明。The file saving method provided by the embodiment of the present application can be applied to at least the following scenarios, which will be described in detail below.
用户在保存文件的时候,会将不同类的文件分类保存到不同的文件夹中。例如,将下载的文件分类保存至不同的文件夹中,或者将某文件夹中的所有文件分类保存至不同的文件夹中。When a user saves a file, different types of files are classified into different folders. For example, classify and save downloaded files into different folders, or classify and save all files in a folder into different folders.
相关技术中,通常在对文件进行保存之前,用户需要手动创建不同类别的文件夹,并手动对文件夹命名。例如,用户需要下载多集电视剧A和多集电视剧B,为了避免两个电视剧在同一个文件夹中比较混乱,用户可以在电子设备的存储位置创建文件夹A,并命名文件夹为A,创建文件夹B,并命名为B。用户可以先将多集电视剧A和多集电视剧B下载至系统默认的路径对应的文件夹C中,然后用户将多集电子剧A从文件夹C中移动至文件夹A中,然后用户将多集电视剧B从文件夹C中移动到文件夹B中。可见,用户在对文件进行分类保存的过程中,需要进行多次手动操作,如手动创建文件夹、手动为文件夹命名,从而使得对文件进行分类保存的过程中操作比较繁琐。In the related art, before saving a file, a user needs to manually create folders of different categories and manually name the folders. For example, a user needs to download multiple episodes of TV series A and multiple episodes of TV series B. In order to avoid confusion between the two TV series in the same folder, the user can create a folder A in the storage location of the electronic device, name the folder A, and create a folder A. Folder B, and name it B. The user can first download the multi-episode TV series A and the multi-episode TV series B to the folder C corresponding to the default path of the system, and then the user moves the multi-episode TV series A from the folder C to the folder A, and then the user downloads the multi-episode TV series A from the folder C to the folder A. TV series B is moved from folder C to folder B. It can be seen that in the process of classifying and saving files, the user needs to perform many manual operations, such as manually creating a folder and manually naming the folder, which makes the operations in the process of classifying and saving files relatively cumbersome.
针对相关技术中出现的技术问题,本申请实施例提供了一种文件保存方法。该方法中接收用户对第一文件的第一输入;在默认下载路径对应的第一文件夹满足预设条件的情况下,响应于第一输入,在第一文件夹中创建目标文件夹;将第一文件保存至目标文件夹中;其中,目标文件夹的名称与第一文件的名称相关联。如此,用户在对第一文件分类保存的过程中,不需要手动创建文件夹,并且电子设备能够根据第一文件的名称自动对目标文件夹命名,而不需要用户手动对文件夹命名,避免了手动创建文件夹和手动对文件夹命名时繁琐的操作过程,提高了用户的使用体验。Aiming at the technical problems occurring in the related art, the embodiments of the present application provide a file saving method. In the method, a first input from a user to the first file is received; in the case that the first folder corresponding to the default download path satisfies the preset condition, in response to the first input, a target folder is created in the first folder; The first file is saved in the target folder; wherein, the name of the target folder is associated with the name of the first file. In this way, in the process of classifying and saving the first file, the user does not need to manually create a folder, and the electronic device can automatically name the target folder according to the name of the first file, without requiring the user to manually name the folder, avoiding the need for manual naming of the folder. The tedious operation process when manually creating a folder and manually naming a folder improves the user experience.
下面结合附图,以文件保存方法的执行主体为电子设备为例,通过具体的实施例对本申请实施例提供的文件保存方法进行详细地说明。需要说明的是,上述执行主体并不构成对本申请的限定。The file saving method provided by the embodiments of the present application will be described in detail below with reference to the accompanying drawings, taking the execution subject of the file saving method as an electronic device as an example. It should be noted that the above executive body does not constitute a limitation on the present application.
图1是本请实施例提供的一种文件保存方法100的流程示意图。如图1所示,本申请实施例提供的文件保存方法100可以包括:S101-S103。FIG. 1 is a schematic flowchart of a file saving method 100 provided by an embodiment of the present application. As shown in FIG. 1 , the file saving method 100 provided by this embodiment of the present application may include: S101-S103.
S101:接收用户对第一文件的第一输入。S101: Receive a first input from a user to a first file.
第一输入是用户对第一文件的输入,能够指示第一文件需要进行保存。例如,如图2所示,第一输入可以是在浏览器网页中用户对电视剧“AAA.第一集”对应的下载控件的点击输入。又例如,如图3所示,第一输入还可以是用户将文档“000001.txt”从文件夹“培训资料”中拖动至文件夹“资格考试”中。The first input is the user's input to the first file, which can indicate that the first file needs to be saved. For example, as shown in FIG. 2 , the first input may be the user's click input on the download control corresponding to the TV series "AAA. Episode 1" in the browser webpage. For another example, as shown in FIG. 3 , the first input may also be that the user drags the document "000001.txt" from the folder "Training Materials" to the folder "Qualification Examination".
在这里,第一文件中至少包括一个文件。Here, at least one file is included in the first file.
S102:响应于第一输入,在默认下载路径对应的第一文件夹满足预设条件的情况下,在第一文件夹中创建目标文件夹。S102: In response to the first input, if the first folder corresponding to the default download path satisfies the preset condition, create a target folder in the first folder.
需要理解的是,默认下载路径可以是系统中默认保存文件的路径,还可以是用户预先设置的路径。用户在保存文件的过程中,可能需要对保存的文件进行分类,也可能并不需要对保存的文件进行分类。电子设备能够根据默认下载路径对应的第一文件夹确定用户的意图。It should be understood that the default download path may be the path where the file is saved by default in the system, or may be a path preset by the user. In the process of saving the file, the user may need to classify the saved file, or may not need to classify the saved file. The electronic device can determine the user's intention according to the first folder corresponding to the default download path.
电子设备在确定第一文件夹满足预设条件的情况下,确定需要对第一文件进行分类保存,从而在第一文件夹中创建目标文件夹。可选地,在第一文件夹包括子文件夹的情况下,电子设备可以确定在第一文件夹中的文件,均是按照子文件夹的类目对文件内容进行分类保存的,因此,当第一文件夹包括子文件夹且每一个子文件夹的名称与第一文件的名称均不相关的情况下,电子设备可以确定需要重新创建文件夹以保存第一文件。进一步可选地,在第一文件夹为空文件夹,且第一文件夹的名称与第一文件的名称不相关的情况下,电子设备可以确定第一文件需要进行分类保存,电子设备需要重新创建文件夹来保存第一文件。In the case of determining that the first folder satisfies the preset condition, the electronic device determines that the first file needs to be classified and saved, so as to create a target folder in the first folder. Optionally, in the case where the first folder includes subfolders, the electronic device may determine that the files in the first folder are all classified and saved according to the categories of the subfolders. Therefore, when When the first folder includes subfolders and the name of each subfolder is not related to the name of the first file, the electronic device may determine that the folder needs to be recreated to save the first file. Further optionally, when the first folder is an empty folder, and the name of the first folder is not related to the name of the first file, the electronic device may determine that the first file needs to be classified and saved, and the electronic device needs to renew the file. Create a folder to hold the first file.
需要理解的是,创建后的目标文件夹的名称与第一文件的名称相关,例如,目标文件夹的名称与第一文件的名称相同,或者,目标文件夹的名称可以是第一文件的名称中的部分关键词。It should be understood that the name of the created target folder is related to the name of the first file, for example, the name of the target folder is the same as the name of the first file, or the name of the target folder may be the name of the first file some of the keywords in .
可选地,接收到用户对第一文件的第一输入后,可以识别第一文件的文件名称中所包含的关键词。例如,在接收到用户对电视剧“AAA.第一集” 的下载操作之后,通过识别电视剧“AAA.第一集”对应的文件名称,将“AAA.第一集”中的“AAA”作为关键词。Optionally, after receiving the first input of the first file by the user, keywords contained in the file name of the first file may be identified. For example, after receiving the user's download operation for the TV series "AAA.Episode 1", by identifying the file name corresponding to the TV series "AAA.Episode 1", "AAA" in "AAA.Episode 1" is used as the key word.
在一些可选的实施例中,第一文件可以包括多个文件。电子设备接收到第一输入后,可以识别每个文件的文件名称,从而得到每个文件的文件名称中的关键词。其中,多个文件中,可能会存在相同的关键词,也可能各个关键词均不相同。例如,多个文件(两个文件)分别为电视剧“AAA.第一集”和“AAA.第二集”,则识别到“AAA.第一集”的关键词为“AAA”,识别到“AAA.第二集”的关键词同样为“AAA”。又例如,多个文件(三个文件)分别为电视剧“AAA.第一集”、电视剧“BBB.第一集”、电视剧“CCC.第四集”,则识别到的“AAA.第一集”的关键词为“AAA”,识别到的“BBB.第一集”的关键词为“BBB”,识别到的“CCC.第四集”的关键词为“CCC”,即三个文件的各个关键词各不相同。In some optional embodiments, the first file may include multiple files. After receiving the first input, the electronic device can identify the file name of each file, so as to obtain the keywords in the file name of each file. Among them, the same keyword may exist in multiple files, or each keyword may be different. For example, if the multiple files (two files) are the TV series "AAA.Episode 1" and "AAA.Episode 2", the key word of "AAA.Episode 1" is recognized as "AAA", and "AAA. Episode 1" is recognized as "AAA". AAA. The second episode" has the same keyword as "AAA". For another example, if the multiple files (three files) are the TV series "AAA.Episode 1", the TV series "BBB.Episode 1", and the TV series "CCC.Episode 4", the identified "AAA.Episode 1" ” is “AAA”, the recognized keyword of “BBB. Episode 1” is “BBB”, and the recognized keyword of “CCC. Episode 4” is “CCC”, that is, the three files of Each keyword is different.
可以理解的,当多个文件之间的名称不相关时,需要创建多个目标文件夹,并将每个文件保存至与文件名称相关的目标文件夹中。示例性的,如上述所示,在三个文件名称分别为“AAA.第一集”、电视剧“BBB.第一集”、电视剧“CCC.第四集”的情况下,由于“AAA”、“BBB”、“CCC”各不相同,因此可以创建三个目标文件夹,该三个目标文件夹的名称分别为“AAA”、“BBB”、“CCC”,并将“AAA.第一集”保存至目标文件夹“AAA”中,将“BBB.第一集”保存至目标文件夹“BBB”中,将“CCC.第四集”保存至目标文件夹“CCC”中。It is understandable that when the names of multiple files are not related, multiple target folders need to be created, and each file is saved in the target folder related to the file name. Exemplarily, as shown above, in the case where the three file names are "AAA.Episode 1", TV series "BBB.Episode 1", and TV series "CCC.Episode 4", since "AAA", "BBB" and "CCC" are different, so you can create three target folders named "AAA", "BBB", "CCC", and put "AAA.Episode 1" "Save to the target folder "AAA", save "BBB. Episode 1" to the target folder "BBB", and save "CCC. Episode 4" to the target folder "CCC".
作为一个示例实施例,如图4所示,第一输入为用户点击电视剧“AAA.第一集”以及电视剧“AAA.第二集”的下载控件的输入,默认下载路径为“内部存储/影视”,默认下载路径对应的第一文件夹为“影视”。在第一文件夹“影视”中包括子文件夹“泰坦尼克号”和子文件夹“海底世界”的情况下,由于子文件夹名称“泰坦尼克号”和“海底世界”均与识别到的第一文件对应的第一关键词“AAA”不同,因此,在第一文件夹中创建以“AAA”命名的目标文件夹,并将电视剧“AAA.第一集”以及电视剧“AAA.第二集”保存在目标文件夹“AAA”中。As an example embodiment, as shown in FIG. 4 , the first input is the input of the user clicking the download controls of the TV series "AAA. Episode 1" and the TV series "AAA. Episode 2", and the default download path is "Internal Storage/Videos" ", the first folder corresponding to the default download path is "Movies". In the case where the subfolder "Titanic" and the subfolder "Underwater World" are included in the first folder "Movies", since the subfolder names "Titanic" and "Underwater World" are both the same as the identified No. The first keyword "AAA" corresponding to a file is different. Therefore, a target folder named "AAA" is created in the first folder, and the TV series "AAA.Episode 1" and the TV series "AAA.Episode 2" are created in the first folder. " is saved in the destination folder "AAA".
在一些实施例中,为了能够对第一文件进行分类保存,在第一文件包 括M个文件的情况下,电子设备能够识别到M个关键词,如图5所示,还可以具体包括下述S501和S502。In some embodiments, in order to be able to classify and save the first file, when the first file includes M files, the electronic device can identify M keywords, as shown in FIG. 5 , and may also specifically include the following S501 and S502.
S501:对M个关键词进行去重处理,得到N个不同的第一关键词。S501: Perform deduplication processing on the M keywords to obtain N different first keywords.
在第一文件包括M个文件的情况下,电子设备识别到M个关键词后,需要对M个关键词进行去重处理,从而得到N个不同的第一关键词。例如,在M个文件(3个文件)分别为:“AAA.第一集”、“AAA.第二集”、“CCC.第一集”的情况下,关键词分别为“AAA”、“AAA”和“CCC”,对关键词进行去重处理后可以得到两个第一关键词,分别是“AAA”和“CCC”。In the case where the first file includes M files, after the electronic device recognizes the M keywords, it needs to perform deduplication processing on the M keywords, so as to obtain N different first keywords. For example, when the M files (3 files) are respectively: "AAA.Episode 1", "AAA.Episode 2", and "CCC.Episode 1", the keywords are "AAA", " AAA" and "CCC", after the keyword is deduplicated, two first keywords can be obtained, namely "AAA" and "CCC".
S502:以N个不同的第一关键词中的每个第一关键词分别作为文件夹名称,在第一文件夹创建N个目标文件夹。S502: Create N target folders in the first folder by using each of the first keywords in the N different first keywords as the folder name respectively.
得到N个第一关键词后,以每个第一关键词分别作为文件夹的名称,在第一文件夹中创建N个目标文件夹。例如,对M个关键词进行去重处理后,第一关键词分别是“AAA”和“CCC”,那么在第一文件夹中创建两个文件夹分别为:文件夹“AAA”和文件夹“CCC”。After the N first keywords are obtained, each first keyword is used as the name of the folder, and N target folders are created in the first folder. For example, after the M keywords are deduplicated, the first keywords are "AAA" and "CCC" respectively, then two folders are created in the first folder: the folder "AAA" and the folder "CCC".
示例性的,M个文件分别为电视剧“AAA.第一集”、电视剧“AAA.第二集”、电视剧“BBB.第一集”和电视剧“CCC.第四集”,即M等于4。电子设备识别到的四个文件的文件名称分别是“AAA.第一集”、“AAA.第二集”、“BBB.第一集”和“CCC.第四集”,即可以得到四个关键词分别是“AAA”、“AAA”和“BBB”、“CCC”。对四个关键词进行去重处理后,可得到三个第一关键词,分别是“AAA”、“BBB”和“CCC”。其中,由于第一文件夹“影视”中包括子文件夹“泰坦尼克号”和子文件夹“海底世界”均与去重后的三个第一关键词“AAA”、“BBB”和“CCC”不相同,因此,在第一文件夹中分别创建以“AAA”命名的目标文件夹,以“BBB”命名的目标文件,以及以“CCC”命名的目标文件夹。Exemplarily, the M files are the TV series "AAA.Episode 1", the TV series "AAA.Episode 2", the TV series "BBB.Episode 1", and the TV series "CCC.Episode 4", that is, M is equal to 4. The file names of the four files recognized by the electronic device are "AAA. Episode 1", "AAA. Episode 2", "BBB. Episode 1" and "CCC. Episode 4", that is, four files can be obtained. The keywords are "AAA", "AAA" and "BBB", "CCC", respectively. After the four keywords are deduplicated, three first keywords can be obtained, namely "AAA", "BBB" and "CCC". Among them, since the first folder "Movies" includes the subfolder "Titanic" and the subfolder "Underwater World", they are all related to the three first keywords "AAA", "BBB" and "CCC" after deduplication. They are not the same. Therefore, a target folder named "AAA", a target file named "BBB", and a target folder named "CCC" are created in the first folder.
在本申请的实施例中,电子设备可以通过识别文件名称得到关键词,并对关键词进行去重处理,从而得到N个第一关键词,进而创建N个以第一关键词命名的目标文件夹,这N个不同名称的目标文件夹可以将多个文件进行分类保存,方便用户查找不同类别的文件,提高用户的使用体验。In the embodiment of the present application, the electronic device can obtain keywords by recognizing the file names, and perform deduplication processing on the keywords, so as to obtain N first keywords, and then create N target files named after the first keywords The N target folders with different names can classify and save multiple files, which is convenient for users to find files of different categories and improves the user experience.
S103:将第一文件保存至目标文件夹中,其中,目标文件夹的名称与第一文件的名称相关联。S103: Save the first file into a target folder, where the name of the target folder is associated with the name of the first file.
创建目标文件夹后,电子设备将第一文件保存在目标文件夹中。可以理解的,当第一文件包括多个文件时,根据第一文件对应的关键词和目标文件夹的名称保存第一文件。例如,第一文件包括电视剧“AAA.第一集”,电视剧“AAA.第二集”,电视剧“BBB.第五集”,电视剧“BBB.第六集”,目标文件夹包括文件夹“AAA”和文件夹“BBB”,则电子设备将电视剧“AAA.第一集”,电视剧“AAA.第二集”保存在文件夹“AAA”中,将电视剧“BBB.第五集”和电视剧“BBB.第六集”保存在文件夹“BBB”中。After the target folder is created, the electronic device saves the first file in the target folder. It can be understood that when the first file includes multiple files, the first file is saved according to the keyword corresponding to the first file and the name of the target folder. For example, the first file includes the drama "AAA.Episode 1", the drama "AAA.Episode 2", the drama "BBB.Episode 5", the drama "BBB.Episode 6", and the target folder includes the folder "AAA. " and the folder "BBB", the electronic device saves the TV series "AAA.Episode 1", the TV series "AAA.Episode 2" in the folder "AAA", and the TV series "BBB.Episode 5" and TV series " BBB. Episode 6" is saved in the folder "BBB".
在一些实施例中,为了对第一文件进行分类保存,在电子设备创建了N个目标文件夹后,在S103中还可以具体包括下述步骤:针对每个文件,根据文件名称对应的关键词,将目标文件夹以该关键词命名,并将文件保存至对应的目标文件夹中。In some embodiments, in order to classify and save the first file, after the electronic device has created N target folders, S103 may further specifically include the following steps: for each file, according to the keyword corresponding to the file name , name the target folder with the keyword, and save the file to the corresponding target folder.
例如,多个文件分别为电视剧“AAA.第一集”、电视剧“AAA.第二集”、电视剧“BBB.第一集”和电视剧“CCC.第四集”。目标文件夹分别为:文件夹AAA、文件夹BBB和文件夹CCC,电子设备会将电视剧“AAA.第一集”和电视剧“AAA.第二集”保存至文件夹AAA中;将电视剧“BBB.第一集”保存至文件夹BBB中;将电视剧“CCC.第四集”保存至文件夹CCC中。由此,电子设备能够根据文件夹的名称和每一个文件的文件名称中的关键词对文件进行分类保存,方便以后用户查找文件,提高用户使用体验。For example, the plurality of files are the TV series "AAA.Episode 1", the TV series "AAA.Episode 2", the TV series "BBB.Episode 1", and the TV series "CCC.Episode 4", respectively. The target folders are: folder AAA, folder BBB, and folder CCC. The electronic device will save the TV series "AAA. Episode 1" and the TV series "AAA. Episode 2" to the folder AAA; .The first episode" is saved in the folder BBB; the TV series "CCC.The fourth episode" is saved in the folder CCC. Therefore, the electronic device can classify and save the files according to the name of the folder and the keywords in the file name of each file, which facilitates the user to find the file in the future and improves the user experience.
在本申请的实施例中,用户对第一文件进行分类保存的过程中,不需要手动创建文件夹,而且电子设备能够根据第一文件的文件名称自动对目标文件夹命名,更不需要手动对文件夹命名,避免了手动创建文件夹和手动对文件夹命名时繁琐的操作过程,提高用户的使用体验。In the embodiment of the present application, in the process of classifying and saving the first file, the user does not need to manually create a folder, and the electronic device can automatically name the target folder according to the file name of the first file, let alone manually Folder naming avoids the tedious operation process of manually creating folders and manually naming folders, and improves user experience.
在一些实施例中,为了识别用户保存文件时是否需要分类的意图,避免默认下载路径对应的第一文件夹中文件混乱,使得保存后的文件更容易查找,电子设备还需要检测第一文件夹是否满足预设条件。预设条件可以包括:第一文件夹包括子文件夹且第一文件的名称与子文件夹的名称不相 关;或者,第一文件夹为空文件夹且第一文件的名称与第一文件夹的名称不相关。下面对电子设备检测第一文件夹是否满足预设条件进行详细介绍。In some embodiments, in order to identify whether the user wants to classify the file when saving the file, avoid the confusion of files in the first folder corresponding to the default download path, and make the saved file easier to find, the electronic device also needs to detect the first folder. Whether the preset conditions are met. The preset conditions may include: the first folder includes subfolders and the name of the first file is not related to the name of the subfolder; or, the first folder is an empty folder and the name of the first file is related to the name of the first folder name is not relevant. The following describes in detail whether the electronic device detects whether the first folder satisfies the preset condition.
当第一文件夹包括子文件夹且第一文件的名称与子文件夹的名称不相关时,如图6所示,还可以包括下述S601-S603。When the first folder includes subfolders and the name of the first file is not related to the name of the subfolder, as shown in FIG. 6 , the following S601-S603 may also be included.
S601:检测第一文件夹是否包括子文件夹。S601: Detect whether the first folder includes subfolders.
S602:在检测到第一文件夹包括子文件夹的情况下,获取子文件夹的名称以及第一文件名称中的关键词。S602: When it is detected that the first folder includes subfolders, obtain the name of the subfolder and the keyword in the name of the first file.
S603:在检测到第一文件名称中关键词与子文件夹的名称均不相同的情况下,确定第一文件夹满足预设条件。S603: When it is detected that the keyword in the name of the first file and the name of the subfolder are not the same, determine that the first folder satisfies the preset condition.
需要理解的是,这里的关键词与文件夹名称相同可以是完全相同,也可以部分相同,例如,在第一文件的关键词为“AAA”的情况下,若子文件夹名称为“AAA”、“AAA.第一集”,则都认为相同。It should be understood that the keyword here can be the same as the folder name, or it can be partially the same. For example, in the case where the keyword of the first file is "AAA", if the subfolder name is "AAA", "AAA. Episode 1", they all think the same.
可以理解的,当电子设备检测到第一文件夹中包括子文件夹时,则可以确定用户需要对第一文件进行分类保存。由于第一文件夹中包括子文件夹,为了避免创建与子文件夹重复的文件夹,电子设备还会检测第一文件名称中的关键词是否与子文件夹的名称相同。例如,在第一文件为“AAA.第一集”,即第一文件名称中的关键词为“AAA”的情况下,若第一文件夹中已经包括有名称为“AAA”的子文件夹,则电子设备检测到第一文件名称中的关键词“AAA”与子文件夹“AAA”的名称相同,则确定不满足预设条件,不会创建目标文件夹,若第一文件夹中不包括有名称为“AAA”的子文件夹,则电子设备检测到第一文件名称中的关键词“AAA”与子文件夹的名称不相同,则确定满足预设条件,创建目标文件夹。It can be understood that when the electronic device detects that the first folder includes subfolders, it can be determined that the user needs to classify and save the first file. Since the first folder includes subfolders, in order to avoid creating folders duplicated with the subfolders, the electronic device also detects whether the keyword in the name of the first file is the same as the name of the subfolder. For example, if the first file is "AAA. Episode 1", that is, the keyword in the name of the first file is "AAA", if the first folder already contains a subfolder named "AAA" , the electronic device detects that the keyword "AAA" in the name of the first file is the same as the name of the subfolder "AAA", and determines that the preset condition is not met, and the target folder will not be created. If a subfolder named "AAA" is included, the electronic device detects that the keyword "AAA" in the first file name is not the same as the subfolder, determines that the preset condition is met, and creates a target folder.
在本申请的实施方式中,电子设备在检测到第一文件名称的关键词与子文件夹的名称不相同的情况下,才创建以该关键词命名的目标文件夹,从而将第一文件分类保存在目标文件夹中,避免默认下载路径对应的第一文件夹中文件混乱、重复,使得保存后的文件更容易查找,提高用户的使用体验。In the embodiment of the present application, the electronic device only creates a target folder named after the keyword when it detects that the keyword of the name of the first file is not the same as the name of the subfolder, so as to classify the first file Save it in the target folder to avoid confusion and duplication of files in the first folder corresponding to the default download path, making the saved files easier to find and improving the user experience.
当第一文件夹为空文件夹且第一文件的名称与第一文件夹的名称不相 关时。如图7所示,还可以包括下述S701-S703。When the first folder is an empty folder and the name of the first file is not related to the name of the first folder. As shown in FIG. 7 , the following S701-S703 may also be included.
S701:检测第一文件夹是否为空文件夹。S701: Detect whether the first folder is an empty folder.
S702:在检测到第一文件夹为空文件夹的情况下,检测第一文件名称的关键词与第一文件夹的名称是否相同。S702: In the case where it is detected that the first folder is an empty folder, it is detected whether the keyword of the name of the first file is the same as the name of the first folder.
S703:在检测到关键词与第一文件夹名称相同的情况下,确定第一文件夹满足预设条件。S703: In the case where it is detected that the keyword is the same as the name of the first folder, it is determined that the first folder satisfies the preset condition.
需要理解的是,这里的关键词与文件夹名称相同可以是完全相同,也可以部分相同,例如,在第一文件的关键词为“AAA”的情况下,若第一文件夹名称为“AAA”、“AAA.第一集”,则都认为相同。It should be understood that the keyword here may be the same as the folder name, or may be partially the same. For example, if the keyword of the first file is "AAA", if the name of the first folder is "AAA" ", "AAA. The first episode", they are considered the same.
可以理解的,空文件夹是指第一文件夹中没有任何的文档、子文件夹等。在电子设备检测到第一文件夹为空文件夹,且关键词与第一文件夹名称不相同的情况下,为了保证第一文件夹中文件的整洁度,电子设备在第一文件夹中创建以该关键词命名的目标文件夹。It can be understood that an empty folder means that there are no documents, subfolders, etc. in the first folder. When the electronic device detects that the first folder is an empty folder, and the keyword is not the same as the name of the first folder, in order to ensure the cleanliness of the files in the first folder, the electronic device creates an empty folder in the first folder. The target folder named after this keyword.
例如,第一文件夹的名称为“影视”,第一文件夹中不包括任何文档和子文件夹。电子设备识别到第一文件名称的关键词为“AAA”之后,由于“影视”与“AAA”不相同,在第一文件夹中创建以“AAA”命名的目标文件夹。For example, the name of the first folder is "Movies", and the first folder does not include any documents and subfolders. After the electronic device recognizes that the keyword of the first file name is "AAA", since "Video" is different from "AAA", a target folder named "AAA" is created in the first folder.
在本申请实施例中,电子设备在检测到第一文件名称的关键词与第一文件夹的名称不相同的情况下,创建以该关键词命名的目标文件夹,从而将第一文件分类保存在目标文件夹中,避免默认下载路径对应的第一文件夹中文件混乱,使得保存后的文件更容易查找,提高用户的使用体验。In the embodiment of the present application, when detecting that the keyword of the first file name is not the same as the name of the first folder, the electronic device creates a target folder named after the keyword, so as to classify and save the first file In the target folder, the confusion of files in the first folder corresponding to the default download path is avoided, so that the saved files are easier to find, and the user experience is improved.
除此之外,为了避免重复建立文件夹,在S 102之后,还可以包括下述步骤:In addition, in order to avoid repeated creation of folders, after S102, the following steps may also be included:
在第一文件夹为空文件夹,且第一文件名称的关键词与第一文件夹的名称相同的情况下,将第一文件直接保存在第一文件夹中。In the case that the first folder is an empty folder and the keyword of the name of the first file is the same as the name of the first folder, the first file is directly saved in the first folder.
可以理解的,如上示例,默认下载路径对应的第一文件夹的名称为“AAA”,第一文件夹中不包括任何文档和子文件夹。电子设备识别到第一文件名称的关键词为“AAA”之后,由于“AAA”与“AAA”相同,则将第一文件直接保存在第一文件夹中。从而在第一文件名称的关键词与第一文件夹 的名称相同的情况下,不再重新创建以该关键词命名的目标文件夹,直接将第一文件保存在第一文件夹中,避免了在第一文件夹中创建重复的文件夹。It can be understood that, as in the above example, the name of the first folder corresponding to the default download path is "AAA", and the first folder does not include any documents and subfolders. After the electronic device recognizes that the keyword of the first file name is "AAA", since "AAA" is the same as "AAA", the first file is directly saved in the first folder. Therefore, when the keyword of the name of the first file is the same as the name of the first folder, the target folder named after the keyword is not recreated, and the first file is directly stored in the first folder, avoiding Create duplicate folders in the first folder.
在一些实施例中,在S103之后,还可以包括下述步骤:In some embodiments, after S103, the following steps may also be included:
在预设时长内若接收到用户对第二文件的第二输入,则响应于第二输入,在第二文件的名称与目标文件夹的名称相关联的情况下,将第二文件保存至目标文件夹,其中,第二输入用于指示将第二文件保存。If the second input of the second file by the user is received within the preset time period, in response to the second input, in the case that the name of the second file is associated with the name of the target folder, save the second file to the target folder, wherein the second input is used to instruct to save the second file.
可以理解的,在一定的时间内,用户可能需要保存一系列的同类型的文件,例如保存系列电影中的多部。当电子设备将一系列文件中的第一文件保存之后,再次接收到对该一系列文件中的第二文件的第二输入。电子设备会识别第二文件的文件名称与保存第一文件的目标文件夹的名称是否相关联,例如,第二文件的文件名称与保存第一文件的目标文件夹的名称具有相同的关键词,则确定第二文件的名称与第一文件所在的目标文件夹的名称相关联。在第二文件的文件名称与保存第一文件的目标文件夹的名称相关联的情况下,将第二文件直接保存在目标文件夹中。It is understandable that, within a certain period of time, the user may need to save a series of files of the same type, for example, to save multiple movies in a series. After the electronic device saves the first file in the series of files, a second input of the second file in the series of files is received again. The electronic device will identify whether the file name of the second file is associated with the name of the target folder where the first file is saved. For example, the file name of the second file and the name of the target folder where the first file is saved have the same keyword, Then it is determined that the name of the second file is associated with the name of the target folder where the first file is located. In the case where the file name of the second file is associated with the name of the target folder in which the first file is saved, the second file is directly saved in the target folder.
例如,第一文件为“AAA.第一集”,第二文件为“AAA.第二集”。保存“AAA.第一集”的目标文件夹名称为“AAA.第一集”。其中,目标文件夹的名称“AAA.第一集”和第二文件“AAA.第二集”包括相同的关键词“AAA”,因此,电子设备将第二文件“AAA.第二集”保存在目标文件夹“AAA.第一集”中。For example, the first file is "AAA.Episode 1" and the second file is "AAA.Episode 2". The destination folder name for saving "AAA.Episode 1" is "AAA.Episode 1". Wherein, the name of the target folder "AAA.First episode" and the second file "AAA.Second episode" include the same keyword "AAA", therefore, the electronic device saves the second file "AAA.Second episode" In the destination folder "AAA.Episode 1".
在本申请实施例中,无需再重新创建文件夹保存第二文件,节约了文件保存的时间。In the embodiment of the present application, there is no need to recreate the folder to save the second file, which saves the time for saving the file.
在一些实施例中,为了使用户更容易查找文件,电子设备还可以根据目标文件夹中保存的文件更新目标文件夹的名称。In some embodiments, in order to make it easier for the user to find files, the electronic device may also update the name of the target folder according to the files saved in the target folder.
具体地,将第二文件保存在目标文件夹中后,会根据第二文件的文件名称和第一文件的文件名称中重复的关键词,更新目标文件夹的名称。Specifically, after the second file is saved in the target folder, the name of the target folder will be updated according to the repeated keywords in the file name of the second file and the file name of the first file.
如上示例,第一文件为“AAA.第一集”,第二文件为“AAA.第二集”。保存“AAA.第一集”的目标文件夹名称为“AAA.第一集”。其中,由于目标文件夹的名称“AAA.第一集”和第二文件“AAA.第二集”包括相同的关键词 “AAA”,电子设备会将目标文件夹的名称更新为“AAA”。In the above example, the first file is "AAA.Episode 1", and the second file is "AAA.Episode 2". The destination folder name for saving "AAA.Episode 1" is "AAA.Episode 1". Wherein, since the name of the target folder "AAA.Episode 1" and the second file "AAA.Episode 2" include the same keyword "AAA", the electronic device will update the name of the target folder to "AAA".
在本申请实施例中,电子设备根据目标文件夹中保存的文件不断更新文件夹的名称,使得目标文件夹的名称与其中的文件名称更加关联,提高用户在查找文件时的便捷性。In the embodiment of the present application, the electronic device continuously updates the name of the folder according to the files stored in the target folder, so that the name of the target folder is more associated with the file name in it, which improves the convenience for users to find files.
在一些实施例中,为了更准确地识别到用户的需求,在S101之后S102之前,还可以包括下述步骤:In some embodiments, in order to more accurately identify the needs of the user, after S101 and before S102, the following steps may also be included:
确定用户是否需要对第一文件进行分类保存:首先,显示提示信息,该提示信息用户只是是否创建目标文件夹。其次,接收用户的第三输入,该第三输入用于指示用户确认创建文件夹,从而电子设备能够确定用户需要对第一文件进行分类保存。Determine whether the user needs to classify and save the first file: first, display a prompt message, the prompt message is only whether the user creates a target folder. Secondly, a third input from the user is received, where the third input is used to instruct the user to confirm the creation of the folder, so that the electronic device can determine that the user needs to classify and save the first file.
提示信息可以是“是否创建文件夹”,还可以是提示用户是否是创建文件夹A、文件夹B等。例如,提示信息可以是“文件夹A、文件夹B、文件夹C”。提示信息可以通过悬浮窗的形式显示在电子设备的界面中。The prompt information may be "whether to create a folder", or may be a prompt to the user whether to create a folder A, a folder B, and the like. For example, the prompt information can be "folder A, folder B, folder C". The prompt information can be displayed in the interface of the electronic device in the form of a floating window.
例如,如图8所示,电子设备识别到关键词后,关键词包括AAA、BBB和CCC。电子设备以悬浮窗的形式显示提示信息。其中,悬浮窗包括第一控件81“是”和第二控件82“否”。第一控件81用于指示用户确定创建文件夹,第二控件82用于指示用户不需要创建文件夹。提示信息如图8所示,分别为“AAA”、“BBB”、“CCC”。For example, as shown in FIG. 8 , after the electronic device recognizes the keywords, the keywords include AAA, BBB, and CCC. The electronic device displays prompt information in the form of a floating window. The floating window includes the first control 81 "Yes" and the second control 82 "No". The first control 81 is used to instruct the user to determine to create a folder, and the second control 82 is used to instruct the user not to create a folder. The prompt information is shown in Figure 8, which are "AAA", "BBB", and "CCC" respectively.
当接收到用户确定创建文件夹的第三输入后,电子设备对第三输入进行响应,创建目标文件夹。例如,提示信息如图8所示,则电子设备创建文件夹AAA、文件夹BBB和文件夹CCC。After receiving the third input that the user determines to create a folder, the electronic device responds to the third input to create a target folder. For example, if the prompt information is shown in FIG. 8 , the electronic device creates a folder AAA, a folder BBB, and a folder CCC.
由此,电子设备通过提示信息来确定用户是否需要对文件进行分类保存,从而更准确地识别到用户的需求,提高用户的使用体验。Therefore, the electronic device determines whether the user needs to classify and save the file through the prompt information, thereby more accurately identifying the user's requirement and improving the user's use experience.
在一些实施例中,为了使得更精准地识别到文件名称中的关键词,S103还可以具体下述步骤:首先,在预设的关键词数据库中查找与关键词相匹配的目标预设关键词;其次,在查找到目标预设关键词,第一文件夹满足预设条件的情况下,在第一文件夹创建以第一关键词命名的目标文件夹。In some embodiments, in order to more accurately identify the keyword in the file name, S103 may further include the following steps: first, search for a target preset keyword matching the keyword in a preset keyword database ; secondly, when the target preset keyword is found and the first folder satisfies the preset condition, a target folder named after the first keyword is created in the first folder.
预设的关键词数据库可以是保存在电子设备中。例如,关键词为 “AAA.第一集”,电子设备在关键词数据库中查找到目标预设关键词“AAA”,电子设备创建以“AAA”命名的目标文件夹。The preset keyword database may be stored in the electronic device. For example, the keyword is "AAA. Episode 1", the electronic device finds the target preset keyword "AAA" in the keyword database, and the electronic device creates a target folder named "AAA".
为了能够节省电子设备的存储空间,关键词数据库也可以保存在服务器中。电子设备识别到关键词后,可以将关键词发送给服务器。服务器可以在关键词数据库中查找与关键词匹配的目标预设关键词,并将目标预设关键词发送给电子设备。电子设备接收到目标预设关键词后,创建以目标预设关键词命名的目标文件夹。In order to save the storage space of the electronic device, the keyword database can also be stored in the server. After the electronic device recognizes the keyword, it can send the keyword to the server. The server may search for the target preset keyword matching the keyword in the keyword database, and send the target preset keyword to the electronic device. After receiving the target preset keyword, the electronic device creates a target folder named after the target preset keyword.
由此,通过关键词数据库可以精准地识别文件名称中的关键词,从而更精准地确定文件夹的名称。Therefore, the keyword in the file name can be accurately identified through the keyword database, so that the name of the folder can be more accurately determined.
本申请实施例提供的文件保存方法,接收用户对第一文件的第一输入;响应于第一输入,在默认下载路径对应的第一文件夹满足预设条件的情况下,在第一文件夹中创建目标文件夹;将第一文件保存至目标文件夹中;其中,目标文件夹的名称与第一文件的名称相关联。如此,用户对第一文件进行分类保存的过程中,不需要手动创建文件夹,而且电子设备能够根据第一文件的文件名称自动对目标文件夹命名,更不需要手动对文件夹命名,避免了手动创建文件夹和手动对文件夹命名时繁琐的操作过程,提高用户的使用体验。The file saving method provided by the embodiment of the present application receives the first input of the user for the first file; in response to the first input, in the case where the first folder corresponding to the default download path satisfies the preset condition, the first file is stored in the first folder. Create a target folder in ; save the first file to the target folder; wherein, the name of the target folder is associated with the name of the first file. In this way, in the process of classifying and saving the first file, the user does not need to manually create a folder, and the electronic device can automatically name the target folder according to the file name of the first file, and does not need to manually name the folder. The tedious operation process of manually creating folders and manually naming folders improves the user experience.
需要说明的是,本申请实施例中以电子设备执行文件保存方法为例,说明本申请实施例提供的文件保存方法。但是,本申请实施例提供的文件保存方法,执行主体可以为电子设备,还可以是文件保存装置或该文件保存装置中的用于执行文件保存方法的控制模块。It should be noted that, in the embodiment of the present application, the method for saving a file performed by an electronic device is used as an example to describe the method for saving a file provided by the embodiment of the present application. However, in the file storage method provided by the embodiments of the present application, the execution subject may be an electronic device, or may be a file storage device or a control module in the file storage device for executing the file storage method.
基于本申请提供的文件保存方法,相应地,本申请实施例还提供一种文件保存装置。下面以文件保存装置执行文件保存方法为例,说明本申请实施例提供的文件保存装置。Based on the file storage method provided by the present application, correspondingly, an embodiment of the present application further provides a file storage device. The file storage device provided by the embodiment of the present application is described below by taking the file storage method performed by the file storage device as an example.
图9为本申请实施例提供的一种文件保存装置900结构示意图。FIG. 9 is a schematic structural diagram of a file saving apparatus 900 provided by an embodiment of the present application.
如图9所示,本申请提供的文件保存装置900可以包括:接收模块901,创建模块902,保存模块903。As shown in FIG. 9 , the file saving apparatus 900 provided by the present application may include: a receiving module 901 , a creating module 902 , and a saving module 903 .
接收模块901,用于接收用户对第一文件的第一输入。The receiving module 901 is configured to receive the first input of the first file by the user.
创建模块902,用于响应于第一输入,在默认下载路径对应的第一文 件夹满足预设条件的情况下,在第一文件夹中创建目标文件夹。The creating module 902 is configured to, in response to the first input, create a target folder in the first folder under the condition that the first folder corresponding to the default download path satisfies the preset condition.
保存模块903,用于将第一文件保存至目标文件夹中。The saving module 903 is used for saving the first file to the target folder.
其中,目标文件夹的名称与第一文件的名称相关联。Wherein, the name of the target folder is associated with the name of the first file.
由此,用户对第一文件进行分类保存的过程中,不需要手动创建文件夹,而且电子设备能够根据第一文件的文件名称自动对目标文件夹命名,更不需要手动对文件夹命名,避免了手动创建文件夹和手动对文件夹命名时繁琐的操作过程,提高用户的使用体验。Therefore, in the process of classifying and saving the first file, the user does not need to manually create a folder, and the electronic device can automatically name the target folder according to the file name of the first file, and does not need to manually name the folder. It eliminates the tedious operation process when manually creating folders and manually naming folders, and improves the user experience.
可选地,在本申请的一些实施例中,默认下载路径对应的第一文件夹满足预设条件包括:Optionally, in some embodiments of the present application, the first folder corresponding to the default download path satisfies the preset conditions including:
第一文件夹中包括子文件夹,子文件夹的名称与第一文件的名称不相关,或者,第一文件夹为空文件夹。The first folder includes subfolders, and the names of the subfolders are not related to the names of the first files, or the first folder is an empty folder.
可选地,在本申请的一些实施例中,第一文件包括多个文件,创建模块902,具体用于在多个文件的名称均不相关的情况下,创建多个目标文件夹。Optionally, in some embodiments of the present application, the first file includes multiple files, and the creation module 902 is specifically configured to create multiple target folders when the names of the multiple files are not related.
保存模块903,具体用于将每个文件保存至对应的目标文件夹中。The saving module 903 is specifically configured to save each file into a corresponding target folder.
可选地,在本申请的一些实施例中,所述第一文件包括M个文件,M为大于1的整数。创建模块902可具体用于:对识别所述第一文件的文件名称得到的M个关键词进行去重处理,得到N个不同的第一关键词,N为大于1的整数;以N个不同的所述第一关键词中的每个所述第一关键词分别作为文件夹名称,在所述第一文件夹中创建N个所述目标文件夹。Optionally, in some embodiments of the present application, the first file includes M files, where M is an integer greater than 1. The creation module 902 may be specifically configured to: perform deduplication processing on the M keywords obtained by identifying the file name of the first file, and obtain N different first keywords, where N is an integer greater than 1; Each of the first keywords is used as a folder name, and N target folders are created in the first folder.
可选地,在本申请的一些实施例中,创建模块902还可用于:在检测到所述第一文件夹包括所述子文件夹的情况下,获取所述子文件夹的名称以及所述第一文件的名称中的关键词;在检测到所述第一文件的名称中关键词与所述子文件夹的名称均不相同的情况下,确定所述第一文件夹满足所述预设条件;或者,在检测到所述第一文件夹为空文件夹的情况下,检测所述第一文件的名称的关键词与所述第一文件夹的名称是否相同;在检测到关键词与所述第一文件夹的名称相同的情况下,确定所述第一文件夹满足所述预设条件。Optionally, in some embodiments of the present application, the creating module 902 may be further configured to: obtain the name of the subfolder and the subfolder when it is detected that the first folder includes the subfolder The keyword in the name of the first file; when it is detected that the keyword in the name of the first file is different from the name of the subfolder, it is determined that the first folder satisfies the preset condition; or, in the case of detecting that the first folder is an empty folder, detect whether the keyword of the name of the first file is the same as the name of the first folder; In the case that the names of the first folders are the same, it is determined that the first folder satisfies the preset condition.
可选地,在本申请的一些实施例中,保存模块903还可用于:在所述 第一文件夹为空文件夹,且所述第一文件的名称的关键词与所述第一文件夹的名称相同的情况下,将所述第一文件直接保存在所述第一文件夹中。Optionally, in some embodiments of the present application, the saving module 903 may be further configured to: when the first folder is an empty folder, and the keyword of the name of the first file is the same as that of the first folder In the case of the same name, the first file is directly saved in the first folder.
可选地,在本申请的一些实施例中,接收模块901,还用于在预设时长内,接收用户对第二文件的第二输入。Optionally, in some embodiments of the present application, the receiving module 901 is further configured to receive a second input of the second file by the user within a preset time period.
保存模块902,还用于响应于第二输入,在第二文件的名称与目标文件夹的名称相关联的情况下,将第二文件保存至目标文件夹。The saving module 902 is further configured to, in response to the second input, save the second file to the target folder under the condition that the name of the second file is associated with the name of the target folder.
可选地,在本申请的一些实施例中,装置900还包括:Optionally, in some embodiments of the present application, the apparatus 900 further includes:
更新模块,用于更新目标文件夹的名称,其中,更新后的目标文件夹的名称为第二文件和目标文件夹的名称中均包括的关键词。The update module is used to update the name of the target folder, wherein the name of the updated target folder is a keyword included in both the second file and the name of the target folder.
本申请实施例提供的文件保存装置,电接收用户对第一文件的第一输入;响应于第一输入,在默认下载路径对应的第一文件夹满足预设条件的情况下,在第一文件夹中创建目标文件夹;将第一文件保存至目标文件夹中;其中,目标文件夹的名称与第一文件的名称相关联,如此,用户对第一文件进行分类保存的过程中,不需要手动创建文件夹,而且电子设备能够根据第一文件的文件名称自动对目标文件夹命名,更不需要手动对文件夹命名,避免了手动创建文件夹和手动对文件夹命名时繁琐的操作过程,提高用户的使用体验。The file storage device provided by the embodiment of the present application electronically receives the first input of the user for the first file; in response to the first input, in the case where the first folder corresponding to the default download path satisfies the preset condition, the first file is stored in the first file. Create a target folder in the folder; save the first file in the target folder; wherein, the name of the target folder is associated with the name of the first file, so that the user does not need to classify and save the first file in the process The folder is manually created, and the electronic device can automatically name the target folder according to the file name of the first file, and no need to manually name the folder, which avoids the tedious operation process of manually creating a folder and manually naming a folder. Improve user experience.
本申请实施例中的文件保存装置可以是装置,也可以是终端中的部件、集成电路、或芯片。该装置可以是移动电子设备,也可以为非移动电子设备。示例性的,移动电子设备可以为手机、平板电脑、笔记本电脑、掌上电脑、车载电子设备、穿戴式设备、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本或者个人数字助理(personal digital assistant,PDA)等,非移动电子设备可以为服务器、网络附属存储器(Network Attached Storage,NAS)、个人计算机(personal computer,PC)、电视机(television,TV)、柜员机或者自助机等,本申请实施例不作具体限定。The file storage device in this embodiment of the present application may be a device, or may be a component, an integrated circuit, or a chip in a terminal. The apparatus may be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palmtop computer, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (personal digital assistant). assistant, PDA), etc., non-mobile electronic devices can be servers, network attached storage (Network Attached Storage, NAS), personal computer (personal computer, PC), television (television, TV), teller machine or self-service machine, etc., this application Examples are not specifically limited.
本申请实施例中的文件保存装置可以为具有操作系统的装置。该操作系统可以为安卓(Android)操作系统,可以为ios操作系统,还可以为其他可能的操作系统,本申请实施例不作具体限定。The file saving device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, which are not specifically limited in the embodiments of the present application.
本申请实施例提供的文件保存装置能够实现图1、图5、图6、图7的实施例中文件保存装置实现的各个过程,为避免重复,这里不再赘述。The file storage device provided in the embodiment of the present application can implement each process implemented by the file storage device in the embodiments of FIG. 1 , FIG. 5 , FIG. 6 , and FIG. 7 , and to avoid repetition, details are not repeated here.
可选地,如图10所示,本申请实施例还提供一种电子设备1000,包括处理器1001,存储器1002,存储在存储器1002上并可在处理器1001上运行的程序或指令,该程序或指令被处理器1001执行时实现上述文件保存方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Optionally, as shown in FIG. 10 , an embodiment of the present application further provides an electronic device 1000, including a processor 1001, a memory 1002, a program or instruction stored in the memory 1002 and executable on the processor 1001, the program Or when the instruction is executed by the processor 1001, each process of the above-mentioned file saving method embodiment can be implemented, and the same technical effect can be achieved. To avoid repetition, details are not described here.
需要注意的是,本申请实施例中的电子设备包括上述的移动电子设备和非移动电子设备。It should be noted that the electronic devices in the embodiments of the present application include the aforementioned mobile electronic devices and non-mobile electronic devices.
图11为实现本申请实施例的一种电子设备1100的硬件结构示意图。FIG. 11 is a schematic diagram of a hardware structure of an electronic device 1100 implementing an embodiment of the present application.
该电子设备1100包括但不限于:射频单元1101、网络模块1102、音频输出单元1103、输入单元1104、传感器1105、显示单元1106、用户输入单元1107、接口单元1108、存储器1109、以及处理器1110等部件。其中,输入单元1104包括图形处理器和麦克风。显示单元1106包括显示面板。用户输入单元1107包括触控面板和其他输入设备。存储器1109包括应用程序和操作系统。The electronic device 1100 includes but is not limited to: a radio frequency unit 1101, a network module 1102, an audio output unit 1103, an input unit 1104, a sensor 1105, a display unit 1106, a user input unit 1107, an interface unit 1108, a memory 1109, and a processor 1110, etc. part. Among them, the input unit 1104 includes a graphics processor and a microphone. The display unit 1106 includes a display panel. The user input unit 1107 includes a touch panel and other input devices. Memory 1109 includes application programs and an operating system.
本领域技术人员可以理解,电子设备1100还可以包括给各个部件供电的电源(比如电池),电源可以通过电源管理系统与处理器1110逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。图11中示出的电子设备结构并不构成对电子设备的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置,在此不再赘述。Those skilled in the art can understand that the electronic device 1100 may also include a power source (such as a battery) for supplying power to various components, and the power source may be logically connected to the processor 1110 through a power management system, so that the power management system can manage charging, discharging, and power consumption. consumption management and other functions. The structure of the electronic device shown in FIG. 11 does not constitute a limitation on the electronic device. The electronic device may include more or less components than those shown in the figure, or combine some components, or arrange different components, which will not be repeated here. .
其中,用户输入单元1107,用于接收用户对第一文件的第一输入;Wherein, the user input unit 1107 is used for receiving the first input of the user to the first file;
处理器1110,用于响应于第一输入,在默认下载路径对应的第一文件夹满足预设条件的情况下,在第一文件夹中创建目标文件夹;The processor 1110 is configured to, in response to the first input, create a target folder in the first folder when the first folder corresponding to the default download path satisfies the preset condition;
处理器1110,用于将第一文件保存至目标文件夹中。The processor 1110 is configured to save the first file to the target folder.
由此,用户对第一文件进行分类保存的过程中,不需要手动创建文件夹,而且电子设备能够根据第一文件的文件名称自动对目标文件夹命名,更不需要手动对文件夹命名,避免了手动创建文件夹和手动对文件夹命名 时繁琐的操作过程,提高用户的使用体验。Therefore, in the process of classifying and saving the first file, the user does not need to manually create a folder, and the electronic device can automatically name the target folder according to the file name of the first file, and does not need to manually name the folder. It eliminates the tedious operation process when manually creating folders and manually naming folders, and improves the user experience.
可选地,在本申请的一些实施例中,默认下载路径对应的第一文件夹满足预设条件包括:第一文件夹中包括子文件夹,子文件夹的名称与第一文件的名称不相关,或者,第一文件夹为空文件夹。Optionally, in some embodiments of the present application, the first folder corresponding to the default download path satisfying the preset conditions includes: the first folder includes subfolders, and the names of the subfolders are different from the names of the first files. Related, alternatively, the first folder is an empty folder.
可选地,在本申请的一些实施例中,第一文件包括多个文件,处理器1110,用于在多个文件的名称均不相关的情况下,创建多个目标文件夹;Optionally, in some embodiments of the present application, the first file includes multiple files, and the processor 1110 is configured to create multiple target folders when the names of the multiple files are not related;
处理器1110,用于将每个文件保存至对应的目标文件夹中。The processor 1110 is configured to save each file into a corresponding target folder.
可选地,在本申请的一些实施例中,用户输入单元1107,还用于在预设时长内,接收用户对第二文件的第二输入;Optionally, in some embodiments of the present application, the user input unit 1107 is further configured to receive a second input from the user to the second file within a preset time period;
处理器1110,还用于响应于第二输入,在第二文件的名称与目标文件夹的名称相关联的情况下,将第二文件保存至目标文件夹。The processor 1110 is further configured to, in response to the second input, save the second file to the target folder under the condition that the name of the second file is associated with the name of the target folder.
可选地,在本申请的一些实施例中,处理器1110,用于更新目标文件夹的名称,其中,更新后的目标文件夹的名称为第二文件和目标文件夹的名称中均包括的关键词。Optionally, in some embodiments of the present application, the processor 1110 is configured to update the name of the target folder, wherein the updated name of the target folder is included in the names of both the second file and the target folder Key words.
本申请实施例还提供一种可读存储介质,所述可读存储介质上存储有程序或指令,该程序或指令被处理器执行时实现上述文件保存方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Embodiments of the present application further provide a readable storage medium, where a program or an instruction is stored on the readable storage medium. When the program or instruction is executed by a processor, each process of the above-mentioned file saving method embodiment can be achieved, and the same can be achieved. In order to avoid repetition, the technical effect will not be repeated here.
其中,所述处理器为上述实施例中所述的电子设备中的处理器。所述可读存储介质,包括计算机可读存储介质,如计算机只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等。Wherein, the processor is the processor in the electronic device described in the foregoing embodiments. The readable storage medium includes a computer-readable storage medium, such as a computer read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, and the like.
本申请实施例另提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现上述文件保存方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。An embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction to implement the above-mentioned file saving method embodiments Each process can achieve the same technical effect. In order to avoid repetition, it will not be repeated here.
应理解,本申请实施例提到的芯片还可以称为系统级芯片、系统芯片、芯片系统或片上系统芯片等。It should be understood that the chip mentioned in the embodiments of the present application may also be referred to as a system-on-chip, a system-on-chip, a system-on-a-chip, or a system-on-a-chip, or the like.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品 或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个......”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。此外,需要指出的是,本申请实施方式中的方法和装置的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。It should be noted that, herein, the terms "comprising", "comprising" or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements, It also includes other elements not expressly listed or inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in a process, method, article or apparatus that includes the element. Furthermore, it should be noted that the scope of the methods and apparatus in the embodiments of the present application is not limited to performing the functions in the order shown or discussed, but may also include performing the functions in a substantially simultaneous manner or in the reverse order depending on the functions involved. To perform functions, for example, the described methods may be performed in an order different from that described, and various steps may also be added, omitted, or combined. Additionally, features described with reference to some examples may be combined in other examples.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。From the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus a necessary general hardware platform, and of course hardware can also be used, but in many cases the former is better implementation. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product in essence or in a part that contributes to the prior art, and the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disk, CD-ROM), including several instructions to make a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the methods described in the various embodiments of this application.
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。The embodiments of the present application have been described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific embodiments, which are merely illustrative rather than restrictive. Under the inspiration of this application, without departing from the scope of protection of the purpose of this application and the claims, many forms can be made, which all fall within the protection of this application.

Claims (20)

  1. 一种文件保存方法,包括:A file preservation method, including:
    接收用户对第一文件的第一输入;receiving a first input from the user to the first file;
    响应于所述第一输入,在默认下载路径对应的第一文件夹满足预设条件的情况下,在所述第一文件夹中创建目标文件夹;In response to the first input, if the first folder corresponding to the default download path satisfies the preset condition, create a target folder in the first folder;
    将所述第一文件保存至所述目标文件夹中;saving the first file to the target folder;
    其中,所述目标文件夹的名称与所述第一文件的名称相关联。Wherein, the name of the target folder is associated with the name of the first file.
  2. 根据权利要求1所述的方法,其中,所述默认下载路径对应的第一文件夹满足预设条件包括:The method according to claim 1, wherein the first folder corresponding to the default download path satisfying a preset condition comprises:
    所述第一文件夹中包括子文件夹,且所述子文件夹的名称与所述第一文件的名称不相关,或者,所述第一文件夹为空文件夹。The first folder includes subfolders, and the names of the subfolders are not related to the names of the first files, or the first folder is an empty folder.
  3. 根据权利要求1所述的方法,其中,所述第一文件包括多个文件,The method of claim 1, wherein the first file comprises a plurality of files,
    所述在默认下载路径对应的第一文件夹满足预设条件的情况下,在所述第一文件夹中创建目标文件夹,包括:When the first folder corresponding to the default download path satisfies the preset condition, creating a target folder in the first folder includes:
    在所述多个文件的名称不相关的情况下,创建多个所述目标文件夹;In the case that the names of the plurality of files are irrelevant, creating a plurality of the target folders;
    所述将所述第一文件保存至所述目标文件夹中,包括:The saving of the first file to the target folder includes:
    将每个文件保存至对应的所述目标文件夹中。Save each file to the corresponding said destination folder.
  4. 根据权利要求1所述的方法,其中,所述第一文件包括M个文件,M为大于1的整数,The method according to claim 1, wherein the first file comprises M files, where M is an integer greater than 1,
    所述在默认下载路径对应的第一文件夹满足预设条件的情况下,在所述第一文件夹中创建目标文件夹,包括:When the first folder corresponding to the default download path satisfies the preset condition, creating a target folder in the first folder includes:
    对识别所述第一文件的文件名称得到的M个关键词进行去重处理,得到N个不同的第一关键词,N为大于1的整数;Perform deduplication processing on the M keywords obtained by identifying the file name of the first file, and obtain N different first keywords, where N is an integer greater than 1;
    以N个不同的所述第一关键词中的每个所述第一关键词分别作为文件夹名称,在所述第一文件夹中创建N个所述目标文件夹。Using each of the first keywords in the N different first keywords as a folder name, respectively, create N target folders in the first folder.
  5. 根据权利要求1所述的方法,在默认下载路径对应的第一文件夹满足预设条件的情况下,在所述第一文件夹中创建目标文件夹之前,还包括:The method according to claim 1, when the first folder corresponding to the default download path satisfies a preset condition, before creating a target folder in the first folder, further comprising:
    在检测到所述第一文件夹包括所述子文件夹的情况下,获取所述子文件夹的名称以及所述第一文件的名称中的关键词;在检测到所述第一文件的名称中关键词与所述子文件夹的名称均不相同的情况下,确定所述第一文件夹满足所述预设条件;When it is detected that the first folder includes the subfolder, the name of the subfolder and the keyword in the name of the first file are obtained; when the name of the first file is detected In the case where the names of the keywords and the subfolders are different, it is determined that the first folder satisfies the preset condition;
    或者,or,
    在检测到所述第一文件夹为空文件夹的情况下,检测所述第一文件的名称的关键词与所述第一文件夹的名称是否相同;在检测到关键词与所述第一文件夹的名称相同的情况下,确定所述第一文件夹满足所述预设条件。In the case where it is detected that the first folder is an empty folder, it is detected whether the keyword of the name of the first file is the same as the name of the first folder; In the case that the names of the folders are the same, it is determined that the first folder satisfies the preset condition.
  6. 根据权利要求1所述的方法,在默认下载路径对应的第一文件夹满足预设条件的情况下,在第一文件夹中创建目标文件夹之后,还包括:The method according to claim 1, when the first folder corresponding to the default download path satisfies the preset condition, after creating the target folder in the first folder, the method further comprises:
    在所述第一文件夹为空文件夹,且所述第一文件的名称的关键词与所述第一文件夹的名称相同的情况下,将所述第一文件直接保存在所述第一文件夹中。In the case that the first folder is an empty folder and the keyword of the name of the first file is the same as the name of the first folder, the first file is directly saved in the first file folder.
  7. 根据权利要求1所述的方法,其中,在所述将所第一文件保存至目标文件夹之后,所述方法还包括:The method according to claim 1, wherein after the saving the first file to the target folder, the method further comprises:
    在预设时长内,接收所述用户对第二文件的第二输入;within a preset time period, receiving the second input of the user to the second file;
    响应于所述第二输入,在所述第二文件的名称与所述目标文件夹的名称相关联的情况下,将所述第二文件保存至所述目标文件夹。In response to the second input, the second file is saved to the target folder if the name of the second file is associated with the name of the target folder.
  8. 根据权利要求7所述的方法,其中,在所述接收所述用户对第二文件的第二输入之后,所述方法还包括:The method of claim 7, wherein, after the receiving the second input from the user to the second file, the method further comprises:
    更新所述目标文件夹的名称,其中,所述更新后的目标文件夹的名称为所述第二文件和所述目标文件夹的名称中均包括的关键词。The name of the target folder is updated, wherein the updated name of the target folder is a keyword included in both the second file and the name of the target folder.
  9. 一种文件保存装置,包括:A file storage device, comprising:
    接收模块,用于接收用户对第一文件的第一输入;a receiving module, configured to receive the first input of the user to the first file;
    创建模块,用于响应于所述第一输入,在默认下载路径对应的第一文件夹满足预设条件的情况下,在所述第一文件夹中创建目标文件夹;A creation module, configured to, in response to the first input, create a target folder in the first folder under the condition that the first folder corresponding to the default download path satisfies the preset condition;
    保存模块,用于将所述第一文件保存至所述目标文件夹中;a saving module for saving the first file into the target folder;
    其中,所述目标文件夹的名称与所述第一文件的名称相关联。Wherein, the name of the target folder is associated with the name of the first file.
  10. 根据权利要求9所述的装置,其中,所述默认下载路径对应的第一文件夹满足预设条件包括:The device according to claim 9, wherein the first folder corresponding to the default download path satisfies a preset condition comprising:
    所述第一文件夹中包括子文件夹,所述子文件夹的名称与所述第一文件的名称不相关,或者,所述第一文件夹为空文件夹。The first folder includes subfolders, and the names of the subfolders are not related to the names of the first files, or the first folder is an empty folder.
  11. 根据权利要求9所述的装置,其中,所述第一文件包括多个文件,The apparatus of claim 9, wherein the first file comprises a plurality of files,
    所述创建模块,具体用于在所述多个文件的名称不相关的情况下,创建多个所述目标文件夹;The creating module is specifically configured to create a plurality of the target folders when the names of the plurality of files are not related;
    所述保存模块,具体用于将每个文件保存至对应的所述目标文件夹中。The saving module is specifically configured to save each file into the corresponding target folder.
  12. 根据权利要求9所述的装置,其中,所述第一文件包括M个文件,M为大于1的整数,所述创建模块,具体用于:The device according to claim 9, wherein the first file includes M files, where M is an integer greater than 1, and the creation module is specifically used for:
    对识别所述第一文件的文件名称得到的M个关键词进行去重处理,得到N个不同的第一关键词,N为大于1的整数;Perform deduplication processing on the M keywords obtained by identifying the file name of the first file, and obtain N different first keywords, where N is an integer greater than 1;
    以N个不同的所述第一关键词中的每个所述第一关键词分别作为文件夹名称,在所述第一文件夹中创建N个所述目标文件夹。Using each of the first keywords in the N different first keywords as a folder name, respectively, create N target folders in the first folder.
  13. 根据权利要求9所述的装置,其中,所述保存模块还用于:The apparatus according to claim 9, wherein the saving module is further configured to:
    在所述第一文件夹为空文件夹,且所述第一文件的名称的关键词与所述第一文件夹的名称相同的情况下,将所述第一文件直接保存在所述第一文件夹中。In the case that the first folder is an empty folder and the keyword of the name of the first file is the same as the name of the first folder, the first file is directly saved in the first file folder.
  14. 根据权利要求9所述的装置,其中,The apparatus of claim 9, wherein,
    所述接收模块,还用于在预设时长内,接收所述用户对第二文件的第二输入;The receiving module is further configured to receive the second input of the second file by the user within a preset time period;
    所述保存模块,还用于响应于所述第二输入,在所述第二文件的名称与所述目标文件夹的名称相关联的情况下,将所述第二文件保存至所述目标文件夹。The saving module is further configured to, in response to the second input, save the second file to the target file under the condition that the name of the second file is associated with the name of the target folder folder.
  15. 根据权利要求14所述的装置,所述装置还包括:The apparatus of claim 14, further comprising:
    更新模块,用于更新所述目标文件夹的名称,其中,所述更新后的目标文件夹的名称为所述第二文件和所述目标文件夹的名称中均包括的关键词。An update module, configured to update the name of the target folder, wherein the updated name of the target folder is a keyword included in both the second file and the name of the target folder.
  16. 一种电子设备,包括处理器,存储器及存储在所述存储器上并可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如权利要求1-8任一项所述的文件保存方法的步骤。An electronic device, comprising a processor, a memory, and a program or instruction stored on the memory and executable on the processor, the program or instruction being executed by the processor to implement claims 1-8 The steps of any one of the file preservation methods.
  17. 一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如权利要求1-8任一项所述的文件保存方法的步骤。A readable storage medium on which programs or instructions are stored, and when the programs or instructions are executed by a processor, implement the steps of the file saving method according to any one of claims 1-8.
  18. 一种芯片,包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如权利要求1-8任一项所述的文件保存方法。A chip includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used for running a program or an instruction to implement the file saving method according to any one of claims 1-8.
  19. 一种计算机程序产品,其特征在于,所述程序产品被存储在存储介质中,所述程序产品被至少一个处理器执行以实现如权利要求1-8任一项所述的文件保存方法。A computer program product, characterized in that the program product is stored in a storage medium, and the program product is executed by at least one processor to implement the file saving method according to any one of claims 1-8.
  20. 一种终端,其特征在于,包括所述终端被配置成用于执行如权利要求1-8任一项所述的文件保存方法。A terminal, characterized in that the terminal is configured to execute the file saving method according to any one of claims 1-8.
PCT/CN2022/073176 2021-01-28 2022-01-21 File saving method and apparatus, device, and storage medium WO2022161273A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110121045.4 2021-01-28
CN202110121045.4A CN112765104B (en) 2021-01-28 2021-01-28 File storage method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2022161273A1 true WO2022161273A1 (en) 2022-08-04

Family

ID=75706502

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/073176 WO2022161273A1 (en) 2021-01-28 2022-01-21 File saving method and apparatus, device, and storage medium

Country Status (2)

Country Link
CN (1) CN112765104B (en)
WO (1) WO2022161273A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115274038A (en) * 2022-09-28 2022-11-01 北京天健源达科技股份有限公司 Electronic medical record processing method, device, server and storage medium

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112765104B (en) * 2021-01-28 2024-05-24 维沃移动通信有限公司 File storage method, device, equipment and storage medium
CN113448927A (en) * 2021-06-29 2021-09-28 维沃软件技术有限公司 File naming method and device, electronic equipment and storage medium
CN115687662A (en) * 2022-09-26 2023-02-03 北京字跳网络技术有限公司 Multimedia work processing method, device, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6996780B2 (en) * 2000-12-29 2006-02-07 International Business Machines Corporation Method and system for creating a place type to be used as a template for other places
CN109240997A (en) * 2018-08-24 2019-01-18 华强方特(深圳)电影有限公司 A kind of upload store method, system and the client of file
CN110703972A (en) * 2019-09-29 2020-01-17 维沃移动通信有限公司 File control method and electronic equipment
CN112765104A (en) * 2021-01-28 2021-05-07 维沃移动通信有限公司 File saving method, device, equipment and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105022819A (en) * 2015-07-15 2015-11-04 魅族科技(中国)有限公司 File storage method and apparatus
EP3678007A4 (en) * 2017-10-30 2020-09-09 Huawei Technologies Co., Ltd. Application processing method for terminal device and terminal device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6996780B2 (en) * 2000-12-29 2006-02-07 International Business Machines Corporation Method and system for creating a place type to be used as a template for other places
CN109240997A (en) * 2018-08-24 2019-01-18 华强方特(深圳)电影有限公司 A kind of upload store method, system and the client of file
CN110703972A (en) * 2019-09-29 2020-01-17 维沃移动通信有限公司 File control method and electronic equipment
CN112765104A (en) * 2021-01-28 2021-05-07 维沃移动通信有限公司 File saving method, device, equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115274038A (en) * 2022-09-28 2022-11-01 北京天健源达科技股份有限公司 Electronic medical record processing method, device, server and storage medium
CN115274038B (en) * 2022-09-28 2022-12-16 北京天健源达科技股份有限公司 Electronic medical record processing method, device, server and storage medium

Also Published As

Publication number Publication date
CN112765104B (en) 2024-05-24
CN112765104A (en) 2021-05-07

Similar Documents

Publication Publication Date Title
WO2022161273A1 (en) File saving method and apparatus, device, and storage medium
US9954964B2 (en) Content suggestion for posting on communication network
CN109154935B (en) Method, system and readable storage device for analyzing captured information for task completion
US8213332B2 (en) Peer-to-peer data synchronization architecture
RU2718154C1 (en) Method and device for displaying possible word and graphical user interface
CN103823813B (en) Electric terminal historical operation records processing method and processing device
US20140365918A1 (en) Incorporating external dynamic content into a whiteboard
WO2022194004A1 (en) Application icon arrangement method and apparatus, and electronic device
US9251130B1 (en) Tagging annotations of electronic books
EP2447857A1 (en) Communication device and electronic device
US20110125970A1 (en) Automated Clipboard Software
US10845950B2 (en) Web browser extension
CN104967647A (en) Message push method and apparatus
WO2022089568A1 (en) File sharing method and apparatus, and electronic device
EP3403197B1 (en) Content authoring inline commands
US20180260464A1 (en) Techniques for administering comingled content items
WO2022213944A1 (en) Method and apparatus for referencing information, and electronic device
US20120191756A1 (en) Terminal having searching function and method for searching using data saved in clipboard
WO2022184034A1 (en) Document processing method and apparatus, device, and medium
WO2022233276A1 (en) Display method and apparatus, and electronic device
CN106775711B (en) Information processing method, device and computer-readable storage medium for contact persons
CA2909885C (en) Systems and methods for file management by mobile computing devices
WO2022156674A1 (en) Chat content processing method and apparatus, and electronic device
US10242025B2 (en) Efficient differential techniques for metafiles
JP2024509824A (en) Document editing methods, equipment, devices and storage media

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22745148

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 22745148

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 160124)