File packaging method and device, computer equipment, readable storage medium and program product

By detecting the change information in the design package and performing stacking and merging processing, the problem of excessive packaging in the PSR design architecture is solved, which improves efficiency and consistency, reduces the database burden, and improves system performance.

CN119201046APending Publication Date: 2024-12-27CHINA TELECOM CORP LTD TECHNOLOGY INNOVATION CENTER +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411182106.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-27
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

In the PSR design architecture, the design package has a large amount of information and involves a lot of files, which leads to a long time-consuming and time-out error reporting.

Method used

By detecting the change information of the selected objects in the design package, determine the target file to be adjusted, and use the design package as a read-only layer and the target file as a writable layer for stacking and merging, obtaining the merged file information, and then merging the merged file The file information is then packaged and a packaged design package is generated.

Benefits of technology

It improves the efficiency and accuracy of packaging, ensures the integrity and consistency of the merged file information, reduces the frequent IO operation requirements for the database, reduces the database burden and delay, and improves system performance and response speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119201046A_ABST
    Figure CN119201046A_ABST
Patent Text Reader

Abstract

The invention relates to a file packaging method and device, computer equipment, a readable storage medium and a program product. The method comprises the steps that change information of a selected object in a design package is detected; determining a target file needing to be adjusted according to the change information; the design package is used as a read-only layer, the target file is used as a writable layer, the design package and the target file are stacked and combined, and combined file information is obtained; and packaging the combined file information to obtain a packaged design package. According to the method, only changed files are processed during each packaging, so that the packaging efficiency and precision can be improved; in addition, frequent IO operation requirements for the database are reduced in the processing process through lamination and merging, compared with a traditional multi-thread packaging mode, the burden and delay of the database are reduced, and the overall performance and response speed of the system can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of software engineering technology, and in particular to a file packaging method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Art

[0002] The PSR (Product-Service-Resource) design architecture is a standardized information hierarchical decoupling and mapping framework proposed in the process of product design and business activation, which builds the mapping relationship between products, services and resources. In the PSR architecture model, the design package carries all the information of PSR objects and APIs (Application Programming Interfaces), and usually contains multiple information files such as object / API definition files, rule definition files, and process files. After the downstream system receives the design package, it can complete the loading and launch of the corresponding product in the production environment by parsing the multiple information files in the design package.

[0003] However, due to the large amount of information and many files involved in the design package, each packaging operation will take a lot of time. Especially when the user selects multiple objects and APIs to package at the same time, the time consumed will exceed the maximum waiting time limit of the gateway, resulting in a timeout error. Summary of the invention

[0004] Based on this, it is necessary to provide a file packaging method, apparatus, computer device, computer-readable storage medium and computer program product to address the technical problem that the above packaging method takes a long time.

[0005] In a first aspect, the present application provides a file packaging method. The method comprises:

[0006] Detect change information of selected objects in the design package;

[0007] Determine the target file to be adjusted according to the change information;

[0008] Taking the design package as a read-only layer and the target file as a writable layer, performing a layer-by-layer merging process on the design package and the target file to obtain merged file information;

[0009] The merged file information is packaged to obtain a packaged design package.

[0010] In one embodiment, the change information includes a changed file, a change type, and dependencies related to the changed file;

[0011] Determining the target file to be adjusted according to the change information includes:

[0012] Determine, according to the changed file in the changed information and the dependency relationship related to the changed file, the associated file of the changed file;

[0013] The changed file and the associated files of the changed file are determined as the target files.

[0014] In one embodiment, there are multiple target files; the design package is used as a read-only layer, the target file is used as a writable layer, and the design package and the target file are stacked and merged to obtain the merged file information, including:

[0015] The design package is used as a base layer, and each target file is loaded in sequence as a cover layer according to a preset file sequence, so as to perform a layer-by-layer merging process with the design package to obtain merged file information.

[0016] In one embodiment, the design package is used as a read-only layer, the target file is used as a writable layer, and the design package and the target file are stacked and merged to obtain the merged file information, including:

[0017] If there are multiple target files and there are conflicts, identifying the conflicting files;

[0018] Performing conflict adjustment processing on the conflicting file to obtain an adjusted file;

[0019] The design package is used as a read-only layer, and the adjusted file is used as a writable layer. The design package and the adjusted file are subjected to a layer-by-layer merging process to obtain merged file information.

[0020] In one embodiment, the method of using the design package as a read-only layer and the target file as a writable layer, performing a layer-by-layer merging process on the design package and the target file to obtain the merged file information, further comprises:

[0021] Performing consistency check on the target file and the merged file information;

[0022] If the inspection result shows inconsistency, a prompt message is generated.

[0023] In one embodiment, the merged file information includes file path, file content and dependencies between files;

[0024] The step of packaging the merged file information to obtain a packaged design package includes:

[0025] Performing adjustment processing on the file content in the merged file information to obtain processed file content; the adjustment processing includes at least one of compression processing and deduplication processing;

[0026] The file path, the processed file content and the dependency relationship between the files are packaged to obtain a packaged design package.

[0027] In a second aspect, the present application also provides a file packaging device. The device comprises:

[0028] A detection module, used for detecting change information of selected objects in the design package;

[0029] A determination module, used to determine a target file to be adjusted according to the change information;

[0030] A merging module, used to use the design package as a read-only layer and the target file as a writable layer, and to perform a layer-by-layer merging process on the design package and the target file to obtain merged file information;

[0031] The packaging module is used to package the merged file information to obtain a packaged design package.

[0032] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:

[0033] Detect change information of selected objects in the design package;

[0034] Determine the target file to be adjusted according to the change information;

[0035] Taking the design package as a read-only layer and the target file as a writable layer, performing a layer-by-layer merging process on the design package and the target file to obtain merged file information;

[0036] The merged file information is packaged to obtain a packaged design package.

[0037] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0038] Detect change information of selected objects in the design package;

[0039] Determine the target file to be adjusted according to the change information;

[0040] Taking the design package as a read-only layer and the target file as a writable layer, performing a layer-by-layer merging process on the design package and the target file to obtain merged file information;

[0041] The merged file information is packaged to obtain a packaged design package.

[0042] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0043] Detect change information of selected objects in the design package;

[0044] Determine the target file to be adjusted according to the change information;

[0045] Taking the design package as a read-only layer and the target file as a writable layer, performing a layer-by-layer merging process on the design package and the target file to obtain merged file information;

[0046] The merged file information is packaged to obtain a packaged design package.

[0047] The above-mentioned file packaging method, device, computer equipment, storage medium and computer program product detect the change information of the selected object in the design package, determine the target file that needs to be adjusted according to the change information, and when merging, use the design package as the read-only layer and the target file as the writable layer to perform a layered merging process on the design package and the target file to obtain the merged file information; and package the merged file information to obtain the packaged design package. This method only processes the files that have changed each time it is packaged, thereby improving the efficiency and accuracy of packaging; further, the target file that needs to be adjusted is determined through the change information, and the design package and the target file that needs to be adjusted are merged in a layered merging manner, which can ensure the integrity and consistency of the generated merged file information. In addition, the layered merging reduces the frequent IO operation requirements for the database during the processing process, and compared with the traditional multi-threaded packaging method, it reduces the burden and delay of the database, thereby improving the overall performance and response speed of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 A schematic diagram of the principle of a PSR design architecture in one embodiment;

[0049] Figure 2 A schematic diagram of a process flow of a file packaging method in one embodiment;

[0050] Figure 3 A schematic diagram of a file directory in a design package in one embodiment;

[0051] Figure 4 A schematic diagram of a flow chart of a file packaging method in another embodiment;

[0052] Figure 5 is a structural block diagram of a file packaging device in an embodiment;

[0053] Figure 6 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0054] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0055] refer to Figure 1 , is a schematic diagram of the principle of a PSR design architecture according to an embodiment. Figure 1 As shown, in the PSR design architecture, multiple resources constitute a network service (a resource-oriented service), one or more network services constitute a business service (a customer-oriented service), and one or more business services constitute a communication service / product. For the design package of PSR design, since the amount of information in the design package is large and many files are involved, each packaging operation will consume a lot of time. Based on this, the present application proposes a method for quickly packaging a design package based on Union FS (Union File System, which allows read-only and read-write directories to coexist, that is, content can be deleted and added at the same time).

[0056] In one embodiment, Figure 2 As shown, a file packaging method is provided. This embodiment uses the method applied to a terminal as an example for illustration. It can be understood that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. Among them, the terminal can be but is not limited to various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server can be implemented as an independent server or a server cluster consisting of multiple servers. In this embodiment, the method includes the following steps:

[0057] Step S210, detecting change information of the selected object in the design package.

[0058] like Figure 3As shown, the files in the design package include object / API definition files, rule definition files, rule scripts, process information files, object scenario files, etc.

[0059] The change information includes the changed file, the change type, and the dependencies related to the changed file. The change type may include addition, modification, deletion, etc.

[0060] In a specific implementation, the objects selected by the user in the design package can be monitored in real time through a preset file monitoring mechanism. When any object changes, the relevant change information can be captured and recorded immediately, thereby obtaining the change information of the changed file. The object selected by the user can be one or more objects in the design package, or all objects.

[0061] In this step, the selected objects in the design package are monitored in real time through the change detection mechanism, which can accurately obtain the latest file information and provide reliable data support for subsequent layer merging and packaging. In addition, the precise change detection mechanism can ensure that only the changed files are processed each time packaging is performed, thereby improving the efficiency and accuracy of packaging.

[0062] Step S220: determining the target file to be adjusted according to the change information.

[0063] Specifically, after detecting the change information of the selected object in the design package, the target file to be involved in the stacking and merging can be determined according to the change information. The target file can be one or more. Specifically, the change file in the change information and the files associated with the change file can be determined as the target file.

[0064] Step S230 , taking the design package as the read-only layer and the target file as the writable layer, the design package and the target file are stacked and merged to obtain merged file information.

[0065] The read-only layer means that only read operations can be performed, and the writable layer means that editing operations can be performed, such as adding, deleting, modifying, etc.

[0066] In the specific implementation, when merging layers, Union FS technology can be used to treat the original design package as a read-only layer and the target file as a writable layer. Among them, Union FS (Union File System) allows read-only and read-write directories to coexist, that is, content can be deleted and added at the same time.

[0067] Specifically, first load the file system corresponding to the original design package as the base layer (i.e., read-only layer), and then load the target file as the overlay layer (i.e., writable layer). If there are multiple target files, load each target file in turn. This cascading processing method ensures that the changed target file can overwrite the corresponding part of the file system of the original design package, thereby generating the latest and accurate file view.

[0068] Step S240, packaging the merged file information to obtain a packaged design package.

[0069] The merged file information includes the file path, file content and dependencies between files.

[0070] Specifically, after obtaining the merged file information, these files can be further processed and organized to ensure that all files are packaged according to a predetermined structure and format to generate a final design package output file.

[0071] In one implementation, when the merged file information is packaged, a detailed packaging log and report may be generated to record key steps and information in the packaging process, thereby providing a guarantee for subsequent data traceability.

[0072] In the above-mentioned file packaging method, by detecting the change information of the selected object in the design package, the target file that needs to be adjusted is determined according to the change information. When merging, the design package is used as the read-only layer and the target file is used as the writable layer. The design package and the target file are stacked and merged to obtain the merged file information; the merged file information is packaged to obtain the packaged design package. This method only processes the files that have changed each time it is packaged, thereby improving the efficiency and accuracy of packaging; further, the target file that needs to be adjusted is determined according to the change information, and the design package and the target file that needs to be adjusted are merged in a stacked merge manner, which can ensure the integrity and consistency of the generated merged file information. In addition, the stacked merge reduces the frequent IO operation requirements for the database during the processing process. Compared with the traditional multi-threaded packaging method, it reduces the burden and delay of the database and improves the overall performance and response speed of the system.

[0073] In an exemplary embodiment, in the above step S220, determining the target file to be adjusted according to the change information includes: determining the associated files of the changed file according to the changed file in the change information and the dependency relationship related to the changed file; and determining the changed file and the associated files of the changed file as the target files.

[0074] Specifically, it can be understood that when a change file is changed, the files associated with it will be affected and changed. Therefore, the target files to be cascaded and merged include the change file in the change information and the files associated with the change file. Among them, the files associated with the change file can be determined based on the change file and the dependency relationship related to the change file. These files may be files directly referenced by the change file, files that depend on certain components or data in the change file, and other files that may be affected by the change of the change file.

[0075] In this embodiment, the target files determined to participate in the subsequent cascading merge include not only the changed files, but also all related files that have dependencies on the changed files, to ensure that the file structure generated after the subsequent merge is complete and consistent, providing a reliable basis for the final packaging processing.

[0076] In an exemplary embodiment, the above-mentioned step S230 uses the design package as a read-only layer and the target file as a writable layer, and performs a stacking and merging process on the design package and the target file to obtain merged file information, including: using the design package as the base layer, and sequentially loading each target file as a covering layer in accordance with a preset file order, so as to perform a stacking and merging process with the design package to obtain merged file information.

[0077] Specifically, the original design package is loaded as a read-only base layer so that its content cannot be directly modified. Then, each target file is loaded in turn as an overlay layer. When each target file is loaded, the content of the file will overwrite the corresponding part in the base layer. Each time a target file is loaded, if there is a file in the target file with the same path as the base layer, the corresponding file in the base layer will be replaced with the content of the target file. In other words, the update or modification of the target file will have the highest priority and directly affect the final file view.

[0078] During the merge process, target files are loaded in order, and each new target file is applied based on the current file view (the file generated from the base layer and the previously loaded target files). In this way, the final generated file view is the combined result of all target files and the base layer. The order in which each target file is loaded can be determined based on the creation time / modification time of each file, the dependencies between each target file (for example, a file modification needs to be performed after another file modification), etc. You can also Figure 3 The target files are loaded in the order shown in the directories.

[0079] In this embodiment, by overlaying the target file to be adjusted as a writable layer on the read-only original design package, the integrity and consistency of file operations are ensured, and the risk of errors and data loss during the file merging process is reduced.

[0080] In an exemplary embodiment, the above-mentioned step S230 uses the design package as the read-only layer and the target file as the writable layer, and performs a layered merge process on the design package and the target file to obtain merged file information, including: when there are multiple target files and conflicts exist, identifying the conflicting files; performing conflict adjustment process on the conflicting files to obtain adjusted files; using the design package as the read-only layer and the adjusted file as the writable layer, and performing a layered merge process on the design package and the adjusted file to obtain merged file information.

[0081] It is understandable that if two change files modify the same file, the later loaded change file will overwrite the previous change. In this case, measures need to be taken to deal with the conflict. Specifically, the conflicting files can be identified first, and then the conflict can be resolved. For example, the latest version of the file can be retained, or the conflicting files can be merged, etc. The processed files and the files that do not have conflicts are used as adjusted files to participate in the subsequent merge process. That is, the design package is the read-only layer, and the adjusted file is the writable layer. The design package and the adjusted file are stacked and merged to obtain the merged file information.

[0082] In this embodiment, when merging the design package and the target file, the file layers are not simply superimposed, but the file conflicts are also considered. When there are conflicts between multiple target files, the conflicts are resolved according to the preset rules to ensure that there is no conflict in the final generated file structure. This method utilizes the characteristics of the file system and avoids resource competition and efficiency reduction that may be caused by multiple threads modifying the same file at the same time. In this way, system resources can be used more effectively, the overall packaging efficiency can be improved, and the burden on the system during the packaging process can be reduced.

[0083] In an exemplary embodiment, the above step S230 uses the design package as the read-only layer and the target file as the writable layer, performs a layered merge process on the design package and the target file, and after obtaining the merged file information, further includes: based on the change information, performing a consistency check on the merged file information; if the check result shows that there is an inconsistency, generating a prompt message.

[0084] Specifically, after each file is changed, there will be an update time or version number. Therefore, after the layered merge of files is completed, the update time or version number of the target file can be used to check the consistency of the merged file information. Compare the update time of the target file with the update time of the target file in the merged file information. If the two are consistent, it indicates that the content of the merged file information is the latest; or, compare the version number of the target file with the version number of the target file in the merged file information. If the two are consistent, it indicates that the version of the merged file information is the latest. If the test result is that the update time of the target file is inconsistent with the update time of the target file in the merged file information, or the version number of the target file is inconsistent with the version number of the target file in the merged file information, a prompt message can be generated to prompt the operator to handle it.

[0085] In this embodiment, when merging the design package and the target file, in addition to file conflicts, the consistency of the files is also considered, and the consistency of the files is checked to ensure that the versions and contents of all files are the latest, avoiding file mismatches or version errors.

[0086] In an exemplary embodiment, the above-mentioned step S240 packages the merged file information to obtain a packaged design package, including: adjusting the file content in the merged file information to obtain the processed file content; the adjustment processing includes at least one of compression processing and deduplication processing; packaging the file path, processed file content and the dependency relationship between files to obtain a packaged design package.

[0087] Specifically, the merged file information obtained after merging the design package and the target file includes the file path, file content and dependencies between files. After obtaining the merged file information, it can be further optimized, and the optimization method may include compression and deduplication of the file content in the merged file information.

[0088] Specifically, the compression process of the file content can be: compressing the file content in the merged file information by using a compression algorithm. Before the compression process, all the file contents can be merged into a large file to further improve the compression rate. The deduplication process of the file content can be: checking the file content of the merged file information, identifying the duplicate content therein and deleting it. For example, a hash algorithm, a text comparison algorithm, etc. can be used to quickly identify duplicate data.

[0089] After compression and deduplication adjustment, the optimal processed file content can be obtained, and the processed file content can be used to replace the original file content. The file path, processed file content and the dependency relationship between files are packaged to obtain a packaged design package.

[0090] Furthermore, after the design package is packaged, the integrity of the packaged design package can be checked, including whether each information file exists and whether the required information in each information file is filled in. For example, a file verification method (such as MD5 (Message-Digest Algorithm 5) and SHA-256 (SecureHash Algorithm 256)) can be used to confirm that the data is not damaged during the packaging process. This ensures that the packaged file is complete and correct, avoiding file damage or data loss.

[0091] In this embodiment, during the packaging process, the files are compressed. By using an efficient compression algorithm, the file size can be minimized, thereby reducing the size of the design package and improving the efficiency of transmission and downloading. At the same time, the files are deduplicated and redundant data is removed to ensure that the packaged file set is concise and efficient.

[0092] refer to Figure 4 , is a specific flow chart of a file packaging method provided by another embodiment. In this embodiment, the method includes the following steps:

[0093] Step S410, detecting the change information of the selected object in the design package; the change information includes the change file, the change type and the dependency relationship related to the change file;

[0094] Step S420, determining the associated files of the changed files according to the changed files in the changed information and the dependencies related to the changed files;

[0095] Step S430, determining the changed file and the files associated with the changed file as target files to be adjusted; the target file includes at least one file;

[0096] Step S440, when there are multiple target files and there are conflicts, identifying the conflicting files, and performing conflict adjustment processing on the conflicting files to obtain adjusted files;

[0097] Step S450, taking the design package as a read-only layer and the adjusted file as a writable layer, performing layer-by-layer merging processing on the design package and the adjusted file to obtain merged file information; the merged file information includes file path, file content and dependencies between files;

[0098] Step S460, performing consistency check on the target file and the merged file information; if the check result shows that there is inconsistency, generating prompt information;

[0099] Step S470, compressing and / or deduplicating the file content in the merged file information to obtain processed file content;

[0100] Step S480, packaging the file path, processed file content and dependencies between files to obtain a packaged design package.

[0101] This method only processes the changed files each time it is packaged, thereby improving the efficiency and accuracy of packaging; further, the target files that need to be adjusted are determined through the change information, and the design package and the target files that need to be adjusted are merged in a cascading merge manner, which can ensure the integrity and consistency of the generated merged file information. In addition, the cascading merge reduces the frequent IO operation requirements for the database during the processing process. Compared with the traditional multi-threaded packaging method, it reduces the burden and delay of the database and improves the overall performance and response speed of the system.

[0102] In one embodiment, in order to facilitate those skilled in the art to understand the embodiment of the present application, the scheme will be further described in detail below. The file packaging system for implementing the file packaging method can be divided into three modules, a change identification module, a layer merging module, and a packaging processing module, wherein:

[0103] The change recognition module is a key component of the design package rapid packaging system. Its main function is to identify and mark the changes of selected objects in the design package. This module ensures that only the changed parts are processed each time the package is packaged through an accurate change detection mechanism, thereby improving the efficiency and accuracy of packaging. First, the change recognition module monitors the selected objects in the design package in real time through a file monitoring mechanism. Whenever a file changes, the module will immediately capture and record the change information to ensure that the change information can be accurately passed to the subsequent processing stage. Another important function of the change recognition module is the seamless integration with the stacking and merging module. When the change recognition module detects a change, it will pass the change information to the stacking and merging module in a structured form. The information passed includes the change type (such as addition, modification, deletion) and the dependencies related to the changed file. This ensures that the stacking and merging module can accurately obtain the latest file information and perform corresponding stacking processing. In summary, the change recognition module accurately identifies and processes file changes through accurate change detection, providing reliable data support for subsequent stacking, merging and packaging processing.

[0104] The stacking merge module is the core component of the design package rapid packaging system. Its main function is to stack and merge all files related to the changed objects or APIs to generate a unified file structure so that it can be passed to the design package packaging module for final packaging processing. First, the stacking merge module receives the change information from the change identification module, and then determines the file set (i.e., target file) that needs to participate in the stacking merge based on this information. This set includes not only the changed files, but also all related files that have dependencies on the changed files, thereby ensuring that the generated file structure is complete and consistent. When performing stacking merge, the module will use Union FS technology to treat the design package detected by the change identification module as a read-only layer and the changed file set as a writable layer. Specifically, the module first loads the original design package file as the base layer (i.e., the read-only layer), and then loads the changed files in sequence as the overlay layer (i.e., the writable layer). This stacking processing method ensures that the changed files can cover the corresponding parts in the original file system, thereby generating the latest file view. The stacking merge module is not just a simple stacking of file layers, but also needs to deal with file conflicts and consistency issues. For example, when there are conflicts between multiple changed files, the module will resolve the conflicts according to the preset rules to ensure that there are no conflicts in the final generated file structure. At the same time, the module will also check the consistency of the files to ensure that the versions and contents of all files are the latest to avoid file mismatches or version errors. Finally, the cascade merge module will pass the merged file structure to the design package packaging module, which ensures that the design package packaging module can accurately obtain the latest file information and perform efficient packaging processing. In summary, the cascade merge module ensures that a complete and consistent file structure can be generated by utilizing Union FS technology and handling file conflicts and consistency, providing a reliable foundation for the final packaging process.

[0105] The packaging processing module is the final processing component of the design package rapid packaging system. Its main function is to package the file structure generated by the stacking merging module to generate the final design package output file. First, the packaging processing module receives the merged file information from the stacking merging module. This information includes file path, file content, and dependencies. The module will further process and organize these files to ensure that all files are packaged according to the predetermined structure and format. During the packaging process, the module will compress and optimize the files. By using an efficient compression algorithm, the module can minimize the size of the file, thereby reducing the size of the design package and improving the efficiency of transmission and downloading. At the same time, the module will also deduplicate and optimize the files, remove redundant data, and ensure that the packaged file set is concise and efficient. After the packaging is completed, the module will verify and verify the generated design package to ensure that the packaged file is complete and correct, avoiding file damage or data loss. At the same time, the module will also generate detailed packaging logs and reports to record the key steps and information in the packaging process to provide guarantees for subsequent data traceability.

[0106] This method has the following beneficial effects:

[0107] 1. Resolve file conflicts and ensure consistency: Layered merge packaging uses Union FS technology to merge changed files with the original file system, avoiding file conflicts that may occur in traditional multi-threaded packaging. By overlaying the changed files as a writable layer on the read-only original file system, the atomicity and consistency of file operations are ensured, reducing the risk of errors and data loss during the file merging process.

[0108] 2. Improved resource utilization efficiency: Compared with the parallel processing method in multi-threaded packaging, the cascade merging packaging utilizes the characteristics of the file system during the merging process, avoiding the race conditions and resource contention that may be caused by multiple threads modifying the same file at the same time. This can more effectively utilize system resources, improve overall packaging efficiency, and reduce the burden on the system during the packaging process.

[0109] 3. Reduce database IO operations: Cascading merging and packaging reduces the frequent IO operation requirements for the database during processing. Compared with the traditional multi-threaded packaging method, cascading merging technology reduces the read and write requirements for remote databases through system cascading merging, thereby reducing the burden and delay of the database and improving the overall performance and response speed of the system.

[0110] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0111] Based on the same inventive concept, the embodiment of the present application also provides a file packaging device for implementing the file packaging method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more file packaging device embodiments provided below can refer to the limitations on the file packaging method above, and will not be repeated here.

[0112] In one embodiment, Figure 5 As shown, a file packaging device is provided, comprising:

[0113] A detection module 510, used to detect change information of a selected object in a design package;

[0114] A determination module 520, configured to determine a target file to be adjusted according to the change information;

[0115] The merging module 530 is used to perform a layer-by-layer merging process on the design package and the target file, using the design package as a read-only layer and the target file as a writable layer, to obtain merged file information;

[0116] The packaging module 540 is used to package the merged file information to obtain a packaged design package.

[0117] In one of the embodiments, the change information includes the changed file, the change type and the dependency relationship related to the changed file; the determination module 520 is also used to determine the associated files of the changed file based on the changed file in the change information and the dependency relationship related to the changed file; and determine the changed file and the associated files of the changed file as the target files.

[0118] In one of the embodiments, there are multiple target files; the merging module 530 is also used to use the design package as the base layer, and load each target file as the covering layer in sequence according to the preset file order, so as to perform a layered merging process with the design package to obtain the merged file information.

[0119] In one of the embodiments, the merge module 530 is also used to identify the conflicting files when there are multiple target files and conflicts exist; perform conflict adjustment processing on the conflicting files to obtain adjusted files; use the design package as a read-only layer and the adjusted files as a writable layer, perform layered merging processing on the design package and the adjusted files to obtain merged file information.

[0120] In one of the embodiments, the device further comprises a verification module for performing a consistency check between the target file and the merged file information; if the verification result shows that there is inconsistency, a prompt message is generated.

[0121] In one of the embodiments, the merged file information includes the file path, file content and dependencies between files; the packaging module 540 is also used to adjust the file content in the merged file information to obtain the processed file content; the adjustment processing includes at least one of compression processing and deduplication processing; the file path, processed file content and dependencies between files are packaged to obtain a packaged design package.

[0122] Each module in the above-mentioned file packaging device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module.

[0123] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 6 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a file packaging method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.

[0124] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0125] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.

[0126] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0127] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0128] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0129] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0130] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0131] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A file packaging method, characterized in that: The method comprises: Detect change information of selected objects in the design package; Determine the target file to be adjusted according to the change information; Taking the design package as a read-only layer and the target file as a writable layer, performing a layer-by-layer merging process on the design package and the target file to obtain merged file information; The merged file information is packaged to obtain a packaged design package.

2. The method according to claim 1, characterized in that The change information includes the changed file, the change type and the dependency relationship related to the changed file; Determining the target file to be adjusted according to the change information includes: Determine, according to the changed file in the changed information and the dependency relationship related to the changed file, the associated file of the changed file; The changed file and the associated files of the changed file are determined as the target files.

3. The method according to claim 1, characterized in that There are multiple target files; the design package is used as a read-only layer, the target file is used as a writable layer, and the design package and the target file are stacked and merged to obtain the merged file information, including: The design package is used as a base layer, and each target file is loaded in sequence as a cover layer according to a preset file sequence, so as to perform a layer-by-layer merging process with the design package to obtain merged file information.

4. The method according to claim 1, characterized in that: The method uses the design package as a read-only layer and the target file as a writable layer, and performs a layer-by-layer merging process on the design package and the target file to obtain merged file information, including: If there are multiple target files and there are conflicts, identifying the conflicting files; Performing conflict adjustment processing on the conflicting file to obtain an adjusted file; The design package is used as a read-only layer, and the adjusted file is used as a writable layer. The design package and the adjusted file are subjected to a layer-by-layer merging process to obtain merged file information.

5. The method according to any one of claims 1 to 4, characterized in that: The design package is used as a read-only layer, the target file is used as a writable layer, and the design package and the target file are stacked and merged to obtain the merged file information, and further includes: Performing consistency check on the target file and the merged file information; If the inspection result shows inconsistency, a prompt message is generated.

6. The method according to claim 1, characterized in that The merged file information includes file path, file content and dependencies between files; The step of packaging the merged file information to obtain a packaged design package includes: Performing adjustment processing on the file content in the merged file information to obtain processed file content; the adjustment processing includes at least one of compression processing and deduplication processing; The file path, the processed file content and the dependency relationship between the files are packaged to obtain a packaged design package.

7. A file packaging device, characterized in that: The device comprises: A detection module, used for detecting change information of selected objects in the design package; A determination module, used to determine a target file to be adjusted according to the change information; A merging module, used to use the design package as a read-only layer and the target file as a writable layer, and to perform a layer-by-layer merging process on the design package and the target file to obtain merged file information; The packaging module is used to package the merged file information to obtain a packaged design package.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the file packaging method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the file packaging method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the file packaging method described in any one of claims 1 to 6 are implemented.