Service pack extraction and application method and device, equipment, storage medium and product

By obtaining and displaying the repository to be extracted, generating patch files and manifest files, and packaging them into patch packages, it solves the cumbersome problems of patch extraction and application of multiple repository, and improves efficiency.

CN118916414APending Publication Date: 2024-11-08HUNAN KAIHONG ZHIGU DIGITAL IND DEV CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411065949.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-05
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

The existing technology cannot complete patch extraction and application of multiple version warehouses in one click, resulting in cumbersome and inefficient processes.

Method used

By obtaining and displaying all version repositories to be extracted, obtaining version submission records, generating patch files and manifest files, and packaging them into patch packages, the patch extraction and application of all version repositories can be achieved in one click.

Benefits of technology

It reduces the cumbersome process of applying batch patch files, improves the application efficiency of patch files, and achieves efficient and accurate patch processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118916414A_ABST
    Figure CN118916414A_ABST
Patent Text Reader

Abstract

The invention discloses service pack extraction and application methods and devices, equipment, a storage medium and a product, and relates to the technical field of computers. The service pack extraction method comprises the steps of obtaining and displaying all version warehouses to be extracted, and obtaining version submission records selected in the version warehouses to be extracted; respectively generating patch files in the selected version warehouse to be extracted according to the version submission records; generating a patch list file according to the patch file information of each patch file and the first version warehouse information of the corresponding to-be-extracted version warehouse; and generating a service pack according to each patch file and the patch list file. The patch list file is adopted to record all the selected patch files and the relevant information of the corresponding version warehouse, and the patch files and the patch list file are packaged into the patch pack, so that patch extraction of all version warehouses can be completed by one key, the complexity of the batch patch file extraction process is reduced, and the patch file extraction efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a patch package extraction and application method, device, equipment, storage medium and product. Background Art

[0002] Patch technology refers to the technology that when an application client updates an application, it does not need to re-download and install the client, but only needs to update the required program code and program resources on the local machine. The version repository is a repository for managing code files, and patches can be extracted and applied based on the version repository.

[0003] When extracting or applying patches, current technologies mainly operate on a single version repository. If you need to extract and apply patches to multiple version repositories, you need to perform corresponding operations on each code file in each version repository. It is impossible to complete the extraction and application of patches with one click, which makes the patch extraction and application process cumbersome and inefficient. Summary of the invention

[0004] The present invention provides a patch package extraction and application method, device, equipment, storage medium and product to solve the problem that the prior art cannot achieve one-click completion of patch extraction and patch application, and to achieve efficient and accurate patch processing.

[0005] In a first aspect, an embodiment of the present invention provides a patch package extraction method, comprising:

[0006] Obtain and display all the repository of versions to be extracted, and obtain the submission records of the versions selected under each repository of versions to be extracted;

[0007] Generate patch files respectively according to the submission records of each version in the selected version repository to be extracted;

[0008] Generate a patch list file according to the patch file information of each patch file and the first version warehouse information of the corresponding version warehouse to be extracted;

[0009] A patch package is generated according to each of the patch files and the patch list file.

[0010] Further, the patch file information includes the submission record number and patch file name of the patch file; the first version warehouse information includes the relative path and version warehouse name of the version warehouse to be extracted; accordingly, the step of generating a patch manifest file according to the patch file information of each patch file and the first version warehouse information of the corresponding version warehouse to be extracted includes:

[0011] Obtain the current path and root directory path of the to-be-extracted version warehouse corresponding to each patch file, and determine the relative path of the to-be-extracted version warehouse according to the current path and the root directory path;

[0012] Obtain the patch file name and submission record number of each patch file, and the version repository name corresponding to the version repository to be extracted;

[0013] The patch file name and submission record number of each patch file, as well as the relative path and version repository name of the corresponding version repository to be extracted are stored in a patch list file in a one-to-one correspondence.

[0014] Furthermore, the step of obtaining and displaying all the repository versions to be extracted includes:

[0015] Get the first root directory of any repository to be extracted;

[0016] All the to-be-extracted version repositories under the first root directory are obtained, and visualization operations are performed on each of the to-be-extracted version repositories.

[0017] Furthermore, the step of obtaining the version submission record selected under each of the to-be-extracted version repositories includes:

[0018] Get multiple version submission records selected under multiple version repositories to be extracted, or get multiple version submission records selected under the same version repository to be extracted.

[0019] In a second aspect, an embodiment of the present invention provides a patch package application method, including:

[0020] Obtaining the second version warehouse information of all to-be-applied version warehouses and the patch package generated by the patch package generation method; the patch package includes a patch list file and a patch file;

[0021] Copy the patch file in the patch list file that matches the second version warehouse information to the directory where the corresponding to-be-applied version warehouse is located;

[0022] Apply the patch file in the directory where the to-be-applied version warehouse is located, and delete the patch file.

[0023] Furthermore, the step of obtaining the second version warehouse information of all the version warehouses to be applied includes:

[0024] Get the second root directory of any repository of the version to be applied;

[0025] The second version warehouse information of all to-be-applied version warehouses under the second root directory is obtained.

[0026] Furthermore, the method further comprises:

[0027] When an abnormal situation occurs in the application of the patch file, the abnormal information is saved in a log file.

[0028] In a third aspect, an embodiment of the present invention provides an electronic device, the electronic device comprising:

[0029] at least one processor; and

[0030] a memory communicatively connected to the at least one processor; wherein,

[0031] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the patch package generation method or the patch package application method described in any embodiment of the present invention.

[0032] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the patch package generation method or the patch package application method described in any embodiment of the present invention when executed.

[0033] In a fifth aspect, an embodiment of the present invention provides a computer program product including a computer program, and when the computer program is executed by a processor, the computer program implements the XX method described in any embodiment of the present invention.

[0034] The technical solution of the embodiment of the present invention obtains and displays all the version warehouses to be extracted, and obtains the version submission records selected under each version warehouse to be extracted; generates patch files according to each version submission record under the selected version warehouse to be extracted; generates a patch list file according to the patch file information of each patch file and the first version warehouse information of the corresponding version warehouse to be extracted; generates a patch package according to each patch file and the patch list file. The patch list file is used to record the relevant information of all selected patch files and the corresponding version warehouse, and the patch files and the patch list file are packaged into a patch package, which can realize the one-click completion of patch extraction of all version warehouses, without the need to perform repetitive patch operations on each version warehouse, and solves the problem that when extracting and applying patches to multiple version warehouses, it is necessary to perform corresponding operations on each code file under each version warehouse, and the extraction and application of patches cannot be completed with one click, resulting in the problem that the patch extraction and application process is cumbersome and inefficient, reducing the cumbersomeness of the batch patch file application process and improving the application efficiency of patch files.

[0035] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0037] Figure 1 A flowchart of a patch package generation method provided in Embodiment 1 of the present invention;

[0038] Figure 2 A flowchart of a patch package generation method provided in Embodiment 2 of the present invention;

[0039] Figure 3 A flowchart of a patch package application method provided in Embodiment 3 of the present invention;

[0040] Figure 4 A schematic diagram of the structure of a patch package generation device provided in Embodiment 5 of the present invention;

[0041] Figure 5 A schematic diagram of the structure of a patch package generation device provided in Embodiment 5 of the present invention;

[0042] Figure 6 It is a structural schematic diagram of an electronic device for implementing the patch package generation method or the patch package application method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0043] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0044] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0045] Embodiment 1

[0046] Figure 1 This is a flowchart of a patch package extraction method provided in the first embodiment of the present invention. This embodiment is applicable to the case of extracting patch packages from a version library. The method can be executed by a patch package extraction device. The patch package extraction device can be implemented in the form of hardware and / or software. The patch package extraction device can be configured in an electronic device. Figure 1 As shown, the method includes:

[0047] S110, obtaining and displaying all the to-be-extracted version repositories, and obtaining the version submission records selected under each to-be-extracted version repositories.

[0048] Among them, the version warehouse to be extracted can be understood as a version warehouse that can be used to extract code files and generate patch files. The version warehouse refers to a warehouse that manages code files, which can be simply understood as managing all code files in a directory. The modification and deletion of each code file will generate a corresponding operation record, which is the version submission record. The version submission record may include the submitted hash value (commit hash), author, submission date and submission information, etc. Specifically, the patch package extraction device obtains all the version warehouses to be extracted in the directory where it is located, and displays all the version warehouses to be extracted, so that the user can select one or more version warehouses to be extracted from the displayed version warehouses to be extracted, and select one or more version submission records that need to generate patch files under the selected version warehouses to be extracted. After the user completes the selection operation, the patch package extraction device obtains the version submission record selected by the user under each version warehouse to be extracted.

[0049] In an optional embodiment, the step of obtaining the version submission record selected under each version repository to be extracted includes: obtaining multiple version submission records selected under multiple version repositories to be extracted, or obtaining multiple version submission records selected under the same version repository to be extracted.

[0050] The main application scenario of the embodiment of the present invention is to extract multiple patch files from multiple different version repositories to be extracted or from the same version repositories to be extracted, so the number of version repositories to be extracted can be one or more. The specific method of extracting patch files can be: for multiple different version repositories to be extracted, one or more patch files are extracted from each version repositories to be extracted; or multiple patch files are batch extracted from the same version repositories to be extracted.

[0051] S120 , generating patch files respectively according to the submission records of each version in the selected version repository to be extracted.

[0052] Among them, the patch file is a file formed by packaging the supplementary program segments used to fix the vulnerability.

[0053] Specifically, under each to-be-extracted version repository selected by the user, a patch file is generated according to each version submission record selected by the user.

[0054] S130: Generate a patch manifest file according to the patch file information of the patch file and the first version repository information corresponding to the version repository to be extracted.

[0055] Among them, patch file information can be understood as relevant information of the patch file, for example, it can include symbols with unique identification function such as the name and number of the patch file, and the path of the patch file; it can also include information such as the generation time of the patch file, the person who generated it, and the function description of the patch file. The first version warehouse information can be understood as relevant information of the version warehouse to be extracted, for example, it can include: symbols with unique identification function such as the name and number of the version warehouse to be extracted, and information such as the path of the version warehouse to be extracted. The patch manifest file can be understood as a manifest file used to record all patch files and relevant information of the version warehouse to be extracted corresponding to the patch files. The role of the patch manifest file is to facilitate the correct determination of the copy location of the patch file during the patch application process.

[0056] Specifically, the patch file information of the acquired patch file and the first version repository information of the corresponding version repository to be extracted are written into a pre-created manifest file to obtain a patch manifest file.

[0057] S140: Generate a patch package according to each patch file and the patch list file.

[0058] The patch package is a file package obtained by packaging the patch files.

[0059] Specifically, the patch list file and the patch files generated in each to-be-extracted version repository are packaged to generate a patch package.

[0060] The technical solution of the embodiment of the present invention obtains and displays all the version repositories to be extracted, and obtains the version submission records selected under each version repositories to be extracted; generates patch files according to each version submission record under the selected version repositories to be extracted; generates a patch list file according to the patch file information of each patch file and the first version repositories information of the corresponding version repositories to be extracted; generates a patch package according to each patch file and the patch list file. The patch list file is used to record the relevant information of all selected patch files and the corresponding version repositories, and the patch files and the patch list files are packaged into a patch package, so that the patch extraction of all version repositories can be completed with one click, without repetitive patch operations on each version repositories, reducing the tediousness of the batch patch file application process and improving the application efficiency of the patch files.

[0061] Embodiment 2

[0062] Figure 2 This is a flowchart of a patch file extraction method provided in the second embodiment of the present invention. This embodiment further describes in detail the generation process of the patch list file and the acquisition and display process of the version repository to be extracted based on the above embodiment. Figure 2 As shown, the method includes:

[0063] S210: Obtain the first root directory of any repository of the version to be extracted.

[0064] The first root directory can be understood as the root directory where the repository of the version to be extracted is located.

[0065] Specifically, in actual application, all the to-be-extracted version repositories are stored in the same root directory. Therefore, by obtaining the directory where any to-be-extracted version repositories are located and obtaining the first root directory, the first root directories of all to-be-extracted version repositories are obtained.

[0066] Exemplarily, the directory path may be obtained through the pwd command, and the first root directory of the version repository to be extracted may be obtained according to the directory path.

[0067] S220: Obtain all the to-be-extracted version repositories under the first root directory, and perform visualization operations on each to-be-extracted version repositories.

[0068] Specifically, all the to-be-extracted version repositories under the first root directory are scanned, and visualization operations are performed on all the to-be-extracted version repositories, and all the to-be-extracted version repositories are displayed to the user, so that the user can select the required to-be-extracted version repositories therefrom.

[0069] S230: Obtain the version submission record selected in each to-be-extracted version repository, and generate patch files according to each version submission record in the selected to-be-extracted version repository.

[0070] S240: Obtain the current path and the root directory path of the to-be-extracted version repository corresponding to each patch file, and determine the relative path of the to-be-extracted version repository according to the current path and the root directory path.

[0071] Specifically, the current path and root directory path of the version warehouse to be extracted corresponding to each patch file; and the relative path of the version warehouse to be extracted under the root directory is determined according to the current path and the root directory path.

[0072] S250: Obtain the patch file name and submission record number of each patch file, and the version repository name corresponding to the version repository to be extracted.

[0073] Among them, the patch file name refers to the name of the generated patch file. The version warehouse name refers to the name of the version to be extracted to which the selected patch file belongs. In this embodiment, the patch file name and the version warehouse name are names in a broad sense, and can be named with words, letters or special symbols, or numbers (ID), or other strings that can play a unique identification role. The patch file name and can be customized or edited by the user, or it can be automatically named when the patch file is generated. The submission record number is the number generated when the modification record is submitted in the version warehouse, which is used to identify the submission record.

[0074] Specifically, after the patch file is generated, the patch file name and the submission record number corresponding to the version submission record used to generate the patch file are obtained, and the version repository name of the version repository to be extracted to which the patch file belongs is obtained.

[0075] S260: Save the patch file name and submission record number of each patch file, and the relative path and version repository name of the corresponding version repository to be extracted in a patch list file in a one-to-one correspondence.

[0076] Specifically, for each patch file, the patch file name and submission record number of the patch file, and the relative path and version repository name of the to-be-extracted version repository to which the patch file belongs are stored in the patch manifest file in a one-to-one correspondence.

[0077] S270: Generate a patch package according to each patch file and the patch list file.

[0078] The technical solution of the embodiment of the present invention obtains the first root directory of any version warehouse to be extracted, obtains all version warehouses to be extracted under the first root directory, and performs visual operations on each version warehouse to be extracted; obtains the version submission record selected under each version warehouse to be extracted, and generates patch files according to each version submission record under the selected version warehouse to be extracted; obtains the current path and root directory path of the version warehouse to be extracted corresponding to each patch file, and determines the relative path of the version warehouse to be extracted according to the current path and the root directory path; obtains the patch file name and submission record number of each patch file, and the version warehouse name corresponding to the version warehouse to be extracted; saves the patch file name and submission record number of each patch file, and the relative path and version warehouse name of the corresponding version warehouse to be extracted in a patch list file in a one-to-one correspondence; generates a patch package according to each patch file and the patch list file. The patch list file is used to record the relevant information of all selected patch files and the corresponding version warehouse, and the patch file and the patch list file are packaged into a patch package, so that the patch extraction of all version warehouses can be completed with one click, without performing repetitive patch operations on each version warehouse, reducing the tediousness of the version warehouse extraction process and improving the extraction efficiency of the patch file.

[0079] Embodiment 3

[0080] Figure 3 This is a flowchart of a patch package application method provided in the third embodiment of the present invention. This embodiment is applicable to the case of applying a patch package in a version library. The method can be executed by a patch package application device. The patch package application device can be implemented in the form of hardware and / or software. The patch package application device can be configured in an electronic device. Figure 3 As shown, the method includes:

[0081] S310, obtaining the second version repository information of all to-be-applied version repositories and the patch package generated by the patch package generation method; the patch package includes a patch list file and a patch file.

[0082] The second version warehouse information can be understood as the relevant information of the version warehouse to be applied, for example, it can include: the name and number of the version warehouse to be applied, and other symbols with unique identification function, as well as the path of the version warehouse to be applied.

[0083] Specifically, the second version warehouse information corresponding to all the to-be-applied version warehouses is obtained, and the patch package generated by the patch package generation method provided by any of the above embodiments is obtained. The generated patch package includes multiple patch files and a patch manifest file corresponding to each patch file.

[0084] In an optional embodiment, the step of obtaining the second version warehouse information of all the version warehouses to be applied includes: obtaining the second root directory of any version warehouse to be applied; and obtaining the second version warehouse information of all the version warehouses to be applied under the second root directory.

[0085] The second root directory may be understood as the root directory where the repository of the version to be applied is located.

[0086] Specifically, in the actual application process, all the warehouses of the versions to be applied are stored in the same root directory, so by obtaining the directory where any warehouse of the versions to be applied is located and obtaining the second root directory, the second root directories of all warehouses of the versions to be applied are obtained. The second version warehouse information of all warehouses of the versions to be applied is obtained under the second root directory.

[0087] Exemplarily, the directory path may be obtained through the pwd command, and the second root directory of the repository of the version to be extracted may be obtained according to the directory path.

[0088] S320: Copy the patch files in the patch list file that match the second version warehouse information to the directory where the corresponding to-be-applied version warehouse is located.

[0089] Specifically, the second version warehouse information corresponding to all the to-be-applied version warehouses is compared with the to-be-applied version warehouse information in the patch list file. If they match, the patch file corresponding to the version warehouse information is copied to the directory of the matched to-be-applied version warehouse according to the path of the to-be-applied version warehouse recorded in the patch list file.

[0090] S330: Apply the patch file in the directory where the to-be-applied version repository is located, and delete the patch file.

[0091] Specifically, for each version warehouse to be applied, the patch files in the directory where the version warehouse to be applied is located are upgraded and applied. After the patch is completed, the patch files in the directory where the version warehouse to be applied is deleted to avoid the patch files occupying memory. Until the version warehouses recorded in the patch list file have completed the patch application, otherwise return to execute S320 to continue the patch application of the next version warehouse.

[0092] In an optional embodiment, the method further comprises:

[0093] When an abnormal situation occurs in the application of the patch file, the abnormal information is saved in a log file.

[0094] The exception information may include: the patch file that failed to be applied, the cause of the exception, the type of exception, etc.

[0095] Specifically, when applying the patch file, if an abnormal situation occurs, the abnormal information generated when applying the patch file is saved in the log file.

[0096] The technical solution of the embodiment of the present invention is to obtain the second version warehouse information of all version warehouses to be applied and a patch package generated by the patch package generation method; the patch package includes a patch list file and a patch file; the patch file matching the second version warehouse information in the patch list file is copied to the directory where the corresponding version warehouse to be applied is located; the patch file in the directory where the version warehouse to be applied is located is applied, and the patch file is deleted; the patch list file is used to complete the patch application of all version warehouses with one click, without repeating the patch operation on each version warehouse, reducing the tediousness of the batch patch file application process and improving the patch file application efficiency.

[0097] Embodiment 4

[0098] Figure 4 This is a schematic diagram of the structure of a patch package extraction device provided in Embodiment 5 of the present invention. Figure 4 As shown, the device includes: a submission record acquisition module 410, a patch file generation module 420, a patch list generation module 430 and a patch package generation module 440; wherein,

[0099] The submission record acquisition module 410 is used to acquire and display all the version repositories to be extracted, and acquire the version submission record selected under each of the version repositories to be extracted;

[0100] The patch file generation module 420 is used to generate patch files according to the submission records of each version in the selected version repository to be extracted;

[0101] A patch list generating module 430 is used to generate a patch list file according to the patch file information of each patch file and the first version repository information corresponding to the version repository to be extracted;

[0102] The patch package generation module 440 is used to generate a patch package according to the patch files and the patch list file.

[0103] The technical solution of the embodiment of the present invention obtains and displays all the version repositories to be extracted, and obtains the version submission records selected under each version repositories to be extracted; generates patch files according to each version submission record under the selected version repositories to be extracted; generates a patch list file according to the patch file information of each patch file and the first version repositories information of the corresponding version repositories to be extracted; generates a patch package according to each patch file and the patch list file. The patch list file is used to record the relevant information of all selected patch files and the corresponding version repositories, and the patch files and the patch list files are packaged into a patch package, so that the patch extraction of all version repositories can be completed with one click, without repetitive patch operations on each version repositories, reducing the tediousness of the batch patch file application process and improving the application efficiency of the patch files.

[0104] Optionally, the patch file information includes the submission record number and patch file name of the patch file; the first version warehouse information includes the relative path and version warehouse name of the version warehouse to be extracted;

[0105] The patch list generation module 430 is specifically used for:

[0106] Obtain the current path and root directory path of the to-be-extracted version warehouse corresponding to each patch file, and determine the relative path of the to-be-extracted version warehouse according to the current path and the root directory path;

[0107] Obtain the patch file name and submission record number of each patch file, and the version repository name corresponding to the version repository to be extracted;

[0108] The patch file name and submission record number of each patch file, as well as the relative path and version repository name of the corresponding version repository to be extracted are stored in a patch list file in a one-to-one correspondence.

[0109] Optionally, the submission record acquisition module 410 includes:

[0110] A root directory acquisition unit, used to acquire the first root directory of any repository of a version to be extracted;

[0111] The visualization unit is used to obtain all the to-be-extracted version repositories under the first root directory, and perform visualization operations on each of the to-be-extracted version repositories.

[0112] Optionally, the submission record acquisition module 410 includes:

[0113] The version record acquisition unit is used to acquire multiple version submission records selected from multiple version repositories to be extracted, or to acquire multiple version submission records selected from the same version repository to be extracted.

[0114] The patch package extraction device provided in the embodiment of the present invention can execute the patch package extraction method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0115] Embodiment 5

[0116] Figure 5 This is a schematic diagram of the structure of a patch package application device provided in Embodiment 5 of the present invention. Figure 5 As shown, the device includes: a patch package acquisition module 510, a patch copy module 520 and a patch application module 530; wherein,

[0117] The patch package acquisition module 510 is used to acquire the second version repository information of all to-be-applied version repositories and the patch package generated by the patch package generation method; the patch package includes a patch list file and a patch file;

[0118] The patch copy module 520 is used to copy the patch file in the patch list file that matches the second version warehouse information to the directory where the corresponding to-be-applied version warehouse is located;

[0119] The patch application module 530 is used to apply the patch files in the directory where the to-be-applied version repository is located, and delete the patch files.

[0120] The technical solution of the embodiment of the present invention is to obtain the second version warehouse information of all version warehouses to be applied and a patch package generated by the patch package generation method; the patch package includes a patch list file and a patch file; the patch file matching the second version warehouse information in the patch list file is copied to the directory where the corresponding version warehouse to be applied is located; the patch file in the directory where the version warehouse to be applied is located is applied, and the patch file is deleted; the patch list file is used to complete the patch application of all version warehouses with one click, without repeating the patch operation on each version warehouse, reducing the tediousness of the batch patch file application process and improving the patch file application efficiency.

[0121] Optionally, the patch package acquisition module 510 is specifically used to:

[0122] Get the second root directory of any repository of the version to be applied;

[0123] The second version warehouse information of all to-be-applied version warehouses under the second root directory is obtained.

[0124] Optionally, the device further comprises:

[0125] The log saving module is used to save the abnormal information into a log file when an abnormal situation occurs in the application of the patch file.

[0126] The patch package application device provided in the embodiment of the present invention can execute the patch package application method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0127] Embodiment 6

[0128] Figure 6 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0129] like Figure 6 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0130] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0131] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a patch package generation method or a patch package application method.

[0132] In some embodiments, the patch package generation method or the patch package application method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the patch package generation method or the patch package application method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the patch package generation method or the patch package application method in any other appropriate manner (e.g., by means of firmware).

[0133] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0134] In some embodiments, the patch package generation method or the patch package application method may be implemented as a computer program, which is invisibly included in a computer program product. When the computer program is executed by a processor, the patch package generation method or the patch package application method of the present invention is implemented. The computer program product can be understood as a software product that mainly implements its solution through a computer program. The computer program for implementing the method of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flowchart and / or block diagram are implemented. The computer program can be executed entirely on the machine, partially on the machine, as an independent software package, partially on the machine and partially on a remote machine, or completely on a remote machine or server.

[0135] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device, or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0136] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0137] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0138] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0139] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0140] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A patch package extraction method, characterized in that: include: Obtain and display all the repository of versions to be extracted, and obtain the submission records of the versions selected under each repository of versions to be extracted; Generate patch files respectively according to the submission records of each version in the selected version repository to be extracted; Generate a patch list file according to the patch file information of each patch file and the first version warehouse information of the corresponding version warehouse to be extracted; A patch package is generated according to each of the patch files and the patch list file.

2. The patch package extraction method according to claim 1, characterized in that: The patch file information includes the submission record number and patch file name of the patch file; the first version warehouse information includes the relative path and version warehouse name of the version warehouse to be extracted; accordingly, the step of generating a patch manifest file according to the patch file information of each patch file and the first version warehouse information of the corresponding version warehouse to be extracted includes: Obtain the current path and the root directory path of the to-be-extracted version warehouse corresponding to each patch file, and determine the relative path of the to-be-extracted version warehouse according to the current path and the root directory path; Obtain the patch file name and submission record number of each patch file, and the version repository name corresponding to the version repository to be extracted; The patch file name and submission record number of each patch file, as well as the relative path and version repository name of the corresponding version repository to be extracted are stored in a patch list file in a one-to-one correspondence.

3. The patch package extraction method according to claim 1, characterized in that: The steps of obtaining and displaying all the repository versions to be extracted include: Get the first root directory of any repository to be extracted; All the to-be-extracted version repositories under the first root directory are obtained, and visualization operations are performed on each of the to-be-extracted version repositories.

4. The patch package extraction method according to any one of claims 1 to 3, characterized in that: The step of obtaining the version submission record selected under each of the to-be-extracted version repositories includes: Get multiple version submission records selected under multiple version repositories to be extracted, or get multiple version submission records selected under the same version repository to be extracted.

5. A patch package application method, characterized in that: include: Obtain second version warehouse information of all to-be-applied version warehouses and the patch package generated by the patch package generation method according to any one of claims 1 to 4; The patch package includes a patch list file and a patch file; Copy the patch file in the patch list file that matches the second version warehouse information to the directory where the corresponding to-be-applied version warehouse is located; Apply the patch file in the directory where the to-be-applied version warehouse is located, and delete the patch file.

6. The patch package application method according to claim 5, characterized in that: The step of obtaining the second version warehouse information of all the version warehouses to be applied includes: Get the second root directory of any repository of the version to be applied; The second version warehouse information of all to-be-applied version warehouses under the second root directory is obtained.

7. The patch package application method according to claim 5, characterized in that: Also includes: When an abnormal situation occurs in the application of the patch file, the abnormal information is saved in a log file.

8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the patch package extraction method described in any one of claims 1-4 or the patch package application method described in any one of claims 5-7.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the patch package extraction method described in any one of claims 1 to 4 or the patch package application method described in any one of claims 5 to 7 when executed.

10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the computer program implements the patch package extraction method according to any one of claims 1 to 4 or the patch package application method according to any one of claims 5 to 7.