CN112631998A - Folder display method and related equipment - Google Patents

Folder display method and related equipment Download PDF

Info

Publication number
CN112631998A
CN112631998A CN202011504637.6A CN202011504637A CN112631998A CN 112631998 A CN112631998 A CN 112631998A CN 202011504637 A CN202011504637 A CN 202011504637A CN 112631998 A CN112631998 A CN 112631998A
Authority
CN
China
Prior art keywords
folder
processed
determining
subfolders
file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011504637.6A
Other languages
Chinese (zh)
Other versions
CN112631998B (en
Inventor
贾梦晓
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Hongjin Information Technology Co ltd
Shenzhen Lian Intellectual Property Service Center
Original Assignee
Ping An Puhui Enterprise Management Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Puhui Enterprise Management Co Ltd filed Critical Ping An Puhui Enterprise Management Co Ltd
Priority to CN202011504637.6A priority Critical patent/CN112631998B/en
Publication of CN112631998A publication Critical patent/CN112631998A/en
Application granted granted Critical
Publication of CN112631998B publication Critical patent/CN112631998B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/168Details of user interfaces specifically adapted to file systems, e.g. browsing and visualisation, 2d or 3d GUIs
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

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

Abstract

The invention relates to data processing and provides a folder display method and related equipment. The method comprises the steps of obtaining a folder to be processed, traversing the folder to be processed to obtain a file hierarchy of the folder to be processed, determining a subfolder of a next hierarchy of the folder to be processed as a target folder, determining the number of folders in each target folder, determining the total number of subfolders of the folder to be processed according to the number of the folders, determining the number of files in each target folder, determining the total number of subfolders of the folder to be processed according to the number of the files, generating a file name of the folder to be processed according to the file hierarchy, the total number of the subfolders and the total number of the subfolders, and displaying the folder to be processed according to the file name. The invention can visually display the specific number of the files contained in the folder. In addition, the invention also relates to a block chain technology, and the file name can be stored in the block chain.

Description

Folder display method and related equipment
Technical Field
The invention relates to the technical field of data processing, in particular to a folder display method and related equipment.
Background
In current Windows systems, the specific number of subfiles contained in a folder is generally known in the following two ways. Firstly, clicking the attribute of the folder through a mouse; and secondly, double-clicking the folder through a mouse, and manually calculating the number of the subfiles contained in the folder.
However, in both of these methods, the specific number of subfiles contained in the folder cannot be visually displayed, so that the user cannot quickly determine the target folder containing rich information.
Disclosure of Invention
In view of the foregoing, there is a need for a folder display method and related device, which can visually display the number of specific files contained in a folder, and quickly determine a target folder containing rich information without manual operation and without checking the number of files contained in the folder.
In one aspect, the present invention provides a folder display method, including:
when a folder display request is received, acquiring a folder to be processed from the folder display request;
traversing the folder to be processed to obtain a file level of the folder to be processed;
determining a subfolder of a next level of the folder to be processed as a target folder;
determining the number of folders in each target folder, and determining the total amount of subfolders of the folder to be processed according to the number of the folders;
determining the number of files in each target folder, and determining the total amount of subfiles of the folder to be processed according to the number of the files;
generating the file name of the folder to be processed according to the file level, the total amount of the subfolders and the total amount of the subfolders;
and displaying the folder to be processed according to the file name.
According to a preferred embodiment of the present invention, the traversing the folder to be processed to obtain the file hierarchy of the folder to be processed includes:
determining the number of nodes adjacent to the folder to be processed by taking the folder to be processed as a root node;
determining the idle number of idle threads in a preset thread pool, and detecting whether the number of nodes is greater than the idle number;
when the number of the nodes is smaller than the idle number, acquiring the processing efficiency of the idle thread;
screening the processing threads with the number being the number of the nodes from the idle threads according to the processing efficiency;
respectively traversing the adjacent nodes in the folder to be processed by using the processing thread until an atomic folder is traversed to obtain a plurality of levels of the folder to be processed;
determining a hierarchy with the largest value in the plurality of hierarchies as a target hierarchy;
and calculating the sum of the target level and a preset value to obtain the file level.
According to a preferred embodiment of the present invention, the determining the subfolders of the next hierarchy of the folder to be processed as the target folder comprises:
and determining the subfolders corresponding to the adjacent nodes as the target folder.
According to a preferred embodiment of the present invention, the determining the number of folders in each target folder, and the determining the total number of subfolders of the folder to be processed according to the number of folders includes:
screening subfolders from each target folder;
calculating the number of the subfolders in each target folder to obtain the number of the folders;
and calculating the sum of the number of the folders to obtain the total amount of the subfolders.
According to a preferred embodiment of the present invention, the generating the filename of the to-be-processed folder according to the file hierarchy, the total amount of the subfolders, and the total amount of the subfolders includes:
acquiring a trigger user of the folder display request;
acquiring a configuration naming template corresponding to the trigger user;
determining the naming sequence of the configuration naming template;
and splicing the file hierarchy, the total amount of the subfolders and the total amount of the subfiles according to the naming sequence to obtain the file name.
According to a preferred embodiment of the present invention, the acquiring the to-be-processed folder from the folder display request includes:
analyzing the message of the folder display request to obtain the data information carried by the message;
acquiring a preset label, wherein the preset label is used for indicating a folder;
acquiring information corresponding to the preset label from the data information as a file identifier;
and determining the folder to be processed according to the file identifier.
According to a preferred embodiment of the present invention, after displaying the to-be-processed folder with the file name, the method further comprises:
generating a feedback data packet of the folder display request according to the file identification and the file name;
determining a request level of the folder display request;
determining a sending mode according to the request level;
and sending the feedback data packet to the terminal equipment of the trigger user in the sending mode.
In another aspect, the present invention further provides a folder display device, including:
the device comprises an acquisition unit, a processing unit and a display unit, wherein the acquisition unit is used for acquiring a folder to be processed from a folder display request when the folder display request is received;
the traversing unit is used for traversing the folder to be processed to obtain the file level of the folder to be processed;
the determining unit is used for determining a subfolder of the next level of the folder to be processed as a target folder;
the determining unit is further configured to determine the number of folders in each target folder, and determine the total number of subfolders of the folder to be processed according to the number of the folders;
the determining unit is further configured to determine the number of files in each target folder, and determine the total amount of subfiles of the folder to be processed according to the number of files;
the generating unit is used for generating the file name of the folder to be processed according to the file hierarchy, the total amount of the subfolders and the total amount of the subfolders;
and the display unit is used for displaying the folder to be processed according to the file name.
In another aspect, the present invention further provides an electronic device, including:
a memory storing computer readable instructions; and
a processor executing computer readable instructions stored in the memory to implement the folder display method.
In another aspect, the present invention also provides a computer-readable storage medium, in which computer-readable instructions are stored, and the computer-readable instructions are executed by a processor in an electronic device to implement the folder display method.
According to the technical scheme, the file hierarchy of the folder to be processed can be quickly determined by performing traversal processing on the folder to be processed, the number of the determined folders and the number of the determined files in the target folder can be calculated, the total amount of the subfolders and the total amount of the subfiles can be accurately determined, the file name of the folder to be processed is generated according to the file hierarchy, the total amount of the subfolders and the total amount of the subfiles, the specific number of the files contained in the folder to be processed can be visually displayed, and the target folder containing rich information can be quickly determined without manual operation and checking of the number of the files contained in the folder to be processed by a user.
Drawings
FIG. 1 is a flowchart illustrating a folder display method according to a preferred embodiment of the present invention.
FIG. 2 is a flow diagram of one embodiment of the present invention for determining the file hierarchy at which a pending folder is located.
FIG. 3 is a flow diagram of one embodiment of the present invention for generating filenames for pending folders.
FIG. 4 is a functional block diagram of a preferred embodiment of the folder display device of the present invention.
FIG. 5 is a schematic structural diagram of an electronic device implementing a folder display method according to a preferred embodiment of the invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in detail with reference to the accompanying drawings and specific embodiments.
FIG. 1 is a flowchart illustrating a folder display method according to a preferred embodiment of the present invention. The order of the steps in the flow chart may be changed and some steps may be omitted according to different needs.
The folder display method is applied to one or more electronic devices, which are devices capable of automatically performing numerical calculation and/or information processing according to computer readable instructions set or stored in advance, and the hardware of the electronic devices includes, but is not limited to, a microprocessor, an Application Specific Integrated Circuit (ASIC), a Programmable Gate Array (FPGA), a Digital Signal Processor (DSP), an embedded device, and the like.
The electronic device may be any electronic product capable of performing human-computer interaction with a user, for example, a Personal computer, a tablet computer, a smart phone, a Personal Digital Assistant (PDA), a game machine, an interactive Internet Protocol Television (IPTV), a smart wearable device, and the like.
The electronic device may include a network device and/or a user device. Wherein the network device includes, but is not limited to, a single network electronic device, an electronic device group consisting of a plurality of network electronic devices, or a Cloud Computing (Cloud Computing) based Cloud consisting of a large number of hosts or network electronic devices.
The network in which the electronic device is located includes, but is not limited to: the internet, a wide area Network, a metropolitan area Network, a local area Network, a Virtual Private Network (VPN), and the like.
S10, when receiving the folder display request, obtaining the folder to be processed from the folder display request.
In at least one embodiment of the present invention, the folder display request may be triggered by a user, or may be generated when any system detects that there are folders whose specific number cannot be visually displayed.
The information carried by the folder display request includes, but is not limited to: file identification, etc.
The files to be processed refer to the specific number of files of the subfolders which need to be visually displayed.
In at least one embodiment of the present invention, the obtaining, by the electronic device, the to-be-processed folder from the folder display request includes:
analyzing the message of the folder display request to obtain the data information carried by the message;
acquiring a preset label, wherein the preset label is used for indicating a folder;
acquiring information corresponding to the preset label from the data information as a file identifier;
and determining the folder to be processed according to the file identifier.
Wherein the data information includes the file identifier and the like.
The preset tag may be stored in the message, or may be stored in a configuration tag.
According to the embodiment, the whole folder display request does not need to be analyzed, the analysis efficiency of the folder display request can be improved, the file identification can be accurately acquired from the data information through the mapping relation between the preset label and the file identification, and the folder to be processed can be accurately determined.
S11, traversing the folder to be processed to obtain the file hierarchy of the folder to be processed.
In at least one embodiment of the present invention, the file hierarchy refers to a hierarchy in which the to-be-processed folder is located in the electronic device. For example, the folder to be processed includes subfolder a1, and subfolder a1 includes subfolder a2, so the folder to be processed is at a file level of 3.
Referring to FIG. 2, FIG. 2 is a flow diagram of one embodiment of the present invention for determining the file hierarchy at which a pending folder is located. In at least one embodiment of the present invention, the traversing, by the electronic device, the folder to be processed to obtain the file hierarchy of the folder to be processed includes:
s110, taking the folder to be processed as a root node, and determining the number of nodes adjacent to the folder to be processed.
The adjacent node refers to a subfolder of a next layer of the folder to be processed.
S111, determining the idle number of idle threads in a preset thread pool, and detecting whether the number of the nodes is larger than the idle number.
The preset thread pool comprises a plurality of pre-established threads, and the pre-established threads comprise a plurality of idle threads and non-idle threads.
The idle thread refers to a thread in an idle state.
S112, when the number of the nodes is smaller than the idle number, acquiring the processing efficiency of the idle thread.
The processing efficiency refers to the efficiency of the idle thread processing requests.
S113, screening the processing threads with the number being the number of the nodes from the idle threads according to the processing efficiency.
Specifically, the screening, by the electronic device, the number of processing threads that is the number of the nodes from the idle threads according to the processing efficiency includes:
and the electronic equipment sequences the idle threads according to the sequence of the processing efficiency from large to small to obtain a thread queue, and extracts the first N idle threads from the thread queue as the processing threads, wherein N is the number of the nodes.
And S114, respectively traversing the adjacent nodes in the folder to be processed by using the processing thread until the processing thread traverses an atomic folder to obtain a plurality of levels of the folder to be processed.
The plurality of hierarchies refer to hierarchies corresponding to the neighboring nodes.
And S115, determining the hierarchy with the maximum value in the plurality of hierarchies as a target hierarchy.
And S116, calculating the sum of the target level and a preset value to obtain the file level.
The preset value is typically set to 1.
For example: the folder to be processed is B, the folder to be processed B includes subfolder B1, subfolder B2 and subfolder B3, and therefore, it can be determined that the number of nodes of the folder to be processed B is 3, when 5 idle threads are obtained from the preset thread pool, since the number of nodes is 3 and is less than 5, the processing efficiency of each idle thread is obtained, the processing efficiency of idle thread c1 is 5M/s, the processing efficiency of idle thread c2 is 10M/s, the processing efficiency of idle thread c3 is 15M/s, the processing efficiency of idle thread c4 is 25M/s, and the processing efficiency of idle thread c5 is 35M/s, and then the idle thread c3, the idle thread c4 and the idle thread c5 are selected from the preset thread pool as processing threads, and the thread c3 is used as a processing thread to traverse the subfolder B1, traversing the subfolder b2 by using the idle thread c4 as a processing thread, and traversing the subfolder b3 by using the idle thread c5 as a processing thread to obtain that the level of the subfolder b1 is 5, the level of the subfolder b2 is 7, the level of the subfolder b3 is 9, further determining that the target level is 9, and when the preset value is set to 1, calculating the sum of the target level and the preset value to obtain the file level of 10.
By acquiring a plurality of processing threads from the preset thread pool, a plurality of levels of the folder to be processed can be quickly determined, and then the file levels can be quickly determined.
S12, determining the subfolder of the next level of the folder to be processed as a target folder.
In at least one embodiment of the present invention, the target folder refers to a subfolder that is adjacent to the to-be-processed folder and takes the to-be-processed folder as a root node.
In at least one embodiment of the present invention, the electronic device determining a subfolder of a next hierarchy of the folder to be processed as a target folder includes:
and determining the subfolders corresponding to the adjacent nodes as the target folder.
Through the implementation mode, the target folder can be determined quickly.
S13, determining the number of folders in each target folder, and determining the total number of subfolders of the folder to be processed according to the number of the folders.
In at least one embodiment of the present invention, the folder number refers to the number of subfolders in the target folder. For example, the target folder includes subfolder d1 and subfolder d2, and subfolder d1 includes subfolder d11, so that the folder number is 3.
The total number of subfolders refers to the sum of the number of folders of all target folders.
In at least one embodiment of the present invention, the electronic device determining the number of folders in each target folder, and determining the total number of subfolders of the folder to be processed according to the number of folders includes:
screening subfolders from each target folder;
calculating the number of the subfolders in each target folder to obtain the number of the folders;
and calculating the sum of the number of the folders to obtain the total amount of the subfolders.
By directly screening the subfolders from the target folder, the total amount of the subfolders can be determined quickly and accurately because other files do not exist as interference information.
S14, determining the number of files in each target folder, and determining the total amount of subfiles of the folder to be processed according to the number of files.
In at least one embodiment of the present invention, the number of files refers to the number of files in the target folder. For example, the target folder includes the subfolder D1 and the subfolder D2, the subfolder D1 includes the document a and the document B, and the subfolder D2 includes the document C, the document D, and the document E, so that it can be determined that the number of files in the target folder is 5.
In at least one embodiment of the present invention, the electronic device determines the number of files in each target folder, and a manner of determining the total amount of subfiles of the to-be-processed folder according to the number of files is the same as a manner of determining the total amount of subfiles of each target folder by the electronic device, and a manner of determining the total amount of subfiles of the to-be-processed folder according to the number of folders is the same, which is not described herein again.
And S15, generating the file name of the folder to be processed according to the file hierarchy, the total amount of the subfolders and the total amount of the subfolders.
In at least one embodiment of the present invention, the file name is generated according to a configuration naming template pre-configured by the trigger user, the file hierarchy, the total number of subfolders, and the total number of subfiles. For example, the file name is [ n ] [ a, b ], where n indicates the file level, a indicates the total number of subfolders, and b indicates the total number of subfolders.
Referring to fig. 3, fig. 3 is a flowchart of an embodiment of generating the file name of the pending folder according to the present invention. In at least one embodiment of the present invention, the generating, by the electronic device, the filename of the to-be-processed folder according to the file hierarchy, the total amount of the subfolders, and the total amount of the subfolders includes:
s150, acquiring a trigger user of the folder display request.
And the triggering user refers to a user triggering the generation of the folder display request.
And S151, acquiring a configuration naming template corresponding to the trigger user.
The configured naming template refers to a naming template which is configured in advance by the trigger user.
S152, determining the naming sequence of the configuration naming template.
S153, the file hierarchy, the total amount of the subfolders and the total amount of the subfolders are spliced according to the naming sequence to obtain the file name.
It is emphasized that the file name may also be stored in a node of a blockchain in order to further ensure privacy and security of the file name.
Through the embodiment, the file name meeting the requirements of the trigger user can be generated, and the file name can be generated to visually display the number of the specific files contained in the file to be processed, so that the user can quickly determine the target folder containing rich information.
And S16, displaying the folder to be processed by the file name.
In at least one embodiment of the present invention, after displaying the to-be-processed folder with the file name, the method further comprises:
generating a feedback data packet of the folder display request according to the file identification and the file name;
determining a request level of the folder display request;
determining a sending mode according to the request level;
and sending the feedback data packet to the terminal equipment of the trigger user in the sending mode.
Wherein the request level refers to the urgency of the folder display request.
The transmission method is a transmission method of the feedback packet, and the transmission method is a method corresponding to the request level, and for example, the transmission method may be a mail method.
Through the embodiment, the trigger user can be timely notified through a proper sending mode when the file name is generated.
According to the technical scheme, the file hierarchy of the folder to be processed can be quickly determined by performing traversal processing on the folder to be processed, the number of the determined folders and the number of the determined files in the target folder can be calculated, the total amount of the subfolders and the total amount of the subfiles can be accurately determined, the file name of the folder to be processed is generated according to the file hierarchy, the total amount of the subfolders and the total amount of the subfiles, the specific number of the files contained in the folder to be processed can be visually displayed, and the target folder containing rich information can be quickly determined without manual operation and checking of the number of the files contained in the folder to be processed by a user.
Fig. 4 is a functional block diagram of a folder display device according to a preferred embodiment of the present invention. The folder display device 11 includes an acquisition unit 110, a traversal unit 111, a determination unit 112, a generation unit 113, a display unit 114, and a transmission unit 115. The module/unit referred to herein is a series of computer readable instruction segments that can be accessed by the processor 13 and perform a fixed function and that are stored in the memory 12. In the present embodiment, the functions of the modules/units will be described in detail in the following embodiments.
When receiving a folder display request, the acquisition unit 110 acquires a folder to be processed from the folder display request.
In at least one embodiment of the present invention, the folder display request may be triggered by a user, or may be generated when any system detects that there are folders whose specific number cannot be visually displayed.
The information carried by the folder display request includes, but is not limited to: file identification, etc.
The files to be processed refer to the specific number of files of the subfolders which need to be visually displayed.
In at least one embodiment of the present invention, the obtaining unit 110 obtains the folder to be processed from the folder display request, including:
analyzing the message of the folder display request to obtain the data information carried by the message;
acquiring a preset label, wherein the preset label is used for indicating a folder;
acquiring information corresponding to the preset label from the data information as a file identifier;
and determining the folder to be processed according to the file identifier.
Wherein the data information includes the file identifier and the like.
The preset tag may be stored in the message, or may be stored in a configuration tag.
According to the embodiment, the whole folder display request does not need to be analyzed, the analysis efficiency of the folder display request can be improved, the file identification can be accurately acquired from the data information through the mapping relation between the preset label and the file identification, and the folder to be processed can be accurately determined.
The traversing unit 111 traverses the folder to be processed to obtain a file hierarchy of the folder to be processed.
In at least one embodiment of the present invention, the file hierarchy refers to a hierarchy in which the to-be-processed folder is located in the electronic device. For example, the folder to be processed includes subfolder a1, and subfolder a1 includes subfolder a2, so the folder to be processed is at a file level of 3.
In at least one embodiment of the present invention, the traversing unit 111 traverses the folder to be processed, and obtaining the file hierarchy of the folder to be processed includes:
and determining the number of nodes of the adjacent nodes of the folder to be processed by taking the folder to be processed as a root node.
The adjacent node refers to a subfolder of a next layer of the folder to be processed.
And determining the idle number of idle threads in a preset thread pool, and detecting whether the number of the nodes is greater than the idle number.
The preset thread pool comprises a plurality of pre-established threads, and the pre-established threads comprise a plurality of idle threads and non-idle threads.
The idle thread refers to a thread in an idle state.
And when the number of the nodes is smaller than the idle number, acquiring the processing efficiency of the idle thread.
The processing efficiency refers to the efficiency of the idle thread processing requests.
And screening the processing threads with the number being the number of the nodes from the idle threads according to the processing efficiency.
Specifically, the step of the traversing unit 111 screening the number of the processing threads with the node number from the idle threads according to the processing efficiency includes:
the traversal unit 111 sequences the idle threads according to the order of the processing efficiency from large to small to obtain a thread queue, and extracts the first N idle threads from the thread queue as the processing threads, where N is the number of the nodes.
And respectively traversing the adjacent nodes in the folder to be processed by using the processing thread until an atomic folder is traversed, and obtaining a plurality of levels of the folder to be processed.
The plurality of hierarchies refer to hierarchies corresponding to the neighboring nodes.
Determining a highest-valued hierarchy among the plurality of hierarchies as a target hierarchy.
And calculating the sum of the target level and a preset value to obtain the file level.
The preset value is typically set to 1.
For example: the folder to be processed is B, the folder to be processed B includes subfolder B1, subfolder B2 and subfolder B3, and therefore, it can be determined that the number of nodes of the folder to be processed B is 3, when 5 idle threads are obtained from the preset thread pool, since the number of nodes is 3 and is less than 5, the processing efficiency of each idle thread is obtained, the processing efficiency of idle thread c1 is 5M/s, the processing efficiency of idle thread c2 is 10M/s, the processing efficiency of idle thread c3 is 15M/s, the processing efficiency of idle thread c4 is 25M/s, and the processing efficiency of idle thread c5 is 35M/s, and then the idle thread c3, the idle thread c4 and the idle thread c5 are selected from the preset thread pool as processing threads, and the thread c3 is used as a processing thread to traverse the subfolder B1, traversing the subfolder b2 by using the idle thread c4 as a processing thread, and traversing the subfolder b3 by using the idle thread c5 as a processing thread to obtain that the level of the subfolder b1 is 5, the level of the subfolder b2 is 7, the level of the subfolder b3 is 9, further determining that the target level is 9, and when the preset value is set to 1, calculating the sum of the target level and the preset value to obtain the file level of 10.
By acquiring a plurality of processing threads from the preset thread pool, a plurality of levels of the folder to be processed can be quickly determined, and then the file levels can be quickly determined.
The determination unit 112 determines a subfolder of the next hierarchy of the to-be-processed folder as a target folder.
In at least one embodiment of the present invention, the target folder refers to a subfolder that is adjacent to the to-be-processed folder and takes the to-be-processed folder as a root node.
In at least one embodiment of the present invention, the determining unit 112 determines the subfolder of the next hierarchy of the folder to be processed as the target folder includes:
and determining the subfolders corresponding to the adjacent nodes as the target folder.
Through the implementation mode, the target folder can be determined quickly.
The determining unit 112 determines the number of folders in each target folder, and determines the total number of subfolders of the folder to be processed according to the number of folders.
In at least one embodiment of the present invention, the folder number refers to the number of subfolders in the target folder. For example, the target folder includes subfolder d1 and subfolder d2, and subfolder d1 includes subfolder d11, so that the folder number is 3.
The total number of subfolders refers to the sum of the number of folders of all target folders.
In at least one embodiment of the present invention, the determining unit 112 determines the number of folders in each target folder, and determining the total number of subfolders of the folder to be processed according to the number of folders includes:
screening subfolders from each target folder;
calculating the number of the subfolders in each target folder to obtain the number of the folders;
and calculating the sum of the number of the folders to obtain the total amount of the subfolders.
By directly screening the subfolders from the target folder, the total amount of the subfolders can be determined quickly and accurately because other files do not exist as interference information.
The determining unit 112 determines the number of files in each target folder, and determines the total amount of subfiles of the folder to be processed according to the number of files.
In at least one embodiment of the present invention, the number of files refers to the number of files in the target folder. For example, the target folder includes the subfolder D1 and the subfolder D2, the subfolder D1 includes the document a and the document B, and the subfolder D2 includes the document C, the document D, and the document E, so that it can be determined that the number of files in the target folder is 5.
In at least one embodiment of the present invention, the determining unit 112 determines the number of files in each target folder, and a manner of determining the total amount of the subfiles of the to-be-processed folder according to the number of files is the same as a manner of determining the total amount of the subfiles of the to-be-processed folder by the determining unit 112 and determining the total amount of the subfiles of the to-be-processed folder according to the number of folders, which is not described in detail herein.
The generating unit 113 generates the file name of the folder to be processed according to the file hierarchy, the total amount of the subfolders, and the total amount of the subfolders.
It is emphasized that the file name may also be stored in a node of a blockchain in order to further ensure privacy and security of the file name.
In at least one embodiment of the present invention, the file name is generated according to a configuration naming template pre-configured by the trigger user, the file hierarchy, the total number of subfolders, and the total number of subfiles. For example, the file name is [ n ] [ a, b ], where n indicates the file level, a indicates the total number of subfolders, and b indicates the total number of subfolders.
In at least one embodiment of the present invention, the generating unit 113 generates the file name of the folder to be processed according to the file hierarchy, the total amount of the subfolders, and the total amount of the subfolders includes:
and acquiring a trigger user of the folder display request.
And the triggering user refers to a user triggering the generation of the folder display request.
And acquiring a configuration naming template corresponding to the trigger user.
The configured naming template refers to a naming template which is configured in advance by the trigger user.
And determining the naming sequence of the configuration naming template.
And splicing the file hierarchy, the total amount of the subfolders and the total amount of the subfiles according to the naming sequence to obtain the file name.
Through the embodiment, the file name meeting the requirements of the trigger user can be generated, and the file name can be generated to visually display the number of the specific files contained in the file to be processed, so that the user can quickly determine the target folder containing rich information.
The display unit 114 displays the to-be-processed folder with the file name.
In at least one embodiment of the present invention, after displaying the folder to be processed with the file name, the generating unit 113 generates a feedback data packet of the folder display request according to the file identifier and the file name;
the determination unit 112 determines a request level of the folder display request;
the determining unit 112 determines a sending mode according to the request level;
the sending unit 115 sends the feedback data packet to the terminal device of the trigger user in the sending manner.
Wherein the request level refers to the urgency of the folder display request.
The transmission method is a transmission method of the feedback packet, and the transmission method is a method corresponding to the request level, and for example, the transmission method may be a mail method.
Through the embodiment, the trigger user can be timely notified through a proper sending mode when the file name is generated.
According to the technical scheme, the file hierarchy of the folder to be processed can be quickly determined by performing traversal processing on the folder to be processed, the number of the determined folders and the number of the determined files in the target folder can be calculated, the total amount of the subfolders and the total amount of the subfiles can be accurately determined, the file name of the folder to be processed is generated according to the file hierarchy, the total amount of the subfolders and the total amount of the subfiles, the specific number of the files contained in the folder to be processed can be visually displayed, and the target folder containing rich information can be quickly determined without manual operation and checking of the number of the files contained in the folder to be processed by a user.
Fig. 5 is a schematic structural diagram of an electronic device according to a preferred embodiment of the present invention.
In one embodiment of the present invention, the electronic device 1 includes, but is not limited to, a memory 12, a processor 13, and computer readable instructions, such as a folder display program, stored in the memory 12 and executable on the processor 13.
It will be appreciated by a person skilled in the art that the schematic diagram is only an example of the electronic device 1 and does not constitute a limitation of the electronic device 1, and that it may comprise more or less components than shown, or some components may be combined, or different components, e.g. the electronic device 1 may further comprise an input output device, a network access device, a bus, etc.
The Processor 13 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. The processor 13 is an operation core and a control center of the electronic device 1, and is connected to each part of the whole electronic device 1 by various interfaces and lines, and executes an operating system of the electronic device 1 and various installed application programs, program codes, and the like.
Illustratively, the computer readable instructions may be partitioned into one or more modules/units that are stored in the memory 12 and executed by the processor 13 to implement the present invention. The one or more modules/units may be a series of computer readable instruction segments capable of performing specific functions, which are used for describing the execution process of the computer readable instructions in the electronic device 1. For example, the computer readable instructions may be divided into an acquisition unit 110, a traversal unit 111, a determination unit 112, a generation unit 113, a display unit 114, and a transmission unit 115.
The memory 12 may be used for storing the computer readable instructions and/or modules, and the processor 13 implements various functions of the electronic device 1 by executing or executing the computer readable instructions and/or modules stored in the memory 12 and invoking data stored in the memory 12. The memory 12 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to use of the electronic device, and the like. The memory 12 may include non-volatile and volatile memories, such as: a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other storage device.
The memory 12 may be an external memory and/or an internal memory of the electronic device 1. Further, the memory 12 may be a memory having a physical form, such as a memory stick, a TF Card (Trans-flash Card), or the like.
The integrated modules/units of the electronic device 1 may be stored in a computer-readable storage medium if they are implemented in the form of software functional units and sold or used as separate products. Based on such understanding, all or part of the flow of the method according to the above embodiments may be implemented by hardware that is configured to be instructed by computer readable instructions, which may be stored in a computer readable storage medium, and when the computer readable instructions are executed by a processor, the steps of the method embodiments may be implemented.
Wherein the computer readable instructions comprise computer readable instruction code which may be in source code form, object code form, an executable file or some intermediate form, and the like. The computer-readable medium may include: any entity or device capable of carrying said computer readable instruction code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM).
The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
With reference to fig. 1, the memory 12 in the electronic device 1 stores computer-readable instructions to implement a folder display method, and the processor 13 can execute the computer-readable instructions to implement:
when a folder display request is received, acquiring a folder to be processed from the folder display request;
traversing the folder to be processed to obtain a file level of the folder to be processed;
determining a subfolder of a next level of the folder to be processed as a target folder;
determining the number of folders in each target folder, and determining the total amount of subfolders of the folder to be processed according to the number of the folders;
determining the number of files in each target folder, and determining the total amount of subfiles of the folder to be processed according to the number of the files;
generating the file name of the folder to be processed according to the file level, the total amount of the subfolders and the total amount of the subfolders;
and displaying the folder to be processed according to the file name.
Specifically, the processor 13 may refer to the description of the relevant steps in the embodiment corresponding to fig. 1 for a specific implementation method of the computer readable instructions, which is not described herein again.
In the embodiments provided in the present invention, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The computer readable storage medium has computer readable instructions stored thereon, wherein the computer readable instructions when executed by the processor 13 are configured to implement the steps of:
when a folder display request is received, acquiring a folder to be processed from the folder display request;
traversing the folder to be processed to obtain a file level of the folder to be processed;
determining a subfolder of a next level of the folder to be processed as a target folder;
determining the number of folders in each target folder, and determining the total amount of subfolders of the folder to be processed according to the number of the folders;
determining the number of files in each target folder, and determining the total amount of subfiles of the folder to be processed according to the number of the files;
generating the file name of the folder to be processed according to the file level, the total amount of the subfolders and the total amount of the subfolders;
and displaying the folder to be processed according to the file name.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. The plurality of units or devices may also be implemented by one unit or device through software or hardware. The terms first, second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims (10)

1. A folder display method is characterized by comprising the following steps:
when a folder display request is received, acquiring a folder to be processed from the folder display request;
traversing the folder to be processed to obtain a file level of the folder to be processed;
determining a subfolder of a next level of the folder to be processed as a target folder;
determining the number of folders in each target folder, and determining the total amount of subfolders of the folder to be processed according to the number of the folders;
determining the number of files in each target folder, and determining the total amount of subfiles of the folder to be processed according to the number of the files;
generating the file name of the folder to be processed according to the file level, the total amount of the subfolders and the total amount of the subfolders;
and displaying the folder to be processed according to the file name.
2. The folder display method according to claim 1, wherein the traversing the to-be-processed folder to obtain the file hierarchy of the to-be-processed folder comprises:
determining the number of nodes adjacent to the folder to be processed by taking the folder to be processed as a root node;
determining the idle number of idle threads in a preset thread pool, and detecting whether the number of nodes is greater than the idle number;
when the number of the nodes is smaller than the idle number, acquiring the processing efficiency of the idle thread;
screening the processing threads with the number being the number of the nodes from the idle threads according to the processing efficiency;
respectively traversing the adjacent nodes in the folder to be processed by using the processing thread until an atomic folder is traversed to obtain a plurality of levels of the folder to be processed;
determining a hierarchy with the largest value in the plurality of hierarchies as a target hierarchy;
and calculating the sum of the target level and a preset value to obtain the file level.
3. The folder display method according to claim 2, wherein the determining, as the target folder, the sub-folder of the next hierarchy of the folder to be processed includes:
and determining the subfolders corresponding to the adjacent nodes as the target folder.
4. The folder display method according to claim 1, wherein the determining the number of folders in each target folder and the determining the total number of subfolders of the folder to be processed according to the number of folders comprises:
screening subfolders from each target folder;
calculating the number of the subfolders in each target folder to obtain the number of the folders;
and calculating the sum of the number of the folders to obtain the total amount of the subfolders.
5. The folder display method according to claim 1, wherein the generating the filename of the to-be-processed folder according to the file hierarchy, the total number of subfolders, and the total number of subfolders comprises:
acquiring a trigger user of the folder display request;
acquiring a configuration naming template corresponding to the trigger user;
determining the naming sequence of the configuration naming template;
and splicing the file hierarchy, the total amount of the subfolders and the total amount of the subfiles according to the naming sequence to obtain the file name.
6. The folder display method according to claim 1, wherein the acquiring the to-be-processed folder from the folder display request includes:
analyzing the message of the folder display request to obtain the data information carried by the message;
acquiring a preset label, wherein the preset label is used for indicating a folder;
acquiring information corresponding to the preset label from the data information as a file identifier;
and determining the folder to be processed according to the file identifier.
7. The folder display method according to any one of claims 5 to 6, wherein after displaying the to-be-processed folder with the file name, the method further comprises:
generating a feedback data packet of the folder display request according to the file identification and the file name;
determining a request level of the folder display request;
determining a sending mode according to the request level;
and sending the feedback data packet to the terminal equipment of the trigger user in the sending mode.
8. A folder display device, characterized by comprising:
the device comprises an acquisition unit, a processing unit and a display unit, wherein the acquisition unit is used for acquiring a folder to be processed from a folder display request when the folder display request is received;
the traversing unit is used for traversing the folder to be processed to obtain the file level of the folder to be processed;
the determining unit is used for determining a subfolder of the next level of the folder to be processed as a target folder;
the determining unit is further configured to determine the number of folders in each target folder, and determine the total number of subfolders of the folder to be processed according to the number of the folders;
the determining unit is further configured to determine the number of files in each target folder, and determine the total amount of subfiles of the folder to be processed according to the number of files;
the generating unit is used for generating the file name of the folder to be processed according to the file hierarchy, the total amount of the subfolders and the total amount of the subfolders;
and the display unit is used for displaying the folder to be processed according to the file name.
9. An electronic device, characterized in that the electronic device comprises:
a memory storing computer readable instructions; and
a processor executing computer readable instructions stored in the memory to implement the folder display method of any one of claims 1 to 7.
10. A computer-readable storage medium characterized by: the computer-readable storage medium stores therein computer-readable instructions which are executed by a processor in an electronic device to implement the folder display method according to any one of claims 1 to 7.
CN202011504637.6A 2020-12-18 2020-12-18 Folder display method and related equipment Active CN112631998B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011504637.6A CN112631998B (en) 2020-12-18 2020-12-18 Folder display method and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011504637.6A CN112631998B (en) 2020-12-18 2020-12-18 Folder display method and related equipment

Publications (2)

Publication Number Publication Date
CN112631998A true CN112631998A (en) 2021-04-09
CN112631998B CN112631998B (en) 2023-08-25

Family

ID=75317028

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011504637.6A Active CN112631998B (en) 2020-12-18 2020-12-18 Folder display method and related equipment

Country Status (1)

Country Link
CN (1) CN112631998B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102077179A (en) * 2008-06-30 2011-05-25 日立系统解决方案有限公司 File management device
CN104933131A (en) * 2015-06-12 2015-09-23 北京海泰方圆科技有限公司 Method for dynamically adjusting traversal frequency of electronic files
CN105677209A (en) * 2014-11-21 2016-06-15 深圳富泰宏精密工业有限公司 File display method and system
CN109376126A (en) * 2018-09-26 2019-02-22 Oppo广东移动通信有限公司 A kind of file or folder processing method, mobile terminal and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102077179A (en) * 2008-06-30 2011-05-25 日立系统解决方案有限公司 File management device
CN105677209A (en) * 2014-11-21 2016-06-15 深圳富泰宏精密工业有限公司 File display method and system
CN104933131A (en) * 2015-06-12 2015-09-23 北京海泰方圆科技有限公司 Method for dynamically adjusting traversal frequency of electronic files
CN109376126A (en) * 2018-09-26 2019-02-22 Oppo广东移动通信有限公司 A kind of file or folder processing method, mobile terminal and storage medium

Also Published As

Publication number Publication date
CN112631998B (en) 2023-08-25

Similar Documents

Publication Publication Date Title
US11012460B2 (en) Dynamic hierarchical tagging system and method
CN114416667B (en) Method and device for rapidly sharing network disk file, network disk and storage medium
CN112527599A (en) Intelligent monitoring method and device, electronic equipment and readable storage medium
CN112559535B (en) Multithreading-based asynchronous task processing method, device, equipment and medium
CN111797351A (en) Page data management method and device, electronic equipment and medium
CN112860737B (en) Data query method and device, electronic equipment and readable storage medium
CN112001179A (en) Named entity recognition method and device, electronic equipment and readable storage medium
CN114035827A (en) Application program updating method, device, equipment and storage medium
CN112711398A (en) Method, device and equipment for generating buried point file and storage medium
CN112416583A (en) High-frequency request processing method and device, electronic equipment and storage medium
CN112948418A (en) Dynamic query method, device, equipment and storage medium
CN111814045A (en) Data query method and device, electronic equipment and storage medium
CN111881209A (en) Data synchronization method and device for heterogeneous database, electronic equipment and medium
CN114116108A (en) Dynamic rendering method, device, equipment and storage medium
CN113065947A (en) Data processing method, device, equipment and storage medium
CN112434062A (en) Quasi-real-time data processing method, device, server and storage medium
CN112947911A (en) Interface script generation method, device, equipment and storage medium
CN112527280A (en) Interface display method and device, server and readable storage medium
CN113283677B (en) Index data processing method, device, equipment and storage medium
CN112631998B (en) Folder display method and related equipment
CN114692204A (en) Data query method, device, equipment and storage medium
CN112395319B (en) Cache sharing method and device, server and storage medium
CN114238296A (en) Product index data display method, device, equipment and storage medium
CN112817742B (en) Data migration method, device, equipment and storage medium
CN112667721A (en) Data analysis method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20230801

Address after: 518000 Room 202, block B, aerospace micromotor building, No.7, Langshan No.2 Road, Xili street, Nanshan District, Shenzhen City, Guangdong Province

Applicant after: Shenzhen LIAN intellectual property service center

Address before: 518000 Room 201, building A, No. 1, Qian Wan Road, Qianhai Shenzhen Hong Kong cooperation zone, Shenzhen, Guangdong (Shenzhen Qianhai business secretary Co., Ltd.)

Applicant before: PING AN PUHUI ENTERPRISE MANAGEMENT Co.,Ltd.

Effective date of registration: 20230801

Address after: 510000 Building 1, No. 106 Fengze East Road, Nansha District, Guangzhou City, Guangdong Province X1301-G9770 (Cluster Registration) (JM)

Applicant after: Guangzhou Hongjin Information Technology Co.,Ltd.

Address before: 518000 Room 202, block B, aerospace micromotor building, No.7, Langshan No.2 Road, Xili street, Nanshan District, Shenzhen City, Guangdong Province

Applicant before: Shenzhen LIAN intellectual property service center

GR01 Patent grant
GR01 Patent grant