Method, device and electronic equipment for presenting a folder

By identifying and displaying readable folder keywords in the file system, the problem of unreadable folder names is solved, enabling more efficient access to file resources.

CN114398321BActive Publication Date: 2025-12-05BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210010120.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-05
Publication Date
2025-12-05
Estimated Expiration
2042-01-05

AI Technical Summary

Technical Problem

In existing technologies, the folder names in file systems are not very readable, making it difficult for users to quickly understand the specific classification of file resources, and the tree-like display increases the number of user operations.

Method used

By obtaining the path text of the folder, keywords are extracted to determine the target keywords with good readability, and the folder corresponding to the keyword is displayed, simplifying the user's operation path.

Benefits of technology

It improves the readability of file resources, reduces the number of times users need to operate on folders, and enhances the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114398321B_ABST
    Figure CN114398321B_ABST
Patent Text Reader

Abstract

The present disclosure provides a method, device and electronic equipment for displaying a folder, relates to the field of data processing, and particularly to the field of natural language processing. The specific implementation scheme is: obtaining a path text corresponding to a first folder, wherein the first folder contains at least a target file, the path text is composed of the names of at least one folder, and there is a hierarchical relationship between the at least one folder; performing keyword extraction on the path text to obtain at least one keyword; determining a target keyword from the at least one keyword according to the readability of the target keyword in the path text; determining a target folder corresponding to the target keyword from the at least one folder corresponding to the path text, and displaying the target folder, wherein the target folder is a to-be-displayed folder corresponding to the target file. The scheme provided by the present disclosure can improve the readability of file resources, thereby improving the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of data processing technology, and in particular to a method, apparatus, and electronic device for displaying folders. Background Technology

[0002] In a computer or related device, a directory or folder is a virtual "container" containing a digital file system. This virtual "container" can also store a set of files and other directories. These directories or folders are typically set within a file system, for example, in a cloud drive.

[0003] In existing technologies, file systems typically organize and store user files such as videos, documents, audio, and images in a tree structure. However, users usually do not regularly organize and properly categorize the files in their file systems, resulting in files being stored too deeply and folders becoming redundant. For example, in Figure 1 The file system shown has four folders displayed on the homepage: "My Videos," "My Pictures," "My Documents," and "My Wallet." These folder names only identify the file types within each folder, but not the specific categories of the files. Furthermore, if a user wants to view the video "1.mp4" within "My Videos," they need to click through each subfolder within the "My Videos" folder to access the video.

[0004] Furthermore, in existing technologies, file systems are typically displayed using the current folder containing video, audio, or other files as the entry point. This approach can make folder names somewhat ambiguous. For example, in... Figure 2 In the file system shown, the absolute path of the user-stored video "Class Activity.mp4" under the user's space is " / My Videos / My University Videos 1-3 Years / Freshman / Class Activity.mp4". However, the existing file system only displays the "Freshman" folder, which has poor readability, making it difficult for users to quickly understand the information contained in the file. Furthermore, TV series resources may have a second season, and simply displaying the folder containing the video would fragment the series structure, preventing users from quickly switching between resources in the same series. Summary of the Invention

[0005] This disclosure provides a method, apparatus, and electronic device for displaying folders.

[0006] According to an aspect of the present disclosure, a method for displaying a folder is provided, including: obtaining a path text corresponding to a first folder, wherein the first folder contains at least a target file, the path text is composed of names of at least one folder, and there is a hierarchical relationship between the at least one folder; performing keyword extraction on the path text to obtain at least one keyword; determining a target keyword from the at least one keyword according to a readability of the target keyword in the path text; determining a target folder corresponding to the target keyword from the at least one folder corresponding to the path text, and displaying the target folder, wherein the target folder is a to-be-displayed folder corresponding to the target file.

[0007] Further, the method for displaying a folder further includes: obtaining the target file stored in the file system; determining that a parent folder corresponding to the target file is the first folder; determining an absolute path corresponding to the first folder; and obtaining a text corresponding to the absolute path to obtain the path text.

[0008] Further, the method for displaying a folder further includes: before the keyword extraction on the path text to obtain the at least one keyword, performing a splitting processing on the path text based on a first preset character to obtain at least one text unit; removing a text unit corresponding to a second folder from the at least one text unit to obtain at least one candidate text unit, wherein the second folder is a folder created based on a business corresponding to the file system; and removing a second preset character in the at least one candidate text unit to obtain at least one target text unit.

[0009] Further, the method for displaying a folder further includes: determining a keyword score value corresponding to the at least one keyword, wherein the keyword score value represents the readability of the at least one keyword in the path text; and determining the target keyword from the at least one keyword according to the keyword score value.

[0010] Further, the method for displaying a folder further includes: determining a keyword quantity of keywords whose keyword score values are greater than or equal to a preset score value from the at least one keyword; when the keyword quantity is greater than or equal to a preset quantity, obtaining at least one candidate keyword whose keyword score value is greater than or equal to the preset score value; and determining the keyword whose keyword score value is the largest from the at least one candidate keyword as the target keyword.

[0011] Further, the method for displaying a folder further includes: when the keyword quantity is less than the preset quantity, determining the first folder as the target folder.

[0012] Further, the method for displaying a folder further includes: after the keyword extraction on the at least one target text unit, when at least one keyword is not extracted, determining the first folder as the target folder.

[0013] Further, the method for displaying the folder further comprises: when the folder corresponding to the target keyword is multiple, obtaining the levels of the multiple candidate folders corresponding to the target keyword; and determining the target folder from the multiple candidate folders according to the levels of the multiple candidate folders.

[0014] According to another aspect of the present disclosure, a device for displaying a folder is also provided, and further comprises: an obtaining module configured to obtain a path text corresponding to a first folder, wherein the first folder contains at least a target file, the path text is composed of names of at least one folder, and there is a hierarchical relationship between the at least one folder; an extracting module configured to perform keyword extraction on the path text to obtain at least one keyword; a determining module configured to determine a target keyword from the at least one keyword according to a readability of the target keyword in the path text; and a displaying module configured to determine a target folder corresponding to the target keyword from the at least one folder corresponding to the path text, and display the target folder, wherein the target folder is a to-be-displayed folder corresponding to the target file.

[0015] According to another aspect of the present disclosure, an electronic device is also provided, and further comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method for displaying a folder described above.

[0016] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is also provided, wherein the computer instructions are used to enable a computer to perform the method for displaying a folder described above.

[0017] According to another aspect of the present disclosure, a computer program product is also provided, and comprises a computer program, which, when executed by a processor, implements the method for displaying a folder described above.

[0018] In the present disclosure, the target folder corresponding to the target keyword with better readability in the path text is used as the to-be-displayed folder of the target file, and after obtaining the path text corresponding to the first folder containing the target file, keyword extraction is performed on the path text to obtain at least one keyword, then the target keyword is determined from the at least one keyword according to the readability of the target keyword in the path text, finally the target folder corresponding to the target keyword is determined from the at least one folder corresponding to the path text, and the target folder is displayed, wherein the path text is composed of names of at least one folder, the target folder is a to-be-displayed folder corresponding to the target file, and there is a hierarchical relationship between the at least one folder.

[0019] In the above process, since the target keyword is determined according to the readability of the keyword in the path text, the target keyword is a keyword with good readability in the path text of the first folder, and the name of the target folder corresponding to the target keyword also has good readability. Therefore, directly displaying the target folder corresponding to the keyword with good readability can improve the readability of the file resource, thereby avoiding the problem of poor readability of the file resource in the prior art in which the file resource is displayed in a tree form. In addition, the number of levels between the target folder and the target file is necessarily not greater than the number of levels between the homepage of the file system and the target file. Therefore, viewing the target file by taking the target folder as an entrance necessarily reduces the number of operations of the user on the folder, thereby improving the user experience.

[0020] It can be seen that the scheme provided by the present disclosure achieves the purpose of displaying the folder, thereby achieving the technical effect of improving the readability of the file resource, and further solving the problem of poor readability of the file resource in the prior art in which the file resource is displayed in a tree form.

[0021] It should be understood that the content described in this part is not intended to identify key or important features of the embodiments of the present disclosure, nor is it used to limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS

[0022] The accompanying drawings are used to better understand the present scheme and do not constitute a limitation on the present disclosure. Among them:

[0023] Figure 1 is a schematic diagram of a file system in the prior art;

[0024] Figure 2 is a schematic diagram of a file system in the prior art;

[0025] Figure 3 is a flowchart of a method for displaying a folder according to the first embodiment of the present disclosure;

[0026] Figure 4 is a schematic diagram of a file system according to the first embodiment of the present disclosure;

[0027] Figure 5 is a flowchart of a method for displaying a folder according to the first embodiment of the present disclosure;

[0028] Figure 6 is a schematic diagram of a device for displaying a folder according to the second embodiment of the present disclosure;

[0029] Figure 7 is a block diagram of an electronic device for implementing the method for displaying a folder according to the embodiments of the present disclosure. DETAILED DESCRIPTION

[0030] Exemplary embodiments of the present disclosure are described herein with reference to the accompanying drawings, which are presented for the purpose of illustration and description. It is to be understood that the embodiments described herein are merely exemplary and that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Also, for the purpose of clarity and a concise description, descriptions of well-known functions and constructions are omitted from the following description.

[0031] It should be noted that the acquisition, storage and application of user personal information in the technical solutions of the present disclosure comply with relevant laws and regulations and do not violate public order and good customs.

[0032] Example 1

[0033] According to embodiments of the present disclosure, the present disclosure provides a method for displaying a folder, wherein a terminal device can be the execution subject of the method provided in the embodiments, which can be, but is not limited to, a handheld terminal device (for example, a smart phone, a smart tablet, etc.), or a non-handheld terminal device (for example, a desktop computer, a notebook computer, etc.).

[0034] Optionally, Figure 3 is a flowchart of the method for displaying a folder according to the embodiments of the present disclosure, as shown in Figure 3 The method comprises the following steps:

[0035] In step S302, the path text corresponding to the first folder is acquired, wherein the first folder contains at least a target file, and the path text is composed of the names of at least one folder.

[0036] In step S302, the path text corresponding to the first folder can be the text corresponding to the path of the first folder in the space of the file system, wherein the file system is a system for storing and managing files, which can be, but is not limited to, a network disk.

[0037] Optionally, in the present disclosure, the file system can contain thousands of directories, and multiple files can be stored in the same directory, so as to achieve the purpose of organized storage of files. Among them, another directory in a directory can be referred to as its subdirectory or subfolder, so that the directories form a hierarchical or tree structure. In the present disclosure, the tree file system is also used to manage files, and in addition, the present disclosure manages the level of the folder on the basis of the tree file system, actively extracts a reasonable folder level, and exposes it as a resource compilation on the homepage of the file system, reduces the user's click level, facilitates the user to quickly access the file resources, and at the same time, the user's space is arranged and classified to a certain extent.

[0038] In addition, the target file can be any one of all files stored in the file system, and the target file can be, but is not limited to, a video, an audio, a picture, a document, etc. The first folder is a parent folder of the target file. For example, the path of the target file in the file system is “ / my video / my university video 1-3 years / first year / class activities / 1.mp4”, that is, the target file is “1.mp4”, and the parent folder corresponding to the target file is “class activities”, that is, the first folder containing the target file is “class activities”, and the path corresponding to “ / my video / my university video 1-3 years / first year / class activities” is the path of the first folder, and the text corresponding to the first folder is the path text of the first folder.

[0039] It should be noted that in the above example, the path text is composed of the names of multiple folders, for example, in the text path “ / my video / my university video 1-3 years / first year / class activities”, “my video”, “my university video 1-3 years”, “first year”, and “class activities” are all names of folders, and the multiple folders have a hierarchical relationship, that is, the tree relationship of the multiple folders in the file system, that is, the folder corresponding to “class activities” is contained in the folder corresponding to “first year”, the folder corresponding to “first year” is contained in the folder corresponding to “my university video 1-3 years”, and the folder corresponding to “my university video 1-3 years” is contained in the folder corresponding to “my video”.

[0040] In step S304, keyword extraction is performed on the path text to obtain at least one keyword.

[0041] In step S304, the existing natural language processing method can be used to extract keywords from the path text to obtain at least one keyword corresponding to the path text. The natural language processing is a technology for interacting with machines using natural languages used in human communication.

[0042] In an optional embodiment, the terminal device can use a short text keyword extraction model to extract keywords from the path text, wherein the short text keyword extraction model has a related algorithm of natural language processing. Optionally, the short text keyword extraction model can perform word segmentation processing on the path text to obtain a plurality of segmented words, and then determine at least one keyword from the plurality of segmented words based on a preset screening rule.

[0043] It should be noted that there can be some words in the plurality of words obtained by performing the word segmentation on the path text, which cannot be used as keywords or have low feature degrees, for example, the punctuation in the words cannot be used as keywords, and the feature degree of "my" is low. Therefore, after obtaining the plurality of words by performing the word segmentation on the path text, the short text keyword extraction model can perform screening processing on the plurality of words, that is, at least one keyword can be obtained.

[0044] In addition, it should be noted that the keywords corresponding to the path text can represent the related features of the path text, and therefore, the at least one keyword obtained by performing the keyword extraction on the path text can represent the resource information corresponding to the path file, and then the name of the target folder determined according to the at least one keyword can enable the user to quickly understand the resource information, thereby improving the user experience.

[0045] In step S306, a target keyword is determined from the at least one keyword according to the readability of the at least one keyword in the path text.

[0046] Optionally, in step S306, the terminal device can select the keyword with the highest readability as the target keyword from the at least one keyword by using a preset screening rule, wherein the screening rule can include but is not limited to the frequency of the at least one keyword, the part of speech corresponding to the at least one keyword, the context semantics corresponding to the at least one keyword, and a preset dictionary. For example, the frequency of the keyword in the path text can be used to represent the readability of the keyword in the path text, wherein the higher the frequency, the higher the readability, and then the terminal device can select the keyword with the highest frequency from the at least one keyword as the target keyword; for another example, the part of speech of the keyword in the path text can be used to represent the readability of the keyword in the path text, wherein the readability of the keyword corresponding to the noun is higher than the readability of the keyword corresponding to other parts of speech, and then the terminal device can select the keyword corresponding to the noun from the at least one keyword as the target keyword; for another example, the readability of the keyword corresponding to the name in the path text is higher than the readability of the keyword corresponding to the place name in the path text, and then the terminal device can select the keyword corresponding to the name from the at least one keyword as the target keyword.

[0047] It should be noted that since the target keyword is determined from the at least one keyword based on the readability of the keyword, the target keyword is usually the keyword with the best readability, so that the user can obtain the related information of the file resource to the greatest extent according to the target folder corresponding to the keyword with the best readability displayed by the terminal device.

[0048] Step S308: Determine the target folder corresponding to the target keyword from at least one folder corresponding to the path text, and display the target folder, wherein the target folder is the folder to be displayed corresponding to the target file.

[0049] In step S308, the path text consists of the names of at least one folder, while the target keyword is a keyword extracted from the path text. This keyword necessarily corresponds to one or more folders within the path text. The target keyword is the most readable keyword among the at least one keywords corresponding to the path text. Therefore, the name of the target folder corresponding to the target keyword also has good readability. Consequently, by directly displaying the target folder in the file system, users can quickly understand the resource information corresponding to the target folder, thereby improving the user experience.

[0050] Optionally, in this disclosure, after determining the target folder corresponding to the target keyword, the target folder can be directly displayed on the homepage of the file system. Users no longer need to view the target file from the primary folders displayed on the file system homepage; instead, the target folder can serve as the entry point for viewing the target file, reducing the number of operations required for users to view the target file. For example, in Figure 4 As shown in the file system diagram, users don't need to navigate through the "My Videos" folder to the "My University Records" folder, then through the "My University Videos 1-3 Years" folder to the "Freshman" folder, and then through the "Freshman" folder to the "Class Activities" folder to view the target file "1.mp4". Instead, they can simply navigate through the "My University Videos 1-3 Years" folder to the "Freshman" folder, and then through the "Freshman" folder to the "Class Activities" folder to view the target file "1.mp4". Furthermore, the "My University Videos 1-3 Years" folder is highly readable, allowing users to directly access information about their videos from their university years.

[0051] Based on the scheme defined in steps S302 to S308 above, it can be understood that in this disclosure, the target folder corresponding to the target keyword with good readability in the path text is used as the folder to be displayed for the target file. After obtaining the path text corresponding to the first folder containing the target file, the path text is used to extract keywords to obtain at least one keyword. Then, the target keyword is determined from the at least one keyword according to the readability of the at least one keyword in the path text. Finally, the target folder corresponding to the target keyword is determined from the at least one folder corresponding to the path text and the target folder is displayed. Here, the path text consists of the name of at least one folder, the target folder is the folder to be displayed corresponding to the target file, and there is a hierarchical relationship between the at least one folder.

[0052] It is easy to note that in the above process, since the target keyword is determined according to the readability of the keyword in the path text, the target keyword is a keyword with good readability in the path text of the first folder, and the name of the target folder corresponding to the target keyword also has good readability. Therefore, directly displaying the target folder corresponding to the keyword with good readability can improve the readability of the file resource, thereby avoiding the poor readability of the file resource in the prior art when the file resource is displayed in a tree form. In addition, the number of levels between the target folder and the target file is necessarily not greater than the number of levels between the home page of the file system and the target file. Therefore, viewing the target file by taking the target folder as an entry necessarily reduces the number of operations of the user on the folder, thereby improving the user experience.

[0053] It can be seen that the scheme provided by the present disclosure achieves the purpose of displaying the folder, thereby achieving the technical effect of improving the readability of the file resource, and further solving the problem of poor readability of the file resource in the prior art when the file resource is displayed in a tree form.

[0054] In an optional embodiment, after keyword extraction is performed on the path text, the terminal device needs to obtain the path text corresponding to the first folder. Specifically, the terminal device first obtains the target file stored in the file system, and determines that the upper-level folder corresponding to the target file is the first folder, and then determines the absolute path corresponding to the first folder, and obtains the text corresponding to the absolute path to obtain the path text. For example, the target file is "1.mp4", and the absolute path of the target file in the file system is " / my video / my university video 1-3 years / college / Class activities / 1.mp4". The upper-level folder corresponding to the target file "1.mp4" is the "class activities" folder, and the absolute path corresponding to the "class activities" folder is " / my video / my university video 1-3 years / college / class activities". After obtaining the absolute path of the upper-level folder corresponding to the target file, the terminal device converts the absolute path into text to obtain the path text.

[0055] It should be noted that in the present disclosure, in the process of determining the target folder and displaying the target folder, the path of the folder is obtained instead of the path of the target file, so that the extracted target keyword is the keyword of the folder, and the folder at least contains the target file, that is, in the present disclosure, the target folder to be displayed may contain other files or folders in addition to the target file, that is, the target folder aggregates the target file, other files or folders, so that the user can quickly understand the information of the file resources contained in the target folder, and the file resources are also classified. In addition, in the present disclosure, the path of the folder is converted into a text format, which is more convenient for processing by the terminal device, so that the target folder with the best readability is obtained.

[0056] After obtaining the path text corresponding to the first folder, the terminal device can perform keyword extraction on the path text to obtain at least one keyword. However, in actual application, the path text may contain some characters that affect keyword extraction. The existence of these characters may affect the accuracy of keyword extraction, thereby affecting the determination of the target folder, so that the target folder cannot effectively display the information of the file resources, and the user experience is reduced. In order to improve the accuracy of keyword extraction and thus improve the user experience, before keyword extraction is performed on the path text to obtain at least one keyword, the terminal device needs to perform text cleaning processing on the path text.

[0057] Specifically, before keyword extraction is performed on the path text to obtain at least one keyword, the terminal device first performs segmentation processing on the path text based on the first preset character to obtain at least one text unit, then removes the text unit corresponding to the second folder from the at least one text unit to obtain at least one candidate text unit, and finally removes the second preset character in the at least one candidate text unit to obtain at least one target text unit. The second folder is a folder created based on the business corresponding to the file system.

[0058] Optionally, the terminal device can use the " / " character (i.e., a first preset character) to split the path text, for example, in the path text " / my video / my university video 1-3 years / first year / class activities", the " / " character splits the path text into four text units, i.e., "my video", "my university video 1-3 years", "first year", and "class activities". Then, the terminal device removes the name corresponding to the folder created by the file system based on the service in at least one text unit, for example, in the network disk service, the folders created by the file system based on the service logic are "my video", "my picture", "my document", and "my card package", and then the terminal device removes the text unit corresponding to "my video" from at least one text unit to obtain at least one target text unit. Finally, the terminal device removes the Chinese and English punctuation marks and Arabic numerals (i.e., a second preset character) in at least one target text unit to avoid the Chinese and English punctuation marks and Arabic numerals being set in the middle of the text unit, so that the terminal device cannot accurately extract the keywords. For example, "1-3" is removed from the "my university video 1-3 years" text unit to obtain "text unit in years".

[0059] It should be noted that the path text is cleaned only to improve the accuracy of keyword extraction, and the name of the folder will not be changed in the process of cleaning the path text.

[0060] Further, after cleaning the path text, the terminal device can extract keywords from the cleaned path text, and determine a target keyword from at least one keyword according to the readability of at least one keyword in the path text.

[0061] Specifically, the terminal device first determines the keyword score value corresponding to at least one keyword, and determines a target keyword from at least one keyword according to the keyword score value. Wherein, the keyword score value represents the readability of at least one keyword in the path text.

[0062] Optionally, the terminal device can use the above-mentioned short text keyword extraction model to determine the keyword score value corresponding to each keyword. Wherein, the short text keyword extraction model stores a screening rule, which can use the screening rule to score at least one keyword. Wherein, the screening rule can include but is not limited to the word frequency of at least one keyword, the part of speech corresponding to at least one keyword, the context semantics corresponding to at least one keyword, and a preset dictionary.

[0063] For example, the short text keyword extraction model determines a keyword score value of each keyword according to a word frequency of the keyword in the text path, where the higher the word frequency, the higher the keyword score value of the keyword. For another example, the short text keyword extraction model can determine the keyword score value according to a context semantic of the keyword in the text path, where the better the context semantic of the keyword in the text path is expressed, the higher the corresponding keyword score value is.

[0064] It should be noted that since the keyword score value represents the readability of each keyword in the path text, the terminal device can determine the target keyword with the best readability according to the keyword score value, and the target folder corresponding to the target keyword is displayed, which can improve the readability of the file resources for the user.

[0065] In an optional embodiment, after obtaining the keyword score corresponding to each keyword, the terminal device can determine a target keyword from the at least one keyword based on the keyword score value. Specifically, the terminal device first determines a number of keywords with a keyword score value greater than or equal to a preset score value from the at least one keyword, and when the number of keywords is greater than or equal to a preset number, obtains at least one candidate keyword with a keyword score value greater than or equal to the preset score value, and then determines a keyword with the maximum keyword score value from the at least one candidate keyword as the target keyword.

[0066] Optionally, the terminal device first obtains a number of keywords with a keyword score value greater than or equal to a preset score value, and if the number of keywords is greater than or equal to 1, that is, there is a keyword with a keyword score value greater than or equal to the preset score value, the terminal device selects a keyword with the highest keyword score value from the keywords with the keyword score value greater than or equal to the preset score value as the target keyword. For example, in the path text of “ / my videos / my university videos 1-3 years / first year / class activities”, the score of the keyword “university” is the highest, and “university” is selected as the target keyword.

[0067] It should be noted that since the keyword score value represents the readability of each keyword in the path text, selecting the keyword with the highest keyword score value as the target keyword can improve the display effect of the target folder on the file resources and improve the user experience.

[0068] In addition, when the number of keywords is less than the preset number, the terminal device determines the first folder as the target folder. That is, when there is no keyword with a keyword score value greater than or equal to the preset score value in the extracted keywords, the folder where the target file is located can be directly displayed on the home page of the file system.

[0069] It should be noted that when the keyword score of the keyword extracted from the path text is low, the folder where the target file is located is directly displayed on the homepage of the file system, and the target file is aggregated, thereby realizing the sorting and classification of the file resources.

[0070] Further, after keyword extraction is performed on the at least one target text unit, in a case where at least one keyword is not extracted, the terminal device determines the first folder as the target folder. That is, when no keyword is collected by the terminal device, the folder where the target file is located is directly displayed on the homepage of the file system. For example, after text cleaning is performed on the path text, the cleaned path text does not contain any text, and at this time, the terminal device cannot extract any keyword. In this scenario, the folder where the target file is located is directly displayed on the homepage of the file system.

[0071] It should be noted that when no keyword can be extracted from the path text, the folder where the target file is located is directly displayed on the homepage of the file system, and the target file is aggregated, thereby realizing the sorting and classification of the file resources.

[0072] Further, after the target keyword is obtained, the terminal device can first determine the number of target folders corresponding to the target keyword. When the target keyword corresponds to only one target folder, the target folder is directly displayed on the homepage of the file system. When the target keyword corresponds to a plurality of target folders, the terminal device needs to determine the target folder to be displayed according to the hierarchical relationship between the target keyword and the plurality of target folders.

[0073] Specifically, when the target keyword corresponds to a plurality of folders, the terminal device obtains the hierarchy of the plurality of candidate folders corresponding to the target keyword, and determines the target folder from the plurality of candidate folders according to the hierarchy of the plurality of candidate folders. For example, the target file "2.mp4" is stored under the path text " / My Videos / My University Videos 1-3 Years / University Class Activities / Out-of-school Activities", and the target keyword corresponding to the target file is "university". The target keyword "university" is included in both the "My University Videos 1-3 Years" folder and the "University Class Activities" folder. At this time, the terminal device can select the folder with the least hierarchy as the target folder according to the hierarchy of the target file "2.mp4" and the "My University Videos 1-3 Years" folder and the "University Class Activities" folder, for example, the hierarchy of the "My University Videos 1-3 Years" folder and the target file "2.mp4" is 3, and the hierarchy of the "University Class Activities" folder and the target file "2.mp4" is 2, and the "University Class Activities" folder is determined as the target folder.

[0074] Further, after the target folder is determined, the terminal device uses the path of " / My Videos / My University Videos 1-3 Years / University Class Activities / " to locate the resource of the target file "2.mp4" and display the resource collection, and at this time, the folder of "University Class Activities" is directly displayed on the homepage of the file system.

[0075] It should be noted that when the target keyword corresponds to multiple target folders, the target folder to be displayed is determined according to the hierarchical relationship between the target file and the multiple target folders, that is, the target folder with the best readability is selected from the multiple target folders with better readability, and the target folder with the best readability is directly displayed on the homepage of the file system, which can improve the display effect of the target folder on the file resource and improve the user experience.

[0076] In an optional embodiment, Figure 5 An optional method flowchart for displaying a folder is shown, which is shown in Figure 5 As shown, the terminal device first acquires the complete path corresponding to the upper-level folder of the target file, and then performs data cleaning on the path text corresponding to the complete path to obtain cleaned path text. Then, short text keyword extraction is performed based on the cleaned path text to determine whether there is a keyword with a keyword score value not lower than a preset score value. If there is, the lowest layer folder (i.e., the layer number between the target file is the least) in which the keyword with the highest keyword score value is located is acquired, and the lowest layer folder is directly displayed on the homepage of the file system; if there is not, the upper-level folder of the target file is directly displayed on the homepage of the file system.

[0077] From the above content, it can be known that the disclosure extracts the path text by using the keyword extraction method which is one of natural language processing common technologies, and displays the folder with the best readability on the homepage of the file system, which can effectively reduce the hierarchical level of user clicks and display more file resources under the user space. Compared with the existing technology, which directly displays the folder where the file is located and the file itself, the disclosure can also reserve a certain storage organization structure for the file resource. Under the premise of not invading and destroying the original storage structure of the user space, the display level of the folder can be dynamically adjusted to a certain extent to gather a series of file resources, which facilitates the user to switch and browse.

[0078] Example 2

[0079] According to the embodiments of the disclosure, the disclosure also provides a device for displaying a folder, wherein, Figure 6 is a schematic diagram of a device for displaying a folder according to an embodiment of the disclosure, as Figure 6As shown, the apparatus comprises: an acquisition module 601, an extraction module 603, a determination module 605, and a display module 607.

[0080] The acquisition module 601 is configured to acquire a path text corresponding to a first folder, wherein the first folder contains at least a target file, the path text is composed of names of at least one folder, and there is a hierarchical relationship between the at least one folder; the extraction module 603 is configured to perform keyword extraction on the path text to obtain at least one keyword; the determination module 605 is configured to determine a target keyword from the at least one keyword according to a readability of the target keyword in the path text; and the display module 607 is configured to determine a target folder corresponding to the target keyword from at least one folder corresponding to the path text, and display the target folder, wherein the target folder is a to-be-displayed folder corresponding to the target file.

[0081] It should be noted that the acquisition module 601, the extraction module 603, the determination module 605, and the display module 607 correspond to steps S302 to S308 in the above embodiment, and the four modules have the same examples and application scenarios as the corresponding steps, but are not limited to the content disclosed in the above embodiment 1.

[0082] Optionally, the acquisition module comprises: a first acquisition module, a first determination module, a second determination module, and a second acquisition module. The first acquisition module is configured to acquire a target file stored in a file system; the first determination module is configured to determine that a parent folder corresponding to the target file is a first folder; the second determination module is configured to determine an absolute path corresponding to the first folder; and the second acquisition module is configured to acquire a text corresponding to the absolute path to obtain a path text.

[0083] Optionally, the apparatus for displaying a folder further comprises: a segmentation module, a first processing module, and a second processing module. The segmentation module is configured to, before obtaining at least one keyword by performing keyword extraction on the path text, perform segmentation processing on the path text based on a first preset character to obtain at least one text unit; the first processing module is configured to remove a text unit corresponding to a second folder from the at least one text unit to obtain at least one candidate text unit, wherein the second folder is a folder created based on a business corresponding to the file system; and the second processing module is configured to remove a second preset character in the at least one candidate text unit to obtain at least one target text unit.

[0084] Optionally, the determining module comprises a third determining module and a fourth determining module. The third determining module is configured to determine a keyword score value corresponding to the at least one keyword, wherein the keyword score value represents a readability of the at least one keyword in the path text. The fourth determining module is configured to determine a target keyword from the at least one keyword according to the keyword score value.

[0085] Optionally, the fourth determining module comprises a fifth determining module, a third obtaining module and a sixth determining module. The fifth determining module is configured to determine a keyword quantity of keywords with keyword score values greater than or equal to a preset score value from the at least one keyword. The third obtaining module is configured to obtain at least one candidate keyword with a keyword score value greater than or equal to the preset score value when the keyword quantity is greater than or equal to a preset quantity. The sixth determining module is configured to determine a keyword with the maximum keyword score value from the at least one candidate keyword as the target keyword.

[0086] Optionally, the apparatus for displaying the folder further comprises a seventh determining module configured to determine the first folder as the target folder when the keyword quantity is less than the preset quantity.

[0087] Optionally, the apparatus for displaying the folder further comprises an eighth determining module configured to determine the first folder as the target folder when no keyword is extracted from the at least one target text unit.

[0088] Optionally, the displaying module comprises a fourth obtaining module and a ninth determining module. The fourth obtaining module is configured to obtain a hierarchy of a plurality of candidate folders corresponding to the target keyword when the folder corresponding to the target keyword is the plurality of candidate folders. The ninth determining module is configured to determine the target folder from the plurality of candidate folders according to the hierarchy of the plurality of candidate folders.

[0089] Example 3

[0090] According to embodiments of the present disclosure, the present disclosure further provides an electronic device, a readable storage medium and a computer program product.

[0091] Figure 7A schematic block diagram of an example electronic device 800 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0092] like Figure 7 As shown, device 800 includes a computing unit 801, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 802 or a computer program loaded from storage unit 808 into random access memory (RAM) 803. RAM 803 may also store various programs and data required for the operation of device 800. The computing unit 801, ROM 802, and RAM 803 are interconnected via bus 804. Input / output (I / O) interface 805 is also connected to bus 804.

[0093] Multiple components in device 800 are connected to I / O interface 805, including: input unit 806, such as keyboard, mouse, etc.; output unit 807, such as various types of monitors, speakers, etc.; storage unit 808, such as disk, optical disk, etc.; and communication unit 809, such as network card, modem, wireless transceiver, etc. Communication unit 809 allows device 800 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0094] The computing unit 801 can be various general and / or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 801 performs various methods and processes described above, such as the method of presenting a folder. For example, in some embodiments, the method of presenting a folder can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 808. In some embodiments, part or all of the computer program can be loaded and / or installed onto the device 800 via the ROM 802 and / or the communication unit 809. When the computer program is loaded onto the RAM 803 and executed by the computing unit 801, one or more steps of the method of presenting a folder described above can be performed. Alternatively, in other embodiments, the computing unit 801 can be configured to perform the method of presenting a folder by any other suitable means, such as by means of firmware.

[0095] Various implementations of the systems and techniques described above can be realized in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a programmable logic device (PLD), a computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.

[0096] Program code for carrying out methods of the present disclosure can be written in any combination of one or more programming languages. The program code can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the program code, when executed by the processor or controller, produces the functions / operations specified in the flowcharts and / or the block diagrams. The program code can be executed entirely on a machine, partially on a machine, partially on a machine as a stand-alone software package, partially on a machine and partially on a remote machine or entirely on a remote machine or server.

[0097] In the context of this disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include but is not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0098] To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.

[0099] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.

[0100] The computer system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0101] It should be understood that the various forms of flow shown above can be used to reorder, add, or remove steps. For example, the steps described in the present disclosure can be performed in parallel, in series, or in a different order, as long as the desired results of the technology disclosed in the present disclosure are achieved, which is not limited herein.

[0102] The specific implementation described above does not constitute a limitation on the protection scope of the present disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent replacements, and improvements made within the spirit and principles of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A method for displaying a file folder, comprising: obtaining a path text corresponding to a first file folder, wherein the first file folder contains at least a target file, and the path text is composed of names of at least one file folder, and there is a hierarchical relationship between the at least one file folder; performing keyword extraction on the path text to obtain at least one keyword; determining a target keyword from the at least one keyword according to a readability of the at least one keyword in the path text, wherein the target keyword is determined based on a keyword score value, and the keyword score value is used to represent the readability of the at least one keyword in the path text; determining a target file folder corresponding to the target keyword from at least one file folder corresponding to the path text, and displaying the target file folder, wherein the target file folder is a to-be-displayed file folder corresponding to the target file. The obtaining of the path text corresponding to the first file folder comprises: obtaining a target file stored in a file system; determining a parent folder corresponding to the target file as the first file folder; determining an absolute path corresponding to the first file folder; and obtaining a text corresponding to the absolute path to obtain the path text.

2. The method of claim 1, before the keyword extraction on the path text to obtain at least one keyword, the method further comprises: performing a segmentation processing on the path text based on a first preset character to obtain at least one text unit; removing a text unit corresponding to a second file folder from the at least one text unit to obtain at least one candidate text unit, wherein the second file folder is a file folder created based on a business corresponding to the file system; removing a second preset character in the at least one candidate text unit to obtain at least one target text unit.

3. The method of claim 2, the determining of the target keyword from the at least one keyword according to the readability of the at least one keyword in the path text comprises: determining a keyword score value corresponding to the at least one keyword; determining the target keyword from the at least one keyword according to the keyword score value.

4. The method of claim 3, the determining of the target keyword from the at least one keyword according to the keyword score value comprises: determining a number of keywords whose keyword score values are greater than or equal to a preset score value from the at least one keyword; when the number of keywords is greater than or equal to a preset number, obtaining at least one candidate keyword whose keyword score value is greater than or equal to the preset score value; determining a keyword whose keyword score value is the largest from the at least one candidate keyword as the target keyword.

5. The method of claim 4, the method further comprises: when the number of keywords is less than the preset number, determining the first file folder as the target file folder.

6. The method of claim 3, after the keyword extraction on the at least one target text unit, the method further comprises: In a case where the at least one keyword is not extracted, the first folder is determined as the target folder.

7. The method of claim 1, wherein determining the target folder corresponding to the target keyword from at least one folder corresponding to the path text comprises: in a case where the folder corresponding to the target keyword is a plurality of folders, obtaining a hierarchy of a plurality of candidate folders corresponding to the target keyword; determining the target folder from the plurality of candidate folders according to the hierarchy of the plurality of candidate folders.

8. An apparatus for displaying a folder, comprising: an obtaining module configured to obtain a path text corresponding to a first folder, wherein the first folder contains at least a target file, and the path text is composed of names of at least one folder, and there is a hierarchy relationship between the at least one folder; an extracting module configured to perform keyword extraction on the path text to obtain at least one keyword; a determining module configured to determine a target keyword from the at least one keyword according to a readability of the at least one keyword in the path text, wherein the target keyword is determined based on a keyword score value, and the keyword score value is used to represent the readability of the at least one keyword in the path text; a displaying module configured to determine a target folder corresponding to the target keyword from at least one folder corresponding to the path text, and display the target folder, wherein the target folder is a to-be-displayed folder corresponding to the target file; the obtaining module is further configured to obtain a target file stored in a file system, determine a parent folder of the target file as the first folder, determine an absolute path corresponding to the first folder, and obtain a text corresponding to the absolute path to obtain the path text.

9. An electronic device, comprising: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method for displaying a folder according to any one of claims 1 to 7.

10. A non-transitory computer readable storage medium having stored thereon computer instructions, wherein, The computer instructions are used to enable the computer to perform the method for displaying a folder according to any one of claims 1 to 7.

11. A computer program product comprising a computer program which, when executed by a processor, implements the method for displaying a folder according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Electronic device and file browsing method

    CN103714076A