Compression package decompression method, device and equipment

By monitoring the compressed packet decompression progress in real time and performing continuous decompression when interrupted, the problem of waste of resources and reduced efficiency caused by abnormal interruption during compressed packet decompression in the server environment is solved, and the stability and user experience of the compressed packet are improved.

CN120050339APending Publication Date: 2025-05-27镁佳(北京)科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510203784.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-24
Publication Date
2025-05-27

AI Technical Summary

Technical Problem

In a server environment, the compressed packet decompression process may be unexpectedly interrupted due to abnormal conditions such as process restart, power outage, network interruption or system upgrade, resulting in previous waste of resources and reduced data transmission efficiency.

Method used

By obtaining multiple compressed files in the target compression package and their decompression target paths, the decompression progress of each compressed file is obtained in real time. In the event of an unexpected interruption, the undecompressed compressed file is determined based on the decompression progress and the current decompression result, and the undecompressed file is continued.

Benefits of technology

Effectively handle unexpected interruptions of compressed packets during decompression, improve the stability and reliability of the decompression process, reduce resource waste, and improve user decompression efficiency and experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120050339A_ABST
    Figure CN120050339A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to the technical field of computers, and discloses a package decompression method, device and equipment, and the method comprises the steps: obtaining a plurality of compressed files stored in a target package and a corresponding decompression target path; based on the decompression target path, respectively decompressing each compressed file to a corresponding target storage position; obtaining the decompression progress of each compressed file; obtaining a current decompression result of the target compressed package based on the decompression progress; and if the current decompression result represents that the target compressed package is accidentally interrupted in the decompression process, determining a compressed file which is not decompressed in the target compressed package based on the decompression progress and the current decompression result, and continuously decompressing the compressed file which is not decompressed. By applying the technical scheme of the invention, the efficiency and reliability of decompressing the package can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of computer technology, and particularly to a method, apparatus, and device for decompressing compressed packages. Background Art

[0002] With the continuous development of information technology and the rapid growth of data volume, data transmission has become increasingly frequent and important. Users transmit a large number of files to the background server through mobile phone apps or web pages, and the background server will then batch-transmit a large number of files to the resource server for storage. If the file data volume is relatively large, in order to transmit faster and reduce traffic consumption, the app or web page will first compress the files into a large number of compressed packages and transmit them to the background server, and the background server will then decompress the large number of compressed packages to the resource server.

[0003] As a resource-intensive operation, decompression has high requirements for CPU and hard disk resources. In a server environment, if abnormal conditions such as process restart, power failure, network interruption, or system upgrade occur, the decompression process may be accidentally interrupted. Once the interruption occurs, the decompression of a large number of compressed packages must start from the beginning, which not only wastes the previously invested CPU and hard disk resources, greatly affects the efficiency of data transmission, increases the waiting time of users, and thus affects the user's data transmission experience. Summary of the Invention

[0004] In view of the above problems, embodiments of the present invention provide a method, apparatus, and device for decompressing compressed packages.

[0005] According to one aspect of the embodiments of the present invention, a method for decompressing a compressed package is provided. The method includes: obtaining a plurality of compressed files stored in a target compressed package and corresponding decompression target paths; based on the decompression target paths, decompressing each compressed file to a corresponding target storage location respectively; obtaining the decompression progress of each compressed file; obtaining the current decompression result of the target compressed package based on the decompression progress; if the current decompression result indicates that the target compressed package is accidentally interrupted during the decompression process, determining the compressed files in the target compressed package that have not been decompressed based on the decompression progress and the current decompression result, and performing continuous decompression on the compressed files that have not been decompressed. Through the above process, the accidental interruption situation that may occur during the decompression of the compressed package can be effectively handled, and the stability and reliability of the decompression process can be improved. In addition, by obtaining the decompression progress of each compressed file in real time, a more intuitive decompression status feedback can be provided to the user, enabling the user to timely understand the decompression progress and result. At the same time, continuous decompression is performed on the compressed files that have not been decompressed based on the decompression progress and result, avoiding decompression failure caused by accidental interruption, and improving the decompression efficiency and experience of the user.

[0006] In an alternative embodiment, if the current decompression result indicates that the decompression of the target compressed package was interrupted unexpectedly during the decompression process, then based on the decompression progress and the current decompression result, determine the compressed files in the target compressed package that have not been decompressed, and perform continuous decompression on the un-decompressed compressed files, including:

[0007] If the current decompression result indicates that the decompression of the target compressed package was interrupted unexpectedly during the decompression process, then determine the actual decompression result based on the decompression progress;

[0008] Update the current decompression result based on the actual decompression result, and based on the updated current decompression result, determine the compressed files in the target compressed package that have not been decompressed, and perform continuous decompression on the un-decompressed compressed files.

[0009] In an alternative embodiment, update the current decompression result based on the actual decompression result, and based on the updated current decompression result, determine the compressed files in the target compressed package that have not been decompressed, and perform continuous decompression on the un-decompressed compressed files, including:

[0010] Compare the actual decompression result with the current decompression result to obtain a decompression comparison result;

[0011] If the decompression comparison result indicates that the actual decompression result is different from the current decompression result, then update the current decompression result based on the actual decompression result;

[0012] If the updated current decompression result indicates that the decompression of the target compressed package is not completed, then determine the compressed files in the target compressed package that have not been decompressed based on the decompression progress, and perform continuous decompression on the un-decompressed compressed files in sequence.

[0013] In an alternative embodiment, obtaining the current decompression result of the target compressed package based on the decompression progress includes:

[0014] Based on the progress comparison result between the decompression progress and the target decompression progress, mark the decompression progress of each compressed file;

[0015] Count the number of compressed files with the decompression progress of decompression completed to obtain the quantity of decompressed files;

[0016] Obtain the current decompression result of the target compressed package based on the quantity of decompressed files.

[0017] In an alternative embodiment, obtaining the current decompression result of the target compressed package based on the quantity of decompressed files includes:

[0018] If the quantity of decompressed files is zero, then obtain the current decompression result that the decompression of the target compressed package has not started;

[0019] If the amount of decompressed files is less than the amount of compressed files stored in the target compressed package, and the decompression time of the current compressed file is greater than the target decompression time threshold, then the current decompression result of the target compressed package being interrupted unexpectedly is obtained;

[0020] If the amount of decompressed files is equal to the amount of compressed files stored in the target compressed package, then the current decompression result of the target compressed package being decompressed successfully is obtained.

[0021] In an alternative implementation, obtaining the current decompression result of the target compressed package based on the amount of decompressed files further includes:

[0022] If the amount of decompressed files is less than the amount of compressed files stored in the target compressed package, and there are consecutive target numbers of compressed files that all fail to decompress, then the current decompression result of the target compressed package being abnormally terminated is obtained;

[0023] If the amount of decompressed files is less than the amount of compressed files stored in the target compressed package, and there are non - consecutive target numbers of compressed files that fail to decompress, then the current decompression result of the target compressed package being abnormally completed is obtained.

[0024] In an alternative implementation, the above - mentioned method further includes:

[0025] If the current decompression result indicates that the target compressed package is abnormally terminated or abnormally completed during decompression, then based on the compressed files that are abnormally terminated or abnormally completed, corresponding abnormal prompt information is generated.

[0026] In an alternative implementation, obtaining the decompression progress of each compressed file includes:

[0027] Obtain the decompressed file information of each compressed file;

[0028] Compare the decompressed file information with the corresponding compressed file information to obtain an information comparison result;

[0029] Based on the information comparison result, obtain the decompression progress of each compressed file.

[0030] According to another aspect of the embodiments of the present invention, there is provided a compressed package decompression device, including: an information acquisition module, configured to acquire a plurality of compressed files stored in a target compressed package and corresponding decompression target paths; a file decompression module, configured to decompress each compressed file to a corresponding target storage location based on the decompression target path; a progress acquisition module, configured to acquire the decompression progress of each compressed file; a result determination module, configured to obtain the current decompression result of the target compressed package based on the decompression progress; and a file continuous decompression module, configured to, if the current decompression result indicates that the target compressed package is unexpectedly interrupted during decompression, determine the compressed files in the target compressed package that have not been decompressed based on the decompression progress and the current decompression result, and perform continuous decompression on the un-decompressed compressed files. Through the above modules, the situation of unexpected interruption that may occur during the decompression of the compressed package can be effectively handled, improving the stability and reliability of the decompression process. In addition, by obtaining the decompression progress of each compressed file in real time, a more intuitive decompression status feedback can be provided to the user, enabling the user to timely understand the decompression progress and result. At the same time, continuous decompression is performed on the un-decompressed compressed files based on the decompression progress and result, avoiding decompression failure caused by unexpected interruption and improving the user's decompression efficiency and experience.

[0031] According to another aspect of the embodiments of the present invention, there is provided a computer device, including: a processor, a memory, a communication interface, and a communication bus, where the processor, the memory, and the communication interface complete mutual communication through the communication bus; the memory is used to store at least one executable instruction, and the executable instruction causes the processor to perform the operations of the foregoing compressed package decompression method.

[0032] According to yet another aspect of the embodiments of the present invention, there is provided a computer-readable storage medium, in which at least one executable instruction is stored, and the executable instruction causes a computer device / device to perform the operations of the foregoing compressed package decompression method.

[0033] According to yet another aspect of the embodiments of the present invention, there is provided a computer program product, including computer instructions, where the computer instructions are used to cause a computer to perform the operations of the compressed package decompression method in the first aspect or any corresponding embodiment thereof.

[0034] The above description is only an overview of the technical solutions of the embodiments of the present invention. In order to be able to understand the technical means of the embodiments of the present invention more clearly, it can be implemented according to the content of the specification. And in order to make the above and other purposes, features, and advantages of the embodiments of the present invention more obvious and understandable, the following specifically illustrates the embodiments of the present invention. Description of the Drawings

[0035] The drawings are only used to illustrate the embodiments and are not considered as limiting the present invention. Moreover, throughout the drawings, the same reference numerals are used to represent the same components. In the drawings:

[0036] Figure 1 shows a schematic flowchart of a method for decompressing a compressed package provided by the present invention;

[0037] Figure 2 shows another schematic flowchart of a method for decompressing a compressed package provided by the present invention;

[0038] Figure 3 shows a schematic structural diagram of a device for decompressing a compressed package provided by the present invention;

[0039] Figure 4 shows a schematic structural diagram of a computer device provided by the present invention. Detailed implementation manners

[0040] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the described embodiments are some but not all of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0041] Figure 1 shows a flowchart of the first embodiment of a method for decompressing a compressed package according to the present invention. As Figure 1 shown, applied to a background server, the method includes the following steps:

[0042] Step 110, obtain multiple compressed files stored in a target compressed package and corresponding decompression target paths.

[0043] Among them, the target compressed package may be a set of compressed files stored in common compression formats such as ZIP, RAR, 7Z, etc. In practical applications, a user may hope to decompress multiple files in hundreds of compressed packages of a certain type or time period in a certain batch of compressed packages to a specified target path for subsequent use or processing. Therefore, by obtaining multiple compressed files stored in the target compressed package and corresponding decompression target paths, a data basis is provided for subsequent decompression operations, ensuring that each compressed file can be accurately decompressed to the position specified by the user.

[0044] Specifically, when the background server receives the target compressed package, it can first parse the target compressed package to obtain the name, size, current path of each compressed file, and its position information in the compressed package. At the same time, by scanning the file header information in the target compressed package, each compressed file included in the compressed package is identified, and the decompression target path information of each compressed file is read. These information can be stored in a specific data structure, such as an array or a linked list, for subsequent processing and decompression operations.

[0045] Among them, in order to accurately and completely obtain all compressed files and their corresponding decompression target paths, after the background server receives the target compressed package, it can first perform an integrity check on it to ensure that the compressed package has not been damaged or tampered with. Then, the background server will parse the file list and the corresponding decompression target path information in the compressed package. In this process, the background server can adopt specific parsing algorithms or tools to identify and extract each compressed file and its decompression target path in the compressed package. At the same time, in order to ensure the accuracy of parsing, the background server will also verify the parsed information, such as verifying the legality and validity of the decompression target path, so that the background server can accurately and completely obtain all compressed files and their corresponding decompression target paths, providing reliable data support for subsequent processing and decompression operations.

[0046] Furthermore, after completing the parsing and verification steps, the background server will store each compressed file in the specified location according to the decompression target path information. To ensure the smooth progress of the decompression process, the background server will also check whether the space of the target storage location is sufficient to avoid decompression failure due to insufficient storage space. At the same time, the background server can also record the log information of the decompression operation, including decompression time, decompressed file name, decompression target path, etc., for subsequent problem tracking and data analysis.

[0047] In specific implementation, after the background server receives the target compressed package, it first scans the target compressed package. Through programming such as the Java language interface, it obtains the size, current path, decompression target path, total number of file directories in the target compressed package, decompression progress, and the current decompression result of the target compressed package, and records them in a table of a database such as MySQL, as shown in Table 1.

[0048] Table 1 Target Compressed Package Scanning Data Table

[0049]

[0050] Among them, the identifier for not started can be set to 0 (i.e., the identifier of the current decompression result is 0), the identifier for in progress can be set to 1 (i.e., the identifier of the current decompression result is 1), the identifier for normal completion can be set to 2 (i.e., the identifier of the current decompression result is 2), the identifier for abnormal termination can be set to 3 (i.e., the identifier of the current decompression result is 3), and the identifier for abnormal completion can be set to 4 (i.e., the identifier of the current decompression result is 4). The setting of these identifiers helps the background server quickly identify the status of the decompression task, so as to perform effective task management and monitoring. For example, when the background server detects that the decompression progress identifier is 1, it means that the decompression task is in progress. At this time, the background server can continuously monitor the decompression progress and automatically update the current decompression result identifier to 2 after decompression is completed. If an exception occurs during decompression, such as decompression failure or file corruption, the background server can update the current decompression result identifier to 3 or 4 and record the corresponding exception situation in the remarks field for subsequent problem tracking and resolution.

[0051] Step 120: Based on the decompression target path, decompress each compressed file to the corresponding target storage location respectively.

[0052] Specifically, during the decompression process, the background server will intelligently judge the available space of the target storage location in the resource server to ensure that the decompressed files can be stored smoothly. If the space of the target storage location is insufficient, the user will be prompted to select another storage location or clean the existing space. In addition, to improve the decompression efficiency, the most suitable decompression algorithm and the number of threads can be automatically selected according to the format and size of the compressed file to achieve a fast and stable decompression process. After decompression is completed, the background server will generate a detailed decompression report, including information such as decompression time, size of the decompressed file, and storage location, for the user to view and confirm.

[0053] For example, if a target compressed package contains the following files and directories:

[0054] a / ;

[0055] a / a.txt;

[0056] a / b;

[0057] a / b / b.txt;

[0058] c.txt.

[0059] When decompressing, the decompression software will create the directory a in sequence according to the top-down process, create a.txt under the directory a, then create the directory b under the a directory, then create b.txt under the b directory, and then create the c.txt file. At the same time, after each step is completed, the data in the data table will be updated to record the decompression progress and status.

[0060] Step 130, obtain the decompression progress of each compressed file.

[0061] As described above, by obtaining the decompression progress of each compressed file, users can monitor the entire decompression process in real time and resume decompression based on the decompression progress in case of an accidental interruption. For example, when decompressing a large compressed file, users can view the decompression progress of each compressed file and key information such as the remaining time through the user interface. This real-time feedback mechanism enables users to promptly understand the decompression progress, reasonably arrange their time, and improve work efficiency. At the same time, when the decompression progress is abnormal, such as a sudden slowdown in decompression speed or decompression failure, a warning is issued in a timely manner so that users can take corresponding measures to ensure the smooth completion of the decompression task.

[0062] In some alternative embodiments, when obtaining the decompression progress of each compressed file, the decompressed file information of each compressed file can be obtained; the decompressed file information is compared with the corresponding compressed file information to obtain an information comparison result; based on the information comparison result, the decompression progress of each compressed file is obtained.

[0063] Specifically, the decompressed file information may include but is not limited to key attributes such as file size, file type, and file checksum. By comparing with the compressed file information of the original compressed file, it is possible to accurately determine whether the decompression process is complete and accurate. For example, comparing the file sizes can quickly identify whether there is data loss during decompression; comparing the file types can ensure that the decompressed file format is consistent with the expectation; and matching the file checksum is the most direct and effective means to verify the integrity and correctness of the decompressed file. This multi-dimensional information comparison mechanism not only improves the accuracy of the decompression progress but also provides users with more reliable data security protection.

[0064] Step 140, obtain the current decompression result of the target compressed package based on the decompression progress.

[0065] As described above, by obtaining the current decompression result of the target compressed package based on the decompression progress, the summary and presentation of all the previous decompression progress are achieved. By comprehensively judging the decompression status of the target compressed package according to the decompression progress of each compressed file. If all compressed files are decompressed successfully and the information comparison is correct, the current decompression result is marked as successful; if there is a decompression failure or information mismatch, the current decompression result is marked as failed and may be accompanied by specific failure reasons, such as a certain compressed file decompression failure, file size mismatch, file checksum error, etc., so that users can intuitively understand the decompression status of the target compressed package and can quickly locate the problem in case of decompression failure, facilitating subsequent troubleshooting and handling.

[0066] In some alternative embodiments, when obtaining the current decompression result of the target compressed package based on the decompression progress, the decompression progress of each compressed file can be marked based on the progress comparison result between the decompression progress and the target decompression progress; the number of compressed files with the decompression progress being completed is counted to obtain the quantity of decompressed completed files; and the current decompression result of the target compressed package is obtained based on the quantity of decompressed completed files.

[0067] Specifically, if the decompression progress of a certain compressed file is consistent with the target decompression progress, the decompression progress of this file is marked as "normally completed"; if the decompression progress lags behind the target decompression progress, it is marked as "in progress"; if the decompression fails, it is marked as "failed". At the same time, the number of compressed files marked as "normally completed" is counted in real time to obtain the quantity of decompressed completed files. When the quantity of decompressed completed files is equal to the total number of compressed files in the target compressed package, it indicates that the target compressed package has been completely decompressed. At this time, the current decompression result can be marked as "successful". On the contrary, if the quantity of decompressed completed files is less than the total number of compressed files in the target compressed package, it indicates that the decompression of the target compressed package has not been completed or there are files with decompression failures. At this time, the current decompression result can be marked as "incomplete" or the specific files with decompression failures and the reasons can be pointed out, so that users can obtain the decompression progress in a timely manner and take corresponding handling measures.

[0068] In some alternative embodiments, when obtaining the current decompression result of the target compressed package based on the quantity of decompressed completed files, if the quantity of decompressed completed files is zero, the current decompression result that the target compressed package has not started decompressing is obtained; if the quantity of decompressed completed files is less than the quantity of compressed files of the multiple compressed files stored in the target compressed package, and the decompression time of the current compressed file is greater than the target decompression time threshold, the current decompression result that the target compressed package has been interrupted unexpectedly is obtained; if the quantity of decompressed completed files is equal to the quantity of compressed files of the multiple compressed files stored in the target compressed package, the current decompression result that the target compressed package has been decompressed is obtained.

[0069] During specific implementation, the total number of all compressed files and directories recorded in the initial scan data table of the target compressed package is 5. After the directory a is created, the current progress is set to 1. The total progress is 1 / 5. Decompress a.txt in sequence, and the progress is 2... until after c.txt is created, the total progress is 5 / 5, the decompression is completed, and the current decompression result is changed to 2. The decompression data table after normal decompression is shown in Table 2.

[0070] Table 2 Normal Decompression Data Table of the Target Compressed Package

[0071]

[0072]

[0073] Further, if during the decompression process of the target compressed package, the amount of decompressed files is less than the amount of compressed files stored in the multiple compressed files in the target compressed package, and the decompression time of the current compressed file is greater than the target decompression time threshold, such as 30 minutes (i.e., the redundant time when 3 consecutive compressed files fail to decompress, which can be achieved through a global timer), then it is determined that the current decompression result of the target compressed package has an unexpected interruption.

[0074] In addition, to further improve the user experience, some user-friendly prompt messages can be added during the decompression process. For example, when it is detected that the target compressed package has not started decompressing, in addition to marking the current decompression result as "not started", the user can also be reminded to check whether the compressed package is complete and whether the decompression program has started properly through a pop-up window or log. Similarly, when it is detected that the target compressed package has an unexpected interruption during decompression, in addition to marking the current decompression result as "unexpected interruption", the un-decompressed compressed files in the target compressed package can also be continuously decompressed. When the target compressed package is decompressed successfully, a cheerful prompt sound or an obvious success sign can be used to celebrate this achievement, enhancing the user's sense of accomplishment and satisfaction.

[0075] Step 150, if the current decompression result indicates that the target compressed package has an unexpected interruption during the decompression process, then based on the decompression progress and the current decompression result, determine the un-decompressed compressed files in the target compressed package, and continuously decompress the un-decompressed compressed files.

[0076] Among them, the specific operation of continuous decompression can include reading the decompression progress information, which usually records the files that have been decompressed and the positions of the files currently being decompressed. Then, based on this information, locate the un-decompressed files and continue the decompression process from the position of this file. To ensure the smooth progress of continuous decompression, the integrity of the un-decompressed files can also be checked to ensure that they are not damaged or lost. After the continuous decompression is completed, update the current decompression result, mark it as "decompression completed", and give the user corresponding prompts, such as displaying through the interface or sending a notification, to inform the user that the decompression task has been successfully resumed and completed.

[0077] In some alternative embodiments, if the current decompression result indicates that the target compressed package has an unexpected interruption during the decompression process, then based on the decompression progress and the current decompression result, determine the un-decompressed compressed files in the target compressed package, and when continuously decompressing the un-decompressed compressed files, if the current decompression result indicates that the target compressed package has an unexpected interruption during the decompression process, then determine the actual decompression result based on the decompression progress; update the current decompression result based on the actual decompression result, and based on the updated current decompression result, determine the un-decompressed compressed files in the target compressed package, and continuously decompress the un-decompressed compressed files.

[0078] In some alternative embodiments, when updating the current decompression result based on the actual decompression result, determining the compressed files in the target compressed package that have not been decompressed based on the updated current decompression result, and performing continuous decompression on the un-decompressed compressed files, the actual decompression result can be compared with the current decompression result to obtain a decompression comparison result; if the decompression comparison result indicates that the actual decompression result is different from the current decompression result, the current decompression result is updated based on the actual decompression result, and according to the updated current decompression result, the compressed files in the target compressed package that have not been completely decompressed are re-identified, ensuring the accuracy and integrity of the decompression process and avoiding data loss or file corruption problems caused by decompression interruption; subsequently, continuous decompression operations will be performed on the identified un-decompressed compressed files until the entire target compressed package is completely decompressed. In this way, even if an accident occurs during decompression, the user can continue decompressing from the place where the last interruption occurred, greatly improving the decompression efficiency and user experience.

[0079] Further, if the updated current decompression result indicates that the target compressed package has not been completely decompressed, the compressed files in the target compressed package that have not been decompressed are determined based on the decompression progress, and continuous decompression is performed on the un-decompressed compressed files in sequence. During the continuous decompression process, the progress of each continuous decompression is recorded and synchronized with the decompression progress to ensure the continuity and accuracy of the decompression process. At the same time, in order to improve the decompression efficiency and user experience, the decompression strategy can also be intelligently adjusted according to the decompression progress. For example, when decompressing large files, more resources are preferentially allocated to ensure the decompression speed; while when decompressing small files, a more energy-saving decompression method is adopted to reduce resource consumption. In addition, file verification can be automatically performed after decompression to ensure that the decompressed files are complete and undamaged, thus providing a more efficient, reliable, and intelligent decompression experience for users.

[0080] For example, when the decompression of the compressed file is completed but the record has not been updated yet, sudden power off, network disconnection, insufficient disk space and other situations occur. At this time, the corresponding accidental decompression data table is shown in Table 3.

[0081] Table 3 Accidental Decompression Data Table of the Target Compressed Package

[0082]

[0083]

[0084] Among them, Table 2 is the data in the data table when the b.txt file is decompressed and the decompression is accidentally interrupted due to certain reasons. The current decompression result is in progress, with an identifier of 1, indicating that although it is actually in an accidental interruption state, the data table has not been updated in time. When performing continuous decompression on the un-decompressed compressed files, that is, during continuous decompression, it can be judged according to the decompression progress. For example, if the decompression progress is 3, the first 3 files or directories can be skipped and decompression can start from the 4th one.

[0085] The decompression method of the embodiment of the present invention includes: obtaining a plurality of compressed files stored in a target compressed package and corresponding decompression target paths; based on the decompression target paths, decompressing each compressed file to a corresponding target storage location respectively; obtaining the decompression progress of each compressed file; obtaining the current decompression result of the target compressed package based on the decompression progress; if the current decompression result indicates that the target compressed package is accidentally interrupted during decompression, determining the compressed files in the target compressed package that have not been decompressed based on the decompression progress and the current decompression result, and performing continuous decompression on the un-decompressed compressed files, which can effectively handle the accidental interruption situation that may occur during the decompression of the compressed package, and improve the stability and reliability of the decompression process. In addition, by obtaining the decompression progress of each compressed file in real time, a more intuitive decompression status feedback can be provided to the user, enabling the user to timely understand the decompression progress and result. At the same time, continuous decompression is performed on the un-decompressed compressed files based on the decompression progress and result, avoiding decompression failure caused by accidental interruption, and improving the user's decompression efficiency and experience.

[0086] Figure 2 The flowchart of another embodiment of the compressed package decompression method of the present invention is shown. As Figure 2 shown, the method includes the following steps:

[0087] Step 210, obtaining a plurality of compressed files stored in a target compressed package and corresponding decompression target paths.

[0088] For details, please refer to Figure 1 Step 110 of the embodiment shown, which will not be elaborated here.

[0089] Step 220, based on the decompression target paths, decompressing each compressed file to a corresponding target storage location respectively.

[0090] For details, please refer to Figure 1 Step 120 of the embodiment shown, which will not be elaborated here.

[0091] Step 230, obtaining the decompression progress of each compressed file.

[0092] For details, please refer to Figure 1 Step 130 of the embodiment shown, which will not be elaborated here.

[0093] Step 240, obtaining the current decompression result of the target compressed package based on the decompression progress.

[0094] Specifically, the above step 240 includes:

[0095] Step 2401, marking the decompression progress of each compressed file based on the progress comparison result between the decompression progress and the target decompression progress.

[0096] As described above, by marking the decompression progress of each compressed file based on the progress comparison result between the decompression progress and the target decompression progress, the decompression situation of each file in the target compressed package can be more intuitively understood, thus facilitating the user to monitor and manage the decompression process. For example, when the decompression progress of a certain file lags behind the target decompression progress, it can be marked to remind the user to pay attention or take corresponding measures. In addition, the decompression progress can be further sorted and adjusted intelligently in combination with the decompression priority or urgency preset by the user to ensure that important files can be decompressed first, improving the decompression efficiency and user experience.

[0097] Step 2402, count the number of compressed files with the decompression progress being decompression completed to obtain the quantity of decompression completed files.

[0098] As described above, by obtaining the quantity of decompression completed files by counting the number of compressed files with the decompression progress being decompression completed, the completion situation of the decompression task can be more accurately grasped. For example, when the quantity of decompression completed files reaches a preset ratio or quantity, the system can automatically trigger corresponding notifications or reminders to inform the user that the decompression task is about to be completed or has been completed, enabling the user to reasonably arrange subsequent operations or obtain the current decompression result in a timely manner. In addition, the quantity of decompression completed files can be compared with the total quantity of compressed files to calculate the completion rate of the decompression task, presenting the decompression progress in a more intuitive way and further enhancing the user experience.

[0099] Step 2403, if the quantity of decompression completed files is less than the quantity of compressed files stored in the target compressed package and there are consecutive target quantities of compressed files that all fail to decompress, obtain the current decompression result of the abnormal termination of the target compressed package.

[0100] Among them, the consecutive target quantity of failed decompression of compressed files can be set according to actual needs. For example, to improve the stability and reliability of the decompression task, the consecutive target quantity can be set to 3 or 5, that is, when 3 or 5 consecutive compressed files fail to decompress, it is considered that the target compressed package abnormally terminates decompression. Such a setting can, to a certain extent, avoid the situation where the entire decompression task fails due to the failure of individual files to decompress, improving the fault tolerance of the decompression task. Of course, the specific setting value of the consecutive target quantity also needs to be reasonably adjusted according to the actual application scenario and decompression requirements.

[0101] Specifically, during the decompression process, the background server always keeps monitoring the decompression status. Once an abnormal situation is found, such as decompression interruption or failure, it will not blindly continue to decompress, but first try to retry the failed file, giving it multiple opportunities to successfully decompress. If the file still fails to decompress after three retries, it will wisely choose to skip the file, continue to decompress the next file, and increase the progress by 1 accordingly. At the same time, in the remarks column of the data table, it will clearly mark which file still fails after three decompression attempts, so as to facilitate subsequent analysis and processing. More importantly, if three files fail to decompress in succession, the decompression process of the entire compressed package will be decisively terminated. This decision-making mechanism is based on a high degree of consideration for the stability and reliability of the decompression process, avoiding the continuation of meaningless operations when there are obvious problems. When the decompression is terminated, the failure of three consecutive files to decompress will be recorded in the remarks column, and the current decompression result will be marked as abnormal termination. In addition, warning information can be automatically triggered to notify developers in a timely manner through preset communication channels. It can also generate an exception report, which records in detail the key data such as the file information of the failed decompression, the reason for the failure, and the time of abnormal termination, for subsequent analysis and processing by users or administrators. In addition, it can also send abnormal termination information to users in a timely manner through preset communication channels, such as email, SMS or in-app notifications, to ensure that users can quickly learn the status of the decompression task and take appropriate remedial measures according to the actual situation.

[0102] In specific implementation, new records will be updated to the data table only when the decompression is successful each time. If an abnormal situation such as interruption or failure occurs, the record data will not be updated. A retry will be performed first. If the retry fails three times, the file will be skipped to decompress the next file. The progress is +1 and the note in the data table is marked: xxx file decompression failed three times. If three consecutive files fail to be decompressed, the decompression of the compressed package will be terminated. The failure of three consecutive files to be decompressed is recorded in the notes. The current decompression result is recorded as abnormal termination, and a warning message is sent to notify the developer to ensure the stability and efficiency of the decompression process. The data table after abnormal decompression termination is shown in Table 4.

[0103] Table 4 Abnormal termination data table of target compression package

[0104]

[0105]

[0106] Step 2404, if the decompression completed file amount is less than the compressed file amount of the multiple compressed files stored in the target compressed package, and there are non-continuous target number of compressed files that fail to be decompressed, then the current decompression result of abnormal completion of the target compressed package is obtained.

[0107] Specifically, if the amount of decompressed files is less than the amount of compressed files stored in the target compressed package, and there are non - consecutive target numbers of compressed files that fail to decompress, for example, the b.txt file fails to decompress 3 times, then the current decompression result of the target compressed package being abnormally completed is obtained, as shown in Table 5. At this time, although the decompression process is not completely interrupted, due to some non - consecutive compressed files failing to decompress, it may lead to incomplete or incorrect decompressed data. Therefore, the current decompression result can be marked as abnormally completed, and a corresponding decompression log can be generated. The decompression log should detail key data such as the information of files successfully decompressed, the information of files that failed to decompress, the reasons for failure, and the time point when decompression was completed. In this way, when users or administrators view the decompression log later, they can quickly locate the problem and take corresponding remedial measures, such as re - downloading the compressed package, repairing damaged files, or ignoring files that failed to decompress. At the same time, the background server can also automatically perform error statistics and analysis based on the information in the decompression log, providing optimization suggestions for subsequent decompression tasks.

[0108] Table 5 Abnormal Completion Data Table of the Target Compressed Package

[0109]

[0110] Step 250, if the current decompression result indicates that the target compressed package abnormally terminates or is abnormally completed during the decompression process, then generate a corresponding abnormal prompt message based on the compressed files with abnormal termination or abnormal completion.

[0111] Among them, the above - mentioned abnormal prompt message can contain various contents, such as the name of the decompression task, the specific files that failed to decompress, the timestamp of failure, and the remedial measures recommended for users, so that when users or administrators receive the abnormal prompt, they can quickly understand the status of the decompression task and make corresponding processing decisions. In addition, the abnormal prompt message can also be displayed to users through methods such as a graphical user interface (GUI) or a command - line interface (CLI) to adapt to the usage habits and needs of different users.

[0112] In some alternative implementation manners, when the target compressed package is successfully decompressed or fails to decompress, the situation can be notified via email and work software robots (such as Enterprise WeChat, DingTalk, etc.), such as:

[0113] a The compressed package is decompressed successfully, taking 10 minutes, with a total size of 10G.

[0114] b The compressed package has an abnormal interruption, taking 2 minutes, with a total size of 5G, named xxx, and the address is xxxxx.

[0115] c The compressed package is completed with an interruption, taking 3 minutes, with a total size of 6G, and the abnormal file is xxx.

[0116] In summary, the compression package decompression method according to the embodiments of the present invention can resume interrupted decompression, prevent repeated decompression operations on the target compression package, reduce waste of system resources, and help improve the system fault tolerance. In the actual production and development process, because the compression package is very large and often contains thousands of internal files, the waste caused by repeated decompression is very serious. Moreover, the number of compression packages being decompressed by the background server at the same time may reach hundreds. If all are decompressed repeatedly, it will cause serious problems such as system freezing and slow response. At the same time, due to a large amount of reading and writing by the background server, considering the lifespan of the hard disk, many still use mechanical hard disks (the lifespan of solid-state drives is shorter than that of mechanical hard disks). The reading and writing speeds of mechanical hard disks are relatively low, and the loads on the CPU and hard disk are relatively high during decompression. Resuming decompression after interruption can effectively relieve the problem of excessive pressure load caused by the hardware configuration. In addition, by automatically performing skip and retry operations according to abnormal situations, recording abnormal files, and giving notifications in a timely manner, it is possible to stably and reliably monitor the decompression of hundreds of compression packages simultaneously, saving human resources.

[0117] Figure 3 FIG. shows a schematic structural diagram of an embodiment of a compression package decompression device according to the present invention. As Figure 3 shown, the device includes:

[0118] An information acquisition module 310, configured to acquire a plurality of compressed files stored in the target compression package and corresponding decompression target paths;

[0119] A file decompression module 320, configured to decompress each compressed file to a corresponding target storage location based on the decompression target path;

[0120] A progress acquisition module 330, configured to acquire the decompression progress of each compressed file;

[0121] A result determination module 340, configured to obtain the current decompression result of the target compression package based on the decompression progress;

[0122] A file resumption decompression module 350, configured to, if the current decompression result indicates that the target compression package is unexpectedly interrupted during decompression, determine the compressed files in the target compression package that have not been decompressed based on the decompression progress and the current decompression result, and perform resumption decompression on the compressed files that have not been decompressed.

[0123] In an optional implementation manner, the file resumption decompression module 350 includes:

[0124] An actual result determination sub-module, configured to, if the current decompression result indicates that the target compression package is unexpectedly interrupted during decompression, determine the actual decompression result based on the decompression progress;

[0125] The first continuous decompression sub-module is used to update the current decompression result based on the actual decompression result, determine the compressed files in the target compressed package that have not been decompressed based on the updated current decompression result, and perform continuous decompression on the un-decompressed compressed files.

[0126] In an optional implementation manner, the first continuous decompression sub-module includes:

[0127] The decompression result comparison unit is used to compare the actual decompression result with the current decompression result to obtain a decompression comparison result;

[0128] The decompression result update unit is used to update the current decompression result based on the actual decompression result if the decompression comparison result indicates that the actual decompression result is different from the current decompression result;

[0129] The compressed file continuous decompression unit is used to determine the compressed files in the target compressed package that have not been decompressed based on the decompression progress and perform continuous decompression on the un-decompressed compressed files in sequence if the updated current decompression result indicates that the target compressed package has not been completely decompressed.

[0130] In an optional implementation manner, the result determination module 340 includes:

[0131] The decompression progress marking sub-module is used to mark the decompression progress of each compressed file based on the progress comparison result between the decompression progress and the target decompression progress;

[0132] The file quantity statistics sub-module is used to count the quantity of compressed files with the decompression progress being decompression completed to obtain the quantity of decompression completed files;

[0133] The decompression result determination sub-module is used to obtain the current decompression result of the target compressed package based on the quantity of decompression completed files.

[0134] In some optional implementation manners, the decompression result determination sub-module includes:

[0135] The first result determination unit is used to obtain the current decompression result that the target compressed package has not started decompression if the quantity of decompression completed files is zero;

[0136] The second result determination unit is used to obtain the current decompression result that the target compressed package has been interrupted unexpectedly if the quantity of decompression completed files is less than the quantity of compressed files stored in the target compressed package and the decompression time of the current compressed file is greater than the target decompression time threshold;

[0137] The third result determination unit is used to obtain the current decompression result that the target compressed package has been decompressed completed if the quantity of decompression completed files is equal to the quantity of compressed files stored in the target compressed package.

[0138] In some optional implementation manners, the decompression result determination sub-module further includes:

[0139] A fourth result determination unit, configured to obtain a current decompression result of abnormal termination of the target compression package if the amount of decompressed completed files is less than the amount of compressed files of multiple compressed files stored in the target compression package and there are consecutive target numbers of compressed files that all fail to be decompressed.

[0140] A fifth result determination unit, configured to obtain a current decompression result of abnormal completion of the target compression package if the amount of decompressed completed files is less than the amount of compressed files of multiple compressed files stored in the target compression package and there are non - consecutive target numbers of compressed files that fail to be decompressed.

[0141] In some optional embodiments, the above - mentioned device further includes an exception reminder module, configured to generate a corresponding exception prompt message based on the compressed files of abnormal termination or abnormal completion if the current decompression result indicates abnormal termination or abnormal completion of the target compression package during the decompression process.

[0142] In some optional embodiments, the progress acquisition module 330 includes:

[0143] A file information acquisition sub - module, configured to acquire the decompressed file information of each compressed file;

[0144] A file information comparison sub - module, configured to compare the decompressed file information with the corresponding compressed file information to obtain an information comparison result;

[0145] A decompression progress acquisition sub - module, configured to obtain the decompression progress of each compressed file based on the information comparison result.

[0146] The further function descriptions of the above - mentioned modules and units are the same as those in the corresponding method embodiments above, and will not be elaborated here.

[0147] Through the above - mentioned device and its components, the technical solution provided by the embodiments of the present invention has the following advantages:

[0148] The decompression device of the embodiment of the present invention obtains multiple compressed files stored in a target compressed package and corresponding decompression target paths; based on the decompression target paths, decompresses each compressed file to a corresponding target storage location respectively; obtains the decompression progress of each compressed file; obtains the current decompression result of the target compressed package based on the decompression progress; if the current decompression result indicates that the target compressed package is unexpectedly interrupted during decompression, determines the compressed files in the target compressed package that have not been decompressed based on the decompression progress and the current decompression result, and performs continuous decompression on the un-decompressed compressed files, which can effectively handle the unexpected interruption situation that may occur during the decompression of the compressed package, and improve the stability and reliability of the decompression process. In addition, by obtaining the decompression progress of each compressed file in real time, it provides a more intuitive decompression status feedback for the user, enabling the user to timely understand the decompression progress and result. At the same time, based on the decompression progress and result, continuous decompression is performed on the un-decompressed compressed files, avoiding decompression failure caused by unexpected interruption, and improving the user's decompression efficiency and experience.

[0149] Please refer to Figure 4 , Figure 4 which is a schematic structural diagram of a computer device provided by an alternative embodiment of the present invention. As Figure 4 shown, the computer device includes: one or more processors 410, a memory 420, and interfaces for connecting various components, including a high-speed interface and a low-speed interface. Each component communicates with each other using different buses and can be installed on a common main board or installed in other ways as needed. The processor can process instructions executed within the computer device, including instructions stored in the memory or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some alternative embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a set of blade servers, or a multi-processor system). Figure 4 In

[0150] Figure, a single processor 410 is taken as an example.

[0151] The processor 410 can be a central processing unit, a network processor, or a combination thereof. Among them, the processor 410 can further include a hardware chip. The above-mentioned hardware chip can be an application-specific integrated circuit, a programmable logic device, or a combination thereof. The above-mentioned programmable logic device can be a complex programmable logic device, a field programmable gate array, a general array logic, or any combination thereof.

[0152] The memory 420 may include a program storage area and a data storage area. The program storage area may store an operating system and application programs required for at least one function. The data storage area may store data created according to the use of the computer device in the display of a kind of mini-program landing page, etc. In addition, the memory 420 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some alternative embodiments, the memory 420 may optionally include a memory remotely disposed relative to the processor 410, and these remote memories may be connected to the computer device through a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a server cluster, a mobile communication network, and combinations thereof.

[0153] The memory 420 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, a hard disk, or a solid-state drive; the memory 420 may also include a combination of the above types of memory.

[0154] The computer device further includes a communication interface 430 for communicating the computer device with other devices or a communication network.

[0155] An embodiment of the present invention further provides a computer-readable storage medium storing at least one executable instruction, and when the executable instruction runs on the computer device / archive decompression device, the computer device / archive decompression device executes the archive decompression method in any of the above method embodiments.

[0156] An embodiment of the present invention further provides a computer program product including computer instructions for causing a computer to execute the archive decompression method in the first aspect or any corresponding embodiment thereof.

[0157] The algorithms or displays provided herein are not inherently related to any particular computer, virtual system, or other device. In addition, embodiments of the present invention are not directed to any particular programming language.

[0158] In the specification provided herein, a large number of specific details are set forth. However, it can be understood that embodiments of the present invention may be practiced without these specific details. Similarly, in order to streamline the present invention and assist in understanding one or more of the various inventive aspects, in the above description of the exemplary embodiments of the present invention, the various features of the embodiments of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. Among them, the claims following the specific implementation manners are hereby expressly incorporated into the specific implementation manners, and each claim itself is a separate embodiment of the present invention.

[0159] Those skilled in the art can understand that the modules in the devices in the embodiments can be adaptively changed and set in one or more devices different from the embodiments. The modules or units or components in the embodiments can be combined into one module or unit or component, and in addition, they can be divided into multiple sub-modules or sub-units or sub-components. Except that at least some of such features and / or processes or units are mutually exclusive.

[0160] It should be noted that the above embodiments illustrate the present invention rather than limit the present invention, and those skilled in the art can design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in the claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention can be implemented by means of hardware including several different elements and by means of a suitably programmed computer. In a unit claim listing several devices, several of these devices may be embodied by the same item of hardware. The use of the words first, second, and third, etc. does not denote any order. These words may be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be construed as limiting the order of execution.

Claims

1. A method for decompressing a compressed package, characterized in that: The method comprises: Obtain multiple compressed files stored in the target compressed package and the corresponding decompression target path; Based on the decompression target path, decompress each of the compressed files to a corresponding target storage location; Obtaining the decompression progress of each of the compressed files; Obtaining a current decompression result of the target compressed package based on the decompression progress; If the current decompression result indicates that the target compressed package is unexpectedly interrupted during the decompression process, the undecompressed compressed files in the target compressed package are determined based on the decompression progress and the current decompression result, and the undecompressed compressed files are continued to be decompressed.

2. The method according to claim 1, characterized in that If the current decompression result indicates that the target compressed package is unexpectedly interrupted during the decompression process, the undecompressed compressed files in the target compressed package are determined based on the decompression progress and the current decompression result, and the undecompressed compressed files are continued to be decompressed, including: If the current decompression result indicates that the target compressed package is unexpectedly interrupted during the decompression process, determining the actual decompression result based on the decompression progress; The current decompression result is updated based on the actual decompression result, and the compressed files that are not decompressed in the target compressed package are determined based on the updated current decompression result, and the compressed files that are not decompressed are continued to be decompressed.

3. The method according to claim 2, characterized in that The updating of the current decompression result based on the actual decompression result, determining the undecompressed compressed file in the target compressed package based on the updated current decompression result, and continuing to decompress the undecompressed compressed file, comprises: Compare the actual decompression result with the current decompression result to obtain a decompression comparison result; If the decompression comparison result indicates that the actual decompression result is different from the current decompression result, updating the current decompression result based on the actual decompression result; If the updated current decompression result indicates that the target compressed package has not been decompressed, the undecompressed compressed files in the target compressed package are determined based on the decompression progress, and the undecompressed compressed files are sequentially decompressed.

4. The method according to claim 1, characterized in that: The obtaining the current decompression result of the target compressed package based on the decompression progress includes: Based on the progress comparison result of the decompression progress and the target decompression progress, marking the decompression progress of each of the compressed files; Counting the number of compressed files whose decompression progress is completed, to obtain the number of files whose decompression is completed; The current decompression result of the target compressed package is obtained based on the decompression completed file amount.

5. The method according to claim 4, characterized in that The obtaining the current decompression result of the target compressed package based on the decompression completed file amount includes: If the decompression completed file amount is zero, the current decompression result of the target compressed package before decompression is started is obtained; If the decompression completed file amount is less than the compressed file amount of the plurality of compressed files stored in the target compressed package, and the decompression time of the current compressed file is greater than the target decompression time threshold, then the current decompression result of the unexpected interruption of the target compressed package is obtained; If the decompression completed file amount is equal to the compressed file amount of the plurality of compressed files stored in the target compressed package, the current decompression result of the target compressed package being decompressed is obtained.

6. The method according to claim 4, characterized in that The step of obtaining the current decompression result of the target compressed package based on the decompression completed file amount further includes: If the decompression completed file amount is less than the compressed file amount of the multiple compressed files stored in the target compressed package, and there are consecutive target number of compressed files that all fail to be decompressed, then the current decompression result of abnormal termination of the target compressed package is obtained; If the decompression completed file amount is less than the compressed file amount of the multiple compressed files stored in the target compressed package, and there are non-continuous target number of compressed files that fail to be decompressed, then the current decompression result of the target compressed package being abnormally completed is obtained.

7. The method according to claim 5, characterized in that The method further comprises: If the current decompression result indicates that the target compressed package is abnormally terminated or abnormally completed during the decompression process, corresponding abnormal prompt information is generated based on the compressed file that is abnormally terminated or abnormally completed.

8. The method according to claim 1, characterized in that: The obtaining the decompression progress of each compressed file includes: Obtaining decompressed file information of each of the compressed files; Comparing the decompressed file information with the compressed file information of the corresponding compressed file to obtain an information comparison result; Based on the information comparison result, the decompression progress of each compressed file is obtained.

9. A compressed package decompression device, characterized in that: The device comprises: An information acquisition module, used to acquire multiple compressed files stored in a target compressed package and corresponding decompression target paths; A file decompression module, used to decompress each of the compressed files to a corresponding target storage location based on the decompression target path; A progress acquisition module, used to acquire the decompression progress of each compressed file; A result determination module, used for obtaining a current decompression result of the target compressed package based on the decompression progress; The file continuing decompression module is used to determine the undecompressed compressed files in the target compressed package based on the decompression progress and the current decompression result, and continue to decompress the undecompressed compressed files if the current decompression result indicates that the target compressed package is unexpectedly interrupted during the decompression process.

10. A computer device, characterized in that: include: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute the operation of the compressed package decompression method as described in any one of claims 1-7.