Project file volume visualization report generation method and device, equipment and medium
By receiving statistical instructions in the integrated development environment, determining the target root directory, performing recursive traversal and filtering, and generating metadata information such as volume and timestamps, the problem of existing tools being unable to display file volume distribution is solved, and efficient visual management of project file resources is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- PING AN HEALTH INSURANCE CO LTD
- Filing Date
- 2026-04-17
- Publication Date
- 2026-07-10
AI Technical Summary
Existing tools cannot quickly and comprehensively display the size distribution of all files within a project, making it difficult for developers to identify files that occupy a large amount of space, thus affecting storage resource usage and version control efficiency.
This paper provides a method for generating a project file volume visualization report. The method involves receiving statistical instructions through the resource manager interface of the integrated development environment, determining the target root directory, performing recursive traversal, filtering files, generating metadata information, converting it into volume characters and timestamps, sorting it according to volume size, and generating an analysis report.
It enables a comprehensive and visual display of project file resources, optimizes the display of file size and modification time information, and improves the convenience of project management and maintenance.
Smart Images

Figure CN122364172A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of R&D management technology, and in particular to a method, apparatus, device and medium for generating a project document volume visualization report. Background Technology
[0002] In financial software development practices, such as the construction of quantitative trading systems, risk modeling platforms, or financial data analysis tools, projects typically consist of a large number of heterogeneous files, including source code, configuration files, historical datasets, and log documents. The size distribution of these files directly affects the project's storage resource consumption, version control efficiency, and transmission performance during collaborative development. Therefore, developers need a means to quickly and comprehensively understand the size distribution of all files within a project in order to identify files that consume a large amount of space and perform targeted cleaning, archiving, or optimization. This is crucial for controlling storage costs, improving project loading speed, and enhancing maintenance efficiency.
[0003] Currently, mainstream integrated development environments (IDEs) and their extended ecosystems often have significant limitations in file resource management features or plugins. Common tools typically only display the size information of a single active or being edited file in a localized area of the editor interface (such as the status bar). This presentation method only provides fragmented, isolated file data and cannot show the overall size of all files in the entire project directory tree at once. If developers want to understand the size and distribution of different files in the project, they have to manually open each file individually or rely on the operating system's file manager, a tedious and inefficient process.
[0004] More critically, existing tools generally lack the ability to systematically analyze and intuitively compare file size information within a project. Because they cannot automatically collect and list the size data of all files in a project, developers struggle to quickly identify which files are consuming excessive storage space. Furthermore, the lack of a function to sort by file size makes it impossible to intuitively grasp the distribution patterns of file sizes within the project, such as locating files or directories with abnormally large size increases. This information gap leaves developers without effective data support when optimizing project storage space, cleaning up dependencies, or developing file management strategies. They are forced to rely on experience or time-consuming manual investigation, which not only reduces work efficiency but may also lead to inaccurate or untimely optimization decisions. Summary of the Invention
[0005] The main objective of this invention is to provide a method, apparatus, device, and storage medium for generating a project file volume visualization report, aiming to solve the technical problem that the existing technology lacks the ability to centrally and sort the display of the volume information of all files in a project, which makes it impossible for developers to quickly understand the distribution of project file volumes.
[0006] To achieve the above objectives, the present invention provides a method for generating a project file volume visualization report, comprising: In response to the statistics command received in the resource manager interface of the integrated development environment, determine the target root directory to be analyzed; Based on the target root directory, a recursive traversal is performed to obtain all files and folders contained in the target root directory, and files that have not been excluded are filtered out from the files and folders according to a preset exclusion strategy to construct a set of valid file paths. Read the file attributes corresponding to each valid file path in the set of valid file paths, and generate corresponding metadata information. The metadata information includes the valid file path, the original byte size value, and the last modification timestamp. The original byte volume value in each of the metadata information is converted into a volume character, and the last modification timestamp in each of the metadata information is converted into a standard date and time character, to obtain updated metadata information containing the valid file path, the original byte volume value, the volume character, and the standard date and time character; All updated metadata information is sorted according to the original byte volume value to obtain a sorted sequence of updated metadata information; Extract the valid file path, volume characters, and standard date and time characters contained in each updated metadata information in the sorted updated metadata information sequence, and generate an analysis report file.
[0007] Furthermore, to achieve the above objectives, the present invention provides a project document volume visualization report generation device, comprising: The root directory determination module is used to determine the target root directory to be analyzed in response to statistical instructions received in the resource manager interface of the integrated development environment. The traversal and filtering module is used to perform recursive traversal based on the target root directory, obtain all files and folders contained in the target root directory, and filter out the files that have not been excluded from the files and folders according to the preset exclusion strategy, so as to construct a set of valid file paths. The attribute reading module is used to read the file attributes corresponding to each valid file path in the set of valid file paths and generate corresponding metadata information. The metadata information includes the valid file path, the original byte volume value and the last modification timestamp. The data conversion module is used to convert the original byte volume value in each of the metadata information into a volume character, and to convert the last modification timestamp in each of the metadata information into a standard date and time character, so as to obtain updated metadata information containing the valid file path, the original byte volume value, the volume character and the standard date and time character; The sorting module is used to sort all updated metadata information according to the size of the original byte volume value to obtain a sorted sequence of updated metadata information. The report generation module is used to extract the valid file path, volume characters, and standard date and time characters contained in each updated metadata information in the sorted updated metadata information sequence, and generate an analysis report file.
[0008] Furthermore, to achieve the above objectives, the present invention also provides a computer device, the computer device including a memory, a processor, and a project file volume visualization report generation program stored in the memory and executable on the processor, wherein when the project file volume visualization report generation program is executed by the processor, it implements the steps of the project file volume visualization report generation method as described above.
[0009] Furthermore, to achieve the above objectives, the present invention also provides a computer-readable storage medium storing a project file volume visualization report generation program, wherein when the project file volume visualization report generation program is executed by a processor, it implements the steps of the project file volume visualization report generation method described above.
[0010] Beneficial Effects: This invention relates to the field of R&D management technology and discloses a method, apparatus, device, and medium for generating a project file volume visualization report. The method includes: responding to a statistical command received in the resource manager interface and determining the target root directory; performing recursive traversal to obtain files and folders under the target root directory, filtering files according to an exclusion strategy, and constructing a set of valid file paths; reading the file attributes corresponding to each file path and generating metadata information, including the valid file path, byte volume value, and last modification timestamp; converting the byte volume value to volume characters and the last modification timestamp to standard date and time characters to generate updated metadata information; sorting the metadata information according to the byte volume value to generate a sorted sequence; extracting the file path, volume characters, and date and time characters from each metadata information to generate an analysis report file. This invention can be applied to business scenarios such as fintech. Through recursive traversal, filtering, and attribute reading, it achieves a comprehensive visualization of project file resources, optimizes the display method of file size and modification time information, helps users efficiently obtain project resource information, and improves the convenience of project management and maintenance. Attached Figure Description
[0011] The present invention will be further described below with reference to the accompanying drawings and embodiments. In the accompanying drawings: Figure 1 This is a schematic diagram of an application environment for a project file volume visualization report generation method according to an embodiment of the present invention; Figure 2 This is a flowchart illustrating an embodiment of the method for generating a project file volume visualization report according to the present invention; Figure 3 A schematic diagram of the functional modules of a preferred embodiment of the project file volume visualization report generation device of the present invention; Figure 4 This is a schematic diagram of the structure of a computer device according to an embodiment of the present invention; Figure 5 This is another structural schematic diagram of a computer device according to one embodiment of the present invention. Detailed Implementation
[0012] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.
[0013] The project file volume visualization report generation method provided in this embodiment of the invention can be applied to, for example... Figure 1 In this application environment, the client communicates with the server via a network. The server can determine the target root directory by responding to statistical commands received from the client in the resource manager interface; it performs recursive traversal to obtain files and folders under the target root directory, filters files according to exclusion strategies, and constructs a set of valid file paths; it reads the file attributes corresponding to each file path, generates metadata information, including valid file paths, byte volume values, and last modification timestamps; it converts byte volume values to volume characters and last modification timestamps to standard date and time characters, generating updated metadata information; it sorts the metadata information according to byte volume values, generating a sorted sequence; and it extracts the file path, volume characters, and date and time characters from each metadata information to generate an analysis report file. This invention can be applied to business scenarios such as fintech. Through recursive traversal, filtering, and attribute reading, it achieves a comprehensive visualization of project file resources, optimizes the display method of file size and modification time information, helps users efficiently obtain project resource information, and improves the convenience of project management and maintenance. The client can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. The server can be implemented using a standalone server or a server cluster composed of multiple servers. The present invention will now be described in detail through specific embodiments.
[0014] Please see Figure 2 , Figure 2 This is a flowchart illustrating an embodiment of the project file volume visualization report generation method provided by the present invention. It should be noted that although the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that shown here.
[0015] like Figure 2As shown, the method for generating a project file volume visualization report proposed in this invention includes the following steps: S10, in response to the statistical command received in the resource manager interface of the integrated development environment, determine the target root directory to be analyzed; In this embodiment, the integrated development environment (IDE) provides a comprehensive platform for software development and project management, offering tools for code editing, debugging, and building. It includes a resource manager interface for navigating and manipulating project files. This interface visually presents the project's directory structure in a tree or list format, allowing users to browse and select files and folders. The interface is typically built on an extensible architecture, allowing third-party functionalities to register new view components or add action items to existing menus through publicly available application programming interfaces (APIs). For example, in Visual Studio Code, menu contribution points can be declared through the `contributes` field of the `package.json` file, binding custom commands to the resource manager's context menu; in IntelliJ IDEA, the behavior after a user clicks a menu item can be defined by implementing the `AnAction` class and overriding the `actionPerformed` method.
[0016] Statistical commands are explicit signals issued by users within the File Explorer interface through specific interactive actions, requesting the execution of file size statistical analysis. Command generation originates from user interaction with interface controls; a typical scenario includes right-clicking on a file or folder and selecting the preset "Show file size" option from the pop-up menu. This option corresponds to a command identifier registered when the extension system starts. When the user makes this selection, the core event system of the integrated development environment (IDE) captures this interaction, triggers the execution of the callback function associated with the command identifier, and simultaneously passes an event object containing current operation context information to this function, thus completing the command reception. The command reception process is essentially the extension code's response to and processing of system events.
[0017] Determining the target root directory for analysis involves logically deriving the starting position of the file system traversal based on the context information accompanying the received statistical instructions. The system first extracts the resource item identifier selected by the user in the interface from the event object; this identifier may be a Uniform Resource Identifier (URI). Next, it calls platform-specific methods to convert this identifier into a standard local file system absolute path. Then, it needs to determine whether the absolute path points to a regular file or a directory. This determination can be achieved by querying the attribute information of the corresponding path through the file system interface. If the result is a directory, the directory path is directly used as the target root directory; if the result is a file, the path of the file's parent directory is obtained and used as the target root directory. For example, when the event object indicates that the selected resource identifier corresponds to file: / / / projects / finance / model.py, the system converts it to the path / projects / finance / model.py. After determining that it is a file, the final target root directory is its parent directory / projects / finance.
[0018] This embodiment establishes an intuitive and context-aware analysis entry point by receiving statistical commands triggered by user interaction within the graphical interface of the integrated development environment (IDE) and automatically and accurately deriving the starting directory for file system traversal based on the command context. This eliminates the need for users to manually input or browse directory paths, directly translating user intent into precise analysis scope. This approach reduces operational complexity, improves the fluency and efficiency of tool use, and allows file volume analysis functionality to be naturally integrated into the developer's resource management workflow.
[0019] S20, based on the target root directory, perform recursive traversal to obtain all files and folders contained in the target root directory, and filter out the files that have not been excluded from the files and folders according to the preset exclusion strategy to construct a set of valid file paths; In this embodiment, recursive traversal is an algorithmic process for systematically accessing all nodes in a tree or graph structure. In the context of a file system, it refers to starting from a specified target root directory and sequentially visiting each item under that directory. If a subdirectory is encountered, the process is repeated, using that subdirectory as a new starting point, until all levels of directories and files have been visited once. This traversal method ensures that all potentially nested subdirectories and their contained files under the root directory are covered. Implementing recursive traversal typically requires maintaining a data structure, such as a stack or queue, to track the directories to be visited. The algorithm begins by pushing the target root directory onto the stack. In each iteration, a directory path is popped from the stack, and all direct sub-items under that directory are read. For each sub-item, if it is determined to be a directory, its path is pushed onto the stack for later access; if it is determined to be a file, it is recorded. This loop continues until the stack is empty, indicating that all reachable directories have been processed.
[0020] Retrieving files and folders refers to recording the necessary identification information for each file system item accessed during recursive traversal. This typically includes obtaining the complete path of the item, which is a string representation from the target root directory to the item. Within each level of traversal logic, the names of all direct sub-items under the current directory can be obtained by calling the operating system's directory listing interface. Combining the current directory path with the sub-item names allows the reconstruction of the complete path of each sub-item. Simultaneously, it's necessary to distinguish whether the sub-item type is a file or a directory, which can be obtained synchronously by calling the file system status query interface. The obtained information is temporarily stored, forming an intermediate result set containing the paths and types of all sub-items at the current level.
[0021] Predefined exclusion strategies are a set of rules used to identify and skip specific files or directories during the traversal. These strategies are typically defined before the function executes via configuration files, environment variables, or program constants. Common rules include name-based pattern matching, such as excluding all directories named node_modules, .git, or __pycache__; file extension-based exclusion, such as ignoring all .log, .tmp, or .cache files; and more complex matching based on path prefixes or regular expressions. The purpose of exclusion strategies is to filter out files and directories that are irrelevant to the analysis, often automatically generated, temporary, or third-party dependencies, thus focusing on the core project files that the user cares about. During the traversal, each time a sub-item's path is obtained, it is compared with all exclusion rules. If it matches any rule's condition, the item is marked as to be ignored.
[0022] Filtering files that haven't been excluded is a decision-making process that filters all acquired file system entries based on exclusion strategies. For each file (excluding directories) recorded during the traversal, the system compares its full path against preset exclusion strategies one by one. If a file's path doesn't match any exclusion rule, the file is determined to be "not excluded." This decision logic occurs within the loop of the recursive traversal, enabling immediate filtering and avoiding loading information about excluded files into subsequent processing. Another implementation is to apply the exclusion strategy all at once after completing the full traversal and collecting all file paths. Regardless of whether it's immediate or batch filtering, the result is a subset containing only files that meet the analysis criteria.
[0023] Constructing a set of valid file paths is the process of organizing the complete paths of all filtered, non-excluded files into a unified data set accessible to subsequent operations. This set is typically implemented as a data structure such as a list, array, or hash table. During the traversal and filtering process, whenever a file is determined not to be excluded, its complete path is added to an initially empty container. When the entire recursive traversal and filtering process ends, this container has accumulated the paths of all valid files, forming the set of valid file paths. This set, as a whole, provides a clear and clean list of inputs for subsequent operations such as reading file attributes, ensuring that subsequent processing is only performed on the project files that the user cares about.
[0024] This embodiment, by initiating a recursive traversal from the target root directory, can systematically obtain the path information of all files and folders in the project directory tree. Combined with a preset exclusion strategy, the obtained projects are filtered in real-time or in batches, accurately removing temporary files, build artifacts, or third-party dependency directories irrelevant to the analysis target. The final set of valid file paths compiles all filtered project file paths of interest to the user, providing a clean, clear, and complete input data foundation for subsequent file attribute reading and analysis.
[0025] S30, Read the file attributes corresponding to each valid file path in the set of valid file paths, and generate corresponding metadata information. The metadata information includes the valid file path, the original byte volume value and the last modification timestamp. In this embodiment, the set of valid file paths is a data container that stores multiple file system location identifiers, where each element is a complete path string pointing to a specific file on the storage medium. This set typically exists as the result of the previous step's filtering, and its data structure can be an array, list, or iterator, designed to provide an ordered and non-redundant list of target files for subsequent processing. Access to the set follows an iterative pattern, with each path element being processed sequentially using a loop control structure. This sequential access ensures that each file in the set is processed equally, providing a basis for batch operations.
[0026] Reading file attributes refers to the process of requesting the operating system or file system, based on a given file path, to obtain detailed status and characteristic information of the file pointed to by that path. This operation is accomplished by calling the file system application programming interface provided by the platform. For each valid file path retrieved from the set, the system constructs a corresponding file access request. This request is sent to the file system driver, which accesses the file's inode or similar structure and returns a metadata block containing the file's physical storage information and time information to the caller. The returned data packet typically contains fields such as file size, multiple timestamps, access permissions, and file type. This process is a necessary prerequisite for subsequently extracting specific information, and its reliability directly depends on the state and access permissions of the file system.
[0027] File attributes are specific information items parsed from the metadata returned by the file system. The raw byte volume is a key attribute, representing the actual size of contiguous or non-contiguous space occupied by the file content on the storage medium, measured in bytes. This value directly reflects the physical storage cost of the file and is an integer value independent of any display format or unit conversion. The last modified timestamp is another key attribute, recording the precise moment when the file content was last modified by a write operation, usually expressed in seconds or milliseconds from a fixed point in time (such as midnight on January 1, 1970, UTC). These two attributes together constitute the core description of the file's basic state.
[0028] Generating corresponding metadata is a process of data reorganization and encapsulation. After successfully extracting the original byte volume and last modified timestamp from file attributes, these two attribute values need to be associated and packaged with the currently processed valid file paths from the set. This association is usually achieved by creating a new structured data object, such as a record containing specific fields, a dictionary, or a tuple. The explicit role of this data object is to carry and associate these three information elements, thereby forming an independent data unit describing the core attributes of a single file. This newly generated data unit is the metadata information corresponding to that file path. After completing the above reading, extraction, and encapsulation operations for each path in the set of valid file paths, a set of metadata information corresponding one-to-one with the original paths is obtained, completing the transformation from a path list to a descriptor set rich in attribute information.
[0029] This embodiment systematically traverses the set of valid file paths and performs file attribute reading operations on each path, reliably obtaining the original byte size and precise last modification time of each file from the underlying file system. These core attributes are then associated with the file paths and encapsulated into structured metadata, transforming a simple list of paths into a collection rich in descriptive data. This transformation process provides an accurate, consistent, and structured data foundation for any subsequent operations based on file size analysis, time sorting, or resource status assessment.
[0030] S40, convert the original byte volume value in each of the metadata information into a volume character, and convert the last modification timestamp in each of the metadata information into a standard date and time character, to obtain updated metadata information containing the valid file path, the original byte volume value, the volume character and the standard date and time character; In this embodiment, the original byte volume value is an integer representing the space occupied by the file on the storage medium, with the unit being bytes. This value comes directly from the file system metadata and reflects the physical storage cost of the file content. Converting it to a volume character is a formatting process aimed at generating a more intuitive string representation for human reading, including the capacity unit. The conversion process typically follows a predefined correspondence between magnitude thresholds and units. The system iteratively compares the original value with a series of increasing thresholds. When the value is greater than or equal to a certain threshold, it is divided by that threshold, and the corresponding unit symbol is appended to the quotient. Common unit symbols include "KB", "MB", "GB", and "TB", representing kilobytes, megabytes, gigabytes, and terabytes, respectively. The conversion algorithm needs to handle rounding and decimal place control, such as retaining one or two decimal places, to ensure the simplicity and readability of the generated string. The converted volume character not only includes the numerical part but also explicitly indicates the unit, allowing users to directly understand the file volume information without having to perform mental calculations.
[0031] The last modified timestamp is an integer or floating-point value calculated from a fixed epoch, typically representing the moment the file content was last written. Converting it to standard date and time characters is a time formatting and localization process aimed at generating a calendar time representation that conforms to human habits. The conversion process first requires parsing the timestamp, breaking it down into year, month, day, hour, minute, and second components. This parsing needs to consider time zone factors, typically converting the Coordinated Universal Time (UTC) timestamp to the user's local time zone or a unified standard time zone. Subsequently, these time components are combined according to a preset, structured format template. The format template defines the connectors, order, and whether to pad with zeros between the components. For example, "YYYY-MM-DD HH:mm:ss" is a common format, representing a four-digit year, a two-digit month, a two-digit day, followed by two-digit hours, two-digit minutes, and two-digit seconds, separated by hyphens and colons. The generated standard date and time characters provide a clear and unambiguous textual description of the file's update time.
[0032] Obtaining updated metadata is a process of data integration and expansion. After converting the original byte volume and last modified timestamp from a single piece of metadata, the system needs to merge the resulting new data items with the existing content in the metadata. The original valid file path and the unconverted original byte volume are retained as accurate records of the original data. The newly generated volume characters and standard date and time characters are added to the same data unit as formatted, display-friendly versions. This is typically achieved by creating a new data structure instance or adding fields to an existing data structure. The resulting updated metadata contains both the file's original attribute data and a formatted representation optimized for the user interface. It provides a precise yet user-friendly dual view for subsequent operations such as display, sorting, or report generation, satisfying both data processing and user interaction needs.
[0033] This embodiment generates a volume character with attached capacity units by performing unit conversion and sign appending based on a magnitude threshold on the original byte volume value, making the technical data of file volume intuitive and easy for humans to quickly understand and compare. By parsing the last modified timestamp using time zone resolution and standardized format combination, a date and time character conforming to common conventions is generated, providing a clear and consistent textual description of the file update time. These two formatted characters, along with the original valid file path and original byte value, are integrated into the updated metadata information, preserving the accurate original data while adding an optimized representation for the user interface.
[0034] S50, sort all updated metadata information according to the size of the original byte volume value to obtain a sorted sequence of updated metadata information; In this embodiment, the original byte volume value is a data item included in each updated metadata item. It is an integer value representing the physical storage usage of the file, measured in bytes. This value serves as the basis for comparison in the sorting operation, directly determining the relative position of each metadata item in the final sequence. Because this value has comparable mathematical properties—that is, the size relationship between any two values can be determined—it is suitable as a sorting key.
[0035] The updated metadata information is a structured data unit that encapsulates multiple descriptive fields about a single file. These fields include at least a valid file path, a raw byte size value, a volume character, and a standard date and time character. During sorting operations, the entire data unit is treated as an indivisible whole. Sorting operations do not modify the values of the individual fields within the unit or the relationships between them; rather, they change the order in which the different data units are arranged within the set.
[0036] Sorting is an algorithmic process that rearranges a set of data elements according to a specific key value. In this context, sorting operations operate on a collection containing all updated metadata. The core logic of the algorithm is to repeatedly compare the original byte sizes contained in two different data units. Based on the comparison results and a predetermined sorting rule (e.g., descending order from largest to smallest or ascending order from smallest to largest), the order of these two data units in the final output sequence is determined. Common sorting algorithms achieve this rearrangement through a series of element comparisons and position swaps or shifts. The sorting process ensures that when the operation is complete, the order of any two data units in the entire set satisfies the established sorting rule.
[0037] The sorted and updated metadata sequence is the output of the sorting operation. This sequence contains the exact same data units as the input set, with no additions or subtractions, but the relative order of all elements has been systematically adjusted according to the size relationships of their embedded original byte sizes. This sequence is typically implemented as an ordered list or array, with a data structure that supports sequential access to elements. The first element of the sequence represents the file information at the extreme position (e.g., maximum or minimum) of the sort key value, allowing the user to immediately obtain the most significant file size characteristics.
[0038] This implementation transforms an originally unordered file list into an ordered sequence arranged according to file size by sorting the updated metadata set containing all file information based on the original byte size values. This process makes the distribution characteristics of file sizes readily apparent, allowing files at the extremes of the sequence to be immediately identified. The sorted sequence provides a logical and structured data foundation for any subsequent operations that require prioritization, trend analysis, or resource assessment based on file size, greatly enhancing the ability to quickly extract key volume information from the file set.
[0039] S60, extract the valid file path, volume characters and standard date and time characters contained in each updated metadata information in the sorted updated metadata information sequence, and generate an analysis report file.
[0040] In this embodiment, the sorted and updated metadata information sequence is an ordered data set, where each element is a structured updated metadata information set, and the entire set has been rearranged according to its embedded original byte size. This sequence provides a logically organized view of the entire file information, typically implemented as a linear data structure that supports sequential access, such as an array or list. Accessing this sequence means starting from a starting position and retrieving elements one by one according to their inherent physical or logical order until the end of the sequence is reached. This sequential access mode is the basis for batch and consistency processing.
[0041] Extracting valid file paths, volume characters, and standard date and time characters is a process of extracting specific fields from a complex data structure. For each updated metadata item accessed from the sequence, the system needs to locate and read three specific data items stored internally. The valid file path is the string identifying the file location; the volume character is the formatted file size representation with units; and the standard date and time character is the formatted file last modified time. The extraction operation does not change the values of these data items themselves, nor does it affect their storage in the original data structure; it simply copies or references them to prepare for the next step of combination. This process relies on a clear understanding of the updated metadata information's data structure definition, such as obtaining the target field through object attribute access, dictionary key lookups, or tuple index offsets.
[0042] Generating an analysis report file is a process of aggregating and persisting scattered data items into a single disk file. It begins by combining the three extracted fields into a single line of meaningful text according to a predefined, readable format. Common formatting rules include using tabs, commas, or a fixed number of spaces to separate different fields, thus visually and structurally distinguishing them. For example, a format might be "file path [tab] volume character [tab] date time character," generating one line of text after processing each sequence element. As the sequence is traversed, these individual lines of text are sequentially added to a growing text buffer or set. Once all elements in the sequence have been processed, this buffer contains all the formatting information for the files, constituting the entire report. Subsequently, the system creates a new, empty text file at a specific location in the file system and writes the complete text content from the buffer to that file. The write operation involves standard file input / output procedures such as opening the file, writing byte streams, and closing the file. Ultimately, a single analysis report file containing all the target information is generated on disk.
[0043] This implementation systematically traverses a sorted sequence of file information, extracting core path, formatted volume, and time fields. These fields are then combined according to a predetermined format and persisted into a single report file. This process achieves centralized, structured, and persistent output of analysis results from massive amounts of files. The generated report file provides a stable and portable data snapshot independent of the original program's runtime environment. This allows the sorted file volume and time distribution information to be saved, shared, printed, or imported into other tools for secondary analysis in standard text format, providing users with a long-term, readily accessible basis for decision-making.
[0044] In one embodiment, step S10 above includes: S101, Register a command identifier in the extended system of the integrated development environment, and bind the command identifier to the context menu item of the resource manager interface; S102, listen to the command identifier through the command listening interface, and when a statistical instruction activated through the context menu item is detected, obtain the event context object passed with the statistical instruction; S103, parse the event context object, extract the Uniform Resource Identifier of the resource item currently selected by the user in the resource manager interface, and determine the type of the resource item; S104, convert the Uniform Resource Identifier into a local file system path, and determine the target root directory to be analyzed based on the local file system path and the type of the resource item.
[0045] In this embodiment, the extended system of the integrated development environment (IDE) is a technical framework that allows third-party functional modules to be dynamically integrated and run while maintaining the stability of the host environment's core architecture. This framework typically provides a set of standard application programming interfaces (APIs) and a set of declarative manifest specifications. Registering a command identifier is the process within the extended system's command management subsystem of permanently associating a unique string symbol defined by the extension with an executable callback function. This process is usually completed during the extension module's initialization phase by calling a specific registration function and passing the command identifier string and the callback function as parameters. The command management subsystem stores this association in a global command registry, enabling the host environment to find and trigger the corresponding functional logic using the identifier throughout the extension's lifecycle. Binding the command identifier to a context menu item in the resource manager interface creates a human-computer interaction entry point in the user interface's menu system. This requires adherence to the menu contribution point specifications defined by the host environment, typically declared in the extension's manifest configuration file, specifying the menu level, label text, and icon at which the command identifier should appear in the resource manager interface. When a user opens the context menu of File Explorer, the host environment's UI rendering engine queries all extension claims for contribution points and dynamically constructs menu items, thereby presenting the extension functionality to the user in a visual and clickable manner.
[0046] The command listener interface is an event subscription mechanism provided by the extension system to monitor the activation status of registered commands. Extensions declare their interest in the execution events of specific command identifiers by registering a listener function with this interface. When a user interacts with the interface by clicking a context menu item bound to that command identifier, the host environment's command execution engine captures this interaction, generates a command execution event, and calls all listener functions interested in that command identifier. This event is a data object encapsulating the context information of this command execution, called the event context object. Obtaining the event context object passed with the statistical instructions means receiving this data object as a parameter from the command execution engine when the command listener is called. This object is the sole source of all the raw information needed to deduce the target root directory in subsequent steps; it precisely encapsulates the interface state and user intent at the moment the command is triggered.
[0047] Parsing the event context object involves traversing and querying its internal data structure to locate and read specific data fields. This object typically contains an attribute that points to the currently selected user interface element in the resource manager interface. Extracting the Uniform Resource Identifier (URI) of the currently selected resource item in the resource manager interface involves obtaining a standardized string identifying the selected resource from this attribute. This URI is a platform- and location-independent resource location symbol that abstractly represents a logical item within the user's selected project. Simultaneously, for subsequent logical branching decisions, it's necessary to determine whether the resource item is a file or a folder. This determination can be accomplished by querying the metadata attributes associated with the selected item in the event context object, which usually directly indicate the item's type; or indirectly by attempting to parse the actual attributes of the underlying system resource pointed to by the URI.
[0048] Converting a Uniform Resource Identifier (URI) to a local file system path involves calling the path conversion application programming interface (API) provided by the host environment or the underlying operating system to map the abstract resource identifier to a specific file system path string with a drive letter or root directory that the current operating system can recognize. This conversion is necessary because subsequent file system traversal operations must be based on specific paths that can be directly accessed by file input / output libraries. Determining the target root directory to be analyzed based on the local file system path and the type of the resource item is a conditional logic judgment process. The system first checks the type determination result of the resource item. If the type is a folder, the converted local file system path is directly used as the target root directory. If the type is a file, the path of the parent directory where the file is located needs to be calculated. This can be achieved by extracting the directory name part of the path using a path string manipulation library, and then the obtained parent directory path is used as the target root directory. This logic ensures that regardless of whether the user selects a file or a folder, the starting point of the analysis operation will be automatically adjusted to the smallest common directory containing the user's focus, making the analysis scope both intuitive and operational.
[0049] This embodiment establishes a standardized and integrable user interaction entry point by registering commands in the extended system and binding them to the context menu, enabling file analysis functionality to be seamlessly integrated into developers' daily workflows. By capturing precise interaction events and acquiring rich contextual information through the command listening interface, a data foundation is provided for accurately understanding user intent. By parsing the context object to extract resource identifiers and determining their types, the focus of user operations on the interface can be accurately captured. Finally, by converting abstract identifiers into concrete paths and intelligently deriving the target root directory based on the type, an automated path determination mechanism that is deeply coupled with user interface operations and is intent-aware is implemented. This mechanism automatically transforms a simple right-click operation by the user into an accurate starting point for file system analysis, eliminating the tediousness and potential errors of manually entering paths, and greatly improving the convenience, intuitiveness, and accuracy of function calls.
[0050] In one embodiment, step S20 above includes: S201, initialize an empty list for storing path data, and define a scan function that receives the current path parameters to perform a recursive traversal of the file tree; S202, the scanning function is called with the target root directory as the starting path. In each level of the execution logic of the scanning function, the list of child nodes under the current path is read to obtain all files and folders contained in the current level. S203, traverse each file or folder in the child node list, match and verify the name of each file or folder with the preset exclusion strategy, and ignore the items that match successfully; S204. For items that fail to match, determine the type of the items that fail to match. If the type is a folder, call the scanning function with the path of the items that fail to match as a parameter. If the type is a file, filter the items that fail to match as files that have not been excluded. S205, obtain the absolute path of each file that has not been excluded, and add the absolute path to the empty list. After the scanning function has finished calling the target root directory and all recursive calls triggered by the call, output the filled empty list as a set of valid file paths.
[0051] In this embodiment, initializing an empty list to store path data is the starting operation for constructing a dynamic data container. This container is typically represented in the program logic as a linear data structure of zero length, such as an array or linked list, designed to accumulate file path strings sequentially in subsequent processes. Defining a scan function that receives the current path parameter involves writing a repeatedly invoked code block that encapsulates the core logic for processing a single directory. The function's design explicitly uses the current directory path to be processed as an input parameter, expanding its internal operations based on this parameter to achieve general processing capabilities for different directories. The internal logic of the function is constructed to implement recursive traversal of the file tree, meaning that the function can perform self-similar expansion of directories during execution; that is, when encountering a subdirectory, it can call itself again with the same logic, forming a self-referential control flow structure until it reaches the leaf node of the file tree.
[0052] Calling the scan function with the target root directory as the starting path marks the formal beginning of the recursive traversal. This call passes the previously determined specific directory path as the actual parameter to the scan function's formal parameter, thus initiating the first level of processing logic. In each level of execution logic within the scan function, reading the list of child nodes under the current path is a crucial file system interaction operation. This is achieved by calling the directory reading interface provided by the operating system, which accepts a string representing the directory path and returns a set containing the identifiers of all direct child items under that directory. Obtaining all files and folders contained in the current level means that the returned list of child nodes requires not only their names but also the ability to distinguish whether each child item is a file or a directory. This is typically accomplished through additional file attribute queries, providing a basis for subsequent branch processing.
[0053] Traversing each file or folder in the child node list involves using a loop control structure to sequentially access each element in the list. Matching the name of each file or folder against a predefined exclusion strategy is a pattern recognition process. The predefined exclusion strategy is typically defined as a set of string pattern rules, such as wildcard expressions or regular expressions. Matching verification involves comparing the name or path of the current item against these rules one by one to check for a match. Ignoring successfully matched items means that when the comparison result is true, the current item is marked as requiring no further processing, and the loop jumps directly to the next item, thus filtering out items that do not meet the analysis objectives from the data stream in advance.
[0054] For items that fail to match—those that don't match any exclusion rules—the subsequent behavior needs to be determined based on their type. The type of a failed match is determined by querying the file system or using previously acquired type information to determine whether the item is a file or a directory. If the type is a folder, the scan function is called with the folder's path as a parameter. This constitutes the core mechanism of recursive traversal: using subdirectories of the current directory as new input, the same processing flow is triggered again, thus achieving depth-first directory tree exploration. If the type is a file, the failed match is filtered out as an unexcluded file. This means that the file has passed all exclusion rules and is identified as the analysis target; its information is temporarily stored or marked, awaiting subsequent collection.
[0055] Obtaining the absolute path of each file that was not excluded involves converting the file's identifier into a globally unique, complete string representation starting from the file system root directory. This is typically done by concatenating the currently processed directory path with the file's name and calling a path normalization function to ensure correct formatting. Adding the absolute path to an empty list is an operation that appends the string to the end of the dynamically created container during initialization. This operation is performed immediately after each file is filtered, causing the list to grow gradually as it is traversed.
[0056] Once the scanning function has completed its calls to the target root directory and all recursive calls triggered by those calls, the entire recursive process has terminated. This is manifested in no new directories needing processing, the call stack being completely empty, and all branches of the file tree having been visited. At this point, the initially empty list has been filled with the absolute paths of files from different levels, filtered through a process. The final step of the function is to output the filled empty list as a set of valid file paths, returning this data container containing all target file paths as the result. This set constitutes a non-redundant list of file paths whose order reflects the specific traversal order, providing a precise input range for subsequent operations such as reading file attributes.
[0057] This embodiment establishes a repeatable framework for systematic file tree exploration by initializing a path container and a recursive function. Starting the recursion with the target root directory ensures that the analysis scope is strictly limited to the user-specified directory boundaries. Reading child nodes and applying exclusion strategies for immediate matching and verification at each traversal level enables early filtering of irrelevant files, avoiding the subsequent transmission and processing of invalid data. Dynamic decision-making based on item type—deepening directory recursion and collecting files—allows the traversal process to adapt to the complex structure of the directory tree while accurately capturing target files. Finally, by collecting the absolute paths of all unexcluded files and forming a set, this process produces a clean file path dataset directly usable for deep analysis. This mechanism efficiently and accurately extracts the core file set of interest from the complex directory tree, laying a precise data foundation for all subsequent file content-based analysis tasks.
[0058] In one embodiment, step S30 above includes: S301, Iterate through the set of valid file paths to locate the current valid file path that needs to be processed; S302, call the file system status query interface to read the status parameters of the file pointed to by the valid file path, and use the status parameters as the file attributes corresponding to the valid file path; S303, extract the original byte volume value and the last modification timestamp from the file attributes; S304, construct a structured object containing the valid file path, the original byte volume value, and the last modification timestamp; S305, the structured objects generated for all valid file paths in the set of valid file paths are integrated into metadata information.
[0059] In this embodiment, iterative processing of the set of valid file paths is a control flow that sequentially accesses each element in a linear data structure. The set of valid file paths is typically implemented as a list or array storing multiple strings, each string being an absolute path to a specific file in the file system. Iterative processing is implemented through a loop structure that maintains a cursor or index pointing to a position in the set. At the beginning of each loop, the system retrieves a string element from the set using this cursor; this retrieved element is then identified as the valid file path to be processed. This path string subsequently becomes the core input for all subsequent operations within this loop cycle. The iterative mechanism ensures that each path in the set is processed exactly once, providing a predictable and sequential execution model for batch processing.
[0060] Calling the file system status query interface is the process of interacting with the operating system kernel to obtain file metadata. The status query interface is a system call or library function provided by the operating system for applications, such as `stat()` in Unix-like systems or `GetFileAttributesEx()` in Windows systems. When a currently valid file path is passed as an argument, the interface accesses the file system's index structure, retrieving the file control block or inode corresponding to that path. Upon successful execution, the interface returns a data structure containing various file status information, known as the status parameter. This data structure typically exists in memory as a C language struct or similar form, with fields including file type, permissions, multiple timestamps, and file size. Using the status parameter as a file attribute means treating the raw data structure returned by the operating system as a complete description of the file's current state, providing a data source for subsequently extracting specific fields.
[0061] Extracting the raw byte volume and last modified timestamp from file attributes involves dereferencing fields and reading values from the state parameter data structure. The state parameter data structure has a dedicated field representing the file size, typically named `st_size` or similar, whose value is an unsigned integer in bytes—this is the raw byte volume. This value directly reflects the amount of physical storage space occupied by the file content and is the most accurate representation of the file size. The state parameter also contains several timestamp fields. The field indicating the last modification of the file content is typically named `st_mtime` or similar, and its value is an integer representing the number of seconds or nanoseconds since the epoch—this is the last modified timestamp. The extraction operation uses structure member access operators or corresponding API functions provided by the programming language to precisely read the values of these two specific fields, separating them from the complex composite data structure and transforming them into independent, simple data types that can be directly used for calculation or comparison.
[0062] Constructing a structured object containing a valid file path, its original byte size, and its last modified timestamp is a data encapsulation process. This process combines three previously independent data items—the path string from iteration, the byte integer extracted from the state parameter, and the timestamp integer—into a new, logically unified composite data unit. In a program, a structured object can be represented as an instance of a custom class, a dictionary, a named tuple, or a simple array. Its key characteristic is that it defines explicit storage locations and access methods for these three data items, thus establishing a strong association between them. For example, in an object-oriented implementation, a class with three attributes—path, size, and mtime—can be defined and assigned values all at once during construction via the constructor. This construction action creates a semantically complete data entity describing the core attributes of a single file.
[0063] Integrating the structured objects generated from all valid file paths in the set of valid file paths into metadata is a data aggregation process. In each iteration of the loop, a structured object corresponding to the current file is generated. These objects need to be collected to form a dataset representing the attributes of the entire file set. The integration operation is typically implemented using an empty collection container, such as a list, initialized before the iteration begins. Each time a structured object is constructed, it is immediately added to this container. When the iteration loop has processed the last element of the set of valid file paths, the container has accumulated a number of structured objects equal to the original number of paths. This container and its contents together constitute the final metadata. At this point, the metadata itself is an ordered collection containing multiple structured objects, completely mapping the correspondence between each path in the original set of valid file paths and its core file attributes.
[0064] This embodiment provides a deterministic processing context for each file path by sequentially iterating through the file path set, ensuring the comprehensiveness and completeness of batch file attribute reading. It calls the underlying file system status query interface to directly obtain the most authoritative and accurate file status information from the file system metadata layer, guaranteeing the authenticity and real-time nature of the obtained attribute data. It accurately extracts the volume and timestamp—two key values—from the returned composite status parameters, achieving a focus and transformation from the original system data structure to the core data points required by the application. By encapsulating the path, volume, and timestamp into independent structured objects, it creates a self-contained data entity for each file with clearly defined attribute relationships, greatly enhancing data organization and operability. Finally, it aggregates all independent data entities into a unified metadata set, completing the transformation from a scattered list of file paths to a complete, attribute-rich set of file descriptors.
[0065] In one embodiment, step S40 above includes: S401, a preset list of unit symbols arranged in ascending order of capacity, setting the carry threshold and date format; S402, for each of the metadata information, the original byte volume value is compared with the carry threshold in a loop. When the original byte volume value meets the carry condition, division processing is performed and the unit level is updated until the original byte volume value is less than the carry threshold. The processed value is then concatenated with the corresponding symbol in the unit symbol list to generate a volume character. S403, for each of the metadata information, the last modified timestamp is parsed to obtain the time components of year, month, day, hour and minute, and the time components are converted into text form according to the date format to generate standard date and time characters; S404, for each of the metadata information, the generated volume character and the standard date and time character are combined and encapsulated with the valid file path and the original byte volume value in the metadata information to generate an updated metadata information item; S405, integrate all generated updated metadata information items into updated metadata information.
[0066] In this embodiment, the preset list of unit symbols arranged in ascending order of capacity is created as an ordered string array, where each element represents a specific data capacity unit. This list defines a sequence of symbols starting from the basic unit byte and progressing to larger units such as kilobytes, megabytes, gigabytes, and terabytes, for example, ["B", "KB", "MB", "GB", "TB"]. Setting a carry threshold defines a numerical limit for each unit symbol; when the file size in bytes reaches or exceeds this limit, it should be carried over to the next larger unit. In the binary standard, this threshold is typically a power of 1024, while in the decimal standard it is a power of 1000. Setting the date format defines a string template that specifies the order of time components such as year, month, day, hour, minute, and second in the final output text, the separators, and whether to pad with zeros, for example, "YYYY-MM-DD HH:mm". These preset parameters concretize the abstract conversion rules into executable configuration data.
[0067] For each piece of metadata, iteratively comparing the original byte volume value with a carry threshold is an iterative numerical dimensionality reduction process. The algorithm starts from an initial unit level and compares the original byte value with the carry threshold for the current level. When the value is greater than or equal to the threshold, the carry condition is met, and a division operation is performed—the value is divided by the carry threshold to obtain a quotient, and the unit level is updated to the next larger unit in the list. This division and comparison process continues in a loop, using the quotient from each division as the new value for the next comparison, until the new value is less than the carry threshold for the current level. At this point, the final value, after multiple division operations, is a floating-point number or integer that fits the current unit level and is usually less than the threshold. This processed value is then concatenated with the symbol corresponding to the current level in the unit symbol list; for example, concatenating 153.6 with "MB" results in "153.6 MB," thus generating the volume character. This process converts a pure byte count into a readable string with semantic units that makes the capacity size easily understandable to humans.
[0068] Parsing the last modified timestamp for each piece of metadata is an operation that breaks down a single point-in-time value into multiple calendar and time components. A timestamp is typically an integer representing the number of seconds or milliseconds that have elapsed since 00:00 UTC on January 1, 1970. The parsing process first requires determining the target time zone and then converting the integer value to the corresponding local calendar time. This can be achieved by calling a time library function in a programming language, which deconstructs the timestamp into a structure containing independent integer values for year, month, day, hour, minute, and second. After obtaining these time components, they are converted into text format according to a preset date format. Placeholders in the date format string, such as YYYY representing a four-digit year and MM representing a two-digit month, are replaced with the corresponding actual time component values. The conversion process also needs to handle the formatting of the values, for example, formatting the number 3 as the two-digit string "03". The final generated standard date and time string, such as "2023-10-27 14:30", provides a clear time description that conforms to common conventions and eliminates the ambiguity of the original timestamp number.
[0069] For each piece of metadata, the process of combining and encapsulating the generated volume character and standard date and time character with the existing valid file path and original byte volume value in the metadata is a process of creating a new, enhanced data structure. The original metadata contains the file's identifier and original attributes. The newly generated volume character and standard date and time character are derived attributes for display purposes. Combining and encapsulating means creating a new data container that simultaneously holds these four data items: the file path as the original identifier, the original byte value as the precise source of measurement, the volume string as a user-friendly display, and the time string as a clear time description. This new data container is called the updated metadata item. It may be a new class instance, dictionary object, or tuple, and its key characteristic is that it maintains the integrity of the original data while attaching context-optimized display data, providing a dual view of the same file information that is both accurately calculated and easy to read.
[0070] Integrating all generated updated metadata items into updated metadata information is the final step in data aggregation and settling. After transforming and encapsulating each input metadata item, a corresponding updated metadata item is obtained. The integration operation uses a set-type data structure, such as a list or array, to collect all these newly generated items. This process is typically carried out in a loop, adding each generated item to an initially empty set. Once all input items have been processed, this set contains enhanced information about all files. This final set is the updated metadata information. It replaces the original metadata information set that only contained the original path, size, and time, providing a richer, more complete dataset that retains both machine-processable precision and human-readable formatted strings, preparing the data for subsequent sorting, filtering, and report generation.
[0071] This embodiment establishes a clear and configurable rule engine for the conversion of numbers to text by pre-setting a unit list, carry threshold, and date format, making the formatting process deterministic and customizable. Threshold-based cyclic division and unit sign matching are performed on the raw byte values of each file, transforming abstract large numbers into text labels with intuitive dimensions. This frees file volume information from the cognitive burden of raw numerical values, making it directly understandable and quickly comparable. Time zone parsing and template-based text synthesis are performed on timestamps, converting machine time into standardized time strings that conform to human calendar cognition, providing a clear and unambiguous time reference. The formatted strings, along with the original paths and values, are repackaged into enhanced data items, adding an optimized user-friendly representation layer to each file information without sacrificing the accuracy of the original data. Finally, all enhancements are aggregated to form a new meta-dataset, completing a qualitative leap from a "raw data set" to an "integrated set of raw and displayed data."
[0072] In one embodiment, step S50 above includes: S501, Load all updated metadata information into the list container to be processed, and initialize the comparison and sorting module; S502, the sorting order of the comparison sorting module is set to descending order of values from largest to smallest, and the original byte volume value is specified as the sorting comparison key; S503, the comparison and sorting module is run. During the execution of the comparison and sorting module, the original byte volume values contained in each updated metadata information in the list container are extracted according to the sorting comparison key and compared in size. S504, adjust the relative positions of each updated metadata information in the list container according to the comparison results until the list container is reorganized to obtain a sorted sequence of updated metadata information.
[0073] In this embodiment, loading all updated metadata information into the list container to be processed is a data preparation and initialization operation. A list container is a linear data structure that supports sequential access, insertion, and deletion of elements, typically represented in memory as a dynamic array or linked list. The loading process means storing discrete updated metadata information objects representing all files as elements sequentially into the container's storage space, thus forming a logical processing queue or set. This operation establishes a physically continuous or logically linked original dataset that the sorting algorithm can directly manipulate. Initializing the comparison and sorting module configures an executable computational unit or code logic segment for performing the sorting task. In procedural programming, this might refer to parameter preparation before calling a sorting library function; in object-oriented or modular design, it might refer to instantiating a sorter object. Its core is allocating necessary computational resources and setting the initial state for the upcoming comparison and rearrangement operations, such as allocating a call stack for a recursive algorithm or setting loop control variables for an iterative algorithm.
[0074] Setting the sorting order as descending order of values defines a clear target state for the sorting algorithm. This is achieved by specifying a binary comparison rule: for any two original byte volumes to be compared, if one value is greater than the other, then its corresponding updated metadata information should be placed before the other in the final sequence. This rule is encoded as a comparison function or a flag parameter and injected into the logic of the comparison and sorting module, becoming the fundamental basis for its execution decisions. Specifying the original byte volume value as the sorting comparison key defines a mapping rule for extracting key attributes from complex data elements. The comparison key is a function or access path that takes updated metadata information as input and outputs the original byte volume value stored within that information. This specification operation establishes a clear association between the sorting algorithm and specific attributes within the data items, ensuring that all subsequent size comparisons are based on this consistent, quantifiable numerical attribute, rather than other fields.
[0075] The comparison sorting module triggers and executes a series of predefined computational steps designed to rearrange the order of data elements. Once the module begins execution, its internal control logic, such as recursive divide-and-conquer, iterative comparison, or heap structure construction, begins to operate. The core iterative operation during module execution is comparing the original byte sizes of each updated metadata element in the list container based on the sort comparison key. When the algorithm needs to determine the relative order of two elements, it temporarily activates the sort comparison key mapping function: for the two updated metadata elements currently selected by the algorithm in the list container, this mapping function is applied to obtain their respective original byte sizes. Subsequently, the algorithm performs a size comparison operation on these two values. This comparison result is purely mathematical, returning a signal indicating "greater than," "less than," or "equal to."
[0076] Adjusting the relative positions of updated metadata within the list container based on the comparison results is the specific transformation applied to the data structure by the sorting algorithm. This "adjustment" is a direct modification of the list container's state in memory by the algorithm's instructions. If the comparison result does not conform to the preset sorting order rules (e.g., in descending order, the volume of the preceding element is smaller than that of the following element), the algorithm will perform a position swap or data movement operation. This might be achieved by swapping the storage contents of the two elements in the array, or by modifying the pointers of the linked list nodes. This adjustment is local and instantaneous, but through algorithm design (such as the multi-round scan of bubble sort or the recursive partitioning of quicksort), countless such local adjustments will accumulate and propagate through specific strategies, ultimately affecting the global order of the entire container.
[0077] The state where the sorting algorithm converges to the termination condition is described until the list container is completely reorganized. Reorganization means that the order of all elements inside the list container has been systematically changed. The criterion for completing reorganization is defined by the algorithm itself, for example, when quicksort has sorted all partitions, or when bubble sort has not performed any swaps in a full scan. At this point, the relative positions of any two elements in the list container strictly satisfy the preset sorting order rules and the numerical comparison relationship based on the sorting comparison key. The final output of this process is the sorted and updated metadata information sequence. At this point, the list container itself—its physical storage remains unchanged, but the logical order of its elements has been reconstructed—is directly output as the sorted sequence. This sequence is an ordered linear set whose order carries explicit semantics based on file size; the first element corresponds to the largest file, and the last element corresponds to the smallest file, thus transforming the implicit volume distribution information into an explicit, linearly readable list structure.
[0078] This embodiment creates an efficient memory structure and a clear processing context for the ordered reorganization of large-scale file information by loading data into a list container and initializing the sorting logic. By setting descending order rules and precisely specifying the original byte values as comparison keys, the complex problem of sorting multi-attribute file information is reduced to the standardized processing of a single, precisely comparable numerical attribute, ensuring the purity of the sorting logic and the predictability of the results. By running the sorting algorithm and performing numerical comparison and dynamic position adjustment based on the comparison keys, a series of precisely defined transformations are applied to the data container. These transformations are mathematically guaranteed by the algorithm, ultimately forcing all elements to converge to a globally ordered state based on their volume values. The resulting sequence, with its linear structure, directly encodes the distribution pattern of file volume, allowing features such as the maximum and minimum volume values and distribution gradients to be directly perceived through the element's position in the sequence without computation.
[0079] In one embodiment, step S60 above includes: S601, sequentially traverse the sorted updated metadata information sequence, and for each updated metadata information in the sorted updated metadata information sequence, read the volume character, standard date and time character, and valid file path from the updated metadata information; S602, based on the preset line text template, the read volume characters, the standard date and time characters, and the valid file path are concatenated to form a single line statistical text; S603 aggregates all generated single-line statistical texts, writes the aggregated content to a text file, and generates an analysis report file.
[0080] In this embodiment, sequentially traversing the sorted and updated metadata information sequence is a process of accessing a data set with an established linear order from beginning to end. The sorted sequence is typically an array or list whose element order has been reorganized according to the original byte size values, ensuring that the largest file information is located at the beginning of the sequence. Sequential traversal is implemented using an incrementing integer index or an iterator object. This mechanism starts from the first index of the sequence, retrieves the updated metadata information element pointed to by the current index in each loop iteration, and then advances the index to the next position. This access pattern strictly follows the existing physical or logical order of the sequence, ensuring consistency between the output content and the volume ranking established by the sorting, providing a basis for generating a report reflecting this ranking.
[0081] Reading the volume character, standard date and time character, and valid file path from the updated metadata information is an operation of querying specific fields within a structured data unit. The updated metadata information is a composite data structure that encapsulates multiple attribute fields. According to the definition of this data structure, the read operation extracts the volume character string representing the formatted file size, the standard date and time character string representing the formatted modification time, and the valid file path string serving as the original file identifier by accessing its named attributes, dictionary keys, or fixed offsets. This process separates three semantically and functionally related fields from the complex data carrier, transforming them into independent string variables that can be directly manipulated and combined, thus preparing the raw text material for constructing the report line.
[0082] Based on a predefined line text template, the read volume characters, standard date and time characters, and valid file paths are concatenated, a rule-based string construction process. A line text template is a string constant or configuration item that defines the format of the final output line; it contains literal text and specific placeholders. For example, a template might be "{size} {time} {path}". The concatenation operation first parses the template, identifies the placeholders, and then replaces the corresponding string values read from the currently updated metadata with the appropriate placeholder positions. After the replacement is complete, all literal text and variable values in the template are merged into a single new string. This process strictly follows the field order, spacing, and delimiters defined in the template, thus generating a uniformly formatted and clearly structured single-line statistical text. This text line constitutes a complete, human-readable record for a single file.
[0083] Aggregating all generated single-line statistical texts is a process of data accumulation and merging. In each iteration of the traversal sequence, a single-line statistical text string corresponding to the current file is generated. The aggregation operation is implemented through a dynamically growing text buffer, initialized as an empty string or a string builder object. Each time a single line of text is generated, it is appended to the end of the buffer, typically with a newline character as a line separator. As the traversal progresses, the buffer accumulates the records of all files sequentially according to their order in the sequence. When the traversal ends, the buffer contains a long string concatenated by newlines, summarizing the formatted information of all files sorted by size, forming the core content of the report.
[0084] Writing the aggregated content to a text file to generate the analysis report file is the final output step in achieving data persistence. This process first determines a target path on the file system and creates a new file object pointed to by that path. Then, an output stream pointing to that file is opened, and the complete long string stored in the aggregation buffer is encoded into a byte sequence and written to the output stream. The write operation ensures that all characters are completely transmitted to the storage medium. Finally, the file stream is closed to release system resources and ensure that the data is correctly flushed to disk. After this step, an independent file entity containing formatted report text exists on the disk—the analysis report file. This file exists independently of the program process that generated it and can be viewed by any text editor, read by other programs, or archived, realizing the transformation of analysis results from a volatile memory state to a stable, persistent document.
[0085] For example, taking a financial institution's transaction risk control and reconciliation project as an example, this project includes multiple directories such as transaction flow analysis, rule verification, reconciliation detail generation, report export, and playback verification samples. The number of files is large and the directory hierarchy is deep. During version iteration, the size of sample files, intermediate report files, and log archive files can easily grow rapidly. It is necessary to obtain the file size distribution and update time distribution within the project scope directly in the integrated development environment in order to locate the files that occupy a large amount of space and verify the most recent modification time. After the integrated development environment (IDE) loads the file resource analysis component, which receives statistical commands from the resource manager interface and generates project file volume analysis reports, right-clicking on a project file or directory in the IDE's resource manager interface triggers the statistical command by selecting the menu item corresponding to the command. The extended system captures the statistical command based on the command identifier and obtains the event context object. It extracts the Uniform Resource Identifier (URI) of the currently selected resource item from the event context object and determines the type of the resource item. Then, it converts the URI into a local file system path and determines the target root directory to be analyzed based on the local file system path and the type of the resource item. This ensures that when a directory is selected, the target root directory is used, and when a file is selected, the directory where the file is located is used as the target root directory, thus keeping the statistical scope consistent with the selection in the resource manager interface. Once the target root directory is determined, the plugin performs a recursive traversal based on it, reading all files and folders contained within that directory. During the traversal, it performs matching verification according to a preset exclusion strategy. Successfully matched items are ignored, while unmatched items continue processing. For unmatched items, if the type is a folder, it recursively proceeds; if the type is a file, it filters to those not excluded, obtaining the absolute paths of these unexcluded files and writing them to an empty list. After the recursive call is complete, the populated empty list is output as a set of valid file paths. This exclusion strategy can be used in financial engineering to exclude dependency directories, build artifact directories, cache directories, historical archive directories, and other paths that do not need to participate in the current volume analysis, preventing a large number of irrelevant files from entering subsequent statistics. Subsequently, the set of valid file paths is iteratively processed to locate the current valid file path. The status query interface of the file system is called to read the status parameters of the file pointed to by the valid file path and use them as file attributes. The original byte volume value and the last modification timestamp are extracted from the file attributes. A structured object containing the valid file path, the original byte volume value, and the last modification timestamp is constructed. The structured objects generated for all valid file paths in the set of valid file paths are integrated into metadata information to provide input for subsequent unified conversion and sorting.Next, volume and time format processing is performed on each metadata information. A pre-defined list of unit symbols arranged in ascending order of capacity is used, along with a carry threshold and date format. For each metadata information, the original byte volume value is compared cyclically with the carry threshold. When the carry condition is met, division is performed and the unit level is updated until the original byte volume value is less than the carry threshold. The processed value is then concatenated with the corresponding symbol in the unit symbol list to generate a volume character. Simultaneously, the last modified timestamp is parsed for each metadata information to obtain the year, month, day, hour, and minute time components. These time components are then converted into text format according to the date format to generate standard date and time characters. The volume character and standard date and time characters are then combined and encapsulated with the valid file path and original byte volume value from the metadata information to generate updated metadata information items. All updated metadata information items are integrated into updated metadata information, ensuring that the sorting criterion still uses the original byte volume value while the display fields use the volume character and standard date and time characters. Next, all updated metadata information is sorted according to the original byte volume values. The updated metadata information is loaded into a list container, and the comparison and sorting module is initialized. The sorting order of the comparison and sorting module is set to descending order of values from largest to smallest, and the original byte volume value is specified as the sorting comparison key. The comparison and sorting module is run, and during execution, the original byte volume values contained in each updated metadata information in the list container are extracted according to the sorting comparison key and compared. The relative positions of the updated metadata information in the list container are adjusted according to the comparison results until the list container is completely reorganized, resulting in a sorted sequence of updated metadata information. Finally, the valid file path, volume characters, and standard date and time characters contained in each updated metadata information are extracted from the sorted sequence of updated metadata information. Characters are concatenated according to a preset line text template to form a single line statistical text. All single line statistical texts are aggregated and written to a text file to generate an analysis report file. This analysis report can visually present large entries and their update times within the directory structure of financial engineering, such as temporary files exported from reconciliation details, intermediate files generated from regulatory reports, compressed files of transaction replay samples, and large log fragments in the log archive directory. This facilitates locating specific modules and directories by combining valid file paths and verifying whether these files have been modified recently or are continuously growing based on standard date and time characters. This supports archiving, cleaning up, or migrating unnecessary large files while retaining traceability evidence for critical business documents.
[0086] This embodiment ensures that the file list order in the final report strictly corresponds to the volume-based sorting conclusion by sequentially traversing the ordered sequence, making the line order of the report itself a direct reflection of the volume ranking. The formatted volume, time, and original path are precisely read from each data unit, extracting the core information combination presented to the user. String concatenation is performed according to a preset template, transforming discrete data fields into well-formatted and consistent text lines, ensuring the report's readability and professionalism. All text lines are aggregated into a coherent whole, integrating scattered individual records into a complete document draft. Finally, by persistently writing the aggregated content to a separate text file, a stable, shareable, and long-term storable data artifact is created.
[0087] In one embodiment, a project file volume visualization report generation device is provided, which corresponds one-to-one with the project file volume visualization report generation method described in the above embodiments. (Refer to...) Figure 3 , Figure 3 This is a schematic diagram of the functional modules of a preferred embodiment of the project file volume visualization report generation device of the present invention. The modules include a root directory determination module 10, a traversal filtering module 20, an attribute reading module 30, a data conversion module 40, a sorting module 50, and a report generation module 60. Detailed descriptions of each functional module are as follows: The root directory determination module 10 is used to determine the target root directory to be analyzed in response to statistical instructions received in the resource manager interface of the integrated development environment. The traversal filtering module 20 is used to perform recursive traversal based on the target root directory, obtain all files and folders contained in the target root directory, and filter out the files that have not been excluded from the files and folders according to the preset exclusion strategy, so as to construct a set of valid file paths. The attribute reading module 30 is used to read the file attributes corresponding to each valid file path in the set of valid file paths and generate corresponding metadata information. The metadata information includes the valid file path, the original byte volume value and the last modification timestamp. The data conversion module 40 is used to convert the original byte volume value in each of the metadata information into a volume character, and to convert the last modification timestamp in each of the metadata information into a standard date and time character, so as to obtain updated metadata information containing the valid file path, the original byte volume value, the volume character and the standard date and time character; The sorting module 50 is used to sort all updated metadata information according to the size of the original byte volume value to obtain a sorted sequence of updated metadata information. The report generation module 60 is used to extract the valid file path, volume characters, and standard date and time characters contained in each updated metadata information in the sorted updated metadata information sequence, and generate an analysis report file.
[0088] In one embodiment, the root directory determination module 10 is specifically used for: Register a command identifier in the extended system of the integrated development environment and bind the command identifier to the context menu item of the resource manager interface; The command identifier is monitored through the command monitoring interface. When a statistical instruction activated through the context menu item is detected, the event context object passed with the statistical instruction is obtained. The event context object is parsed to extract the Uniform Resource Identifier of the resource item currently selected by the user in the resource manager interface, and the type of the resource item is determined. The Uniform Resource Identifier is converted into a local file system path, and the target root directory to be analyzed is determined based on the local file system path and the type of the resource item.
[0089] In one embodiment, traversing the filtering module 20 is specifically used for: Initialize an empty list to store path data, and define a scan function that receives the current path parameter to perform a recursive traversal of the file tree; The scanning function is called with the target root directory as the starting path. In each level of the execution logic of the scanning function, the list of child nodes under the current path is read to obtain all files and folders contained in the current level. Iterate through each file or folder in the child node list, verify the name of each file or folder against the preset exclusion strategy, and ignore the items that match successfully; For items that fail to match, determine the type of the item. If the type is a folder, call the scanning function with the path of the item as a parameter. If the type is a file, filter the item as a file that has not been excluded. Obtain the absolute path of each file that was not excluded and add the absolute path to the empty list. After the scanning function has finished calling the target root directory and all recursive calls triggered by the call, output the filled empty list as a set of valid file paths.
[0090] In one embodiment, the attribute reading module 30 is specifically used for: The set of valid file paths is iteratively processed to locate the currently valid file path that needs to be processed. Call the file system status query interface to read the status parameters of the file pointed to by the valid file path, and use the status parameters as the file attributes corresponding to the valid file path; Extract the original byte volume value and the last modification timestamp from the file attributes; Construct a structured object containing the valid file path, the original byte size value, and the last modification timestamp; The structured objects generated for all valid file paths in the set of valid file paths are integrated into metadata information.
[0091] In one embodiment, the data conversion module 40 is specifically used for: A preset list of unit symbols arranged in ascending order of capacity is provided, along with settings for carry threshold and date format. For each piece of metadata, the original byte volume value is compared with the carry threshold in a loop. When the original byte volume value meets the carry condition, division is performed and the unit level is updated until the original byte volume value is less than the carry threshold. The processed value is then concatenated with the corresponding symbol in the unit symbol list to generate a volume character. For each piece of metadata information, the last modified timestamp is parsed to obtain the time components of year, month, day, hour, and minute, and the time components are converted into text form according to the date format to generate standard date and time characters; For each of the metadata information items, the generated volume character and the standard date and time character are combined and encapsulated with the valid file path and the original byte volume value in the metadata information to generate an updated metadata information item; All generated updated metadata information items are integrated into updated metadata information.
[0092] In one embodiment, the sorting module 50 is specifically used for: Load all updated metadata information into the list container to be processed, and initialize the comparison and sorting module; The sorting order of the comparison and sorting module is set to descending order of values from largest to smallest, and the original byte volume value is specified as the sorting comparison key; Run the comparison and sorting module. During the execution of the comparison and sorting module, extract the original byte volume values contained in each updated metadata information in the list container according to the sorting comparison key and compare their sizes. Based on the comparison results, adjust the relative positions of each updated metadata information in the list container until the list container is reorganized to obtain a sorted sequence of updated metadata information.
[0093] In one embodiment, the report generation module 60 is specifically used for: The sorted updated metadata information sequence is sequentially traversed. For each updated metadata information in the sorted updated metadata information sequence, the volume character, standard date and time character, and valid file path are read from the updated metadata information. Based on a preset line text template, the read volume characters, standard date and time characters, and valid file paths are concatenated to form a single line of statistical text; Aggregate all generated single-line statistical texts, write the aggregated content to a text file, and generate an analysis report file.
[0094] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 4 As shown. The computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides determination and control capabilities. The memory includes non-volatile and / or volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface is used to communicate with external clients via a network connection. When the computer program is executed by the processor, it implements the functions or steps of a project file volume visualization report generation method on the server side.
[0095] In one embodiment, a computer device is provided, which may be a client, and its internal structure diagram may be as follows: Figure 5 As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides determination and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface is used to communicate with an external server via a network connection. When executed by the processor, the computer program implements client-side functions or steps of a project file volume visualization report generation method.
[0096] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps: In response to the statistics command received in the resource manager interface of the integrated development environment, determine the target root directory to be analyzed; Based on the target root directory, a recursive traversal is performed to obtain all files and folders contained in the target root directory, and files that have not been excluded are filtered out from the files and folders according to a preset exclusion strategy to construct a set of valid file paths. Read the file attributes corresponding to each valid file path in the set of valid file paths, and generate corresponding metadata information. The metadata information includes the valid file path, the original byte size value, and the last modification timestamp. The original byte volume value in each of the metadata information is converted into a volume character, and the last modification timestamp in each of the metadata information is converted into a standard date and time character, to obtain updated metadata information containing the valid file path, the original byte volume value, the volume character, and the standard date and time character; All updated metadata information is sorted according to the original byte volume value to obtain a sorted sequence of updated metadata information; Extract the valid file path, volume characters, and standard date and time characters contained in each updated metadata information in the sorted updated metadata information sequence, and generate an analysis report file.
[0097] In one embodiment, a computer-readable storage medium is provided, which may be non-volatile or volatile, and a computer program is stored thereon, which, when executed by a processor, performs the following steps: In response to the statistics command received in the resource manager interface of the integrated development environment, determine the target root directory to be analyzed; Based on the target root directory, a recursive traversal is performed to obtain all files and folders contained in the target root directory, and files that have not been excluded are filtered out from the files and folders according to a preset exclusion strategy to construct a set of valid file paths. Read the file attributes corresponding to each valid file path in the set of valid file paths, and generate corresponding metadata information. The metadata information includes the valid file path, the original byte size value, and the last modification timestamp. The original byte volume value in each of the metadata information is converted into a volume character, and the last modification timestamp in each of the metadata information is converted into a standard date and time character, to obtain updated metadata information containing the valid file path, the original byte volume value, the volume character, and the standard date and time character; All updated metadata information is sorted according to the original byte volume value to obtain a sorted sequence of updated metadata information; Extract the valid file path, volume characters, and standard date and time characters contained in each updated metadata information in the sorted updated metadata information sequence, and generate an analysis report file.
[0098] It should be noted that the functions or steps that can be implemented by the computer-readable storage medium or computer device described above can be referred to the relevant descriptions on the server side and client side in the foregoing method embodiments. To avoid repetition, they will not be described one by one here.
[0099] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0100] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0101] It should be noted that if any software tools or components not belonging to our company appear in the embodiments of this application, they are merely for illustrative purposes and do not represent actual use.
[0102] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A method for generating a project file volume visualization report, characterized in that, Includes the following steps: In response to the statistics command received in the resource manager interface of the integrated development environment, determine the target root directory to be analyzed; Based on the target root directory, a recursive traversal is performed to obtain all files and folders contained in the target root directory, and files that have not been excluded are filtered out from the files and folders according to a preset exclusion strategy to construct a set of valid file paths. Read the file attributes corresponding to each valid file path in the set of valid file paths, and generate corresponding metadata information. The metadata information includes the valid file path, the original byte size value, and the last modification timestamp. The original byte volume value in each of the metadata information is converted into a volume character, and the last modification timestamp in each of the metadata information is converted into a standard date and time character, to obtain updated metadata information containing the valid file path, the original byte volume value, the volume character, and the standard date and time character; All updated metadata information is sorted according to the original byte volume value to obtain a sorted sequence of updated metadata information; Extract the valid file path, volume characters, and standard date and time characters contained in each updated metadata information in the sorted updated metadata information sequence, and generate an analysis report file.
2. The method for generating a project file volume visualization report as described in claim 1, characterized in that, In response to a statistics command received in the resource manager interface of the integrated development environment, determine the target root directory to be analyzed, including: Register a command identifier in the extended system of the integrated development environment and bind the command identifier to the context menu item of the resource manager interface; The command identifier is monitored through the command monitoring interface. When a statistical instruction activated through the context menu item is detected, the event context object passed with the statistical instruction is obtained. The event context object is parsed to extract the Uniform Resource Identifier of the resource item currently selected by the user in the resource manager interface, and the type of the resource item is determined. The Uniform Resource Identifier is converted into a local file system path, and the target root directory to be analyzed is determined based on the local file system path and the type of the resource item.
3. The method for generating a project file volume visualization report as described in claim 1, characterized in that, A recursive traversal is performed based on the target root directory to obtain all files and folders contained in the target root directory. Files that are not excluded are then filtered out from the files and folders according to a preset exclusion strategy to construct a set of valid file paths, including: Initialize an empty list to store path data, and define a scan function that receives the current path parameter to perform a recursive traversal of the file tree; The scanning function is called with the target root directory as the starting path. In each level of the execution logic of the scanning function, the list of child nodes under the current path is read to obtain all files and folders contained in the current level. Iterate through each file or folder in the child node list, verify the name of each file or folder against the preset exclusion strategy, and ignore the items that match successfully; For items that fail to match, determine the type of the item. If the type is a folder, call the scanning function with the path of the item as a parameter. If the type is a file, filter the item as a file that has not been excluded. Obtain the absolute path of each file that was not excluded and add the absolute path to the empty list. After the scanning function has finished calling the target root directory and all recursive calls triggered by the call, output the filled empty list as a set of valid file paths.
4. The method for generating a project file volume visualization report as described in claim 1, characterized in that, Read the file attributes corresponding to each valid file path in the set of valid file paths, and generate corresponding metadata information. The metadata information includes the valid file path, the original byte size, and the last modification timestamp, including: The set of valid file paths is iteratively processed to locate the currently valid file path that needs to be processed. Call the file system status query interface to read the status parameters of the file pointed to by the valid file path, and use the status parameters as the file attributes corresponding to the valid file path; Extract the original byte volume value and the last modification timestamp from the file attributes; Construct a structured object containing the valid file path, the original byte size value, and the last modification timestamp; The structured objects generated for all valid file paths in the set of valid file paths are integrated into metadata information.
5. The method for generating a project file volume visualization report as described in claim 1, characterized in that, The original byte volume value in each of the metadata information is converted into a volume character, and the last modification timestamp in each of the metadata information is converted into a standard date and time character, to obtain updated metadata information containing the valid file path, the original byte volume value, the volume character, and the standard date and time character, including: A preset list of unit symbols arranged in ascending order of capacity is provided, along with settings for carry threshold and date format. For each piece of metadata, the original byte volume value is compared with the carry threshold in a loop. When the original byte volume value meets the carry condition, division is performed and the unit level is updated until the original byte volume value is less than the carry threshold. The processed value is then concatenated with the corresponding symbol in the unit symbol list to generate a volume character. For each piece of metadata information, the last modified timestamp is parsed to obtain the time components of year, month, day, hour, and minute, and the time components are converted into text form according to the date format to generate standard date and time characters; For each of the metadata information items, the generated volume character and the standard date and time character are combined and encapsulated with the valid file path and the original byte volume value in the metadata information to generate an updated metadata information item; All generated updated metadata information items are integrated into updated metadata information.
6. The method for generating a project file volume visualization report as described in claim 1, characterized in that, Based on the original byte volume value, all updated metadata information is sorted to obtain a sorted sequence of updated metadata information, including: Load all updated metadata information into the list container to be processed, and initialize the comparison and sorting module; The sorting order of the comparison and sorting module is set to descending order of values from largest to smallest, and the original byte volume value is specified as the sorting comparison key; Run the comparison and sorting module. During the execution of the comparison and sorting module, extract the original byte volume values contained in each updated metadata information in the list container according to the sorting comparison key and compare their sizes. Based on the comparison results, adjust the relative positions of each updated metadata information in the list container until the list container is reorganized to obtain a sorted sequence of updated metadata information.
7. The method for generating a project file volume visualization report as described in claim 1, characterized in that, Extract the valid file path, volume characters, and standard date and time characters contained in each updated metadata information in the sorted updated metadata information sequence, and generate an analysis report file, including: The sorted updated metadata information sequence is sequentially traversed. For each updated metadata information in the sorted updated metadata information sequence, the volume character, standard date and time character, and valid file path are read from the updated metadata information. Based on a preset line text template, the read volume characters, standard date and time characters, and valid file paths are concatenated to form a single line of statistical text; Aggregate all generated single-line statistical texts, write the aggregated content to a text file, and generate an analysis report file.
8. A device for generating a project document volume visualization report, characterized in that, The project file volume visualization report generation device includes: The root directory determination module is used to determine the target root directory to be analyzed in response to statistical instructions received in the resource manager interface of the integrated development environment. The traversal and filtering module is used to perform recursive traversal based on the target root directory, obtain all files and folders contained in the target root directory, and filter out the files that have not been excluded from the files and folders according to the preset exclusion strategy, so as to construct a set of valid file paths. The attribute reading module is used to read the file attributes corresponding to each valid file path in the set of valid file paths and generate corresponding metadata information. The metadata information includes the valid file path, the original byte volume value and the last modification timestamp. The data conversion module is used to convert the original byte volume value in each of the metadata information into a volume character, and to convert the last modification timestamp in each of the metadata information into a standard date and time character, so as to obtain updated metadata information containing the valid file path, the original byte volume value, the volume character and the standard date and time character; The sorting module is used to sort all updated metadata information according to the size of the original byte volume value to obtain a sorted sequence of updated metadata information. The report generation module is used to extract the valid file path, volume characters, and standard date and time characters contained in each updated metadata information in the sorted updated metadata information sequence, and generate an analysis report file.
9. A computer device, characterized in that, The computer device includes a memory, a processor, and a project file volume visualization report generation program stored in the memory and executable on the processor. When the project file volume visualization report generation program is executed by the processor, it implements the steps of the project file volume visualization report generation method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The storage medium stores a project file volume visualization report generation program, which, when executed by a processor, implements the steps of the project file volume visualization report generation method as described in any one of claims 1-7.