Version updating method and device, computer equipment, storage medium and program product

By automating the execution of version update scripts and deleting redundant files, the cumbersome version update process is solved, improving efficiency and applicability.

CN121541908APending Publication Date: 2026-02-17CHINA CONSTRUCTION BANK +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511744931.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-25
Publication Date
2026-02-17

Smart Images

  • Figure CN121541908A_ABST
    Figure CN121541908A_ABST
Patent Text Reader

Abstract

The invention relates to the field of computers, and particularly discloses a version updating method and device, computer equipment, a storage medium and a program product. The method comprises the steps that in response to a version release instruction of a target application, a configuration script of the target application is obtained from a preset script library, and the script library comprises compiling scripts, testing scripts and packaging scripts of multiple applications; obtaining a version package of the target application by executing each configuration script; and deploying the version package in a development environment of the target application, and performing version updating on the target application. By adopting the method, the version updating efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a version update method, apparatus, computer equipment, storage medium, and program product. Background Technology

[0002] With the rapid development of computer technology, various applications are emerging in an endless stream, and the speed of application version updates is also getting faster and faster. For any application, the development process of a new version requires a series of processes such as compilation, deployment, testing, and verification, and the new version is released after verification is passed.

[0003] In related technologies, the development process for a new version typically involves calling corresponding operation commands during the compilation, deployment, testing, and verification phases to configure the corresponding data files, thereby completing the development work at each stage and ultimately releasing the new version. However, in practical applications, the development process at each stage is quite cumbersome, requiring repeated calls to operation commands. This development process wastes a significant amount of human and material resources and inevitably introduces many development errors, resulting in low version update efficiency in related technologies. Summary of the Invention

[0004] Therefore, it is necessary to provide a version update method, apparatus, computer equipment, storage medium, and program product that can improve the efficiency of version updates in response to the above-mentioned technical problems.

[0005] Firstly, this application provides a version update method, including:

[0006] In response to the version release command of the target application, the configuration script of the target application is obtained from the preset script library; the script library includes compilation scripts, test scripts and packaging scripts for multiple applications;

[0007] By executing each configuration script, the initial version package of the target application is obtained;

[0008] Remove redundant files from the initial version package to obtain a lightweight version package of the target application;

[0009] Deploy the lightweight version package in the development environment of the target application to update the target application.

[0010] In one embodiment, in response to a version release command for the target application, the configuration script for the target application is retrieved from a preset script library, including:

[0011] Identify multiple script identifiers of the target application from the version release instructions;

[0012] Retrieve the target compilation script, target test script, and target packaging script that match the script identifier from the script library.

[0013] In one embodiment, the configuration script includes a target compilation script, a target testing script, and a target packaging script; by executing each configuration script, an initial version package of the target application is obtained, including:

[0014] The compiled files of the target application are obtained by executing the target compilation script;

[0015] Unit tests and integration tests are performed on the compiled files by executing the target test script;

[0016] By executing the target packaging script, the compiled files that have passed the test are packaged and compressed to obtain the initial version package of the target application.

[0017] In one embodiment, the compiled files of the target application are obtained by executing the target compilation script, including:

[0018] By executing the target compilation script, the latest source code of the target application is pulled from the code repository;

[0019] The source code is compiled to obtain the compiled file of the target application.

[0020] In one embodiment, redundant files in the initial version package are removed to obtain a lightweight version package of the target application, including:

[0021] Unzip the initial version package to a pre-built folder to obtain the set of configuration files for the target application;

[0022] Identify and remove redundant files from the configuration file set;

[0023] The set of configuration files with redundant files removed is compressed to obtain a lightweight version package of the target application.

[0024] In one embodiment, identifying and deleting redundant files in the configuration file set includes:

[0025] Obtain the initial set of configuration files for the target application;

[0026] Files that are simultaneously in both the configuration file set and the initial configuration file set are identified as redundant files.

[0027] Remove redundant files from the configuration file set.

[0028] In one embodiment, deploying the lightweight version package in the development environment of the target application and updating the target application includes:

[0029] Upload the lightweight version package to the target application's server;

[0030] During the installation of the lightweight version package on the server, the lightweight version package is verified for integrity and authenticity.

[0031] If both the integrity and authenticity checks of the lightweight version package pass, the lightweight version package is considered to have been successfully verified, and the target application can be updated.

[0032] In one embodiment, the method further includes:

[0033] If the integrity check of the lightweight version package fails, and / or the authenticity check of the lightweight version package fails, then stop the version update of the target application and delete the version package files installed in the development environment.

[0034] Secondly, this application also provides a version update device, comprising:

[0035] The script acquisition module is used to retrieve the configuration scripts of the target application from a preset script library in response to the version release instructions of the target application; the script library includes compilation scripts, test scripts and packaging scripts for multiple applications;

[0036] The script execution module is used to obtain the initial version package of the target application by executing various configuration scripts;

[0037] The version package processing module is used to remove redundant files from the initial version package to obtain a lightweight version package of the target application.

[0038] The application update module is used to deploy the lightweight version package in the development environment of the target application and update the target application.

[0039] In one embodiment, the script acquisition module includes:

[0040] The identification unit is used to identify multiple script identifiers of the target application from the version release instructions;

[0041] The script matching unit is used to retrieve target compilation scripts, target test scripts, and target packaging scripts that match the script identifier from the script library.

[0042] In one embodiment, the configuration script includes a target compilation script, a target test script, and a target packaging script; the script execution module includes:

[0043] The compilation script execution unit is used to obtain the compiled files of the target application by executing the target compilation script;

[0044] The test script execution unit is used to perform unit tests and integration tests on the compiled files by executing the target test script;

[0045] The packaging script execution unit is used to package and compress the tested compiled files by executing the target packaging script to obtain the initial version package of the target application.

[0046] In one embodiment, the compilation script execution unit includes:

[0047] The source code retrieval subunit is used to pull the latest source code of the target application from the code repository by executing the target compilation script;

[0048] The source code compilation subunit is used to compile the source code to obtain the compiled file of the target application.

[0049] In one embodiment, the version package processing module includes:

[0050] The file decompression unit is used to decompress the initial version package into a pre-built folder to obtain the set of configuration files for the target application;

[0051] The file deletion unit is used to identify and delete redundant files in the configuration file set;

[0052] The file compression unit is used to compress the set of configuration files with redundant files removed to obtain a lightweight version package of the target application.

[0053] In one embodiment, the file deletion unit includes:

[0054] The initial file acquisition subunit is used to obtain the initial configuration file set of the target application;

[0055] The redundant file identification subunit is used to identify files that are simultaneously in the configuration file set and the initial configuration file set as redundant files.

[0056] The redundant file deletion subunit removes redundant files from the configuration file set.

[0057] In one embodiment, the application update module includes:

[0058] The version package upload unit is used to upload lightweight version packages to the target application's server;

[0059] The version package verification unit is used to perform integrity and authenticity verification on the lightweight version package during the installation process on the server.

[0060] The version package update unit is used to determine that the lightweight version package has been successfully verified if both the integrity and authenticity verification of the lightweight version package pass, and then update the target application.

[0061] In one embodiment, the device further includes:

[0062] The version package deletion module is used to stop the version update of the target application and delete the version package files installed in the development environment if the integrity verification of the lightweight version package fails and / or the authenticity verification of the lightweight version package fails.

[0063] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method in any of the embodiments of the first aspect described above.

[0064] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method in any of the embodiments of the first aspect described above.

[0065] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the method in any of the embodiments of the first aspect described above.

[0066] The aforementioned version update method, apparatus, computer equipment, storage medium, and program product, in response to a version release command for the target application, first obtains the configuration scripts for the target application from a pre-set script library. Then, by executing each configuration script, an initial version package of the target application is obtained. Next, redundant files in the initial version package are deleted to obtain a lightweight version package of the target application. Finally, the lightweight version package is deployed in the development environment of the target application to update the target application. The script library includes compilation scripts, testing scripts, and packaging scripts for multiple applications. In this method, in response to a version release command, compilation scripts, testing scripts, and packaging scripts are obtained from a pre-set script library, and each configuration script is executed automatically to obtain the initial version package. This improves the automation level of the version package acquisition process, avoids interference from human factors, and improves the efficiency of obtaining the initial version package. Furthermore, the deletion of redundant files in the initial version package ensures the validity of the data while making the initial version package more lightweight, adapting to updates of the target application in different application environments and improving the scenario applicability of the version update method. In summary, using the above version update method to update the target application can be flexibly applied to various application scenarios, while improving version update efficiency. Attached Figure Description

[0067] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0068] Figure 1 This is a diagram illustrating the application environment of a version update method in one embodiment;

[0069] Figure 2 This is a flowchart illustrating a version update method in one embodiment;

[0070] Figure 3 This is a flowchart illustrating the script acquisition step in one embodiment;

[0071] Figure 4 This is a flowchart illustrating the version package acquisition step in one embodiment;

[0072] Figure 5 This is a flowchart illustrating the compilation steps in one embodiment;

[0073] Figure 6 This is a flowchart illustrating the version package acquisition step in another embodiment;

[0074] Figure 7 This is a flowchart illustrating the configuration file processing steps in another embodiment;

[0075] Figure 8 This is a flowchart illustrating the version update method in another embodiment;

[0076] Figure 9 This is a flowchart illustrating the version update method in another embodiment;

[0077] Figure 10 This is a structural block diagram of a version update device in one embodiment;

[0078] Figure 11 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0079] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application. It should be noted that existing industry solutions such as software, components, and models may be mentioned in the embodiments of this application. These should be considered exemplary and are intended only to illustrate the feasibility of implementing the technical solutions of this application, but do not imply that the applicant has already used or necessarily used such solutions.

[0080] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with relevant regulations. The acquisition, storage, use and processing of data in the technical solution of this application all comply with the relevant provisions of national laws and regulations.

[0081] First, before introducing the technical solutions of the embodiments of this application in detail, we will first introduce the technical background or technical evolution on which the embodiments of this application are based.

[0082] With the rapid development of technology, applications deployed on terminals are becoming increasingly diverse, and the iteration speed of each application version is also accelerating. For application developers, each application version update requires a series of development stages, including compilation, deployment, installation, testing, and verification. Each development stage requires calling different operation commands and executing corresponding configuration operations. This process wastes a significant amount of human and material resources and inevitably introduces human error, resulting in low development efficiency. Therefore, this application provides a version update method, apparatus, computer device, storage medium, and program product that can quickly and automatically execute each process of the version development stage, improving version update efficiency. Of course, the technical solutions provided in this application are not limited to solving the above problems and also have other technical effects, which can be seen in the following embodiments.

[0083] Before describing the embodiments of this application, the application scenarios of these embodiments will be explained first. The version update method provided in these embodiments can be applied to, for example... Figure 1In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or located on the cloud or other network servers. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, projection devices, etc. Portable wearable devices can include smartwatches, smart bracelets, head-mounted devices, etc. Head-mounted devices can be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. Server 104 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.

[0084] The technical solution of this application and how it solves the above-mentioned technical problems will be described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will be described below with reference to the accompanying drawings.

[0085] In one exemplary embodiment, such as Figure 2 As shown, a version update method is provided, including the following steps:

[0086] S201, in response to the version release command of the target application, retrieves the configuration script of the target application from the preset script library; the script library includes compilation scripts, test scripts and packaging scripts for multiple applications.

[0087] The target application is any application already deployed on the terminal. When a new version of the target application is developed, testers can trigger a version release command on the terminal to instruct the terminal to automatically execute scripts to install and deploy the new version of the target application and verify the feasibility of the application version.

[0088] In response to the version release command of the target application, the configuration script for the target application is determined from a pre-defined script library. This script library is a collection of scripts required to execute version release tasks for different applications. Version releases for different applications all require steps such as compilation, testing, packaging, and deployment; correspondingly, the script library includes compilation scripts, testing scripts, packaging scripts, and deployment scripts for different applications.

[0089] For example, if the release command carries the application identifier of the target application, the terminal can directly filter the configuration script of the target application from the script library based on the application identifier, or it can send the application identifier to the server and instruct the server to determine the configuration script of the target application based on the application identifier.

[0090] S202, by executing each configuration script, obtains the initial version package of the target application.

[0091] The initial version package is a compressed package containing the configuration files for the new version of the target application. In practice, these initial version packages can be downloaded and installed through the "Software Update" option in the system settings to update the applications on the user's device to the latest version and fix known version vulnerabilities.

[0092] In this embodiment of the application, the execution order of each configuration script is determined according to the configuration order in the version release process of the target application, and each configuration script is executed in sequence according to the order. The source code is processed in stages into configuration files that are compatible with the application environment. Then the configuration files are compressed to obtain the initial version package.

[0093] S203, remove redundant files from the initial version package to obtain a lightweight version package of the target application.

[0094] By comparing the configuration files in the initial version package according to their type, name, and content, duplicate files in the initial version package are filtered out and deleted as redundant files, resulting in a lightweight version package.

[0095] S204 deploys the lightweight version package in the development environment of the target application to update the target application.

[0096] Install and deploy the lightweight version package in the development environment of the target application, i.e., the server of the target application. Then, by decompressing and running the lightweight version on the server, the original version of the target application is overwritten, thereby updating the version of the target application.

[0097] In this embodiment, in response to a version release command for the target application, the configuration scripts for the target application are first obtained from a preset script library. Then, by executing each configuration script, an initial version package of the target application is obtained. Next, redundant files in the initial version package are deleted to obtain a lightweight version package of the target application. Finally, the lightweight version package is deployed in the development environment of the target application to update the target application. The script library includes compilation scripts, testing scripts, and packaging scripts for multiple applications. In this method, in response to a version release command, compilation scripts, testing scripts, and packaging scripts are obtained from a preset script library, and each configuration script is executed automatically to obtain the initial version package. This improves the automation of the version package acquisition process, avoids interference from human factors, and improves the efficiency of obtaining the initial version package. Furthermore, redundant files in the initial version package are deleted, ensuring the validity of the data in the initial version package while making the initial version package more lightweight to adapt to updates of the target application in different application environments, thus improving the scenario applicability of the version update method. In summary, the above version update method for updating the target application can be flexibly applied to various application scenarios while improving version update efficiency.

[0098] Next, one possible implementation of the configuration script in the aforementioned embodiments will be described.

[0099] In one exemplary embodiment, such as Figure 3 As shown, in response to the target application's version release command, the configuration script for the target application is retrieved from a preset script library, including the following steps:

[0100] S301 identifies multiple script identifiers of the target application from the release instructions.

[0101] The release instructions carry script identifiers for the target application in multiple types. Each script identifier corresponds to a development stage of the target application in the new version release process, such as the compilation script identifier for the compilation stage, the test script identifier for the testing stage, the packaging script identifier for the packaging stage, the deployment version identifier for the deployment stage, and so on.

[0102] S302, retrieve the target compilation script, target test script, and target packaging script that match the script identifier from the script library.

[0103] Based on the script identifiers of the target application, the scripts matching each script identifier are determined from the script library. Taking a script identifier that includes a test script identifier, a test script identifier, and a packaging script identifier as an example, based on the target application's compilation script identifier, the target application's compilation script is determined from the script library; based on the target application's test script identifier, the target application's test script is determined from the script library; and based on the target application's packaging script identifier, the target application's packaging script is determined from the script library.

[0104] It should be noted that, in order to improve the speed of script retrieval and the efficiency of version updates, compilation scripts, test scripts, and packaging scripts can be retrieved in parallel from the script library; alternatively, they can be retrieved sequentially according to the execution order of the scripts. Each time a script is retrieved, it is executed immediately, and the next script is retrieved simultaneously. For example, after retrieving the compilation script, the compilation script is executed, and during the execution of the compilation script, the test script is retrieved. In other words, the execution steps of the current script and the retrieval steps of the next script are executed simultaneously.

[0105] In this embodiment, multiple script identifiers of the target application are used as a basis to query and determine the scripts corresponding to each script identifier from the script library. The filtering criteria are simple and reliable, which speeds up the script determination process and improves the accuracy of the script determination results. In addition, the method of finding scripts based on script identifiers has strong scalability and can be applied to the script acquisition process of different applications, thereby ensuring compatibility with the version update process of various applications on the terminal.

[0106] The foregoing embodiments have described the steps for obtaining the configuration scripts. Next, a feasible method for executing each configuration script to obtain the initial version package will be described.

[0107] In one exemplary embodiment, such as Figure 4 As shown, the configuration scripts include a target compilation script, a target testing script, and a target packaging script. By executing each configuration script, an initial version package of the target application is obtained, including the following steps:

[0108] S401 obtains the compiled files of the target application by executing the target compilation script.

[0109] The target compilation script is used to convert the source code written by developers into executable code. In actual application development, source code is for developers and refers to code that developers can use to develop based on the actual project requirements, such as code in .java, .cpp, and other file formats; executable code is for the application terminal and refers to code or bytecode that the terminal can understand and execute, such as machine languages ​​like C++.

[0110] In one embodiment, such as Figure 5 As shown, obtaining the compiled files of the target application by executing the target compilation script includes the following steps:

[0111] S501 pulls the latest source code of the target application from the code repository by executing the target compilation script.

[0112] The code repository includes the source code of multiple applications pre-uploaded by developers, including historical source code for each application in previous updates and the latest version. In this embodiment, a compilation script can be executed to first determine all the source code of the target application from the code repository, and then copy the source code of the target application with the latest upload time according to the upload time.

[0113] S502 compiles the source code to obtain the compiled file of the target application.

[0114] The source code is input into the compiler by calling compilation instructions, which instruct the compiler to compile the source code and obtain a compiled file that can be recognized and run on the terminal. The compiler type is open-source compilation software or model. This application embodiment does not limit the type of compiler, provided that the compiler is compatible with the terminal runtime environment.

[0115] In the above embodiments, the latest source code for the target application is pulled from the code repository based on the code upload time of the target application to ensure the validity of the source code. Furthermore, the compiled file obtained by compiling the source code is also valid. This compilation process is simple and efficient, avoiding the waste of compilation resources.

[0116] S402 performs unit tests and integration tests on the compiled files by executing the target test script.

[0117] After obtaining the compiled files, the compilation process needs to be tested to ensure that no new errors or regressions are introduced during the compilation process.

[0118] The target test scripts include unit test scripts and integration test scripts. Unit test scripts are used to test the internal quality of the compiled files, while integration test scripts are used to test the interaction quality between the compiled files and other files in the development environment.

[0119] In this embodiment, unit test scripts are executed to perform internal tests on the compiled file. If the internal tests pass, integration test scripts are then executed to perform integration tests on the compiled file, ensuring the quality and reliability of the compiled file and guaranteeing that the code's functionality and performance meet expectations. Of course, unit test scripts and integration scripts can be executed in parallel, or the integration test scripts can be executed first, followed by the unit test scripts, etc. This embodiment does not impose any restrictions on the execution order.

[0120] S403 executes the target packaging script to package and compress the tested compiled files, obtaining the initial version package of the target application.

[0121] By executing the target packaging script, the compiled files that have passed the test are packaged and compressed to obtain an initial version package, which includes all the code, resources and dependencies of the target application.

[0122] In this embodiment, the target compilation script, target test script, and target packaging script are executed sequentially to automatically perform the compilation, testing, and packaging operations on the source code of the target application. The entire process is highly automated, fast, and avoids compilation errors introduced during manual processing, thus improving the quality of the initial version package.

[0123] In one exemplary embodiment, such as Figure 6 As shown, redundant files are removed from the initial version package to obtain a lightweight version package of the target application, including the following steps:

[0124] S601 extracts the initial version package to a pre-built folder, obtaining the set of configuration files for the target application.

[0125] In practical applications, the release command carries a file path, instructing that an empty folder be created under that file path. In this embodiment, the folder is used to store the configuration file for the latest version of the target application.

[0126] After creating the folder, you can directly extract the initial version package into the folder according to the file path to obtain the configuration file set of the target application; or you can first copy the initial version package into the folder, and then extract the initial version package into the folder to obtain the configuration file set of the target application.

[0127] S602 identifies and removes redundant files from the configuration file set.

[0128] Redundant files refer to files that appear multiple times in the configuration file set, compilation artifacts generated during the compilation of the initial version package, and so on.

[0129] Alternatively, redundant files in the configuration file set can be identified by calling a file scanning tool and then deleted from the configuration file set.

[0130] S603 compresses the set of configuration files with redundant files removed to obtain a lightweight version package of the target application.

[0131] It should be noted that the configuration file set with redundant files removed still retains complete and valid configuration files, which can be deployed in the development environment. However, considering the large number of files in the configuration file set and the convenience of subsequent releases, the configuration file set with redundant files removed needs to be compressed to obtain a lightweight version package corresponding to the initial version package.

[0132] In this embodiment, redundant files in the initial version package are deleted, while maintaining the quality of the initial version package and reducing its size. The resulting lightweight version package occupies less storage space, reducing the update cost of the target application and improving the update speed of the target application.

[0133] Next, an example will be used to illustrate another implementation of step S602 in the aforementioned embodiments, such as... Figure 7 As shown, identifying and deleting redundant files in a configuration file set includes the following steps:

[0134] S701, obtain the initial configuration file set of the target application.

[0135] The initial configuration file set refers to the collection of configuration files for the currently running version of the target application, which can be stored in a database or on a cloud server. Optionally, the version release instruction of the target application carries a target application identifier. In this case, the complete initial configuration file set for the currently running version is determined from the database or cloud server based on the target application identifier.

[0136] S702 identifies files that are simultaneously in both the configuration file set and the initial configuration file set as redundant files.

[0137] The files in the configuration file set are compared one by one with the files in the initial configuration file set to identify the files that exist in both sets, which are redundant files.

[0138] Optionally, for each file in the configuration file set, the file is compared with each file in the initial configuration file set in turn according to the file name, file type, and file content to determine whether the file is a redundant file. The above steps are repeated until each file in the configuration file set has been judged, and all the files in the configuration file set are identified.

[0139] S703 removes redundant files from the configuration file set.

[0140] In this embodiment, redundant files that are simultaneously in the configuration file set and the initial configuration file set are deleted from the configuration file set, thereby reducing the space of the entire target application's configuration files (configuration file set and initial configuration file set), reducing the update cost of the target application, and improving the update speed of the target application.

[0141] In one exemplary embodiment, such as Figure 8 As shown, deploying the lightweight version package in the development environment of the target application and updating the target application includes the following steps:

[0142] S801 uploads the lightweight version package to the target application's server.

[0143] S802 performs integrity and authenticity checks on the lightweight version package during the installation process on the server.

[0144] The lightweight version package is uploaded to the target application's server, instructing the server to install it. During the installation process, the lightweight version package undergoes simultaneous authenticity and integrity verification. Authenticity verification checks the source of the lightweight version package, while integrity verification checks the completeness of the lightweight version package by comparing and analyzing the package before and after installation.

[0145] S803. If both the integrity and authenticity checks of the lightweight version package pass, the lightweight version package is confirmed to have been successfully verified, and the target application is updated.

[0146] In an exemplary embodiment, if the integrity verification of the lightweight version package fails, and / or the authenticity verification of the lightweight version package fails, the version update of the target application is stopped, and the version package file installed in the development environment is deleted.

[0147] If both the integrity and authenticity checks of the lightweight version package pass, it indicates that the lightweight version package has not been tampered with during the installation process and has been fully installed. Therefore, the lightweight version package is considered to have been successfully verified, and the current version of the target application is replaced with the lightweight version to complete the version update of the target application.

[0148] If the integrity verification of the lightweight version package fails, it indicates that some files are missing during the installation process. In this case, the authenticity verification of the lightweight version package is determined to have failed, the version update of the target application is stopped, and the version package files installed in the development environment are deleted.

[0149] If the authenticity verification of the lightweight version package fails, it indicates that the installation source of the lightweight version package is untrustworthy. In this case, it is determined that the authenticity verification of the lightweight version package has failed, the version update of the target application is stopped, and the version package file installed in the development environment is deleted.

[0150] In this embodiment of the application, during the installation of the lightweight version package on the server, the lightweight version package is subjected to integrity verification and authenticity verification. If both integrity verification and authenticity verification pass, the target application is updated according to the lightweight version package to promptly fix known vulnerabilities in the target application and ensure the smooth operation of the target application.

[0151] In one exemplary embodiment, a version update method is provided, such as Figure 9 As shown, it includes the following steps:

[0152] S901 identifies multiple script identifiers of the target application from the version release instructions.

[0153] S902 retrieves the target compilation script, target test script, and target packaging script that match the script identifier from the preset script library.

[0154] The script library includes compilation scripts, test scripts, and packaging scripts for multiple applications.

[0155] S903, by executing the target compilation script, pulls the latest source code of the target application from the code repository, compiles the source code, and obtains the compiled file of the target application.

[0156] S904 performs unit tests and integration tests on the compiled files by executing target test scripts.

[0157] S905 executes the target packaging script to package and compress the tested compiled files, obtaining the initial version package of the target application.

[0158] S906: Remove redundant files from the initial version package to obtain a lightweight version package of the target application.

[0159] S907 uploads the lightweight version package to the target application's server.

[0160] S908 performs integrity and authenticity checks on the lightweight version package during the installation process on the server.

[0161] S909: If both the integrity and authenticity checks of the lightweight version package pass, the release will be successful and the package will be archived.

[0162] At the same time, once the lightweight version package is confirmed to be verified successfully, the target application is updated.

[0163] S910 If the integrity verification of the lightweight version package fails, and / or the authenticity verification of the lightweight version package fails, then the verification failure will be displayed.

[0164] At the same time, stop version updates for the target application and delete the version package files installed in the development environment.

[0165] In this embodiment, in response to a version release command, compilation scripts, testing scripts, and packaging scripts are retrieved from a pre-defined script library, and each configuration script is executed automatically to obtain an initial version package. This improves the automation of the version package retrieval process, avoids interference from human factors, and increases the efficiency of obtaining the initial version package. Furthermore, redundant files in the initial version package are removed, ensuring the validity of the data while making the initial version package more lightweight. This allows it to adapt to updates to the target application in different application environments, improving the scenario applicability of the version update method. In summary, using the above version update method to update the target application can be flexibly applied to various application scenarios while improving version update efficiency.

[0166] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0167] Based on the same inventive concept, this application also provides a version update apparatus for implementing the version update method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more version update apparatus embodiments provided below can be found in the limitations of the version update method described above, and will not be repeated here.

[0168] In one exemplary embodiment, such as Figure 10 As shown, a version update device is provided, including: a script acquisition module 1001, a script execution module 1002, a version package processing module 1003, and an application update module 1004, wherein:

[0169] The script acquisition module 1001 is used to retrieve the configuration script of the target application from a preset script library in response to the version release command of the target application; the script library includes compilation scripts, test scripts and packaging scripts for multiple applications;

[0170] The script execution module 1002 is used to obtain the initial version package of the target application by executing various configuration scripts;

[0171] Version package processing module 1003 is used to remove redundant files in the initial version package to obtain a lightweight version package of the target application;

[0172] Application update module 1004 is used to deploy the lightweight version package in the development environment of the target application and update the version of the target application.

[0173] In one embodiment, the script acquisition module 1001 includes:

[0174] The identification unit is used to identify multiple script identifiers of the target application from the version release instructions;

[0175] The script matching unit is used to retrieve target compilation scripts, target test scripts, and target packaging scripts that match the script identifier from the script library.

[0176] In one embodiment, the configuration script includes a target compilation script, a target test script, and a target packaging script; the script execution module 1002 includes:

[0177] The compilation script execution unit is used to obtain the compiled files of the target application by executing the target compilation script;

[0178] The test script execution unit is used to perform unit tests and integration tests on the compiled files by executing the target test script;

[0179] The packaging script execution unit is used to package and compress the tested compiled files by executing the target packaging script to obtain the initial version package of the target application.

[0180] In one embodiment, the compilation script execution unit includes:

[0181] The source code retrieval subunit is used to pull the latest source code of the target application from the code repository by executing the target compilation script;

[0182] The source code compilation subunit is used to compile the source code to obtain the compiled file of the target application.

[0183] In one embodiment, the version package processing module 1003 includes:

[0184] The file decompression unit is used to decompress the initial version package into a pre-built folder to obtain the set of configuration files for the target application;

[0185] The file deletion unit is used to identify and delete redundant files in the configuration file set;

[0186] The file compression unit is used to compress the set of configuration files with redundant files removed to obtain a lightweight version package of the target application.

[0187] In one embodiment, the file deletion unit includes:

[0188] The initial file acquisition subunit is used to obtain the initial configuration file set of the target application;

[0189] The redundant file identification subunit is used to identify files that are simultaneously in the configuration file set and the initial configuration file set as redundant files.

[0190] The redundant file deletion subunit removes redundant files from the configuration file set.

[0191] In one embodiment, the application update module 1004 includes:

[0192] The version package upload unit is used to upload lightweight version packages to the target application's server;

[0193] The version package verification unit is used to perform integrity and authenticity verification on the lightweight version package during the installation process on the server.

[0194] The version package update unit is used to determine that the lightweight version package has been successfully verified if both the integrity and authenticity verification of the lightweight version package pass, and then update the target application.

[0195] In one embodiment, the version update device further includes:

[0196] The version package deletion module is used to stop the version update of the target application and delete the version package files installed in the development environment if the integrity verification of the lightweight version package fails and / or the authenticity verification of the lightweight version package fails.

[0197] Each module in the aforementioned version update device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.

[0198] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 11As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a version update method. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.

[0199] Those skilled in the art will understand that Figure 11 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0200] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0201] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.

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

[0203] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, graphics processors, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0204] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0205] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A version update method, characterized in that, The method includes: In response to a version release command for the target application, the configuration script for the target application is retrieved from a pre-defined script library; the script library includes compilation scripts, test scripts, and packaging scripts for multiple applications. By executing each of the configuration scripts, the initial version package of the target application is obtained; Redundant files are removed from the initial version package to obtain a lightweight version package of the target application; Deploy the lightweight version package in the development environment of the target application and update the target application.

2. The method according to claim 1, characterized in that, The step of responding to a version release command for the target application by retrieving the configuration script for the target application from a preset script library includes: Identify multiple script identifiers of the target application from the version release instructions; Obtain the target compilation script, target test script, and target packaging script that match the script identifier from the script library.

3. The method according to claim 1 or 2, characterized in that, The configuration scripts include target compilation scripts, target test scripts, and target packaging scripts; The step of obtaining the initial version package of the target application by executing each of the configuration scripts includes: By executing the target compilation script, the compiled file of the target application is obtained; Unit tests and integration tests are performed on the compiled file by executing the target test script; By executing the target packaging script, the compiled files that have passed the test are packaged and compressed to obtain the initial version package of the target application.

4. The method according to claim 3, characterized in that, The step of obtaining the compiled file of the target application by executing the target compilation script includes: By executing the target compilation script, the latest source code of the target application is pulled from the code repository; The source code is compiled to obtain the compiled file of the target application.

5. The method according to claim 1 or 2, characterized in that, The step of deleting redundant files from the initial version package to obtain a lightweight version package of the target application includes: The initial version package is unzipped to a pre-built folder to obtain the configuration file set of the target application; Identify and delete redundant files in the configuration file set; The set of configuration files with redundant files removed is compressed to obtain a lightweight version package of the target application.

6. The method according to claim 5, characterized in that, The process of identifying and deleting redundant files in the configuration file set includes: Obtain the initial set of configuration files for the target application; Files that are simultaneously in both the configuration file set and the initial configuration file set are identified as redundant files. Delete the redundant file from the set of configuration files.

7. The method according to claim 1 or 2, characterized in that, The step of deploying the lightweight version package in the development environment of the target application and updating the target application includes: Upload the lightweight version package to the server of the target application; During the installation of the lightweight version package on the server, the lightweight version package is subjected to integrity and authenticity verification. If both the integrity and authenticity checks of the lightweight version package pass, the lightweight version package is determined to have been successfully verified, and the target application is updated.

8. The method according to claim 1 or 2, characterized in that, The method further includes: If the integrity verification of the lightweight version package fails, and / or the authenticity verification of the lightweight version package fails, then the version update of the target application is stopped, and the version package file installed in the development environment is deleted.

9. A version update device, characterized in that, The device includes: The script acquisition module is used to retrieve the configuration script of the target application from a preset script library in response to the version release instruction of the target application; the script library includes compilation scripts, test scripts and packaging scripts of multiple applications; The script execution module is used to obtain the initial version package of the target application by executing each of the configuration scripts. The version package processing module is used to delete redundant files in the initial version package to obtain a lightweight version package of the target application. The application update module is used to deploy the lightweight version package in the development environment of the target application and update the version of the target application.

10. The apparatus according to claim 9, characterized in that, The script acquisition module includes: An identifier identification unit is used to identify multiple script identifiers of the target application from the version release instructions; The script matching unit is used to obtain the target compilation script, target test script, and target packaging script that match the script identifier from the script library.

11. The apparatus according to claim 9 or 10, characterized in that, The configuration scripts include target compilation scripts, target test scripts, and target packaging scripts; The script execution module includes: The compilation script execution unit is used to obtain the compiled file of the target application by executing the target compilation script; The test script execution unit is used to perform unit tests and integration tests on the compiled file by executing the target test script; The packaging script execution unit is used to package and compress the tested compiled files by executing the target packaging script to obtain the initial version package of the target application.

12. The apparatus according to claim 11, characterized in that, The compiler script execution unit includes: The source code acquisition subunit is used to pull the latest source code of the target application from the code repository by executing the target compilation script; The source code compilation subunit is used to compile the source code to obtain the compiled file of the target application.

13. The apparatus according to claim 9 or 10, characterized in that, The version package processing module includes: The file decompression unit is used to decompress the initial version package into a pre-built folder to obtain the configuration file set of the target application; The file deletion unit is used to identify and delete redundant files in the configuration file set; The file compression unit is used to compress the set of configuration files with redundant files removed to obtain a lightweight version package of the target application.

14. The apparatus according to claim 13, characterized in that, The file deletion unit includes: The initial file acquisition subunit is used to acquire the initial configuration file set of the target application; A redundant file identification subunit is used to identify files that are simultaneously in the configuration file set and the initial configuration file set as redundant files; The redundant file deletion subunit deletes the redundant files from the configuration file set.

15. The apparatus according to claim 9 or 10, characterized in that, The application update module includes: The version package upload unit is used to upload the lightweight version package to the server of the target application; The version package verification unit is used to perform integrity verification and authenticity verification on the lightweight version package during the installation of the lightweight version package on the server. The version package update unit is used to determine that the lightweight version package has been successfully verified if both the integrity verification and the authenticity verification of the lightweight version package pass, and then update the target application.

16. The apparatus according to claim 9 or 10, characterized in that, The device further includes: The version package deletion module is used to stop the version update of the target application and delete the version package file installed in the development environment if the integrity verification of the lightweight version package fails and / or the authenticity verification of the lightweight version package fails.

17. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 8.

18. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 8.

19. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 8.