File processing method and device, computer equipment and storage medium
By identifying and monitoring extension changes of compressed packages, searching index tables and creating virtual file objects, it solves the problem of complexity in accessing files in compressed packages, realizes the function of directly operating files in compressed packages, and improves user experience.
Patent Information
- Application Number
- CN202410485623.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-22
- Publication Date
- 2024-08-27
AI Technical Summary
When accessing files in a compressed package, users need to decompress the package, which increases the complexity of file access for users.
By identifying and monitoring extension changes of compressed packages, searching index tables, and creating virtual file objects, users can directly operate files in compressed packages without decompression.
It reduces the complexity for users to access files in the compressed package and improves the user experience. Users only need to rename the compressed package to directly access the files.
Smart Images

Figure CN118550883A
Abstract
Description
Technical Field
[0001] The present application relates to the field of file management, and in particular to a file processing method, device, computer equipment and storage medium. Background Art
[0002] In a computer file system, each file has an extension that identifies the file type, such as .txt for a text file, .wav for an audio file, .avi for a video file, .png for an image file, etc. The computer identifies the file type of the file by the extension, and determines the application to open and process the file based on the file type. For ease of storage and transmission, multiple files of different types can be packaged into a single compressed file, such as a compressed package in a format such as ZIP or RAR. However, when accessing files in a compressed package, the user needs to first decompress the compressed package using decompression software, which increases the complexity of the user's access to files. Summary of the invention
[0003] The main purpose of this application is to provide a file processing method, device, computer equipment and storage medium, aiming to reduce the complexity of users accessing files in compressed packages.
[0004] In a first aspect, the present application provides a file processing method, the file processing method comprising the following steps:
[0005] Identifying the extension of the target compressed package, and monitoring a renaming event of the target compressed package when the extension of the target compressed package is in a target format;
[0006] When it is detected that the target compressed package is renamed and the extension of the target compressed package is changed, obtaining the changed target extension;
[0007] Searching the index table corresponding to the target compressed package according to the target extension name, and determining the target file corresponding to the target extension name, wherein the target file is a file in the target compressed package whose extension name corresponds to the target extension name;
[0008] A virtual file object is created according to the target file, and the virtual file object is used to simulate the target file so that a user can operate the target file through the virtual file object.
[0009] In a second aspect, the present application further provides a file processing device, the file processing device comprising:
[0010] A compressed package detection module, used for identifying the extension of a target compressed package, and monitoring a renaming event of the target compressed package when the extension of the target compressed package is in a target format;
[0011] An extension name acquisition module, used for acquiring the changed target extension name when detecting that a renaming event occurs to the target compressed package and the extension name of the target compressed package changes;
[0012] A file matching module, used for searching the index table corresponding to the target compressed package according to the target extension, and determining the target file corresponding to the target extension, wherein the target file is a file in the target compressed package whose extension corresponds to the target extension;
[0013] The file simulation module is used to create a virtual file object according to the target file, and the virtual file object is used to simulate the target file so that the user can operate the target file through the virtual file object.
[0014] In a third aspect, the present application also provides a computer device, comprising a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the file processing method as described above is implemented.
[0015] In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, wherein when the computer program is executed by a processor, the file processing method as described above is implemented.
[0016] The present application provides a file processing method, device, equipment and computer storage medium. The present application identifies the extension of a target compressed package, and monitors the renaming event of the target compressed package when the extension of the target compressed package is in the target format; obtains the changed target extension when the target compressed package is detected to have a renaming event and the extension of the target compressed package is changed; searches the index table corresponding to the target compressed package according to the target extension to determine the target file corresponding to the target extension, wherein the target file is a file in the target compressed package with an extension corresponding to the target extension; creates a virtual file object according to the target file, and the virtual file object is used to simulate the target file so that the user can operate the target file through the virtual file object. Since the target file in the target compressed package is simulated by the virtual file object, the user does not need to decompress the target compressed package, but only needs to rename the target compressed package to directly access the target file in the compressed package, which reduces the complexity of the user accessing the files in the compressed package and improves the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0018] Figure 1 A flowchart of a file processing method provided in one embodiment of the present application;
[0019] Figure 2 A usage scenario diagram of a file processing method provided in one embodiment of the present application;
[0020] Figure 3 A schematic block diagram of a file processing device provided in one embodiment of the present application;
[0021] Figure 4 The present invention is a block diagram showing the structure of a computer device according to an embodiment of the present application. DETAILED DESCRIPTION
[0022] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0023] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.
[0024] Embodiments of the present application provide a file processing method, apparatus, computer equipment, and computer-readable storage medium.
[0025] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0026] Please refer to Figure 1 , Figure 1A flowchart of a file processing method provided for an embodiment of the present application. The file processing method can be used in a terminal or a server to reduce the complexity of a user accessing a target file in a target compressed package in a terminal or a server. The terminal can be an electronic device such as a mobile phone, a tablet computer, a laptop computer, a desktop computer, a personal digital assistant, and a wearable device; the server can be an independent server, a server cluster, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.
[0027] Please refer to Figure 2 , Figure 2 This is a usage scenario diagram provided by an embodiment of the present application. Figure 2 As shown, if it is detected that the extension of the target compressed package is in the target format, when a renaming event occurs in the target compressed package causing the extension to change, the index table corresponding to the target compressed package is obtained, and the target file is determined according to the index table, and a virtual file object is created based on the target compressed package, so that the user does not need to decompress the target compressed package but can directly operate on the target file through the virtual file object.
[0028] like Figure 1 As shown, the file processing method includes steps S101 to S104.
[0029] Step S101: Identify the extension of a target compressed package, and if the extension of the target compressed package is in a target format, monitor a renaming event of the target compressed package.
[0030] In the related art, the user needs to decompress the target compressed package through a decompression tool before being able to access the files in the target compressed package. This requires the user to install a specific decompression tool before accessing the files in the target compressed package, which makes the operation process complicated.
[0031] Exemplarily, the file processing method provided in the embodiment of the present application can identify the target compressed package by the extension of the target format, wherein the extension of the target format can be determined according to actual needs so that the user can identify the target format. Specifically, the target format can be, for example, .yrk. When the user recognizes that the extension of the target compressed package is .yrk, the file processing method provided in the embodiment of the present application can be executed on the target compressed package according to actual needs.
[0032] Exemplarily, the user can modify the extension of the target compressed package to the extension corresponding to the file type to be accessed according to his own needs, so as to directly operate the file of the file type in the target compressed package. In order to respond to the user's renaming of the target compressed package in time, the file management system can monitor the renaming event of the target compressed package, so as to perform subsequent operations when the renaming event of the target compressed package is detected.
[0033] Step S102: when it is detected that a renaming event occurs in the target compressed package and the extension of the target compressed package changes, the changed target extension is obtained.
[0034] Exemplarily, when the file management system detects a renaming event of the target compressed package, and the renaming event involves a change in the extension, it obtains the renamed target extension so as to simulate the file corresponding to the target extension in the target compressed package according to the target extension, so that the user can directly open the file corresponding to the target extension.
[0035] Specifically, when a file of a certain format in a target compressed package needs to be accessed, the user only needs to modify the extension of the compressed package to the extension corresponding to the format, and the file of the format can be directly accessed without decompressing the compressed package, which reduces the complexity of operation and improves the user experience. For example, if the user wants to access a picture file in the .jpg format in the target compressed package, the extension of the target compressed package can be directly modified from .yrk to .jpg; in this way, the file management system can simulate the picture file in the .jpg format in the compressed package according to the modified extension .jpg, so that the user can directly open the picture file in the .jpg format in the compressed package.
[0036] Step S103: searching the index table corresponding to the target compressed package according to the target extension, and determining the target file corresponding to the target extension, wherein the target file is a file in the target compressed package whose extension corresponds to the target extension.
[0037] Exemplarily, the target compressed package in .yrk format is pre-set with an index table so as to simulate the files in the target compressed package. Specifically, the index table includes the file type and corresponding file name of each file stored in the target compressed package, as well as the file information of each file, so as to subsequently simulate the files in the target compressed package according to the file information.
[0038] Exemplarily, the target file corresponding to the target extension is determined according to the renamed target extension. For example, if the target extension is .jpg, the file with the extension .jpg in the index table is determined as the target file.
[0039] In some implementations, searching the index table corresponding to the target compressed package according to the target extension to determine the target file corresponding to the target extension includes:
[0040] Determining candidate files whose extensions match the target extension;
[0041] When the number of the candidate files is greater than 1, generating a file list based on the candidate files and displaying the file list to a user;
[0042] The target file is determined from the candidate files according to a selection operation of the user on the file list.
[0043] For example, one extension may correspond to multiple files in the target compressed package. For example, the target compressed package contains multiple image files with the extension .jpg. At this time, in order to determine the target file to be simulated, a file list consisting of multiple files with the same extension can be displayed to the user so that the user can select the target file from the multiple files with the same extension.
[0044] In some implementations, before searching the index table corresponding to the target compressed package according to the target extension to determine the target file corresponding to the target extension, the method further includes:
[0045] When it is detected that the target compressed package has a preset key, obtaining a decompression password input by a user;
[0046] Based on a preset hash function, a decryption key is generated according to the decompression password;
[0047] The decryption key is compared with the preset key, and when the decryption key matches the preset key, an index table corresponding to the target compressed package is searched according to the target extension name.
[0048] For example, in order to ensure the security of files, some compressed packages may set a decompression password when compressing. In this case, the file processing method provided in the embodiment of the present application also needs to obtain the decompression password before obtaining the index table of the target compressed package to ensure the information security of the target compressed package.
[0049] For example, in order to prevent the decompression password entered by the user from being stolen, the file management method provided in the embodiment of the present application does not directly compare the decompression password, but hashes the decompression password entered by the user through a hash function to obtain a decryption key, and then compares the decompression key with the preset key stored in the target compressed package. When the decryption key is consistent with the preset key, it is confirmed that the user has passed the authentication and the index table of the target compressed package is obtained.
[0050] For example, the preset key is obtained by hashing the preset password set by the user when compressing the target compressed package. Since the hash function can obtain the same hash result based on the same string of values, but it is difficult to reversely obtain the value before hashing based on the hash result, by comparing the hashed decryption key and the preset key, the decompression password is avoided from being directly exposed to a third party, thereby improving the security of file processing.
[0051] In some implementations, the step of generating a decryption key based on the decompression password based on a preset hash function further includes:
[0052] Obtaining a random value stored in a file processing system;
[0053] The decompression password and the random value are concatenated based on a preset concatenation algorithm to obtain a value to be hashed;
[0054] A hash operation is performed on the value to be hashed based on the hash function to obtain the decryption key.
[0055] Exemplarily, in order to further improve the security of the file processing method, when determining the preset key, a certain random value can be added to the preset password as a salt value, and then the preset key with the added random value is hashed, and the random value is stored in the file management system. In this way, only the specific file management system that stores the random value can decrypt the target compressed package and obtain the index table therein.
[0056] Specifically, during the process of file compression, if a preset password is set, a random value is generated before determining a preset key according to the preset password, and the random value is spliced with the preset password based on a preset splicing algorithm, and the spliced value is hashed to obtain the preset key, and then the random value is stored in the file processing system. When the user enters the decompression password to try to decrypt the target compressed package, the random value stored in the file management system is obtained, and the random value and the decompression password entered by the user are spliced based on the same splicing algorithm to obtain a value to be hashed, the value to be hashed is hashed to obtain a decryption key, and the decryption key is compared with the preset key, so as to obtain the index table of the target compressed package when the decompression key matches the preset key.
[0057] Among them, the splicing algorithm can be determined according to actual needs. For example, the random value can be directly spliced before and after the decompression password. Of course, it is not limited to this. The first digit of the random value can be inserted after the first digit of the decompression password, and then the second digit of the random value is inserted after 2 digits of the decompression password, and then the third digit of the random value is inserted after 3 digits of the decompression password, and so on.
[0058] Step S104: Create a virtual file object according to the target file, where the virtual file object is used to simulate the target file so that the user can operate the target file through the virtual file object.
[0059] Exemplarily, after the user modifies the extension of the target compressed package, a virtual file object is created based on the target file corresponding to the modified target extension, and the target file is simulated directly based on the target compressed package. In this way, the user can access the target file by directly clicking on the icon of the target compressed package with the modified extension, without the need for decompression, thereby reducing the complexity of operation and improving the user experience.
[0060] In some implementations, the creating a virtual file object according to the target file, wherein the virtual file object is used to simulate the target file, includes:
[0061] The file attributes of the virtual file object are determined according to the file information of the target file recorded in the index table, wherein the file attributes include at least one of creation time, file size, and opening method.
[0062] Exemplarily, the index table records the file information of each file in the target compressed package, such as the file creation time, file size, opening method, etc. When the user needs to view the file properties of the virtual file object, the file information of the target file in the index table is displayed to the user.
[0063] For example, after the user changes the suffix of the target compressed package to .jpg, the corresponding image file is determined as the target file, and the icon of the target compressed package is used as the icon of the virtual file object. When the user views the file properties through the icon, the file properties of the target file are displayed to the user instead of the file properties of the target compressed package, so that the user can obtain the file information of the target file without decompressing it, making the operation more convenient.
[0064] In some implementations, the step of creating a virtual file object according to the target file, wherein the virtual file object is used to simulate the target file, further includes:
[0065] In response to a browse request for the virtual file object, calling a virtual file interface of the target file;
[0066] Based on the virtual file interface, the file content of the target file is read through the opening method corresponding to the target extension.
[0067] Exemplarily, the user can also directly operate the target file through the virtual file object. Specifically, the file processing method provided in the embodiment of the present application can simulate the target file by registering the virtual file interface of the target file in the file management system and calling the data of the target file on the content layer. In the file processing method provided in the embodiment of the present application, the user clicks the icon of the target compressed package with a modified extension, and the target file corresponding to the modified extension is opened. In the process of the user opening the target file, the file management system continues to call the virtual file interface to obtain the content in the target file. The user will not perceive the existence of the virtual file interface, which is equivalent to directly opening the target file, thereby improving file processing efficiency and user experience.
[0068] Specifically, different types of virtual file interfaces can be used in different operating systems. For example, the POSIX (Portable Operating System Interface) interface can be used in Unix-like systems (such as Linux, macOS), and the WinAPI interface can be used in Windows systems. Of course, it is not limited to this and is not limited here.
[0069] In some implementations, after reading the file content of the target file based on the virtual file interface and using the opening method corresponding to the target extension, the method further includes:
[0070] In the process of the user performing a browsing operation on the virtual file object, in response to a modification operation on the virtual file object, obtaining the user's operation content;
[0071] When the user completes the browsing operation on the virtual file object, the target file is updated according to the acquired operation content.
[0072] Exemplarily, the user can also directly operate the target file through the virtual file object during the browsing process, and the file management system can obtain the user's operation content, where the operation content can be, for example, the modification of the text content of text files such as .txt files and .doc files, or the modification of the image content of image files such as .jpg files and .png files, which is not limited here.
[0073] Exemplarily, when the user closes the virtual file object, it is determined that the user has completed the access operation on the virtual file object, and the operation content obtained during the access of the target file is updated to the target file. At this time, the target file in the compressed package is updated to the target file after the user's modification operation. In this way, the next time the user modifies the extension of the target compressed package or decompresses and opens the target file in the target compressed package, what he sees is the target file after the last modification operation, achieving the same effect as operating the target file through normal decompression.
[0074] The file processing method provided by the above embodiment identifies the extension of the target compressed package, and monitors the renaming event of the target compressed package when the extension of the target compressed package is in the target format; obtains the changed target extension when it is detected that the target compressed package has a renaming event and the extension of the target compressed package has changed; searches the index table corresponding to the target compressed package according to the target extension to determine the target file corresponding to the target extension, wherein the target file is a file in the target compressed package with an extension corresponding to the target extension; creates a virtual file object according to the target file, and the virtual file object is used to simulate the target file so that the user can operate the target file through the virtual file object. Since the target file in the target compressed package is simulated by the virtual file object, the user does not need to decompress the target compressed package, but only needs to rename the target compressed package to directly access the target file in the compressed package, which reduces the complexity of the user accessing the files in the compressed package and improves the user experience.
[0075] See also Figure 3 , Figure 3 It is a schematic diagram of a file processing device provided in one embodiment of the present application. The file processing device can be configured in a server or a terminal to execute the aforementioned file processing method.
[0076] like Figure 3 As shown, the file processing device includes: a compression package detection module 110, an extension name acquisition module 120, a file matching module 130, and a file simulation module 140.
[0077] A compressed package detection module 110, for identifying the extension of a target compressed package, and monitoring a renaming event of the target compressed package when the extension of the target compressed package is in a target format;
[0078] The extension name acquisition module 120 is used to acquire the changed target extension name when it is detected that the target compressed package is renamed and the extension name of the target compressed package is changed;
[0079] A file matching module 130 is used to search the index table corresponding to the target compressed package according to the target extension, and determine the target file corresponding to the target extension, wherein the target file is a file in the target compressed package whose extension corresponds to the target extension;
[0080] The file simulation module 140 is used to create a virtual file object according to the target file, and the virtual file object is used to simulate the target file so that the user can operate the target file through the virtual file object.
[0081] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0082] The method and apparatus of the present application can be used in many general or special computing system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0083] Exemplarily, the above method and apparatus may be implemented in the form of a computer program. The computer program may be implemented in Figure 4 Runs on the computer device shown.
[0084] See also Figure 4 , Figure 4 A schematic block diagram of the structure of a computer device provided in an embodiment of the present application. The computer device may be a server or a terminal.
[0085] like Figure 4 As shown, the computer device includes a processor, a memory, and a network interface connected via a system bus, wherein the memory may include a storage medium and an internal memory.
[0086] The storage medium can store an operating system and a computer program. The computer program includes program instructions, and when the program instructions are executed, the processor can execute any file processing method.
[0087] The processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.
[0088] The internal memory provides an environment for the operation of the computer program in the storage medium. When the computer program is executed by the processor, the processor can execute any file processing method.
[0089] The network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art will appreciate that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0090] It should be understood that the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0091] In one embodiment, the processor is used to run a computer program stored in the memory to implement the following steps:
[0092] Identifying the extension of the target compressed package, and monitoring a renaming event of the target compressed package when the extension of the target compressed package is in a target format;
[0093] When it is detected that the target compressed package is renamed and the extension of the target compressed package is changed, obtaining the changed target extension;
[0094] Searching the index table corresponding to the target compressed package according to the target extension name, and determining the target file corresponding to the target extension name, wherein the target file is a file in the target compressed package whose extension name corresponds to the target extension name;
[0095] A virtual file object is created according to the target file, and the virtual file object is used to simulate the target file so that a user can operate the target file through the virtual file object.
[0096] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described file processing can refer to the corresponding process in the aforementioned file processing control method embodiment, and will not be repeated here.
[0097] An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. The computer program includes program instructions. The method implemented when the program instructions are executed can refer to the various embodiments of the file processing method of the present application.
[0098] The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiment, such as a hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc., equipped on the computer device.
[0099] It should be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0100] It should also be understood that the term "and / or" used in the specification of this application and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, including these combinations. It should be noted that, in this article, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "including a..." does not exclude the presence of other identical elements in the process, method, article or system including the element.
[0101] The serial numbers of the embodiments of the present application are for description only and do not represent the advantages and disadvantages of the embodiments. The above description is only a specific implementation mode of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A file processing method, It is characterized in that The method comprises: Identifying the extension of the target compressed package, and monitoring a renaming event of the target compressed package when the extension of the target compressed package is in a target format; When it is detected that the target compressed package is renamed and the extension of the target compressed package is changed, obtaining the changed target extension; Searching the index table corresponding to the target compressed package according to the target extension name, and determining the target file corresponding to the target extension name, wherein the target file is a file in the target compressed package whose extension name corresponds to the target extension name; A virtual file object is created according to the target file, and the virtual file object is used to simulate the target file so that a user can operate the target file through the virtual file object.
2. The file processing method according to claim 1, It is characterized in that The step of creating a virtual file object according to the target file, wherein the virtual file object is used to simulate the target file, comprises: The file attributes of the virtual file object are determined according to the file information of the target file recorded in the index table, wherein the file attributes include at least one of creation time, file size, and opening method.
3. The file processing method according to claim 1, It is characterized in that The step of creating a virtual file object according to the target file, wherein the virtual file object is used to simulate the target file, further comprises: In response to a browse request for the virtual file object, calling a virtual file interface of the target file; Based on the virtual file interface, the file content of the target file is read through the opening method corresponding to the target extension.
4. The file processing method according to claim 3, It is characterized in that After reading the file content of the target file through the opening method corresponding to the target extension name based on the virtual file interface, the method further includes: In the process of the user performing a browsing operation on the virtual file object, in response to a modification operation on the virtual file object, obtaining the user's operation content; When the user completes the browsing operation on the virtual file object, the target file is updated according to the acquired operation content.
5. The file processing method according to claim 1, It is characterized in that The step of searching the index table corresponding to the target compressed package according to the target extension name to determine the target file corresponding to the target extension name includes: Determining candidate files whose extensions match the target extension; When the number of the candidate files is greater than 1, generating a file list based on the candidate files and displaying the file list to a user; The target file is determined from the candidate files according to a selection operation of the user on the file list.
6. The file processing method according to claim 1, It is characterized in that Before searching the index table corresponding to the target compressed package according to the target extension name to determine the target file corresponding to the target extension name, the method further includes: When it is detected that the target compressed package has a preset key, obtaining a decompression password input by a user; Based on a preset hash function, a decryption key is generated according to the decompression password; The decryption key is compared with the preset key, and when the decryption key matches the preset key, an index table corresponding to the target compressed package is searched according to the target extension name.
7. The file processing method according to claim 6, It is characterized in that The method of generating a decryption key based on the decompression password based on a preset hash function also includes: Obtaining a random value stored in a file processing system; The decompression password and the random value are concatenated based on a preset concatenation algorithm to obtain a value to be hashed; A hash operation is performed on the value to be hashed based on the hash function to obtain the decryption key.
8. A file processing device, It is characterized in that The file processing device comprises: A compressed package detection module, used for identifying the extension of a target compressed package, and monitoring a renaming event of the target compressed package when the extension of the target compressed package is in a target format; An extension name acquisition module, used for acquiring the changed target extension name when detecting that a renaming event occurs to the target compressed package and the extension name of the target compressed package changes; A file matching module, used for searching the index table corresponding to the target compressed package according to the target extension, and determining the target file corresponding to the target extension, wherein the target file is a file in the target compressed package whose extension corresponds to the target extension; The file simulation module is used to create a virtual file object according to the target file, and the virtual file object is used to simulate the target file so that the user can operate the target file through the virtual file object.
9. A computer device, It is characterized in that The computer device comprises a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the steps of the file processing method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the file processing method according to any one of claims 1 to 7 are implemented.
