Offline deployment method and device, electronic equipment and computer readable medium

By automatically extracting delivered material information and generating readable information files during the resource package construction process, the inefficiency and high cost problems caused by manual recording in offline deployment are solved, and efficient version traceability and environmental operation and maintenance are achieved.

CN120371322APending Publication Date: 2025-07-25TONGDUN NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510497404.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-21
Publication Date
2025-07-25

Smart Images

  • Figure CN120371322A_ABST
    Figure CN120371322A_ABST
Patent Text Reader

Abstract

The invention relates to an offline deployment method and device, electronic equipment and a computer readable medium, and relates to the technical field of computers. According to the method, in an offline deployment scene, deliverable information can be automatically extracted in a resource bundle construction process, and a readable information file is generated in a resource bundle based on the deliverable information; and deploying the resource bundle containing the readable information file to a target environment during deployment. According to the method, in the deployment process, the readable information file is automatically generated according to the deliverable information, so that the information can be conveniently, quickly and directly checked and read according to requirements after synchronous deployment, the information of the resource bundle is subjected to high-efficiency and low-cost transparent public processing, manual recording and tracking are not needed, and in the multi-branch and complex-process deployment process, the deployment efficiency is greatly improved. And subsequent version tracing and environment operation and maintenance can be flexibly supported.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] In diversified offline deployment scenarios, it is usually necessary to customize according to specific business requirements to package code, dependencies, etc. for independent offline deployment. When the front-end and back-end are separated and business function components are modularized, there are many branches and the deployment process is complex. Subsequent version tracking, maintenance, and updates rely on manual records and processing, resulting in low efficiency and high costs. Summary of the Invention

[0003] The purpose of the present disclosure is to provide an offline deployment method, an offline deployment device, an electronic device, and a computer-readable medium. This method can automatically synchronize and deploy readable information files containing deliverable information in an offline deployment scenario, facilitating the disclosure of front-end resource information and version tracing, and supporting subsequent operation and maintenance with low cost and high efficiency.

[0004] According to a first aspect of the present disclosure, an offline deployment method is provided. The method may include: during the construction of a resource package for offline deployment, automatically extracting deliverable information; in the resource package, generating a readable information file based on the deliverable information; and deploying the resource package containing the readable information file to a target environment.

[0005] In an exemplary embodiment, during the construction of a resource package for offline deployment, automatically extracting deliverable information includes: determining collection metrics for the resource package, where the collection metrics include at least one of a responsible party metric, a time metric, a code branch metric, and an integrity metric; and during the construction of the resource package for offline deployment, automatically extracting the deliverable information corresponding to the collection metrics.

[0006] In an exemplary embodiment, the method is applied to an automation plugin. During the construction of a resource package for offline deployment, automatically extracting deliverable information includes: parsing the parameter definitions of the automation plugin; determining the collection metrics for the resource package according to the parameter definitions; determining the collection method for the deliverable information according to the parameter definitions; and automatically executing the collection method to extract the deliverable information corresponding to the collection metrics.

[0007] In an exemplary embodiment, in the resource package, generating a readable information file based on the deliverable information includes: determining file generation information for the readable information file according to the parameter definitions, where the file generation information includes at least one of a file name, file content, write permission, and generation path; and in the resource package, generating a readable information file based on the deliverable information and the file generation information.

[0008] In an exemplary embodiment, the automation plugin is configured in a continuous integration and continuous delivery tool.

[0009] In an exemplary embodiment, after deploying a resource package containing a readable information file to a target environment, it further includes: in response to a viewing request for the readable information file, presenting deliverable information through the readable information file.

[0010] In an exemplary embodiment, the viewing request is initiated from a web client.

[0011] According to a second aspect of the present disclosure, there is provided an offline deployment device, which may include: an information collection module, configured to automatically extract deliverable information during the construction of an offline-deployed resource package; a file generation module, configured to generate a readable information file based on the deliverable information in the resource package; and a resource deployment module, configured to deploy the resource package containing the readable information file to a target environment.

[0012] In an exemplary embodiment, the information collection module is specifically configured to determine collection metrics for the resource package, where the collection metrics include at least one of a responsible party metric, a time metric, a code branch metric, and an integrity metric; and automatically extract the deliverable information corresponding to the collection metrics during the construction of the offline-deployed resource package.

[0013] In an exemplary embodiment, the device is applied to an automation plug-in. The information collection module is specifically configured to parse parameter definitions of the automation plug-in; determine collection metrics for the resource package according to the parameter definitions; determine a collection method for the deliverable information according to the parameter definitions; and automatically execute the collection method to extract the deliverable information corresponding to the collection metrics.

[0014] In an exemplary embodiment, the file generation module is specifically configured to determine file generation information for the readable information file according to the parameter definitions, where the file generation information includes at least one of a file name, file content, write permission, and generation path; and generate the readable information file based on the deliverable information and the file generation information in the resource package.

[0015] In an exemplary embodiment, the automation plug-in is configured in a continuous integration and continuous delivery tool.

[0016] In an exemplary embodiment, the device further includes an information display module, configured to present deliverable information through the readable information file in response to a viewing request for the readable information file.

[0017] In an exemplary embodiment, the viewing request is initiated from a web client.

[0018] According to a third aspect of the present disclosure, there is provided an electronic device, including:

[0019] a processor; and

[0020] a memory for storing a computer program of the processor;

[0021] Among them, the processor is configured to implement the offline deployment method as described above in the first aspect by executing a computer program.

[0022] According to a fourth aspect of the present disclosure, there is provided a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the offline deployment method as described in the first aspect is implemented.

[0023] According to a fifth aspect of the present disclosure, there is provided a computer program product, which when running on an electronic device, causes the electronic device to implement the offline deployment method as described in the first aspect when executed.

[0024] The offline deployment method, offline deployment device, electronic device, and computer-readable medium provided by the present disclosure. In the offline deployment scenario, during the process of building the resource package, the method can automatically extract the deliverable information, and generate a readable information file based on the deliverable information in the resource package; when deploying, the resource package containing the readable information file is deployed to the target environment. During the deployment process, the method automatically generates a readable information file based on the deliverable information, so that after the synchronous deployment, the requester can conveniently and directly view and read it, and the information of the resource package is transparently disclosed with high efficiency and low cost, without manual recording and tracking. During the deployment process with multiple branches and complex processes, it can flexibly support subsequent version tracing and environment operation and maintenance.

[0025] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present disclosure, and are used together with the specification to explain the principles of the present disclosure. Obviously, the drawings in the following description are only some embodiments of the present disclosure, and those of ordinary skill in the art can obtain other drawings based on these drawings without creative efforts.

[0027] Figure 1 One of the step flowcharts of the offline deployment method provided by the embodiments of the present disclosure.

[0028] Figure 2 A schematic diagram of offline deployment of a front-end application provided by the embodiments of the present disclosure.

[0029] Figure 3 A schematic diagram of a web page interface provided by the embodiments of the present disclosure.

[0030] Figure 4 One of the step flowcharts of the offline deployment method provided by the embodiments of the present disclosure.

[0031] Figure 5 Block diagram of the offline deployment device provided by an embodiment of the present disclosure.

[0032] Figure 6 Schematic structural diagram of an electronic device provided by an embodiment of the present disclosure. Detailed implementation manners

[0033] Example embodiments will now be described more fully with reference to the accompanying drawings. However, the example embodiments can be implemented in various forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be more complete and comprehensive, and will fully convey the concept of the example embodiments to those skilled in the art. The features, structures, or characteristics described may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of the embodiments of the present disclosure. However, those skilled in the art will realize that the technical solutions of the present disclosure can be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. may be employed. In other instances, well-known technical solutions are not shown or described in detail to avoid obscuring the various aspects of the present disclosure.

[0034] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus repeated descriptions thereof will be omitted. Some of the block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0035] It should be noted that all data obtained by the present disclosure are accessed, collected, stored, and applied to subsequent analysis and processing with the consent and authorization of the user or the relevant data owner after clearly informing the user or the relevant data owner of information such as the content of data collection, data usage, processing methods, etc., and the user or the relevant data owner can be sent the means to access, correct, and delete the data, as well as the method to revoke consent and authorization.

[0036] Generally, the resource packages delivered after compilation and compression are not readable, and the front-end resource information for deployment cannot be clearly identified during the development, testing, deployment, etc. stages, thus affecting the efficiency of problem troubleshooting, operation and maintenance support, and project management. Manual-dependent information integration and recording are costly, inefficient, and difficult to ensure stable quality and have relatively high risks when there are many branches and the projects are cumbersome.

[0037] The offline deployment method provided by the present disclosure can automatically extract, integrate, and generate a readable information file during the resource package construction process, and synchronously deploy it to the target environment together with the constructed resource package. Thus, the deliverable information corresponding to the resource package can be understood through the readable information file, reducing manual dependence, improving information transparency, and providing version tracing and environment operation and maintenance support. The method is described as follows in conjunction with the accompanying drawings.

[0038] Figure 1 It is one of the step flowcharts of the offline deployment method provided by the embodiments of the present disclosure. As Figure 1 shown, the method may include the following steps 101 to 103.

[0039] In step 101, during the construction of the resource package for offline deployment, the deliverable information is automatically extracted.

[0040] In the embodiments of the present disclosure, offline deployment refers to packaging resources such as application programs and dependencies into a compressed file to obtain a resource package, and decompressing and configuring the resource package in an offline environment, so as to deploy in the offline environment. Among them, the resource package construction process may be a resource packaging process. During the resource package construction process, the deliverable information corresponding to each resource can be automatically extracted.

[0041] In the embodiments of the present disclosure, the deliverable may refer to a resource package that has been constructed and delivered and is to be deployed to an offline environment. The deliverable information may include resource information with transparency and publicity requirements, such as the attributes of the resource itself, such as the name, content, version, creator, creation time, etc. of the resource, and may also include information reflecting the resource package construction process, such as the resource packaging order, packaging method, and submission record. The deliverable information can be extracted from a version control and package management system, or directly from the corresponding directory of the resource file.

[0042] The automatic extraction of the deliverable information can be achieved through methods, scripts, or corresponding automation tools. Those skilled in the art can select the way to achieve automation according to actual needs and application conditions, and the embodiments of the present disclosure do not make specific limitations on this.

[0043] In step 102, a readable information file is generated in the resource package based on the deliverable information.

[0044] In the embodiments of the present disclosure, a readable information file can be generated during the construction process of the resource package based on the deliverable information. The readable information file is used to record the deliverable information, and the file permission supports readability. The readable information file can be generated in the default path or a custom path in the resource package.

[0045] In step 103, the resource package containing the readable information file is deployed to the target environment.

[0046] In the embodiments of the present disclosure, the resource package to be deployed includes a readable information file, which records the deliverable information extracted during the construction process of the resource package. The target environment is an offline environment where the resource package is to be deployed. When the resource package is deployed to the target environment, the readable information file is deployed to the target environment together. When the type of the target environment is different, the commands and configurations for offline deployment may be different. The resource package can be uploaded or copied to the corresponding deployment directory in the target environment and accessed through nginx pointing to this deployment directory. At this time, the resource package is decompressed in this deployment directory, and the readable information file is stored in the path where the file is generated during the construction process of the resource package.

[0047] In an alternative method embodiment of the present disclosure, step 101 may include the following steps A1 to A2.

[0048] In step A1, determine the collection metrics of the resource package. The collection metrics include at least one of the responsible party metric, time metric, code branch metric, and integrity metric.

[0049] In the embodiments of the present disclosure, the collection metrics can be prepared before extracting the deliverable information. The collection metrics are used to guide the extraction of the deliverable information, can be customized according to the environmental operation and maintenance requirements, and can also be flexibly expanded dynamically according to environmental changes. Among them, the collection metrics can be selected and prepared from the responsible party metric, time metric, code branch metric, and integrity metric. The responsible party metric can be the identity information metric of the resource provider, such as the provider identifier, the affiliated department, etc., so that the responsibility of the resource provider can be traced; the time metric can be the time information metric for different operations on the resource, such as the submission time, the packaging time, etc., so as to perform version management on the resource and support subsequent time-based problem troubleshooting; the code branch metric can be the information of the code branch (submodule) to which the application program, sub-module, etc. belong, and can determine the consistency between the deployment environment and the code version; the integrity metric can be the integrity information metric of the resource content, such as the commit content record, Node version, packaging script command, etc., so as to support the integrity and reproducibility of the resource package. In the embodiments of the present disclosure, the above classification and selection of the collection metrics are only examples. Those skilled in the art can flexibly adjust and expand the selection of the collection metrics according to different requirements of the business and scenario types. For example, it can also include the hardware device information of the resource provider, the version of the second-party package, etc. Through the collection metrics, the resource status can be comprehensively, deeply, and accurately characterized, so as to support the tracking, management, and maintenance of the resource package and directly and accurately transmit information.

[0050] In step A2, during the construction process of the resource package for offline deployment, automatically extract the deliverable information corresponding to the collection metrics.

[0051] In the embodiments of the present disclosure, based on the determined collection metrics, during the construction of the offline-deployed resource package, the deliverable information corresponding to each collection metric can be automatically extracted. Among them, the collection metrics can be defined through methods, scripts, or corresponding automated tools, and then the automated extraction of the deliverable information is performed. The relevant description of the foregoing step 102 can be referred to correspondingly. To avoid repetition, it will not be elaborated here.

[0052] In an alternative method embodiment of the present disclosure, after the foregoing step 103, the following step B may further be included.

[0053] In step B, in response to a viewing request for the readable information file, the deliverable information is presented through the readable information file.

[0054] In the embodiments of the present disclosure, after the resource package is deployed to the target environment, a viewing request for the readable information file can be received. In response to the viewing request, the deliverable information recorded in the readable information file can be presented to the requester, so that the requester can directly obtain accurate deliverable information.

[0055] Figure 2 It is a schematic diagram of the offline deployment of a front-end application provided by the embodiments of the present disclosure. As Figure 2 shown, it includes front-end applications A, B, C... deployed in the deployment directory of the target server. The deployment directory includes subdirectories of front-end applications A, B, and C. The subdirectory of front-end application A contains a readable information file A, which is generated by extracting the deliverable information of each resource of front-end application A during the construction of the front-end application A resource package; the subdirectory of front-end application B contains a readable information file B, which is generated by extracting the deliverable information of each resource of front-end application B during the construction of the front-end application B resource package; the subdirectory of front-end application C contains a readable information file C, which is generated by extracting the deliverable information of each resource of front-end application C during the construction of the front-end application C resource package. At this time, the requester can enter the subdirectory of the corresponding front-end application on the directory page provided by the target server and select the corresponding readable information file to request viewing. On this basis, the deliverable information of the corresponding front-end application is provided to the requester through the readable information file. For example, the deliverable information of front-end application A can be presented to the requester through the readable information file A, the deliverable information of front-end application B can be presented to the requester through the readable information file B, and the deliverable information of front-end application C can be presented to the requester through the readable information file C, and so on. When there are multiple front-end applications, the readable information files of each front-end application can be directly and conveniently viewed, so as to obtain its deliverable information, which can support information disclosure, version tracing, etc. at low cost and high efficiency.

[0056] In an alternative method embodiment of the present disclosure, a viewing request is initiated from the web side.

[0057] In the embodiments of the present disclosure, the viewing request can also be initiated from the web side. At this time, in response to the viewing request, a readable information file can be provided to the web side to display the deliverable information recorded in the readable information file to the requester on the web side.

[0058] Figure 3 It is a schematic diagram of a web-side interface provided by the embodiments of the present disclosure. As Figure 3 shown, the address bar displays the storage path of the readable information file "********** / **** / v2 / branch_info.txt", and the content in the content bar shows the deliverable information recorded in the readable information file as follows:

[0059] Resource package provider: ********

[0060] Execution script: ******************************.js

[0061] Email: ********@****.net

[0062] Generation date: 2025-02-17 19:55:52

[0063] Release branch: V****.Sp03-****

[0064] Submodule branch: submodule.src / modules.branch release.*********

[0065] Record of the most recent commit:

[0066] Author: ******<************.net>

[0067] Date: 2025-2-17 19:54

[0068] Message: feat: Output: ******

[0069] CommitId: 2d52a9dc8*******

[0070] Environment information:

[0071] Node version: v16.20.2

[0072] Npm version: 10.9.2

[0073] Project Folder: / Users / **:******s / @tntd / ***************

[0074] Operating System Name: Darwin

[0075] Operating System Type: darwin

[0076] Processor Architecture: arm64

[0077] Operating System Hostname: ******

[0078] Operating System Version: 24.3.0

[0079] The requester can conveniently and accurately obtain the above-mentioned delivery information through a readable information file on the web side, so as to perform version tracing and management on the deployed resource package.

[0080] The offline deployment method provided by the present disclosure can automatically extract delivery information during the process of building a resource package and generate a readable information file based on the delivery information in the resource package in an offline deployment scenario; deploy the resource package containing the readable information file to the target environment during deployment. During the deployment process, this method automatically generates a readable information file with the delivery information, so that after synchronous deployment, it can be conveniently and directly viewed and read by the requester, and the information of the resource package is transparently disclosed with high efficiency and low cost, without manual recording and tracking. During the deployment process with multiple branches and complex processes, it can flexibly support subsequent version tracing and environment operation and maintenance.

[0081] Figure 4 This is the second step flow chart of the offline deployment method provided by the embodiments of the present disclosure. This method is applied to an automation plugin.

[0082] In the embodiments of the present disclosure, automatic collection of delivery information can be achieved through the way of an automation plugin. The automation plugin can be integrated into the resource package building process, can be parameterized and configured to adapt to different business and environmental requirements, and has good flexibility and scalability. Exemplarily, in the offline deployment of a front-end application, this automation plugin can be implemented based on webpack. Webpack is a modular packaging tool in front-end development, which can package various resources into a runnable file on the web side. Webpack runs in a serial process, and realizes the packaging of resources through an initialization stage, a compilation stage, and an output stage. In the initialization stage, the required parameters are read and initialized. In the compilation stage, each module is serially translated, and then recursively compiled according to the dependency relationship. In the output stage, corresponding files are generated according to the compilation results and then output. At this time, in the output stage, the webpack plugin can automatically extract the delivery information to generate a readable information file.

[0083] In an alternative method embodiment of the present disclosure, the automation plug-in is configured in a continuous integration and continuous delivery tool.

[0084] In the embodiments of the present disclosure, the automation plug-in supports parameterized configuration, and can define the content of the readable information file according to actual information acquisition requirements, information processing conditions, etc. For the automated implementation method, parameter adaptation can also be performed according to the integrated application and the different operating environments. For example, the automation plug-in can be configured in a continuous integration and continuous delivery (CI / CD) tool. The CI / CD tool is an enterprise-level application used to build and execute automated processes through the tool to improve software development quality and efficiency. In continuous integration, key components can include a version control system, an automated build tool, a unit test framework, etc.; in continuous delivery, key components can include an automated deployment platform, environment configuration management, continuous monitoring and feedback tools, etc. The automation plug-in can be integrated into the automated deployment process of the CI / CD tool to generate a readable information file when building a resource package on the automated deployment platform. The readable information file includes deliverable information, supports the output of deliverables in multiple environment characteristics such as development, testing, and production, and automatically generates a readable information file that can be flexibly expanded.

[0085] As Figure 4 shown, the method may include the following steps 401 to step 405.

[0086] In step 401, parse the parameter definition of the automation plug-in.

[0087] In the embodiments of the present disclosure, when extracting deliverable information, the parameter definition of the automation plug-in can be parsed. The parameter definition may include relevant information such as the content of the readable information file and the automated implementation method, so as to indicate the subsequent automated execution process.

[0088] In step 402, determine the collection metrics of the resource package according to the parameter definition.

[0089] In the embodiments of the present disclosure, the content of the readable information file can be written into the parameter definition in the automation plug-in, so that the collection metrics of the deliverable information can be determined when parsing the parameter definition. The collection metrics may include the information source, extraction path, keywords, etc. of the deliverable information, so that the corresponding extraction of the deliverable information can be performed based on the collection metrics during automated execution.

[0090] In step 403, determine the collection method of the deliverable information according to the parameter definition.

[0091] In the embodiments of the present disclosure, an implementation manner of automation can be written into parameter definitions in an automation plug-in, so that a collection method of deliverable information can be determined when parsing the parameter definitions. For example, in the offline deployment of a front-end application, the automation plug-in is implemented based on webpack. At this time, the collection method of deliverable information can be determined according to the parsed parameter definitions as executing a Shell script through the execSync method of Node, and automatically extracting deliverable information according to collection metrics in the corresponding front-end application file directory from relevant tools such as Git (distributed version control system), Node (JavaScript interpreter running on the server side), and NPM (JavaScript package management tool). Those skilled in the art can define other collection methods and data sources for executing the collection methods according to actual requirements and environments, and the embodiments of the present disclosure do not make specific limitations thereto.

[0092] In step 404, the collection method is automatically executed to extract the deliverable information corresponding to the collection metrics.

[0093] In the embodiments of the present disclosure, on this basis, the collection method can be automatically executed to extract the deliverable information corresponding to the collection metrics from the data sources defined by the collection method. Reference can be made to the relevant descriptions in step 101 above. To avoid repetition, it will not be elaborated here.

[0094] In an optional embodiment of the present disclosure, the generated readable information file can also be defined through an automation plug-in, then as Figure 4 shown, the method may further include the following steps 405 to 406.

[0095] In step 405, file generation information of the readable information file is determined according to the parameter definitions, and the file generation information includes at least one of file name, file content, write permission, and generation path.

[0096] In the embodiments of the present disclosure, the requirement for generating a readable information file can be written into the parameter definitions in the automation plug-in, so that the file generation information can be determined when parsing the parameter definitions. The file generation information can indicate requirements for file generation, such as file name, file content, write permission, generation path, etc. Among them, the file name can be the content and format of the file name, the file content can be the order, type, word count limit, etc. of writing the deliverable information, the write permission can be the add, delete, and modify permissions after generating the readable information file, and the generation path can be the file directory for generating the readable file information in the resource package. In the embodiments of the present disclosure, the above file generation information is only for illustration, and those skilled in the art can select or expand the file generation information through parameter definitions according to actual requirements and file generation conditions, and the embodiments of the present disclosure do not make specific limitations thereto.

[0097] For example, taking the offline deployment of a front-end application as an example, the npm package introduced in the resources of the front-end application: @tntd / webpack-branch-plugin, defines the parameters for writing file generation information, such as file name (filename), file content (fileContent), and write permission (mode).

[0098] In step 406, in the resource package, a readable information file is generated based on the deliverable information and the file generation information.

[0099] In the embodiments of the present disclosure, a readable information file including the deliverable information and conforming to the file generation information can be automatically generated in the resource package. For specific reference, see the relevant description of step 102 above. To avoid repetition, it will not be elaborated here.

[0100] In step 407, the resource package containing the readable information file is deployed to the target environment.

[0101] In the embodiments of the present disclosure, step 407 can be correspondingly referred to the relevant description of step 103 above. To avoid repetition, it will not be elaborated here.

[0102] The offline deployment method provided by the present disclosure can automatically extract deliverable information during the construction of the resource package in the offline deployment scenario, and generate a readable information file based on the deliverable information in the resource package; when deploying, the resource package containing the readable information file is deployed to the target environment. In the deployment process of this method, a readable information file is automatically generated with the deliverable information, so that after synchronous deployment, it can be conveniently and directly viewed and read by the requester, and the information of the resource package is transparently disclosed with high efficiency and low cost, without manual recording and tracking. During the deployment process of multiple branches and complex processes, it can flexibly support subsequent version tracing and environment operation and maintenance.

[0103] This method can be applied to an automated plugin. The automated plugin supports parameterized configuration, can be flexibly deployed, supports the output of deliverables in multi-environment characteristics such as development, testing, and production, and automatically generates an extensible readable information file. On this basis, it can better adapt to complex work processes and multi-branch environments, effectively improve the work efficiency of delivery, deployment, tracing, troubleshooting, etc., and can also simplify manual participation and reduce process complexity and time and labor costs.

[0104] Figure 5 The structural block diagram of an offline deployment device 500 is also provided. As Figure 5As shown, the device 500 may include: an information collection module 501, configured to automatically extract deliverable information during the construction of an offline deployment resource package; a file generation module 502, configured to generate a readable information file in the resource package based on the deliverable information; and a resource deployment module 503, configured to deploy the resource package containing the readable information file to a target environment.

[0105] In an exemplary embodiment, the information collection module 501 is specifically configured to determine collection metrics for the resource package, where the collection metrics include at least one of a responsible party metric, a time metric, a code branch metric, and an integrity metric; and automatically extract the deliverable information corresponding to the collection metrics during the construction of the offline deployment resource package.

[0106] In an exemplary embodiment, the device is applied to an automation plugin. The information collection module 501 is specifically configured to parse the parameter definitions of the automation plugin; determine the collection metrics for the resource package according to the parameter definitions; determine the collection method for the deliverable information according to the parameter definitions; and automatically execute the collection method to extract the deliverable information corresponding to the collection metrics.

[0107] In an exemplary embodiment, the file generation module 502 is specifically configured to determine file generation information for the readable information file according to the parameter definitions, where the file generation information includes at least one of a file name, file content, write permission, and generation path; and generate the readable information file in the resource package based on the deliverable information and the file generation information.

[0108] In an exemplary embodiment, the automation plugin is configured in a continuous integration and continuous delivery tool.

[0109] In an exemplary embodiment, the device further includes an information display module, configured to display the deliverable information through the readable information file in response to a viewing request for the readable information file.

[0110] The offline deployment device provided by the present disclosure can automatically extract deliverable information during the construction of a resource package in an offline deployment scenario, and generate a readable information file based on the deliverable information in the resource package; and deploy the resource package containing the readable information file to a target environment during deployment. In the deployment process, the method automatically generates a readable information file with the deliverable information, so that after synchronous deployment, the demand side can conveniently and directly view and read it, transparently discloses the information of the resource package with high efficiency and low cost, without manual recording and tracking, and can flexibly support subsequent version tracing and environment operation and maintenance in the deployment process of multiple branches and complex processes.

[0111] It should be noted that although several modules or units of a device for action execution are mentioned in the above detailed description, such a division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more of the above-described modules or units can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0112] In addition, although the steps of the methods in the present disclosure are described in a specific order in the drawings, this does not require or imply that these steps must be performed in that specific order, or that all of the steps shown must be performed to achieve the desired result. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step for execution, and / or one step may be decomposed into multiple steps for execution, etc.

[0113] From the description of the above embodiments, those skilled in the art can easily understand that the example embodiments described herein can be implemented by software, or by a combination of software and necessary hardware. Therefore, the technical solutions according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.

[0114] In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.

[0115] Those skilled in the art can understand that various aspects of the present disclosure can be implemented as a device, a method, or a program product. Therefore, various aspects of the present disclosure can be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or an implementation combining hardware and software aspects, which can be collectively referred to herein as "circuitry", "module", or "system".

[0116] Next, with reference to Figure 6 the electronic device 600 according to this embodiment of the present disclosure will be described. Figure 6 The electronic device 600 shown is only an example and should not impose any limitations on the functions and usage scope of the embodiments of the present disclosure.

[0117] As Figure 6As shown, the electronic device 600 is presented in the form of a general-purpose computing device. The components of the electronic device 600 may include, but are not limited to: at least one of the above-mentioned processing units 610, at least one of the above-mentioned storage units 620, and a bus 630 that connects different system components (including the storage unit 620 and the processing unit 610).

[0118] Among them, the storage unit stores program code, and the program code can be executed by the processing unit 610, so that the processing unit 610 executes the steps according to various exemplary embodiments of the present disclosure described in the "Exemplary Method" section of this specification above.

[0119] The storage unit 620 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 6201 and / or a cache storage unit 6202, and may further include a read-only storage unit (ROM) 6203.

[0120] The storage unit 620 may also include a program / utilities 6204 having a set (at least one) of program modules 6205. Such program modules 6205 include, but are not limited to: an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include the implementation of a network environment.

[0121] The bus 630 may represent one or more of several types of bus structures, including a storage unit bus or a storage unit controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the various bus structures.

[0122] The electronic device 600 can also communicate with one or more external devices (such as a keyboard, a pointing device, a Bluetooth device, etc.), can also communicate with one or more devices that enable a user to interact with the electronic device 600, and / or can communicate with any device that enables the electronic device 600 to communicate with one or more other computing devices (such as a router, a modem, etc.). Such communication can be carried out through a display unit 640 and an input / output (I / O) interface 650 connected to the display unit 640. And, the electronic device 600 can also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 660. As shown in the figure, the network adapter 660 communicates with other modules of the electronic device 600 through the bus 630. It should be understood that although not shown in the figure, other hardware and / or software modules can be used in combination with the electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.

[0123] Through the description of the above embodiments, those skilled in the art can easily understand that the exemplary embodiments described herein can be implemented by software, or by a combination of software and necessary hardware. Therefore, the technical solutions according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (such as a personal computer, server, terminal device, or network device, etc.) to execute the method according to the embodiments of the present disclosure.

[0124] In an exemplary embodiment of the present disclosure, there is also provided a computer-readable storage medium having stored thereon a program product capable of implementing the above-described method of this specification. In some possible embodiments, various aspects of the present disclosure can also be implemented in the form of a program product, which includes program code. When the program product runs on a terminal device, the program code is used to cause the terminal device to execute the steps according to various exemplary embodiments of the present disclosure described in the above "Exemplary Method" section of this specification.

[0125] In an embodiment of the present disclosure, there is also provided a program product for implementing the above method. It can use a portable compact disc read-only memory (CD-ROM) and include program code, and can run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto. In this document, the readable storage medium can be any tangible medium that contains or stores a program, and the program can be used by or in combination with an instruction execution system, apparatus, or device.

[0126] The program product can adopt any combination of one or more readable media. The readable media can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0127] A computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which readable program code is carried. Such a propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. The readable signal medium may also be any readable medium other than a readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device.

[0128] The program code contained on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0129] The program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and also including conventional procedural programming languages such as the "C" language or similar programming languages. The program code may execute entirely on the user's computing device, partially on the user's device, execute as a stand-alone software package, execute partially on the user's computing device and partially on a remote computing device, or execute entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user's computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., by using an Internet service provider to connect through the Internet).

[0130] In addition, the above-mentioned drawings are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present disclosure, and are not for limiting purposes. It is easy to understand that the processes shown in the above-mentioned drawings do not indicate or limit the chronological order of these processes. Additionally, it is also easy to understand that these processes may be executed, for example, synchronously or asynchronously in multiple modules.

[0131] Those skilled in the art will readily conceive of other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include known common knowledge or conventional technical means in the technical field not disclosed by the present disclosure. The specification and embodiments are only to be considered as exemplary, and the true scope and spirit of the present disclosure are pointed out by the claims.

Claims

1. An offline deployment method, characterized in that, The method includes: Automatically extracting deliverable information during the construction of an offline-deployed resource package; Generating a readable information file based on the deliverable information in the resource package; Deploying the resource package containing the readable information file to a target environment.

2. The method according to claim 1, characterized in that The automatically extracting deliverable information during the construction of an offline-deployed resource package includes: Determining the collection metrics of the resource package, where the collection metrics include at least one of a responsible party metric, a time metric, a code branch metric, and an integrity metric; Automatically extracting the deliverable information corresponding to the collection metrics during the construction of the offline-deployed resource package.

3. The method according to claim 1, wherein When the method is applied to an automated plugin, the automatically extracting deliverable information during the construction of an offline-deployed resource package includes: Parsing the parameter definitions of the automated plugin; Determining the collection metrics of the resource package according to the parameter definitions; Determining the collection method of the deliverable information according to the parameter definitions; Automatically executing the collection method to extract the deliverable information corresponding to the collection metrics.

4. The method according to claim 3, characterized in that, The generating a readable information file based on the deliverable information in the resource package includes: Determining the file generation information of the readable information file according to the parameter definitions, where the file generation information includes at least one of a file name, file content, write permission, and generation path; Generating the readable information file based on the deliverable information and the file generation information in the resource package.

5. The method according to claim 3, wherein The automated plugin is configured in a continuous integration and continuous delivery tool.

6. The method according to claim 1, characterized in that After deploying the resource package containing the readable information file to the target environment, it further includes: In response to a viewing request for the readable information file, presenting the deliverable information through the readable information file.

7. The method according to claim 6, characterized in that, The viewing request is initiated from a web page.

8. An offline deployment device, characterized in that, The apparatus includes: An information collection module for automatically extracting deliverable information during the construction of an offline-deployed resource package; A file generation module for generating a readable information file based on the deliverable information in the resource package; A resource deployment module for deploying the resource package containing the readable information file to a target environment.

9. An electronic device, characterized in that, It includes: A processor; and A memory for storing the computer program of the processor; Wherein, the processor is configured to execute the offline deployment method according to any one of claims 1 to 7 by executing the computer program.

10. A computer-readable medium, on which a computer program is stored, characterized in that, When the computer program is executed by the processor, it implements the offline deployment method according to any one of claims 1 to 7.