A file processing method and computing device
By generating task list files in computing devices and automatically importing them into external storage devices, the problem of automating and unifying file operations across multiple computers is solved, simplifying user operations and improving interactivity.
Patent Information
- Application Number
- CN202210621405.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-01
- Publication Date
- 2026-01-13
- Estimated Expiration
- 2042-06-01
AI Technical Summary
In existing technologies, file operations between multiple computers require manual execution of scripts, resulting in poor user interactivity. Ordinary users find it difficult to write scripts and cannot achieve automated processing.
By creating file processing tasks and generating a task list file in the first computing device, storing it on an external storage device, and importing it into the second computing device to automatically execute file operations, the operation is simplified by utilizing the task editing interface of the file manager.
It automates and unifies file operations across multiple computing devices, simplifies user operations, and improves interactivity and convenience.
Smart Images

Figure CN115033537B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer and document management technology, and in particular to a document processing method and computing device. Background Technology
[0002] A file manager is a system-level application for managing files. It supports copying and pasting files locally on the computer. To transfer data between multiple computers, you can use a network channel or external storage devices for physical transfer. However, if you need to perform multiple file operations between multiple computers and ensure the accuracy and consistency of the operations, manual operation by the user is obviously cumbersome.
[0003] For R&D personnel, scripts can be written to manipulate multiple files and imported into other computers via external storage devices. Manual execution of the scripts allows for automated file processing on other computers. However, for ordinary users, writing scripts is difficult, hindering user operation and usability. Furthermore, scripts typically run in the background and cannot directly interact with the user, resulting in poor interactivity. Additionally, since scripts are executable files, users must manually double-click the script file to run it when imported to other machines, failing to achieve automatic execution.
[0004] Therefore, a file processing method is needed to solve the problems existing in the above solutions. Summary of the Invention
[0005] Therefore, the present invention provides a file processing method to solve or at least alleviate the problems mentioned above.
[0006] According to one aspect of the present invention, a file processing method is provided, executed in a first computing device adapted to have one or more external storage devices mounted on it. The method includes the steps of: creating one or more file processing tasks, each file processing task including a target file and file operations to be performed on the target file; generating a task list file in a predetermined format based on the one or more file processing tasks; storing the task list file in the one or more external storage devices so as to import the task list file into a second computing device via the external storage devices, and executing the one or more file processing tasks in the second computing device based on the task list file.
[0007] Optionally, in the file processing method according to the present invention, the first computing device includes a first file manager, and the step of creating one or more file processing tasks includes: the first file manager responding to a task editing request by displaying a task editing interface; obtaining task information configured for each file processing task in the task editing interface, the task information including one or more of the following: target file source path, file operation to be performed on the target file, and target path; and creating a corresponding file processing task based on the task information.
[0008] Optionally, in the file processing method according to the present invention, a search request triggered in the task editing interface is received, and the search scope and post-processing operation are obtained; one or more target files are obtained based on the search scope; and post-processing operation is performed on the one or more target files; wherein the post-processing operation includes writing the source path of the target file to an external storage device.
[0009] Optionally, in the file processing method according to the present invention, the first file manager includes a first display interface, and the first file manager displays the task editing interface in response to a task editing request, including: the first file manager displays the task editing interface in response to a trigger operation on the task editing interface in the first display interface.
[0010] Optionally, in the file processing method according to the present invention, the step of storing the task list file in one or more external storage devices includes: in response to a request to export a task, displaying a task export interface, the task export interface displaying information about one or more external storage devices mounted on the first computing device; obtaining information about one or more external devices selected in the task export interface; in response to a request to import a task, generating a task list file in a predetermined format based on the one or more file processing tasks, and storing the task list file in the selected one or more external storage devices.
[0011] Optionally, in the file processing method according to the present invention, the step of generating a task list file in a predetermined format based on the one or more file processing tasks further includes: writing the device identifier of the first computing device into the task list file so that only the first computing device is allowed to edit the task list file.
[0012] Optionally, in the file processing method according to the present invention, the file operation includes one or more of the following: copy operation, cut operation, delete operation, and compression operation.
[0013] According to one aspect of the present invention, a file processing method is provided, executed in a second computing device, comprising the steps of: mounting the external storage device; checking whether a task list file exists in the external storage device; if the task list file exists, importing the task list file and executing the one or more file processing tasks based on the task list file.
[0014] Optionally, in the file processing method according to the present invention, the second computing device includes a second file manager, and the step of checking whether a task list file exists in the external storage device includes: a daemon process of the second file manager detects whether the external storage device is mounted; if so, it checks whether a task list file exists in a predetermined directory of the external storage device; if a task list file exists, it starts the second file manager process so that the second file manager process imports the task list file into the second computing device and executes the one or more file processing tasks based on the task list file.
[0015] According to one aspect of the present invention, a computing device is provided, comprising: at least one processor; and a memory storing program instructions, wherein the program instructions are configured to be executed by the at least one processor, the program instructions including instructions for performing the file processing method described above.
[0016] According to one aspect of the present invention, a readable storage medium storing program instructions is provided, which, when read and executed by a computing device, causes the computing device to perform the file processing method described above.
[0017] According to the technical solution of the present invention, a file processing method is provided, wherein a file manager in a computing device can create one or more file processing tasks and generate a task list file, and can store the task list file in one or more mounted external storage devices. The task list file can then be imported into other computing devices via the external storage devices, allowing the other computing devices to automatically execute one or more file processing tasks based on the task list file. In this way, by generating the task list file on only one computing device, the same file operations can be performed on multiple computing devices based on the same task list file, ensuring consistent file operations across multiple computing devices. Furthermore, by mounting external storage devices to other computing devices, the other computing devices automatically import the task list file and automatically execute the file processing tasks sequentially, thereby achieving the goal of automatic file operation execution and simplifying user operation steps.
[0018] Furthermore, in the file processing method of the present invention, the display interface of the file manager provides a task editing interface. Users can trigger the task editing interface to pop up the task editing interface, so that users can directly edit file processing tasks in the task editing interface. This simplifies the operation of editing tasks, is more user-friendly, and improves the interactive experience.
[0019] Furthermore, according to the technical solution of the present invention, users can also perform search operations when editing tasks, and the search results (paths to one or more target files) can be written to an external storage device. This makes the application scenarios applicable to the present invention more extensive.
[0020] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description
[0021] To achieve the foregoing and related objectives, certain illustrative aspects are described herein in conjunction with the following description and accompanying drawings. These aspects indicate various ways in which the principles disclosed herein may be practiced, and all aspects and their equivalents are intended to fall within the scope of the claimed subject matter. The foregoing and other objectives, features, and advantages of this disclosure will become more apparent from the following detailed description, taken in conjunction with the accompanying drawings. Throughout this disclosure, the same reference numerals generally refer to the same parts or elements.
[0022] Figure 1 A schematic diagram of a computing device 100 according to an embodiment of the present invention is shown;
[0023] Figure 2 , Figure 3 Flowcharts of a file processing method 200 according to an embodiment of the present invention are shown respectively;
[0024] Figure 4 A schematic diagram of a first computing device and a second computing device according to an embodiment of the present invention is shown;
[0025] Figure 5 A rendering of a first display interface according to an embodiment of the present invention is shown;
[0026] Figure 6 A rendering of a task editing interface according to an embodiment of the present invention is shown;
[0027] Figure 7 The image shows a rendering of a single task configuration interface according to an embodiment of the present invention;
[0028] Figure 8The image shows a rendering of a search task configuration interface according to an embodiment of the present invention;
[0029] Figure 9 The figure shows a rendering of a task export interface according to an embodiment of the present invention;
[0030] Figure 10 A flowchart of a file processing method 1000 according to an embodiment of the present invention is shown;
[0031] Figure 11 The image shows a rendering of a task list interface according to an embodiment of the present invention. Detailed Implementation
[0032] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
[0033] This invention provides a file processing method suitable for execution in a computing device. The computing device can create one or more file processing tasks and generate a task list file, and can store the task list file in one or more mounted external storage devices so that the task list file can be imported into other computing devices for execution via the external storage devices, thereby realizing the automatic execution of one or more file processing tasks based on the task list file in other computing devices.
[0034] Figure 1 A schematic diagram of a computing device 100 according to an embodiment of the present invention is shown. In a basic configuration, the computing device 100 includes at least one processing unit 102 and a system memory 104. According to one aspect, depending on the configuration and type of the computing device, the processing unit 102 may be implemented as a processor. The system memory 104 includes, but is not limited to, volatile memory (e.g., random access memory), non-volatile memory (e.g., read-only memory), flash memory, or any combination of such memory. According to one aspect, the system memory 104 includes an operating system 105, on which a file manager 150 is running, the file manager 150 being configured to execute the file processing method 200 of the present invention.
[0035] According to one aspect, operating system 105 is, for example, suitable for controlling the operation of computing device 100. Furthermore, examples are practiced in conjunction with graphics libraries, other operating systems, or any other applications, and are not limited to any particular application or system. Figure 1The basic configuration is illustrated by the components within the dashed lines 108. According to one aspect, the computing device 100 has additional features or functions. For example, according to one aspect, the computing device 100 includes additional data storage devices (removable and / or non-removable), such as disks, optical discs, or magnetic tapes. This additional storage... Figure 1 The middle part is shown by external storage device 109 (i.e., removable storage device) and non-removable storage device 110.
[0036] As stated above, according to one aspect, a program module is stored in system memory 104. According to one aspect, the program module may include one or more applications. The present invention does not limit the type of application; for example, applications may include: email and contact applications, word processing applications, spreadsheet applications, database applications, slideshow applications, drawing or computer-aided applications, web browser applications, etc.
[0037] According to one aspect, examples can be practiced on circuits including discrete electronic components, packaged or integrated electronic chips containing logic gates, circuits utilizing microprocessors, or on a single chip containing electronic components or a microprocessor. For example, it can be practiced via wherein... Figure 1 Each or many of the components shown can be implemented as an example by integrating a System-on-a-Chip (SOC) on a single integrated circuit. According to one aspect, such an SOC device may include one or more processing units, graphics units, communication units, system virtualization units, and various application functions, all integrated (or “burned in”) as a single integrated circuit onto a chip substrate. When operating via the SOC, the functions described herein can be operated via dedicated logic integrated on a single integrated circuit (chip) with other components of the computing device 100. Embodiments of the invention can also be implemented using other techniques capable of performing logical operations (e.g., AND, OR, and NOT), including but not limited to mechanical, optical, fluid, and quantum technologies. Additionally, embodiments of the invention can be implemented within a general-purpose computer or in any other circuit or system.
[0038] According to one aspect, computing device 100 may also have one or more input devices 112, such as a keyboard, mouse, pen, voice input device, touch input device, etc. It may also include output devices 114, such as a display, speaker, printer, etc. The foregoing devices are examples and other devices may also be used. Computing device 100 may include one or more communication connections 116 that allow communication with other computing devices 118. Examples of suitable communication connections 116 include, but are not limited to: RF transmitter, receiver and / or transceiver circuitry; Universal Serial Bus (USB), parallel and / or serial ports.
[0039] As used herein, the term computer-readable medium includes computer storage medium. Computer storage medium can include volatile and non-volatile, removable and non-removable media implemented using any method or technology for storing information (e.g., computer-readable instructions, data structures, or program modules). System memory 104, external storage device 109, and non-removable storage device 110 are examples of computer storage media (i.e., memory storage). Computer storage media can include random access memory (RAM), read-only memory (ROM), electrically erasable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical storage, magnetic tape, magnetic tape, disk storage or other magnetic storage devices, or any other article of manufacture that can be used to store information and is accessible by computer device 100. According to one aspect, any such computer storage medium can be part of computing device 100. Computer storage media does not include carrier waves or other transmitted data signals.
[0040] According to one aspect, a communication medium is implemented by computer-readable instructions, data structures, program modules, or other data in a modulated data signal (e.g., a carrier wave or other transmission mechanism), and includes any information transmission medium. According to one aspect, the term "modulated data signal" describes a signal having one or more sets of characteristics or altered in a manner that encodes information in the signal. By way of example and not limitation, a communication medium includes wired media such as wired networks or direct wired connections, and wireless media such as acoustic, radio frequency (RF), infrared, and other wireless media.
[0041] In one embodiment of the present invention, computing device 100 includes one or more processors and one or more readable storage media storing program instructions. When the program instructions are configured to be executed by one or more processors, the computing device 100 causes the computing device 100 to perform the file processing method of the present invention.
[0042] Figure 2 , Figure 3 Flowcharts of a file processing method 200 according to an embodiment of the present invention are shown. Method 200 is adapted to be executed in a computing device (the aforementioned computing device 100).
[0043] In an embodiment of the invention, a computing device runs an operating system, and a file manager 150 runs within the operating system. Method 200 is adapted to be executed within the file manager 150.
[0044] It should be noted that, according to the technical solution of the present invention, the computing device 100 can be mounted with one or more external storage devices. The computing device 100 can create one or more file processing tasks and generate a task list file by executing the file processing method 200 of the present invention. The task list file can be stored in one or more mounted external storage devices so that the task list file can be imported into other computing devices for execution via the external storage devices, thereby realizing the automatic execution of one or more file processing tasks based on the task list file in other computing devices.
[0045] To distinguish between the computing device that creates file processing tasks and generates task list files, and other computing devices that import task list files and execute file processing tasks, the computing device that creates file processing tasks is referred to as the first computing device, and other computing devices that execute file processing tasks are referred to as the second computing device.
[0046] Figure 4 A schematic diagram of a first computing device and a second computing device according to an embodiment of the present invention is shown. The first computing device is adapted to execute the file processing method 200 of the present invention to create file processing tasks and generate a task list file. Specifically, the first computing device may be connected to one or more external storage devices, and the first computing device may store the generated task list file in the connected one or more external storage devices, so that the task list file can be imported into the second computing device via the external storage devices, thereby realizing the automatic execution of one or more file processing tasks based on the task list file in the second computing device.
[0047] In one embodiment of the present invention, a first file manager runs in the operating system of the first computing device, and method 200 is adapted to be executed in the first file manager. A second file manager runs in the operating system of the second computing device, and the second file manager is adapted to import a task list file from an external storage device into the second computing device and automatically execute one or more file processing tasks based on the task list file.
[0048] like Figure 2 and Figure 3 As shown, method 200 begins with step S210.
[0049] In step S210, the first computing device creates one or more file processing tasks, each including a target file and file operations performed on the target file. Here, when creating a file processing task, the source path of the target file is configured so that the target file can be obtained based on its source path, and corresponding file operations can be performed on the target file.
[0050] Specifically, file operations include one or more of the following: copy, cut, delete, compress, and search.
[0051] Additionally, file processing tasks may include a target path to store the target file after the file operation is performed. For example, when the file operation performed on the target file is a copy (or cut) operation, a corresponding target path needs to be configured for the target file so that it can be copied to that path. When the file operation performed on the target file is a compression operation, a corresponding target path needs to be configured for the target file so that the compressed target file can be stored there.
[0052] When the file operation performed on the target file is a deletion operation, only the source path of the target file needs to be configured so that the target file can be deleted based on the source path, without needing to configure the target path for the target file.
[0053] According to one embodiment of the present invention, a first file manager in a first computing device may specifically create one or more file processing tasks in the following manner.
[0054] First, the first file manager can respond to a user's task editing request and display a task editing interface. Here, the first file manager includes a first display interface.
[0055] Figure 5 A rendering of a first display interface according to an embodiment of the present invention is shown. Figure 5 As shown, the first display interface includes a task editing interface (task editing menu item). Users can trigger the task editing interface from this interface, and the first file manager responds by displaying the task editing interface to the user. This allows users to configure relevant information for one or more file processing tasks within the task editing interface.
[0056] Next, the first file manager can obtain the task information configured by the user for each file processing task in the task editing interface. This task information includes one or more of the following: the target file source path, the file operation performed on the target file, and the target path. As mentioned earlier, the task information required for different file operation types varies for each file processing task. For example, the task information configured by the user for a file processing task may include the target file source path and the file operation performed on the target file (e.g., deletion); or, the user may configure the task information for a file processing task to include the target file source path, the file operation performed on the target file (e.g., copy, cut, compression), and the target path, so that the target file after the file operation is performed can be stored based on the target path.
[0057] Furthermore, based on the task information configured by the user for each file processing task, the first file manager can create and generate corresponding file processing tasks according to the task information (target file source path, file operations to be performed on the target file, and one or more of the target path). Ultimately, one or more file processing tasks can be created.
[0058] Figure 6 The figure shows a rendering of a task editing interface according to an embodiment of the present invention. Figure 7 The diagram shows a rendering of a single task configuration interface according to an embodiment of the present invention. Figure 8 The image shows a screenshot of a search task configuration interface according to an embodiment of the present invention.
[0059] In one implementation, such as Figure 6 As shown, the task editing interface includes a task list, which contains multiple currently added task entries, Task1 to Task4. Users can trigger the "Add" button in the task editing interface to request the file manager to add a new task. In response to the user's request, the file manager will display a single task configuration interface. Then, as... Figure 7 The single task configuration interface shown allows users to configure task information, including the target file source path, the file operation to be performed on the target file, and the target path, among other things. Specifically, users can select the file operation to be performed on the target file (Action), the source path of the target file (Source), and the target path (Target) in the single task configuration interface. After entering the task information, users can click the "OK" button. The file manager then creates the corresponding file processing task based on the task information, and a new task entry can be added to the task list in the task editing interface.
[0060] Additionally, after creating one or more file processing tasks, you can configure whether the task execution mode is silent. In one implementation, such as... Figure 6 As shown, the task editing interface includes a silent execution option. By selecting the silent execution option, users can set one or more file processing tasks to be executed silently.
[0061] In one embodiment, file operations also include a search operation. When a user selects a file operation to perform on a target file in the individual task configuration interface, they can also select a search operation to search for the target file. Specifically, by selecting and triggering the "Search" option in the Action drop-down menu of the individual task configuration interface, the file manager, in response to the user's triggering of the "Search" option, switches the individual task configuration interface to the search task configuration interface, such as... Figure 8 As shown. In this way, when configuring tasks, users can trigger a search request in the search task configuration interface to request the first file manager to search for one or more target files and perform post-processing operations on one or more target files.
[0062] exist Figure 8 In the search task configuration interface shown, the parameter corresponding to Target is the directory path to be searched, and the parameter corresponding to Range is the search scope. This allows users to configure the search directory path and search scope. Here, the search scope can be the current directory or each subdirectory under the current directory. Additionally, when configuring the search scope, users can select search criteria such as file type, file modification time, matching mode, and file size. Furthermore, they can choose the post-processing operation to be performed on the target file. Selectable file types include, for example, application files, video files, audio files, image files, and text files. Selectable file modification times include, for example, Today, Yesterday, This Week, Last Week, etc. Selectable matching modes include, for example, exact match and fuzzy match. Selectable file sizes include, for example, 0–100KB, 100KB–1MB, 1MB–100MB, etc.
[0063] It should be noted that post-processing operations are file operations performed on one or more target files found after the search is completed. For example, post-processing operations can be implemented as write operations, specifically writing the source paths of all the target files found to an external storage device. Furthermore, the storage path can be set to a user directory created under the root directory of the external storage device. In this way, the source paths of all the target files found can be written to the user directory in the external storage device.
[0064] According to this embodiment, when configuring a task, the user can trigger a search request in the search task configuration interface to request the first file manager to search for one or more target files, and configure post-processing operations to be performed on the one or more target files. In other words, the first file manager can receive the search request triggered by the user in the task configuration interface, and can obtain the search scope configured by the user, as well as the post-processing operations to be performed on the target files. Based on the search scope configured by the user, one or more target files can be found, and then post-processing operations can be performed on the one or more target files found.
[0065] In step S220, the first file manager of the first computing device can generate a task list file in a predetermined format based on one or more file processing tasks.
[0066] In one implementation, the predefined format is, for example, JSON.
[0067] In one embodiment, when generating a task list file in a predetermined format based on one or more file processing tasks, a device identifier of the first computing device can also be written into the task list file to bind the task list file to the first computing device and restrict the editing permission of the task list file to the first computing device, allowing only the first computing device to edit the task list file.
[0068] In step S230, the first file manager of the first computing device stores the task list file in one or more external storage devices mounted on the first computing device, so as to import the task list file into the second computing device via the external storage devices, and execute one or more file processing tasks based on the task list file in the second computing device.
[0069] In one embodiment, a task folder (.Task) is created in the root directory of the external storage device, and the task list file is stored in the task folder on the external storage device. Furthermore, the task list file can be set to read-only mode.
[0070] It should be noted that after the task list file is stored on one or more external storage devices mounted on the first computing device, the second file manager on the second computing device will import the task list file from the external storage device into the second computing device by mounting any one of the external storage devices on the second computing device.
[0071] It should be noted that, according to the method 200 of the present invention, after step S230 is performed to import the task list file into the second computing device via an external storage device, the second computing device will automatically execute one or more file processing tasks in the task list file in sequence according to the task list file.
[0072] According to one embodiment of the present invention, the first file manager of the first computing device can specifically store the task list file to one or more external storage devices by means of the following method:
[0073] First, the primary file manager responds to the user's request to export a task by displaying the task export interface. Here, in one implementation, such as... Figure 6 As shown, the task editing interface includes an Export button, which allows users to request the first file manager to export tasks by triggering the Export button in the task editing interface.
[0074] Figure 9 A rendering of a task export interface according to an embodiment of the present invention is shown. Figure 9 As shown, the task export interface displays information about one or more external storage devices mounted on the first computing device, with each external storage device listed in a corresponding entry. Users can select one or more external device entries in the task export interface.
[0075] Next, the first file manager retrieves information about one or more external devices selected by the user in the task export interface. Here, the user selects the corresponding external device by triggering the entry containing the external device information in the task export interface.
[0076] Finally, in response to the user's request to import tasks, the first file manager generates a task list file in a predefined format (e.g., JSON format) based on one or more file processing tasks, and stores the task list file on one or more external storage devices selected by the user. Specifically, the task list file can be stored in a predefined directory (e.g., a task folder) on each external storage device selected by the user. Here, in one implementation, such as... Figure 9 As shown, the task export interface includes an import button (Ixport), which allows users to request the import of tasks from the first file manager by triggering the import button in the task export interface.
[0077] Below is an example of a JSON-formatted task list file (containing multiple file processing tasks):
[0078]
[0079]
[0080] The `app` field indicates the name and version of the software to be opened, and each sub-node under the `tasks` node contains configuration information for each file processing task.
[0081] Furthermore, to ensure that the task list file can only be edited by the first computing device, and that operations on the task list file can only be performed on other computing devices (the second computing device), in one embodiment of the invention, the device identifier of the first computing device can be written into the task list file. In one implementation, the last six digits of the MAC address of the first computing device can be written into the identity field. For example, if the MAC address is 08:00:20:0A:8C:6D, then 0A8C6D is written into the identity field. This binds the task list file to the first computing device, restricting editing permissions to the first computing device, so that only the first computing device can edit the task list file.
[0082] It should also be noted that in the example above, the silent field indicates whether one or more file processing tasks in the task list file are executed silently, which is true by default.
[0083] Next, a task list file in a predetermined format can be imported into a second computing device via an external storage device. The second computing device can recognize the predetermined format (JSON format). The second computing device includes a second file manager.
[0084] Figure 10 A flowchart of a file processing method 1000 according to an embodiment of the present invention is shown. The method 1000 is adapted to be executed in a second computing device.
[0085] In one embodiment, a second file manager runs in the operating system of the second computing device, and method 1000 is adapted to be executed in the second file manager.
[0086] like Figure 10 As shown, method 1000 begins with step S1100.
[0087] In step S1100, the second computing device first mounts an external storage device.
[0088] Next, it is determined whether the second file manager is started. If the second file manager is already started and running, then in step S1200, the task list file is checked on the external storage device using the second file manager.
[0089] Finally, in step S1300, if it is determined that a task list file exists, the task list file is automatically imported into the second computing device, and one or more file processing tasks in the task list file are automatically executed based on the task list file.
[0090] In another embodiment, if the second file manager is not started, i.e., the second file manager process is not running, then in step S1200, the daemon process of the second file manager detects whether an external storage device is mounted. If an external storage device is detected, the daemon process checks whether a task list file exists in a predetermined directory of the external storage device. Furthermore, it can check whether the tasks in the task list file match the second computing device.
[0091] In step S1300, if it is determined that a task list file exists, the second file manager process is started. Subsequently, the second file manager process imports the task list file into the second computing device and automatically executes one or more file processing tasks in sequence based on the task list file.
[0092] In one embodiment, after the task list file is imported into any computing device, the file manager in the computing device can read the device identifier from the identity field in the task list file, determine whether the device identifier matches the current computing device, and if they match, it means that the task list file was created by the computing device (e.g., the first computing device). The computing device can edit the task list file and pop up a task list interface corresponding to the task list file.
[0093] Figure 11 A rendering of a task list interface according to an embodiment of the present invention is shown. Figure 11 As shown, the task list interface displays one or more file processing tasks from the task list file. The task list interface includes a Run button, an Edit button, a View log button, and a Cancel button. Users can click the Run button to request the file manager to execute one or more file processing tasks from the task list. Users can also click the Edit button to request editing of the task list file.
[0094] It should be noted that if the task list file is imported into another computing device (such as a second computing device), the device identifier in the identity field of the task list file does not match that of the other computing device, so the other computing device is not allowed to edit the task list file. Therefore, the task list interface that pops up on the other computing device does not include the Edit button and the View log button.
[0095] In another embodiment, if the `silent` field in the task list file indicates silent execution (meaning one or more file processing tasks in the task list file need to be executed silently), then the file processing tasks will be executed silently in the background without popping up the task list interface. When the file manager is silently executing file processing tasks, it can display a corresponding progress bar (the file manager's built-in progress bar) to allow users to monitor the task's progress in real time, improving user-friendliness.
[0096] In one embodiment, during the execution of a file processing task, task execution information can be written to a log file, and the log file can be stored in the task folder. Here, the task execution information written to the log file may include the name of the computing device (e.g., a second computing device) currently executing the task, the execution completion time, and relevant information about the file processing task (e.g., the source path of the target file, the file operations performed on the target file, and the target path).
[0097] Additionally, if the operation performed on the target file in the file processing task is a copy operation, and the target path is an external storage device, that is, when executing the file processing task, it is necessary to copy the target file to the external storage device. In this case, a folder named after the current computing device's username is created in the root directory of the external storage device, and the target file is stored in that username folder.
[0098] It should also be noted that, in the embodiments of the present invention, both the creation and execution of file processing tasks are implemented within the file manager. Specifically, in the above embodiments, the first file manager of the first computing device can configure and create file processing tasks, and the second file manager of the second computing device can execute file processing tasks. Based on this, file operations (including copy, cut, delete, compression, and search operations) in each file processing task can be implemented by calling the file manager's built-in functions. For example, during the copy operation of a target file, the file manager's copy method can be called and its built-in copy progress bar can be displayed.
[0099] According to the file processing method of the present invention, a file manager in a computing device can create one or more file processing tasks and generate a task list file. This task list file can be stored in one or more mounted external storage devices. The task list file can then be imported into other computing devices via these external storage devices. Furthermore, these other computing devices can automatically execute one or more file processing tasks based on the task list file. In this way, by generating the task list file on only one computing device, the same file operations can be performed on multiple computing devices based on the same task list file, ensuring consistent file operations across multiple computing devices. Moreover, by mounting external storage devices to other computing devices, these devices automatically import the task list file and automatically execute the file processing tasks sequentially, thereby achieving automated file operations and simplifying user operations.
[0100] Furthermore, in the file processing method of the present invention, the display interface of the file manager provides a task editing interface. Users can trigger the task editing interface to pop up the task editing interface, so that users can directly edit file processing tasks in the task editing interface. This simplifies the operation of editing tasks, is more user-friendly, and improves the interactive experience.
[0101] Furthermore, according to the technical solution of the present invention, users can also perform search operations when editing tasks, and the search results (paths to one or more target files) can be written to an external storage device. This makes the application scenarios applicable to the present invention more extensive.
[0102] The various techniques described herein can be implemented in combination with hardware or software, or a combination thereof. Thus, the methods and apparatus of the present invention, or certain aspects or portions thereof, can take the form of program code (i.e., instructions) embedded in a tangible medium, such as a removable hard disk, USB flash drive, floppy disk, CD-ROM, or any other machine-readable storage medium, wherein when the program is loaded into and executed by a machine such as a computer, the machine becomes an apparatus for practicing the present invention.
[0103] When the program code is executed on a programmable computer, the mobile terminal generally includes a processor, a processor-readable storage medium (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device. The memory is configured to store program code; the processor is configured to execute the file processing method of the present invention according to instructions in the program code stored in the memory.
[0104] By way of example, and not limitation, readable media include readable storage media and communication media. Readable storage media stores information such as computer-readable instructions, data structures, program modules, or other data. Communication media generally embodies computer-readable instructions, data structures, program modules, or other data in the form of modulated data signals such as carrier waves or other transmission mechanisms, and includes any information delivery medium. Any combination of the above is also included within the scope of readable media.
[0105] In the specification provided herein, the algorithms and displays are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used with the examples of this invention. The required structure for constructing such systems is apparent from the above description. Furthermore, this invention is not directed to any particular programming language. It should be understood that the contents of the invention described herein can be implemented using various programming languages, and the above description of specific languages is for the purpose of disclosing the best mode of implementation of the invention.
[0106] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.
[0107] Similarly, it should be understood that, in order to streamline this disclosure and aid in understanding one or more aspects of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof in the above description of exemplary embodiments of the invention. However, this method of disclosure should not be construed as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Therefore, the claims following the detailed description are hereby expressly incorporated into that detailed description, wherein each claim itself is a separate embodiment of the invention.
[0108] Those skilled in the art will understand that modules, units, or components of the devices disclosed in the examples herein can be arranged in the devices described in this embodiment, or alternatively, can be located in one or more devices different from the devices in this example. The modules in the foregoing examples can be combined into a single module or, in addition, can be divided into multiple sub-modules.
[0109] Those skilled in the art will understand that modules in the device of the embodiments can be adaptively changed and placed in one or more devices different from that embodiment. Modules, units, or components in the embodiments can be combined into a single module, unit, or component, and further, they can be divided into multiple sub-modules, sub-units, or sub-components. Except where at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all processes or units of any method or device so disclosed. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) may be replaced by an alternative feature that serves the same, equivalent, or similar purpose.
[0110] Furthermore, those skilled in the art will understand that although some embodiments described herein include certain features but not others included in other embodiments, combinations of features from different embodiments are intended to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments can be used in any combination.
[0111] Furthermore, some of the embodiments described herein are methods or combinations of method elements that can be implemented by a processor of a computer system or by other means of performing the functions. Therefore, a processor having the necessary instructions for implementing the methods or method elements forms means for implementing the methods or method elements. Furthermore, the elements described herein in the apparatus embodiments are examples of means for implementing the functions performed by elements for the purposes of carrying out the invention.
[0112] As used herein, unless otherwise specified, the use of ordinal numbers such as “first,” “second,” “third,” etc., to describe ordinary objects merely indicates different instances of similar objects and is not intended to imply that the objects being described must have a given order in time, space, ordering, or any other manner.
[0113] Although the invention has been described with respect to a limited number of embodiments, those skilled in the art will understand from the foregoing description that other embodiments are conceivable within the scope of the invention described herein. Furthermore, it should be noted that the language used in this specification has been chosen primarily for readability and edibility purposes, and not for the purpose of interpreting or limiting the subject matter of the invention. Therefore, many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the appended claims. The disclosure of the invention is illustrative rather than restrictive, and the scope of the invention is defined by the appended claims.
Claims
1. A file processing method, executed in a first computing device, the first computing device adapted to mount one or more external storage devices, the method comprising the steps of: creating one or more file processing tasks, the file processing tasks comprising target files, file operations performed on the target files, the file operations comprising one or more of copy operation, cut operation, delete operation, compress operation; in response to a request of exporting the tasks, displaying a task exporting interface, the task exporting interface displaying information of one or more external storage devices mounted by the first computing device; obtaining the information of the one or more external storage devices selected in the task exporting interface; in response to a request of importing the tasks, generating a task list file in a predetermined format based on the one or more file processing tasks; storing the task list file into the selected one or more external storage devices, so as to import the task list file into a second computing device via the external storage devices, and execute the one or more file processing tasks based on the task list file in the second computing device; wherein the second computing device comprises a second file manager, the second computing device adapted to: mount an external storage device; detect, by a daemon process of the second file manager, whether the external storage device is mounted, and if so, check whether a task list file exists in a predetermined directory of the external storage device; if the task list file exists, start a second file manager process, so as to import the task list file into the second computing device by the second file manager process, and execute the one or more file processing tasks based on the task list file.
2. The method of claim 1, wherein, the first computing device comprises a first file manager, and the step of creating one or more file processing tasks comprises: the first file manager displays a task editing interface in response to a task editing request; obtaining task information configured for each file processing task respectively in the task editing interface, the task information comprising one or more of a target file source path, a file operation performed on the target file, and a target path; creating a corresponding file processing task based on the task information.
3. The method of claim 2, wherein, the method further comprises the steps of: receiving a search request triggered in the task editing interface, obtaining a search range and a post-processing operation; searching for one or more target files based on the search range; performing the post-processing operation on the one or more target files; wherein the post-processing operation comprises writing the target file source path into an external storage device.
4. The method of any one of claims 1-3, wherein, the step of generating a task list file in a predetermined format based on the one or more file processing tasks further comprises: writing a device identifier of the first computing device into the task list file, so as to allow only the first computing device to edit the task list file. 5.A computing device comprising: at least one processor; and a memory storing program instructions configured to be executed by the at least one processor, the program instructions comprising instructions for performing the method of any one of claims 1-4. 6. A readable storage medium storing program instructions, which, when read and executed by a computing device, cause the computing device to perform the method of any one of claims 1-4.
Citation Information
Patent Citations
Control method and device for kubernetes container cluster and electronic equipment
CN111614729A