CN114168146A - Method, device and equipment for generating patch package - Google Patents
Method, device and equipment for generating patch package Download PDFInfo
- Publication number
- CN114168146A CN114168146A CN202111485933.0A CN202111485933A CN114168146A CN 114168146 A CN114168146 A CN 114168146A CN 202111485933 A CN202111485933 A CN 202111485933A CN 114168146 A CN114168146 A CN 114168146A
- Authority
- CN
- China
- Prior art keywords
- patch
- file
- target
- service
- parameter
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 53
- 230000006870 function Effects 0.000 claims abstract description 74
- 238000004590 computer program Methods 0.000 claims abstract description 23
- 238000012856 packing Methods 0.000 claims abstract description 17
- 238000012795 verification Methods 0.000 claims description 53
- 238000012545 processing Methods 0.000 claims description 10
- 230000008569 process Effects 0.000 claims description 6
- 238000012216 screening Methods 0.000 claims description 4
- 230000000694 effects Effects 0.000 abstract description 4
- 238000004519 manufacturing process Methods 0.000 description 10
- 238000010586 diagram Methods 0.000 description 4
- 230000006835 compression Effects 0.000 description 3
- 238000007906 compression Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 238000009434 installation Methods 0.000 description 3
- 230000008439 repair process Effects 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000004069 differentiation Effects 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000000737 periodic effect Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 238000012827 research and development Methods 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
- G06F8/44—Encoding
- G06F8/447—Target code generation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
- G06F8/658—Incremental updates; Differential updates
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Stored Programmes (AREA)
Abstract
The application discloses a method for generating a patch package, which comprises the following steps: performing patch parameter configuration according to the service order information; the service order information is used for representing at least part of service functions in a plurality of service functions of the ordered target service; acquiring a target patch file corresponding to at least part of service functions according to the configured patch parameters; generating a patch configuration file required by installing a target patch file according to the configured patch parameters; and packing the target patch file and the patch configuration file to obtain a target patch package. By applying the patch package generation method, the patch package can be generated according to the business order information, the personalized output of the patch package is realized, the generation efficiency of the patch package is improved, and the consumption of computing resources and labor cost is reduced. The application also discloses a patch package generation device, equipment, a computer readable storage medium and a computer program product, which all have the technical effects.
Description
Technical Field
The application relates to the technical field of software development, in particular to a method for generating a patch package; it also relates to a patch package generation apparatus, a device, a computer readable storage medium and a computer program product.
Background
Software vulnerabilities have become one of the leading causes of network and information security incidents and significant information disclosure incidents. Aiming at the damage caused by software bugs, installing corresponding patches is the most effective and economic precaution measure. At present, the scheme of generating a patch package in the software industry can be summarized as acquiring a file to be updated and an updated file, acquiring difference information between the file to be updated and the updated file, and generating a patch according to the difference information. However, in the existing scheme for generating the patch package, in the process of generating the patch package, one patch package may include contents of all orders or contents of all functional modules, which not only results in low generation efficiency of the patch package, but also easily consumes a large amount of computing resources and labor cost to generate the patch package.
Disclosure of Invention
The patch package generation method can generate the patch package according to the business order information, achieve personalized output of the patch package, improve generation efficiency of the patch package, and reduce consumption of computing resources and labor cost. It is another object of the present application to provide a patch package generation apparatus, a device, a computer readable storage medium, and a computer program product, all of which have the above technical effects.
In order to solve the above technical problem, the present application provides a method for generating a patch package, including:
performing patch parameter configuration according to the service order information; the service order information is used for representing at least part of service functions in a plurality of service functions of the ordered target service;
acquiring a target patch file corresponding to at least part of the service functions according to the configured patch parameters;
generating a patch configuration file required for installing the target patch file according to the configured patch parameters;
and packing the target patch file and the patch configuration file to obtain a target patch package.
In the above scheme, the method further comprises: performing parameter verification on the configured patch parameters; the obtaining of the target patch file corresponding to at least part of the service functions according to the configured patch parameters includes: and when the verification result of the parameter verification is that the verification is passed, acquiring a target patch file corresponding to at least part of the service functions according to the configured patch parameters.
In the foregoing solution, the performing parameter verification on the configured patch parameter includes: performing at least one of: according to the parameter format condition corresponding to any one parameter in the patch parameters, performing parameter format verification on the any one parameter; according to the parameter value condition corresponding to any one of the patch parameters, performing parameter value verification on the any one of the patch parameters; and according to the parameter type condition corresponding to the patch parameter, performing parameter type verification on the patch parameter.
In the above scheme, the method further comprises: generating a check identifier according to the target patch file, and writing the check identifier into the patch configuration file; the verification identifier is used for performing file verification on the target patch file when the target patch file is installed.
In the above solution, the performing patch parameter configuration according to the service order information includes: any one of the following processes is performed: displaying the service order information in a graphical user interface, and receiving patch parameter configuration operation aiming at the service order information in the graphical user interface to obtain configured patch parameters; and screening out patch parameters corresponding to at least part of the service functions ordered represented by the service order information from the patch parameters corresponding to the service functions respectively to serve as the configured patch parameters.
In the above scheme, the method further comprises: compressing the target patch package; and sending the compressed target patch package to a block chain network, so that the compressed target patch package is filled into a block by a node of the block chain network, and the block is added to the tail of a block chain.
In the foregoing solution, after obtaining the target patch file corresponding to at least part of the service functions according to the configured patch parameters, the method further includes: acquiring an original service file corresponding to the service order information; and carrying out differential processing on the original service file and the target patch file, and taking the differential file obtained by the differential processing as a new target patch file.
In the above scheme, the target service is a platform service integrating a plurality of applications, wherein different applications are used for providing different service functions; or, the target service is an application service based on a single application, and the application service is used for providing a plurality of service functions.
In order to solve the above technical problem, the present application further provides a patch package generating device, including:
the configuration module is used for carrying out patch parameter configuration according to the service order information; the service order information is used for representing at least part of service functions in a plurality of service functions of the ordered target service;
the obtaining module is used for obtaining a target patch file corresponding to at least part of the service functions according to the configured patch parameters;
the generating module is used for generating a patch configuration file required by installing the target patch file according to the configured patch parameters;
and the packing module is used for packing the target patch file and the patch configuration file to obtain a target patch package.
In order to solve the above technical problem, the present application further provides a patch package generating device, including:
a memory for storing a computer program;
and the processor is used for realizing the steps of the patch package generation method provided by the embodiment of the application when the computer program is executed.
In order to solve the above technical problem, the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the patch package generation method provided in the embodiments of the present application are implemented.
In order to solve the above technical problem, the present application further provides a computer program product, where the computer program product includes a computer program, and when the computer program is executed by a processor, the steps of the patch package generation method provided in the embodiments of the present application are implemented.
When a patch package is manufactured, patch parameter configuration is firstly performed according to business order information of a client, a target patch file (for example, a patch file corresponding to a business function purchased by the client) is further obtained according to the configured patch parameters, a patch configuration file required for installing the target patch file is generated according to the configured patch parameters, finally the target patch file and the patch configuration file are packaged to obtain a target patch file, and the output target patch file corresponds to the business order information, so that personalized output of the patch package is realized, the problem that standard patches cannot be issued in time to repair urgent bugs of the client when different products are developed simultaneously is solved, mass patch output can be realized, the working efficiency of patch manufacturing and the accuracy of the patches are improved, a large number of computing resources are saved, and the like, The cost of labor.
The patch package generation device, the equipment, the computer readable storage medium and the computer program product provided by the application have the technical effects.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the prior art and the embodiments are briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a schematic flowchart of a method for generating a patch package according to an embodiment of the present disclosure;
fig. 2 is a schematic diagram illustrating a patch manufacturing process according to an embodiment of the present application;
fig. 3 is a schematic view of a usage scenario of a method for generating a patch package according to an embodiment of the present application;
fig. 4 is a schematic diagram of a patch package generating apparatus according to an embodiment of the present application;
fig. 5 is a schematic diagram of a patch package generation apparatus according to an embodiment of the present application.
Detailed Description
The core of the application is to provide a method for generating a patch package, which can generate a patch package differentially according to service order information of a client (the service order information can include service functions ordered by the client), so as to realize personalized output of the patch package. At the other core of the present application, a patch package generating device, an apparatus, a computer readable storage medium and a computer program product are provided, which all have the above technical effects.
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, fig. 1 is a schematic flowchart of a method for generating a patch package according to an embodiment of the present application, and referring to fig. 1, the method mainly includes:
s101: performing patch parameter configuration according to the service order information; the service order information is used for representing at least part of a plurality of service functions of the ordered target service.
In the embodiment of the present application, a service may generally refer to a software service for providing a software function (service function), wherein the type of the service function is not limited, and includes, for example, but is not limited to, a chat function, a file transfer function, and an office function. After the service order information is obtained, patch parameter configuration can be performed according to the service order information, the configured patch parameters are used for generating a target patch package, and the target patch package is used for performing patch upgrade on at least part of service functions ordered by the service order information.
In some embodiments, the target service may be a platform service (e.g., a cloud platform) that integrates multiple applications, where different applications are used to provide different service functions, and a single application may provide one or more service functions (function modules in the application). For this case, for the customer who subscribes to the platform service, part or all of the applications in the platform service may be selectively subscribed, and for the subscribed applications, part or all of the service functions of the applications may be selectively subscribed, depending on the customer's needs.
In some embodiments, the target service may be a single application-based application service that is used to provide multiple service functions. For this case, the customer may selectively subscribe to some or all of the service functions of the application service.
In some embodiments, the patch parameter configuration according to the service order information includes: any one of the following processes is performed: displaying the service order information in the graphical user interface, and receiving patch parameter configuration operation aiming at the service order information in the graphical user interface to obtain configured patch parameters; and screening out patch parameters corresponding to at least part of service functions ordered represented by the service order information from the patch parameters corresponding to the service functions respectively to serve as the configured patch parameters.
For example, the service order information also carries a customer identification which marks the service function purchased by the customer. When making a patch package, firstly, corresponding patch parameter configuration is carried out on a graphical user interface according to the service order information. For example, the patch package may be a patch package for an application under a cloud product (e.g., a sub-application under a cloud platform), and for this case, a corresponding cloud identifier, an application identifier, and the like may be obtained according to the cloud product purchased by the customer and the application under the cloud product, which are displayed in the service order information, and then corresponding patch parameter configuration is performed on a graphical user interface of the patch making system, for example, a patch parameter configuration operation is received in the graphical user interface. Different from the traditional configuration of properties patch configuration files, the patch parameter configuration according to the service order information is dynamic configuration on a graphical user interface. Different customers purchase different service functions, and different patch parameter configurations are adaptively carried out on the graphical user interface. Therefore, the accuracy of the service parameter configuration can be ensured, and the pertinence to each service order information is improved.
In addition, in the embodiment of the present application, automatic patch parameter configuration may also be performed according to the service order information, for example, patch parameters corresponding to a plurality of service functions are configured in advance, and after the service order information is obtained, patch parameters corresponding to at least part of the service functions ordered represented by the service order information are screened out to be used as the configured patch parameters. Therefore, manual configuration operation can be reduced, and labor cost is further saved.
In some embodiments, the patch production system is synchronized with the order system information from which the patch production system can obtain business order information. The patch making system is used for making (generating) a patch package, the order system is used for managing service order information, and the patch making system and the order system can operate in the same equipment or different equipment respectively. The information synchronization between the patch making system and the order system can be real-time synchronization or periodic synchronization, and is determined according to the timeliness requirement in the actual application scene.
In an example embodiment, the configured patch parameters include at least one of cloud identification, application identification, patch number, and patch path.
For example, cloud identification is a unique code for a cloud product; the application identification is a unique code of the application under the cloud product. The patch number is the version number of the product iteration patch; the patch file path is the root directory of the program read and write files during patch production. The patch parameters configured by performing patch parameter configuration according to the service order information include at least one of a cloud identifier, an application identifier, a patch number, and a patch path, and may include the cloud identifier, the application identifier, the patch number, and the patch path at the same time, for example.
In the embodiment of the present application, the same service order information may support configuration of multiple application identifiers, for example, patch parameter configuration in a graphical user interface, and each application identifier may be separated by using a specific separator (e.g., comma). In addition, the graphical user interface may be implemented using Java Swing technology, but is not limited thereto.
S102: and acquiring a target patch file corresponding to at least part of the service functions according to the configured patch parameters.
And acquiring a target patch file corresponding to at least part of service functions represented and ordered by the service order information according to the configured patch parameters.
In some embodiments, on the basis of completing the patch parameter configuration, the target patch file is further obtained according to the configured patch parameters. The target patch file refers to a patch file corresponding to a service function purchased by a client, and does not include a patch file unrelated to the service function purchased by the client, for example, the service functions provided by the target service include A, B and C, and the service order information is used for representing that the client orders the service function a, so that the obtained target patch file only corresponds to the service function a and does not correspond to the service functions B and C. Therefore, the adaptation degree between the target patch file and the service order information is ensured, the pertinence and the accuracy of the target patch file are improved, and meanwhile, the size of the target patch file can be reduced as much as possible on the basis of meeting the requirements of the service order information.
In some embodiments, after obtaining the target patch file corresponding to at least part of the service function according to the configured patch parameter, the method further includes: acquiring an original service file corresponding to service order information; and carrying out differential processing on the original service file and the target patch file, and taking the differential file obtained by the differential processing as a new target patch file.
Here, an original service file corresponding to the service order information may be obtained, where the original service file is a local file of the client device, and the local file is used for operating a service function ordered by the client device. And then, carrying out differential processing on the original service file and the target patch file to obtain a differential file, wherein the differential file represents the newly added or changed content of the target patch file compared with the original service file, so that redundant content in the target patch file is removed in a differential processing mode. The differential file is used as a new target patch file, and then a target patch package is generated based on the new target patch file, so that the size of the target patch package can be effectively reduced, the transmission and the installation are convenient, and the consumption of related computing resources can be reduced.
S103: generating a patch configuration file required by installing a target patch file according to the configured patch parameters;
in some embodiments, on the basis of completing the patch parameter configuration, a patch configuration file required when the target patch file is installed is further generated according to the configured patch parameters, so as to ensure that the target patch file can be successfully installed.
In an exemplary embodiment, generating a patch configuration file required for installing the target patch file according to the configured patch parameters includes:
and generating an extensible markup language (XML) patch configuration file required by installing the target patch file according to the configured patch parameters.
For example, in this embodiment, the format of the patch configuration file required for installing the target patch file may be an eXtensible Markup Language (XML) format, that is, an XML patch configuration file required for installing the target patch file is generated according to the configured patch parameters.
The XML patch configuration file may include a custom tag pair, tag attributes, and a tree value, among others. The custom tag pair may include a product name identifier, an application identifier, version information, a resource unique identifier, a source path, an output path, a file type, and the like.
In addition, generating the XML patch configuration file may be implemented using Dom4j in java XML API technology.
It should be noted that, as for the sequence of executing step S102 and step S103, the present application is not limited to be unique, and step S102 may be executed first, and then step S103 may be executed, that is, the target patch file is obtained first, and then the patch configuration file required when the target patch file is installed is generated. Step S103 may be executed first, and then step S102 may be executed, that is, the patch configuration file required when the target patch file is installed is generated first, and then the target patch file is acquired. Of course, the steps S102 and S103 may be executed synchronously by running the two threads synchronously.
S104: and packing the target patch file and the patch configuration file to obtain a target patch package.
In some embodiments, after the target patch file is acquired and the patch configuration file required for installing the target patch file is generated, the target patch file and the patch configuration file are further packaged to obtain and output a target patch package only containing the patch file corresponding to the service function purchased by the customer.
The generated target patch package can be named through at least one of at least part of the patch parameters (such as cloud identification and application identification) and a timestamp, and the output version of historical production is reserved, and the main difference between the versions is the difference of the generated XML patch configuration file and the content of the patch file. The reserved target patch package can be multiplexed, for example, for a plurality of service order information ordering the same service function, the same target patch package can be multiplexed without repeatedly generating a plurality of target patch packages, so that the computing resources can be saved.
In some embodiments, after the patch parameter configuration is performed according to the service order information, the method further includes: performing parameter verification on the configured patch parameters; obtaining a target patch file corresponding to at least part of the service functions according to the configured patch parameters, wherein the method comprises the following steps: and when the verification result of the parameter verification is that the verification is passed, acquiring a target patch file corresponding to at least part of the service functions according to the configured patch parameters.
On the basis of completing the patch parameter configuration, in order to ensure the normal and effective execution of the subsequent steps, the configured patch parameters can be subjected to parameter verification, namely, whether the patch parameters are correct is verified. For example, the parameter checking method may include the following steps:
1) and according to the parameter format condition corresponding to any one of the patch parameters, performing parameter format verification on any one of the patch parameters. Here, at least part of the parameters in the patch parameters may be checked, and for each parameter requiring parameter format check, the parameter format check may be performed on the parameter according to a parameter format condition corresponding to the parameter. And when a certain parameter meets the corresponding parameter format condition, determining that the parameter passes the parameter format check. For example, it is determined whether the characters of the cloud identifier are correct, the format and characters of the configured version number are correct, whether the characters of the application identifier and separators between the application identifiers are correct, the format of the patch file path is correct, and the like.
2) And according to the parameter value condition corresponding to any one of the patch parameters, performing parameter value verification on any one of the parameters. Here, at least part of the parameters in the patch parameters may be checked, and for each parameter requiring parameter value checking, the parameter value checking may be performed on the parameter according to a parameter value condition corresponding to the parameter, where the parameter value condition may be a continuous value range, or a discrete value range formed by a single value or multiple values. And when a certain parameter meets the corresponding parameter value condition, determining that the parameter passes the parameter value verification. For example, the parameter value conditions corresponding to the patch number may be set according to the production condition of the patch file, and if three versions of patch files have been produced, which are 1.0 version, 2.0 version and 3.0 version, respectively, the parameter value conditions corresponding to the patch number may be set to include discrete values of 1.0, 2.0 and 3.0.
3) And according to the parameter type condition corresponding to the patch parameter, performing parameter type verification on the patch parameter. Here, the parameter type condition is used to constrain the type of the parameter included in the patch parameter, the parameter type check is an integrity check on the patch parameter, and when the patch parameter satisfies the parameter type condition, it is determined that the patch parameter passes the parameter type check. For example, the parameter category condition may be used to constrain that patch parameters must include cloud identification, application identification, patch number, patch path.
The above 3 modes may be optionally applied, or may be used in any combination, for example, the modes 1) and 2) may be combined, that is, only when the parameter requiring parameter format verification in the patch parameter passes parameter format verification and the parameter requiring parameter value verification in the patch parameter passes parameter value verification, the verification result of the parameter verification is determined to be verification-passed, where the parameter requiring parameter format verification and the parameter requiring parameter value verification may be the same or different.
And if the configured patch parameters are correct (namely, the verification is passed), further executing the subsequent steps of obtaining the target patch file according to the configured patch parameters, generating a patch configuration file required by installing the target patch file according to the configured patch parameters and the like. Conversely, if the configured patch parameters are not correct, the execution of the subsequent steps can be suspended, and the patch parameter configuration is directly resumed, or relevant prompt is performed so as to resume the patch parameter configuration.
That is, if step S102 is executed first and then step S103 is executed, before the target patch file is acquired according to the configured patch parameters, the configured patch parameters are checked first, and when the check is passed, steps S102, S103, and S104 are executed in sequence. If step S103 is executed first, and then step S102 is executed, before generating a patch configuration file required for installing the target patch file according to the configured patch parameters, the configured patch parameters are checked first, and when the check is passed, steps S103, S102, and S104 are executed in sequence.
In some embodiments, after generating the patch configuration file required for installing the target patch file according to the configured patch parameters, the method further includes:
generating a check identifier according to the target patch file, and writing the check identifier into a patch configuration file; the verification identifier is used for performing file verification on the target patch file when the target patch file is installed.
For example, in order to prevent the patch file from being tampered or incomplete when the patch file is subsequently installed (for example, the client device corresponding to the service order information installs the target patch file based on the target patch package), in this embodiment, after the target patch file is obtained, a verification identifier of the target patch file is further generated, and the verification identifier is written into a patch configuration file required when the target patch file is installed, for example, a custom tag pair of the patch configuration file may be written.
Therefore, before the subsequent client equipment installs the target patch file, the client equipment firstly acquires the target patch file in the target patch package, calculates the check identifier of the target patch file, and then compares the calculated check identifier with the check identifier written in the patch configuration file, if the check identifier is consistent with the check identifier written in the patch configuration file, the target patch file is complete and is not tampered, and the subsequent client equipment can be normally installed; conversely, if the two are not consistent, indicating that the target patch file has been damaged or tampered with, the installation may be stopped at this point to circumvent a possible security risk. Wherein the client device may include at least one of a terminal device and a server.
In an exemplary embodiment, generating the check identifier according to the target patch file includes:
and generating an MD5 value according to the target patch file.
For example, the MD5 value is used as the check identifier of the target patch file in this embodiment. After the corresponding target patch file is obtained by splicing the cloud identifier and the application identifier into a file name, performing Message Digest (MD) signature on the obtained target patch file to generate an MD5 value, and writing the MD5 value into a patch configuration file of the target patch file, so as to verify whether the target patch file is tampered and complete or not based on the MD5 value before the target patch file is installed subsequently.
The generation of the MD5 value may be accomplished using, but is not limited to, the digest algorithm in the DigetUtils in the Apache common codes project.
In some embodiments, packing the target patch file and the patch configuration file to obtain the target patch package further includes:
and compressing the target patch package.
For example, a designated code directory jar, a designated metadata directory dm and subdirectories thereof and a kdpkgks.
The Apache common compression technology can be used for file compression, but is not limited to this.
The compressed target patch package may be directly sent to the client device, or may be stored in a specific storage location, and the client device may obtain the compressed target patch package from the storage location, decompress the compressed target patch package, and install the compressed target patch package. Wherein the storage location may be a database, a distributed file system, or a blockchain, etc. For example, the compressed target patch package may be sent to a blockchain network, so that a node of the blockchain network fills the compressed target patch package into a block, and adds the filled block to the tail of the blockchain. The patch updating method has the advantages that the block chain has the characteristic of being not capable of being tampered, so that the accuracy of data in the block chain can be guaranteed, and the client device can send a patch request to the block chain network to obtain a compressed target patch package in the block chain, so that effective patch updating is conducted.
Referring to FIG. 2, in an exemplary embodiment, the generation of the patch package may be implemented based on the collaboration among the order system, the development task system, and the patch production system, as follows:
and inputting the code edited by the code management based on the research and development task system into the patch making system so that the patch making system runs the code to make the patch. The customer order (service order information) is input into the patch making system by the order system, for example, patch configuration is carried out based on the service order information, and at least one of cloud identification, application identification, version number and patch file path is input into the patch making system. The patch production system runs the code to produce a patch and outputs a personalized patch (corresponding to the target patch package above). In the process of making the patch by the patch making system, a patch file verification mechanism is added, namely, in the process of making the patch file, MD signature is carried out to generate an MD5 value. And before the target patch file is installed, the subsequent client device verifies whether the patch is tampered and complete according to the MD5 value.
Referring to fig. 3, an embodiment of the present application provides a usage scenario as shown in fig. 3, where the usage scenario includes a merchant terminal, a merchant server, and a client terminal (corresponding to the above client device), where a merchant is configured to provide a target service (e.g., cloud product service) to the client terminal through at least one of the merchant terminal and the merchant server.
In some embodiments, the patch package generation method provided by the embodiment of the present application may be implemented by a terminal device. For example, after acquiring the service order information of the customer, the merchant terminal configures patch parameters according to the service order information; acquiring a target patch file according to the configured patch parameters; generating a patch configuration file required by installing a target patch file according to the configured patch parameters; and packing the target patch file and the patch configuration file to obtain a target patch package. The merchant terminal may send the target patch package to the client terminal for installation by the client terminal. The merchant terminal can obtain the service order information from the client terminal, or merchant personnel can manually input the service order information into the merchant terminal, or the merchant server can obtain the service order information.
In some embodiments, the patch package generation method provided by the embodiment of the present application may be implemented by a server. For example, the merchant server configures patch parameters according to the service order information; acquiring a target patch file according to the configured patch parameters; generating a patch configuration file required by installing a target patch file according to the configured patch parameters; and packing the target patch file and the patch configuration file to obtain a target patch package, and sending the target patch package to the client terminal so as to install the client terminal. The business server can directly obtain the business order information from the client terminal, can also obtain the business order information from the business terminal, and can also manually input the business order information in the business server by business personnel.
In some embodiments, the server (such as the merchant server described above) related to the embodiments of the present application may be an independent physical server, may also be a server cluster or a distributed system formed by a plurality of physical servers, and may also be a cloud server that provides basic cloud computing services such as cloud service, a cloud database, cloud computing, a cloud function, cloud storage, Network service, cloud communication, middleware service, domain name service, security service, Content Delivery Network (CDN), and a big data and artificial intelligence platform. The terminal devices (such as the merchant terminal and the client terminal) may be, but are not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, and the like. The terminal device and the server may be directly or indirectly connected through wired or wireless communication, and the embodiment of the present application is not limited.
In summary, the method for generating a patch package provided by the present application includes: performing patch parameter configuration according to the service order information; acquiring a target patch file according to the configured patch parameters; generating a patch configuration file required by installing a target patch file according to the configured patch parameters; and packing the target patch file and the patch configuration file to obtain a target patch package. It can be seen that the method for generating a patch package provided by the present application, when making a patch package, first performs patch parameter configuration according to the service order information of a client, further obtains a target patch file according to the configured patch parameters, that is, obtains a patch file corresponding to an application or a function module purchased by the client, and generates a patch configuration file required for installing the target patch file according to the configured patch parameters, and finally packages the target patch file and the patch configuration file to obtain the target patch file, where the output target patch file only includes the patch file of the service function purchased by the client, thereby implementing personalized output of the patch package, solving the problem that different products cannot release standard patches in time to repair urgent bugs of the client when being developed simultaneously, and being capable of implementing mass patch output, improving the working efficiency of patch making and the accuracy of patches, and a large amount of computing resources and labor cost are saved. By taking enterprise-level software for a huge enterprise client group as an example, the embodiment of the application supports different personalized requirements in the enterprise client group, different patches are output by using personalized configuration, and different clients can quickly and accurately upgrade the used enterprise-level software according to the received target patch package, so that the differentiation requirements are met, and the product quality is guaranteed.
The application also provides a patch package generating device, and the device described below can be referred to with the method described above correspondingly. Referring to fig. 4, fig. 4 is a schematic diagram of a patch package generating apparatus according to an embodiment of the present application, and referring to fig. 4, the apparatus includes:
the configuration module 10 is used for performing patch parameter configuration according to the service order information; the service order information is used for representing at least part of service functions in a plurality of service functions of the ordered target service;
an obtaining module 20, configured to obtain, according to the configured patch parameter, a target patch file corresponding to at least part of the service function;
a generating module 30, configured to generate a patch configuration file required for installing the target patch file according to the configured patch parameters;
and the packing module 40 is used for packing the target patch file and the patch configuration file to obtain the target patch package.
In some embodiments, the patch package generating apparatus further includes a parameter checking module, configured to perform parameter checking on the configured patch parameter; the obtaining module 20 is further configured to: and when the verification result of the parameter verification is that the verification is passed, acquiring a target patch file corresponding to at least part of the service functions according to the configured patch parameters.
In some embodiments, the parameter checking module is further configured to perform at least one of: according to the parameter format condition corresponding to any one of the patch parameters, performing parameter format verification on any one of the patch parameters; according to the parameter value condition corresponding to any one of the patch parameters, performing parameter value verification on any one of the parameters; and according to the parameter type condition corresponding to the patch parameter, performing parameter type verification on the patch parameter.
In some embodiments, the patch package generating apparatus further includes a file verification module, configured to generate a verification identifier according to the target patch file, and write the verification identifier into the patch configuration file; the verification identifier is used for performing file verification on the target patch file when the target patch file is installed.
In some embodiments, module 10 is configured to perform any one of the following: displaying the service order information in the graphical user interface, and receiving patch parameter configuration operation aiming at the service order information in the graphical user interface to obtain configured patch parameters; and screening out patch parameters corresponding to at least part of service functions ordered represented by the service order information from the patch parameters corresponding to the service functions respectively to serve as the configured patch parameters.
In some embodiments, the patch package generating apparatus further comprises a compression module configured to: compressing the target patch package; and sending the compressed target patch package to a block chain network so that the compressed target patch package is filled into the block by the node of the block chain network and the block is added to the tail part of the block chain.
In some embodiments, the patch package generating apparatus further comprises a difference module for: acquiring an original service file corresponding to service order information; and carrying out differential processing on the original service file and the target patch file, and taking the differential file obtained by the differential processing as a new target patch file.
The patch package generating device provided by the application, when a patch package is manufactured, firstly, patch parameter configuration is carried out according to business order information of a client, then, a target patch file is obtained according to the configured patch parameters, namely, the patch file corresponding to a business function purchased by the client is obtained, a patch configuration file required by installing the target patch file is generated according to the configured patch parameters, finally, the target patch file and the patch configuration file are packaged to obtain the target patch file, the output target patch file only comprises the patch file of the business function purchased by the client, therefore, the individualized output of the patch package is realized, the problem that different products cannot release standard patches to repair urgent bugs of the client in time during simultaneous development is solved, the output of large batches of patches can be realized, the working efficiency of patch manufacturing of software developers and the accuracy of the patches are improved, saving a large amount of labor cost.
The present application also provides a patch package generation apparatus, which is shown with reference to fig. 5 and includes a memory 1 and a processor 2.
A memory 1 for storing a computer program;
a processor 2 for executing a computer program to implement the steps of:
performing patch parameter configuration according to the service order information; acquiring a target patch file according to the configured patch parameters; generating a patch configuration file required by installing a target patch file according to the configured patch parameters; and packing the target patch file and the patch configuration file to obtain a target patch package.
For the introduction of the device provided in the present application, reference is made to the above-described method embodiments.
The present application further provides a computer readable storage medium having a computer program stored thereon, which when executed by a processor, performs the steps of:
performing patch parameter configuration according to the service order information; acquiring a target patch file according to the configured patch parameters; generating a patch configuration file required by installing a target patch file according to the configured patch parameters; and packing the target patch file and the patch configuration file to obtain a target patch package.
The computer-readable storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
For an introduction of the computer-readable storage medium provided in the present application, reference is made to the above-described method embodiments.
The present application further provides a computer program product comprising a computer program which when executed by a processor performs the steps of:
performing patch parameter configuration according to the service order information; acquiring a target patch file according to the configured patch parameters; generating a patch configuration file required by installing a target patch file according to the configured patch parameters; and packing the target patch file and the patch configuration file to obtain a target patch package.
The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The apparatuses, devices, computer-readable storage media, and computer program products disclosed in the embodiments correspond to the methods disclosed in the embodiments, so that the description is simple, and the relevant points can be referred to the description of the method.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The patch package generation method, apparatus, device, computer readable storage medium, and computer program product provided by the present application are described in detail above. The principles and embodiments of the present application are explained herein using exemplary embodiments, which are presented only to assist in understanding the method and its core concepts. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and such improvements and modifications also fall within the scope of the claims of the present application.
Claims (10)
1. A method for generating a patch package, comprising:
performing patch parameter configuration according to the service order information; the service order information is used for representing at least part of service functions in a plurality of service functions of the ordered target service;
acquiring a target patch file corresponding to at least part of the service functions according to the configured patch parameters;
generating a patch configuration file required for installing the target patch file according to the configured patch parameters;
and packing the target patch file and the patch configuration file to obtain a target patch package.
2. The patch package generation method according to claim 1, further comprising:
performing parameter verification on the configured patch parameters;
the obtaining of the target patch file corresponding to at least part of the service functions according to the configured patch parameters includes:
and when the verification result of the parameter verification is that the verification is passed, acquiring a target patch file corresponding to at least part of the service functions according to the configured patch parameters.
3. The method for generating a patch package according to claim 2, wherein the performing parameter check on the configured patch parameters includes:
performing at least one of:
according to the parameter format condition corresponding to any one parameter in the patch parameters, performing parameter format verification on the any one parameter;
according to the parameter value condition corresponding to any one of the patch parameters, performing parameter value verification on the any one of the patch parameters;
and according to the parameter type condition corresponding to the patch parameter, performing parameter type verification on the patch parameter.
4. The patch package generation method according to claim 1, further comprising:
generating a check identifier according to the target patch file, and writing the check identifier into the patch configuration file;
the verification identifier is used for performing file verification on the target patch file when the target patch file is installed.
5. The method for generating a patch package according to claim 1, wherein the configuring of the patch parameters according to the service order information includes:
any one of the following processes is performed:
displaying the service order information in a graphical user interface, and receiving patch parameter configuration operation aiming at the service order information in the graphical user interface to obtain configured patch parameters;
and screening out patch parameters corresponding to at least part of the service functions ordered represented by the service order information from the patch parameters corresponding to the service functions respectively to serve as the configured patch parameters.
6. The patch package generation method according to claim 1, further comprising:
compressing the target patch package;
and sending the compressed target patch package to a block chain network, so that the compressed target patch package is filled into a block by a node of the block chain network, and the block is added to the tail of a block chain.
7. The method for generating a patch package according to any one of claims 1 to 6, wherein after acquiring the target patch file corresponding to the at least part of service functions according to the configured patch parameters, the method further includes:
acquiring an original service file corresponding to the service order information;
and carrying out differential processing on the original service file and the target patch file, and taking the differential file obtained by the differential processing as a new target patch file.
8. A patch package generation apparatus, comprising:
the configuration module is used for carrying out patch parameter configuration according to the service order information; the service order information is used for representing at least part of service functions in a plurality of service functions of the ordered target service;
the obtaining module is used for obtaining a target patch file corresponding to at least part of the service functions according to the configured patch parameters;
the generating module is used for generating a patch configuration file required by installing the target patch file according to the configured patch parameters;
and the packing module is used for packing the target patch file and the patch configuration file to obtain a target patch package.
9. A patch package generation apparatus, characterized by comprising:
a memory for storing a computer program;
a processor for implementing the steps of the patch package generation method as claimed in any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, carries out the steps of the patch generation method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111485933.0A CN114168146A (en) | 2021-12-07 | 2021-12-07 | Method, device and equipment for generating patch package |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111485933.0A CN114168146A (en) | 2021-12-07 | 2021-12-07 | Method, device and equipment for generating patch package |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114168146A true CN114168146A (en) | 2022-03-11 |
Family
ID=80483951
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111485933.0A Pending CN114168146A (en) | 2021-12-07 | 2021-12-07 | Method, device and equipment for generating patch package |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114168146A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118377508A (en) * | 2024-06-21 | 2024-07-23 | 北京鲲鹏凌昊智能技术有限公司 | Processing method and device for software configuration and electronic equipment |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103324494A (en) * | 2012-03-22 | 2013-09-25 | 金蝶软件(中国)有限公司 | Automatic patch making method, server and system |
US20140325497A1 (en) * | 2013-04-28 | 2014-10-30 | Zhihong Zhao | Method and Apparatus for Upgrading Application |
CN108710500A (en) * | 2018-05-23 | 2018-10-26 | 北京五八信息技术有限公司 | Resource issuing method, update method and device |
CN108829430A (en) * | 2018-06-19 | 2018-11-16 | 厦门海迈科技股份有限公司 | Java Web project update method and relevant apparatus based on Eclipse and Tomcat |
-
2021
- 2021-12-07 CN CN202111485933.0A patent/CN114168146A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103324494A (en) * | 2012-03-22 | 2013-09-25 | 金蝶软件(中国)有限公司 | Automatic patch making method, server and system |
US20140325497A1 (en) * | 2013-04-28 | 2014-10-30 | Zhihong Zhao | Method and Apparatus for Upgrading Application |
CN108710500A (en) * | 2018-05-23 | 2018-10-26 | 北京五八信息技术有限公司 | Resource issuing method, update method and device |
CN108829430A (en) * | 2018-06-19 | 2018-11-16 | 厦门海迈科技股份有限公司 | Java Web project update method and relevant apparatus based on Eclipse and Tomcat |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118377508A (en) * | 2024-06-21 | 2024-07-23 | 北京鲲鹏凌昊智能技术有限公司 | Processing method and device for software configuration and electronic equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9063746B2 (en) | Deployment of software applications on a cloud computing platform | |
CN113779444B (en) | Interface development method, zero code engine and zero code data interface development system | |
US20180307472A1 (en) | Simultaneous deployment on cloud devices and on on-premise devices | |
CN111162953B (en) | Data processing method, system upgrading method and server | |
CN110601896B (en) | Data processing method and equipment based on block chain nodes | |
CN115658085A (en) | Deployment method of cloud native application | |
CN110019158A (en) | A kind of method and apparatus of monitoring data quality | |
US20130254757A1 (en) | Nesting installations of software products | |
CN112256989A (en) | Page loading method and device based on offline package, terminal equipment and storage medium | |
CN111552484A (en) | Application package distribution method, device, equipment and storage medium | |
CN114168146A (en) | Method, device and equipment for generating patch package | |
CN110865806A (en) | Code processing method, device, server and storage medium | |
CN116737662A (en) | Method, device, electronic equipment and storage medium for processing business data | |
CN113973139B (en) | Message processing method and device | |
CN112099814B (en) | System and method for managing vehicle-mounted machine application software installation environment | |
CN114677138B (en) | Data processing method, device and computer readable storage medium | |
CN114840429A (en) | Method, apparatus, device, medium and program product for identifying version conflicts | |
CN114385503A (en) | Interface test method, device, equipment and storage medium | |
CN112241332B (en) | Interface compensation method and device | |
CN112948195A (en) | Interface testing method and device, electronic equipment and storage medium | |
CN113132447A (en) | Reverse proxy method and system | |
CN109167826A (en) | The restocking method, apparatus and system of WEB application | |
CN112667491A (en) | Function test method and device of virtual machine | |
CN113449035B (en) | Data synchronization method, device, computer equipment and readable storage medium | |
CN116560722B (en) | Operation and maintenance flow processing method and device, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |