File processing method, device, electronic device and readable storage medium

By using hyperlink files to record file format and order in file transfer, the problem of inconsistent file arrangement and name of the receiver is solved, automatic update is achieved, user operations are simplified, and user experience is improved.

CN113821484BActive Publication Date: 2024-12-03VIVO MOBILE COMM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111134066.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-26
Publication Date
2024-12-03
Estimated Expiration
2041-09-26

AI Technical Summary

Technical Problem

During the file transfer process, the decompressed file arrangement order and name of the receiver are inconsistent with the file arrangement order before compression, and the decoding format is inconsistent with the encoding format, resulting in user changes manually, which is cumbersome and affects user experience.

Method used

By generating hyperlink files during compression, recording file format, name and order, and updating file names and sorts based on this information during decompression, making them consistent with the files before compression, avoiding manual changes from users.

Benefits of technology

No need for users to manually change file names and sorting, saving time, improving user experience, simplifying operations, and ensuring the correctness of file viewing order and name.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113821484B_ABST
    Figure CN113821484B_ABST
Patent Text Reader

Abstract

The present application discloses a file processing method, device, electronic device and readable storage medium, comprising: obtaining a first folder, wherein the first folder includes a first file and N second files, the first file includes N first data corresponding to N third files, one first data includes characteristic information of a third file, the characteristic information includes a file format, a file name and an order in the second folder, the third file is the second file before compression, and the second folder is the first folder before compression; in response to a decompression operation on the first folder, the first folder is decompressed to obtain a third folder, the third folder includes the first file and N decompressed second files; according to the characteristic information of the N second files indicated by the N first data, the names and order of the N decompressed second files are updated to make the names and order of the N decompressed second files consistent with the names and order of the N third files.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the technical field of electronic equipment, and specifically relates to a file processing method, device, electronic equipment and readable storage medium. Background Art

[0002] With the development of electronic equipment technology, electronic equipment has become an essential tool for people to process files in their daily lives, for example, using electronic equipment to compress files, decompress files, etc.

[0003] In the related art, when a user sends multiple files to other users, the multiple files can be packaged and compressed, and then the packaged and compressed package can be sent to other users, which can reduce the amount of transmitted data and increase the file transmission speed. However, the arrangement order of the multiple files in the received compressed package may be different from the arrangement order of the multiple files sent by the user, and the names of the files in the received compressed package may also be garbled, which requires the user to manually correct, which is cumbersome and affects the user experience. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a file processing method, device and electronic device, which can solve the problem in the prior art that the arrangement order and name of the files after decompression by the receiving party are inconsistent with those of the files before compression.

[0005] In a first aspect, an embodiment of the present application provides a file processing method, the method comprising:

[0006] Acquire a first folder, wherein the first folder includes the first file and N second files, the first file includes N pieces of first data corresponding to N third files, one piece of the first data includes characteristic information of one third file, the characteristic information includes a file format, a file name, and an order in the second folder, the third file is the second file before compression, and the second folder is the first folder before compression;

[0007] In response to the decompression operation on the first folder, the first folder is decompressed to obtain a third folder, wherein the third folder includes the first file and N decompressed second files;

[0008] updating the names and order of the N decompressed second files according to the characteristic information of the N second files indicated by the N pieces of first data, so that the names and order of the N decompressed second files are consistent with the names and order of the N third files;

[0009] Wherein, N is a positive integer and N is greater than 1.

[0010] In a second aspect, an embodiment of the present application provides a file processing device, the device comprising:

[0011] an acquisition module, configured to acquire a first folder, wherein the first folder includes the first file and N second files, the first file includes N pieces of first data corresponding to N third files, one piece of the first data includes characteristic information of one third file, the characteristic information includes a file format, a file name, and an order in the second folder, the third file is the second file before compression, and the second folder is the first folder before compression;

[0012] a decompression module, configured to, in response to a decompression operation on the first folder, decompress the first folder to obtain a third folder, wherein the third folder includes the first file and N decompressed second files;

[0013] an updating module, configured to update the names and order of the N decompressed second files according to the characteristic information of the N second files indicated by the N pieces of first data, so that the names and order of the N decompressed second files are consistent with the names and order of the N third files;

[0014] Wherein, N is a positive integer and N is greater than 1.

[0015] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method described in the first aspect.

[0016] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.

[0017] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the steps of the method described in the first aspect.

[0018] In an embodiment of the present application, when the acquired first folder is decompressed, the names and orders of the N second files can be updated according to the N first data corresponding to the N second files in the first file, so that the names and orders of the N decompressed second files are consistent with the names and orders of the N second files before compression. The user is not required to manually change the names and orders of the decompressed files, nor is the user required to modify the decoding format of the second file processing device, thereby avoiding repeated tedious operations, saving user time, and improving user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 is a schematic diagram of a folder before compression in the prior art;

[0020] Figure 2 It is a schematic diagram of a decompressed folder in the prior art;

[0021] Figure 3 It is a schematic diagram of another decompressed folder in the prior art;

[0022] Figure 4 It is a flowchart of a file processing method provided by an embodiment of the present application;

[0023] Figure 5 is a structural schematic diagram of a file processing device provided in an embodiment of the present application;

[0024] Figure 6 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application;

[0025] Figure 7 It is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0026] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.

[0027] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0028] With the development of electronic equipment technology, electronic equipment has become an essential tool for people to process files in their daily lives, for example, using electronic equipment to compress files, decompress files, etc.

[0029] In the related art, when a user sends multiple files to other users, the multiple files can be packaged and compressed, and then the compressed package is sent to other users, which can reduce the amount of transmitted data and increase the file transmission speed.

[0030] However, on the one hand, since the sorting method of the electronic device is set by the user according to actual needs, if the sorting methods set by the sender and the receiver are different, the order of the multiple files decompressed by the receiver is different from the order of the multiple files before compression by the sender, and the receiver user cannot know the order in which the files are viewed. For example, see Figure 1 The folder before compression includes four files in order: Introduction to Deep Learning, DIEN Interest Evolution Model, Machine Learning Rules, and Machine Learning Book by NG. Figure 2 In the folder decompressed by the receiver, the order of Introduction to Deep Learning, DIEN Interest Evolution Model, Machine Learning Rules, and Machine Learning Books by NG is DIEN Interest Evolution Model → Machine Learning Books by NG → Machine Learning Rules → Introduction to Deep Learning. In this regard, in the related art, the sender can indicate the viewing order in the file name of each file before packaging and compressing, and the receiver can also manually change the order of multiple files after decompression. However, these methods have cumbersome steps, and when there are too many files in the folder, the workload is large and errors are prone to occur.

[0031] On the other hand, since the decoding format of the receiving electronic device is inconsistent with the encoding format of the sending electronic device, the name of the file decompressed by the receiving party will be garbled and cannot be displayed correctly, affecting the user's viewing. Figure 1 The folder before compression includes four files: Introduction to Deep Learning, DIEN Interest Evolution Model, Machine Learning Rules, and Machine Learning Book by NG. Figure 3 , the file names of the four files in the folder after the receiver decompresses are garbled. In this regard, in the related art, the receiver can modify the decoding format of the electronic device so that the decoding format is consistent with the encoding format to avoid garbled characters after decompression. However, this method has cumbersome operation steps, and when the encoding format of the sender changes, the modified decoding format cannot be dynamically consistent with the encoding format. Every time the file is decompressed, the user needs to modify the decoding format, which is inconvenient for the user.

[0032] To solve the above problem, an embodiment of the present application provides a file processing method. When compressing a folder including multiple files, a hyperlink file including the file names and sorting of multiple files is generated, so that when decompressing, the sorting of the multiple files is adjusted according to the hyperlink file, and the file name of each file is updated. This avoids the situation where the names and sorting of the multiple files after decompression by the recipient are different from the names and sorting of the multiple files before compression, and no manual changes are required, saving user time.

[0033] The file processing method provided in the embodiment of the present application is described in detail below through specific embodiments and their application scenarios in conjunction with the accompanying drawings.

[0034] like Figure 4 As shown, the embodiment of the present application provides a file processing method, which is applied to an electronic device, and the electronic device can decompress the compressed folder or encode the folder. The method can include steps 4100 to 4300, which are described in detail below.

[0035] Step 4100, obtaining a first folder, wherein the first folder includes a first file and N second files, the first file includes N first data corresponding to N third files, one first data includes characteristic information of a third file, the characteristic information includes a file format, a file name and an order in the second folder, the third file is the second file before compression, and the second folder is the first folder before compression.

[0036] In this embodiment, the first folder may be a compressed folder obtained after encoding and compression. The first folder includes N second files, where N is a positive integer and N is greater than 1. The second file may be a compressed file. The types of the N second files may be the same or different. For example, the second file may be a word document, a PDF document, a presentation, a picture, etc.

[0037] The first folder also includes a first file. The first file can be used to record characteristic information of N third files. The characteristic information of the third files may include file format, file name and order in the second folder, wherein the third file is the second file before compression, and the second folder is the first folder before compression.

[0038] The file name may be the file name of the third file displayed in the second folder, for example, Figure 1 The “Introduction to Deep Learning”, “DIEN Interest Evolution Model”, “Machine Learning Rules”, etc. are shown. It should be noted that the file name of the third file can be a name changed by the user.

[0039] The order in the second folder is the order of the N third files in the second folder. Figure 1 Taking the second folder shown as an example, the order of "Introduction to Deep Learning" in the second folder is "1", the order of "DIEN Interest Evolution Model" in the second folder is "2", the order of "Machine Learning Rules" in the second folder is "3", and the order of "Machine Learning Book by NG" in the second folder is "4".

[0040] The file format may be, for example, docx, pdf, jpg, etc. Based on the file format in the characteristic information of the third file, files with the same name may be distinguished to ensure that one third file uniquely corresponds to one piece of first data. Based on this, in the case of including multiple third files with the same name, a one-to-one mapping relationship between the first data and the third file may be ensured.

[0041] In this embodiment, the first file may include N pieces of first data corresponding to N third files, the N pieces of first data correspond to the N third files one by one, and one piece of first data is used to indicate characteristic information of one third file. The first file may be, for example, a hyperlink file in txt format, and the first data may be, for example, a hyperlink address. It should be noted that the first file may also be a file in other formats that can display text information, and the embodiment of the present application does not specifically limit this.

[0042] by Figure 1 Taking the second folder as an example, the hyperlink file may include:

[0043] Hyperlink: / / type=jpg / name=Introduction to Deep Learning / rank=1;

[0044] Hyperlink: / / type=pptx / name=DIEN interest evolution model / rank=2;

[0045] Hyperlink: / / type=docx / name=machine learning rules / rank=3;

[0046] Hyperlink: / / type=pdf / name=Machine Learning Book by NG / rank=4.

[0047] It should be noted that obtaining the first folder may be receiving the first folder sent by other electronic devices.

[0048] In some embodiments of the present application, before obtaining the first folder, the method may further include: steps 5100 to 5200.

[0049] Step 5100: Receive a compression operation on the second folder, where the second folder includes the N third files, where N is a positive integer and is greater than 1.

[0050] In this embodiment, the second folder may be a folder that the user needs to package and compress. The second folder includes NN third files, and the types of the N third files may be the same or different. For example, the third file may be a word document, a PDF document, a presentation, a picture, etc.

[0051] The compression operation may be, for example, an operation of clicking “add to compressed file” or an operation of clicking “add to 'second folder.zip'”, which is not particularly limited in the embodiment of the present application.

[0052] Step 5200, in response to the compression operation, generating the first file according to the characteristic information of the N third files, and compressing the N third files in the second folder to obtain a first folder; wherein the first folder includes the first file and the N second files.

[0053] The first file may include N first data corresponding to N third files, the N first data corresponding to the N third files one by one, and one first data is used to indicate characteristic information of a third file. The first file may be, for example, a hyperlink file in txt format, and the first data may be, for example, a hyperlink address. It should be noted that the format of the first data may be set by a person skilled in the art as required. For example, the naming of the hyperlink address starts with a prefix (Hyperlink:), obtains the type (type), name (nmae) and order (rank) of the corresponding file, and is automatically generated in a format separated by a single slash ( / ).

[0054] In a specific implementation, characteristic information of N third files is obtained, and N pieces of first data are generated according to the characteristic information of the N third files in the format of the first data. Figure 1 Taking the second folder shown as an example, the process of generating the first file based on the feature information of N third files is as follows: the second folder includes four files: Introduction to Deep Learning, DIEN Interest Evolution Model, Machine Learning Rules, and Machine Learning Books by NG, wherein the hyperlink file has four hyperlink addresses corresponding to the four files, specifically including:

[0055] Hyperlink: / / type=jpg / name=Introduction to Deep Learning / rank=1;

[0056] Hyperlink: / / type=pptx / name=DIEN interest evolution model / rank=2;

[0057] Hyperlink: / / type=docx / name=machine learning rules / rank=3;

[0058] Hyperlink: / / type=pdf / name=Machine Learning Book by NG / rank=4.

[0059] In this embodiment, the N third files in the second folder are compressed, and the N third files in the second folder can be compressed according to the encoding format set by the electronic device. The encoding format can be, for example, UTF-8 (8-bit, Universal Character Set / Unicode Transformation Format) encoding format, Simplified Chinese (GBK) encoding format, etc.

[0060] It is understandable that when compressing the N third files in the second folder, the first file can be skipped, and only the N third files in the second folder are encoded and compressed. In addition, the first file is stored in the first folder, for example, the first file can be in the folder for storing the N third files, and for another example, the first file is outside the folder for storing the N third files.

[0061] It should be noted that steps 5100-5200 and steps 4100-4300 can be implemented by the same electronic device or by different electronic devices. For example, the first user encodes and compresses the second folder of the first electronic device to obtain the first folder, and sends the first folder to the second electronic device corresponding to the second user. The second user decompresses the received first folder through the second electronic device. The decoding format set by the first electronic device can be the same as the encoding format set by the second electronic device, or it can be different from the encoding format set by the second electronic device. For example, the encoding format of the first electronic device is UTF-8, and the decoding format of the second electronic device is Simplified Chinese.

[0062] In an embodiment of the present application, a compression operation on a second folder is received, wherein the second folder includes N third files, and in response to the compression operation, a first file is generated according to the characteristic information of the N third files, and the N third files in the second folder are compressed to obtain a first folder, wherein the first file includes N first data corresponding to the N third files, and one first data includes the characteristic information of a third file, and the characteristic information includes the file format, the file name, and the order in the second folder. In this way, when the receiving user decompresses the first folder, the names and order of the N decompressed second files can be updated according to the N first data corresponding to the N second files in the first file, so that the names and order of the N decompressed second files are consistent with the names and order of the N second files before compression, and the user does not need to manually change the names and order of the decompressed files, nor does the user need to modify the decoding format of the electronic device, thereby avoiding repeated cumbersome operations, saving user time, and improving user experience.

[0063] In some embodiments of the present application, after compressing the N third files in the second folder to obtain the first folder, the method may further include: hiding the first file in the first folder.

[0064] That is to say, the first file is not displayed in the compressed first folder. In this way, the construction of the hidden first file is not perceived by the user, and will not interfere with the user's viewing of the file, which can further improve the user experience.

[0065] In some embodiments of the present application, after compressing the N third files in the second folder to obtain the first folder, the method may further include: receiving an operation of adding a fourth file in the first folder; in response to the operation of adding the fourth file, adding first data corresponding to the fourth file in the first file; wherein the first data corresponding to the fourth file includes characteristic information of the fourth file, and the characteristic information includes a file format, a file name, and an order in the second folder.

[0066] In this embodiment, after encoding and compressing the second folder to obtain the first folder, if the user needs to add a new file to the folder, the fourth file can be directly added to the compressed first folder, and the first data corresponding to the fourth file can be added to the first file (hyperlink file), and according to the mapping relationship between the first data and the third file in the second folder, a one-to-one mapping relationship is formed between the multiple files in the first folder and the multiple first data in the first file. It can be understood that the fourth file can be one or more. In the case of adding multiple fourth files to the first folder, multiple first data corresponding to the multiple fourth files can be added to the first file.

[0067] In this embodiment, when the user needs to add a new file to a folder, the fourth file can be directly added to the compressed first folder, and the first data corresponding to the fourth file can be added to the first file. In this way, after the user adds the new file, there is no need to re-encode and compress the added folder, and the problem of the order of multiple files in the first folder being disrupted when the user directly adds the new file to the compressed first folder can be avoided. The operation steps can be simplified, time can be saved, and it is more flexible and convenient.

[0068] After step 4100, step 4200 is executed. In response to the decompression operation on the first folder, the first folder is decompressed to obtain a third folder. The third folder includes the first file and N decompressed second files.

[0069] In a specific implementation, in response to the decompression operation on the first folder, the compressed N second files in the first folder are decompressed to obtain N decompressed second files. At this time, after the decompression is completed, the decompression process enters a sleep waiting state. That is, after the decompression is completed, the decompression result is not directly displayed to the user. After that, in combination with subsequent steps, the names and sorting of the N decompressed second files are updated, and the updated decompression result is displayed to the user.

[0070] In some embodiments of the present application, after decompressing the first folder to obtain a third folder, the method may further include: hiding the first file in the third folder.

[0071] That is to say, the first file is not displayed in the third folder obtained by decompression. In this way, the construction of the hidden hyperlink file is imperceptible to the user and does not interfere with the user's viewing of the file, which can further improve the user experience.

[0072] After step 4200, execute step 4300 to update the names and order of the N decompressed second files based on the characteristic information of the N second files indicated by the N first data, so that the names and order of the N decompressed second files are consistent with the names and order of the N third files.

[0073] In a specific implementation, the N second files in the first folder are traversed, each second file is compared with the first data corresponding to the second file, and when the name of the decompressed second file is inconsistent with the name of the third file, the name of the decompressed second file is updated; and, when the order of the decompressed second files is inconsistent with the order of the third files, the sorting of the N decompressed second files is adjusted so that the names and sorting of the N decompressed second files are consistent with the names and order of the N third files, that is, the names and sorting of the N decompressed second files are consistent with the names and order of the N second files before compression. After that, the electronic device sends a signal to end the waiting process to display the N decompressed second files according to the updated sorting and names in response to the signal to end the waiting.

[0074] In some embodiments of the present application, updating the names and order of the N decompressed second files according to the characteristic information of the N second files indicated by the N first data may further include: steps 6100 to 6300.

[0075] Step 6100: Determine, based on target data in the N pieces of first data, a first name and a first order of a second file corresponding to the target data.

[0076] Step 6200: When the second name is inconsistent with the first name, update the second name to the first name, wherein the second name is the name of the decompressed second file.

[0077] Step 6300, when the second order is inconsistent with the first order, adjust the order of the decompressed second files in the third folder according to the first order, wherein the second order is the order of the decompressed second files in the third folder.

[0078] In this embodiment, the first order may be the order of the second files before compression indicated by the target data in the second folder, and the second order may be the order of the second files after decompression in the third folder.

[0079] The first name may be the name of the second file in the second folder before compression indicated by the target data, and the second name may be the name of the second file after decompression.

[0080] Exemplarily, the process of updating the order of the decompressed second file is as follows: after decompressing the N second files in the first folder, the decompression process enters a sleep wait state, at which time a sequence consistency judgment is performed, the N decompressed second files are traversed, and each decompressed second file is compared with the hyperlink address corresponding to the second file. Specifically, the first order rank_0=a of the decompressed second file is obtained, and then, it is determined whether the first order of the decompressed second file is consistent with the second order rank_1=b in the hyperlink address corresponding to the second file. If the first order is inconsistent with the second order, the updated second order rank_0*=rank_1=b is made, and if the first order is consistent with the second order, the updated second order rank_0*=rank_0=a is made, and the order of the decompressed second file is adjusted according to the updated second order (rank_0*).

[0081] Exemplarily, the process of updating the name of the decompressed second file is as follows: after decompressing the N second files in the first folder, the decompression process enters a sleep wait state, at which time a name consistency judgment is performed, the N decompressed second files are traversed, and each decompressed second file is compared with the hyperlink address corresponding to the second file. Specifically, the first name name_0=a of the decompressed second file is obtained, and then, it is determined whether the first name of the decompressed second file is consistent with the second name name_1=b in the hyperlink address corresponding to the second file. If the first name and the second name are inconsistent, the updated second name name_0*=name_1=b is made, and if the first name and the second name are consistent, the updated second name name_0*=name_0=a is made, and the name of the decompressed second file is updated according to the updated second name (name_0*).

[0082] In this embodiment, before displaying the decompression result, a sequence consistency comparison is performed. If the order of the second file after decompression is inconsistent with that of the second file before compression, the order of the second file indicated by the first data is adjusted to ensure that the order of the second file after decompression is consistent with that of the second file before compression, which is convenient for users to view files, and does not require users to make manual changes, making the operation more convenient. In addition, before displaying the decompression result, a name consistency comparison is performed. If the name of the second file after decompression is inconsistent with that of the second file before compression, the name of the second file after decompression is updated according to the name indicated by the first data, which can solve the problem of garbled characters in the name of the decompressed file when the decoding format is inconsistent with the encoding format, and does not require users to make manual changes, making the operation more convenient.

[0083] The following is a specific example to illustrate the process of file compression and decompression.

[0084] Step 601: The first electronic device receives a compression operation on a second folder, where the second folder includes N third files, where N is a positive integer and greater than 1;

[0085] Step 602: In response to the compression operation, the first electronic device generates a first file according to the characteristic information of the N third files, the first file including N pieces of first data corresponding to the N third files, one piece of first data including characteristic information of one third file, the characteristic information including the file format, the file name and the order in the second folder;

[0086] Step 603: The first electronic device compresses the N third files in the second folder to obtain a first folder, where the first folder includes the first file and the N second files;

[0087] Step 604, the first electronic device sends the first folder to the second electronic device;

[0088] Step 605: The second electronic device receives a first folder sent by the first electronic device, where the first folder includes a first file and N second files;

[0089] Step 606, the second electronic device decompresses the first folder in response to the decompression operation on the first folder, and enters sleep waiting after decompression;

[0090] Step 607, the second electronic device obtains the first rank rank_0=a of the decompressed second file;

[0091] Step 608, the second electronic device determines whether the first order of the decompressed second file is consistent with the second order rank_1=b in the hyperlink address corresponding to the second file, if they are consistent, proceed to step 609, if not, proceed to step 610;

[0092] Step 609, the second electronic device updates the second rank so that the updated second rank rank_0*=rank_0=a, and then proceeds to step 611;

[0093] Step 610, the second electronic device updates the second rank so that the updated second rank rank_0*=rank_1=b, and then proceeds to step 611;

[0094] Step 611: The second electronic device sorts the N decompressed second files in the third folder according to the updated second sequence;

[0095] Step 612, the second electronic device obtains the first name of the decompressed second file name_0=a;

[0096] Step 613, the second electronic device determines whether the first name of the decompressed second file is consistent with the second name name_1=b in the hyperlink address corresponding to the second file, if they are consistent, proceed to step 614, if not, proceed to step 615;

[0097] Step 614, the second electronic device updates the second name so that the updated second name name_0*=name_0=a, and then proceeds to step 616;

[0098] Step 615, the second electronic device updates the second name so that the updated second name name_0*=name_1=b, and then proceeds to step 616;

[0099] Step 616, the second electronic device updates the names of the N decompressed second files in the third folder according to the updated second name;

[0100] Step 617, the second electronic device sends a signal to end the waiting to the decompression process to display a third folder, which includes N decompressed second files, wherein the names and order of the N decompressed second files are consistent with the names and order of the N third files.

[0101] In an embodiment of the present application, when the acquired first folder is decompressed, the names and orders of the N second files can be updated according to the N first data corresponding to the N second files in the first file, so that the names and orders of the N decompressed second files are consistent with the names and orders of the N second files before compression. The user is not required to manually change the names and orders of the decompressed files, nor is the user required to modify the decoding format of the second file processing device, thereby avoiding repeated tedious operations, saving user time, and improving user experience.

[0102] It should be noted that the file processing method provided in the embodiment of the present application can be executed by a file processing or a control module in the file processing for executing the file processing method. In the embodiment of the present application, the file processing method for executing file processing is taken as an example to illustrate the file processing device provided in the embodiment of the present application.

[0103] See also Figure 5 The embodiment of the present application also provides a file processing device 500, which includes an acquisition module 501, a decompression module 502 and an update module 503.

[0104] The acquisition module 501 is used to acquire a first folder, wherein the first folder includes the first file and N second files, the first file includes N first data corresponding to N third files, one first data includes characteristic information of one third file, the characteristic information includes a file format, a file name and an order in the second folder, the third file is the second file before compression, and the second folder is the first folder before compression;

[0105] The decompression module 502 is used for decompressing the first folder in response to the decompression operation on the first folder to obtain a third folder, wherein the third folder includes the first file and N decompressed second files;

[0106] The updating module 503 is used to update the names and order of the N decompressed second files according to the characteristic information of the N second files indicated by the N first data, so that the names and order of the N decompressed second files are consistent with the names and order of the N third files;

[0107] Wherein, N is a positive integer and N is greater than 1.

[0108] Optionally, the device also includes: a first receiving module, used to receive a compression operation on the second folder, the second folder including the N third files; a compression module, used to generate the first file according to the characteristic information of the N third files in response to the compression operation, and compress the N third files in the second folder to obtain a first folder; wherein the first folder includes the first file and the N second files.

[0109] Optionally, the device further includes: a hiding module, configured to hide the first file in the first folder.

[0110] Optionally, the device also includes: a second receiving module, used to receive an operation of adding a fourth file in the first folder; an adding module, used to add first data corresponding to the fourth file in the first file in response to the operation of adding the fourth file; wherein the first data corresponding to the fourth file includes characteristic information of the fourth file, and the characteristic information includes file format, file name and order in the second folder.

[0111] Optionally, the update module includes: a determination unit, used to determine the first name and first order of the second file corresponding to the target data according to the target data in the N first data; a first update unit, used to update the second name to the first name when the second name is inconsistent with the first name, wherein the second name is the name of the decompressed second file; a second update unit, used to adjust the order of the decompressed second files in the third folder according to the first order when the second order is inconsistent with the first order, wherein the second order is the order of the decompressed second files in the third folder.

[0112] Optionally, the first data is a hyperlink address.

[0113] In an embodiment of the present application, when the acquired first folder is decompressed, the names and orders of the N second files can be updated according to the N first data corresponding to the N second files in the first file, so that the names and orders of the N decompressed second files are consistent with the names and orders of the N second files before compression. The user is not required to manually change the names and orders of the decompressed files, nor is the user required to modify the decoding format of the second file processing device, thereby avoiding repeated tedious operations, saving user time, and improving user experience.

[0114] The file processing in the embodiments of the present application may be a device, or a component, integrated circuit, or chip in a terminal. The device may be a mobile electronic device or a non-mobile electronic device. For example, the mobile electronic device may be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc. The non-mobile electronic device may be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine, or a self-service machine, etc., which is not specifically limited in the embodiments of the present application.

[0115] The file processing device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0116] It should be noted that the file processing device provided in the embodiment of the present application can achieve Figure 4 To avoid repetition, the various processes implemented by the method embodiment are not described here.

[0117] Alternatively, if Figure 6 As shown, an embodiment of the present application also provides an electronic device 600, including a processor 601, a memory 602, and a program or instruction stored in the memory 602 and executable on the processor 601. When the program or instruction is executed by the processor 601, each process of the above-mentioned file processing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.

[0118] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.

[0119] Figure 7 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.

[0120] The electronic device 700 includes but is not limited to: a radio frequency unit 701, a network module 702, an audio output unit 703, an input unit 704, a sensor 705, a display unit 706, a user input unit 707, an interface unit 708, a memory 709, and a processor 710.

[0121] Those skilled in the art will appreciate that the electronic device 700 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 710 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Figure 7 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.

[0122] The processor 710 is used to: obtain a first folder, wherein the first folder includes the first file and N second files, the first file includes N first data corresponding to N third files, one first data includes characteristic information of a third file, the characteristic information includes a file format, a file name and an order in the second folder, the third file is the second file before compression, and the second folder is the first folder before compression; in response to a decompression operation on the first folder, decompress the first folder to obtain a third folder, wherein the third folder includes the first file and N decompressed second files; according to the characteristic information of the N second files indicated by the N first data, update the names and order of the N decompressed second files so that the names and order of the N decompressed second files are consistent with the names and order of the N third files; wherein N is a positive integer and N is greater than 1.

[0123] Optionally, the user input unit 707 is used to receive a compression operation on the second folder, which includes the N third files; the processor 710 is used to: in response to the compression operation, generate the first file according to the characteristic information of the N third files, and compress the N third files in the second folder to obtain a first folder; wherein the first folder includes the first file and the N second files.

[0124] Optionally, after compressing the N third files in the second folder to obtain the first folder, the processor 710 is further configured to: hide the first file in the first folder.

[0125] Optionally, after compressing the N third files in the second folder to obtain the first folder, the processor 710 is further used to: receive an operation to add a fourth file in the first folder; in response to the operation to add the fourth file, add first data corresponding to the fourth file to the first file; wherein the first data corresponding to the fourth file includes characteristic information of the fourth file, and the characteristic information includes a file format, a file name, and an order in the second folder.

[0126] Optionally, when updating the names and orders of the N decompressed second files according to the characteristic information of the N second files indicated by the N first data, the processor 710 is used to: determine the first name and the first order of the second file corresponding to the target data according to the target data in the N first data; if the second name is inconsistent with the first name, update it to the first name according to the second name, wherein the second name is the name of the decompressed second file; if the second order is inconsistent with the first order, adjust the order of the decompressed second files in the third folder according to the first order, wherein the second order is the order of the decompressed second files in the third folder.

[0127] Optionally, the first data is a hyperlink address.

[0128] In an embodiment of the present application, when the acquired first folder is decompressed, the names and orders of the N second files can be updated according to the N first data corresponding to the N second files in the first file, so that the names and orders of the N decompressed second files are consistent with the names and orders of the N second files before compression. The user is not required to manually change the names and orders of the decompressed files, nor is the user required to modify the decoding format of the second file processing device, thereby avoiding repeated tedious operations, saving user time, and improving user experience.

[0129] It should be understood that in the embodiment of the present application, the input unit 704 may include a graphics processor (Graphics Processing Unit, GPU) 7041 and a microphone 7042, and the graphics processor 7041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 706 may include a display panel 7061, and the display panel 7061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 707 includes a touch panel 7071 and other input devices 7072. The touch panel 7071 is also called a touch screen. The touch panel 7071 may include two parts: a touch detection device and a touch controller. Other input devices 7072 may include but are not limited to a physical keyboard, a function key (such as a volume control button, a switch button, etc.), a trackball, a mouse, and a joystick, which will not be repeated here. The memory 709 can be used to store software programs and various data, including but not limited to applications and operating systems. The processor 710 can integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and applications, etc., and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 710.

[0130] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned file processing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0131] The processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0132] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned file processing method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0133] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0134] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0135] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0136] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A file processing method, characterized in that: The method comprises: Acquire a first folder, wherein the first folder includes the first file and N second files, the first file includes N pieces of first data corresponding to N third files, one piece of the first data includes characteristic information of one third file, the characteristic information includes a file format, a file name, and an order in the second folder, the third file is the second file before compression, and the second folder is the first folder before compression; In response to the decompression operation on the first folder, the first folder is decompressed to obtain a third folder, wherein the third folder includes the first file and N decompressed second files; updating the names and order of the N decompressed second files according to the characteristic information of the N second files indicated by the N pieces of first data, so that the names and order of the N decompressed second files are consistent with the names and order of the N third files; Wherein, N is a positive integer and N is greater than 1; The updating, according to the characteristic information of the N second files indicated by the N pieces of first data, the names and the order of the N decompressed second files comprises: Determine, according to target data in the N pieces of first data, a first name and a first order of a second file corresponding to the target data; When the second name is inconsistent with the first name, updating the second name to the first name, wherein the second name is the name of the decompressed second file; When the second order is inconsistent with the first order, the order of the decompressed second files in the third folder is adjusted according to the first order, wherein the second order is the order of the decompressed second files in the third folder.

2. The method according to claim 1, characterized in that Before obtaining the first folder, the method further includes: receiving a compression operation on the second folder, where the second folder includes the N third files; In response to the compression operation, generating the first file according to the characteristic information of the N third files, and compressing the N third files in the second folder to obtain a first folder; The first folder includes the first file and the N second files.

3. The method according to claim 2, characterized in that After compressing the N third files in the second folder to obtain the first folder, the method further includes: The first file in the first folder is hidden.

4. The method according to claim 2, characterized in that: After compressing the N third files in the second folder to obtain the first folder, the method further includes: receiving an operation of adding a fourth file in the first folder; In response to the operation of adding the fourth file, adding first data corresponding to the fourth file to the first file; The first data corresponding to the fourth file includes characteristic information of the fourth file, and the characteristic information includes a file format, a file name, and an order in the second folder.

5. The method according to claim 1, characterized in that The first data is a hyperlink address.

6. A file processing device, characterized in that: The device comprises: an acquisition module, configured to acquire a first folder, wherein the first folder includes the first file and N second files, the first file includes N pieces of first data corresponding to N third files, one piece of the first data includes characteristic information of one third file, the characteristic information includes a file format, a file name, and an order in the second folder, the third file is the second file before compression, and the second folder is the first folder before compression; a decompression module, configured to, in response to a decompression operation on the first folder, decompress the first folder to obtain a third folder, wherein the third folder includes the first file and N decompressed second files; an updating module, configured to update the names and order of the N decompressed second files according to the characteristic information of the N second files indicated by the N pieces of first data, so that the names and order of the N decompressed second files are consistent with the names and order of the N third files; Wherein, N is a positive integer and N is greater than 1; The updating, according to the characteristic information of the N second files indicated by the N pieces of first data, the names and the order of the N decompressed second files comprises: Determine, according to target data in the N pieces of first data, a first name and a first order of a second file corresponding to the target data; When the second name is inconsistent with the first name, updating the second name to the first name, wherein the second name is the name of the decompressed second file; When the second order is inconsistent with the first order, the order of the decompressed second files in the third folder is adjusted according to the first order, wherein the second order is the order of the decompressed second files in the third folder.

7. The device according to claim 6, characterized in that The device also includes: A first receiving module, configured to receive a compression operation on the second folder, where the second folder includes the N third files; a compression module, configured to generate the first file according to the characteristic information of the N third files in response to the compression operation, and to compress the N third files in the second folder to obtain a first folder; The first folder includes the first file and the N second files.

8. The device according to claim 7, characterized in that The device also includes: A hiding module is used to hide the first file in the first folder.

9. The device according to claim 7, characterized in that The device also includes: A second receiving module, used for receiving an operation of adding a fourth file in the first folder; an adding module, configured to add first data corresponding to the fourth file to the first file in response to the operation of adding the fourth file; The first data corresponding to the fourth file includes characteristic information of the fourth file, and the characteristic information includes a file format, a file name, and an order in the second folder.

10. The device according to claim 6, characterized in that The update module comprises: a determining unit, configured to determine, according to target data in the N pieces of first data, a first name and a first order of a second file corresponding to the target data; A first updating unit, configured to update the second name to the first name when the second name is inconsistent with the first name, wherein the second name is the name of the decompressed second file; The second updating unit is used to adjust the order of the decompressed second files in the third folder according to the first order when the second order is inconsistent with the first order, wherein the second order is the order of the decompressed second files in the third folder.

11. An electronic device, characterized in that: The method comprises a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the file processing method as claimed in any one of claims 1 to 5.

12. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by a processor, the steps of the file processing method according to any one of claims 1 to 5 are implemented.