Application update management method, management system, equipment and storage medium
By using a decoupling method to build business code files and code configuration files in the Windows.NET Framework environment, and dynamically updating differential code files, the problems of low application update efficiency and poor stability are solved, and efficient and stable application updates and user optimization are achieved. experience.
Patent Information
- Application Number
- CN202411625340.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-01-21
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the existing Windows.NET Framework environment, when applying updates, you need to close the software and reconfigure the device information, resulting in low update efficiency and poor stability, which affects the user experience.
Use a decoupling method to build business code files, and record their information in code configuration files. By comparing different versions of code configuration files, you can determine the difference business code files, and use these difference files to dynamically update to achieve hot updates.
It realizes version updates without affecting the normal use of users, keeps device configuration information unchanged, improves user experience, and improves the efficiency and stability of application updates.
Smart Images

Figure CN119336372A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the computer field, and in particular to an application update management method, management system, device and storage medium. Background Art
[0002] With the increasing number of deployed host computers and the increasing complexity of device access, we are faced with the need to update existing software to adapt to changing application scenarios. In order to ensure that these deployed clients can be managed in a standardized manner and hot updates can be achieved without affecting normal user use, we need to adopt a more systematic and professional solution.
[0003] In actual applications, when updating software functions on the host computer, it is usually necessary to shut down the software and then load the downloaded update resource package. Although this satisfies the software function update, the host computer software is usually connected to various types of devices. If the software needs to be shut down and the device information needs to be reconfigured every time a version is updated, it will not only consume a lot of debugging time, but also significantly affect the user experience. This method obviously cannot meet the requirements of efficient and stable operation. Summary of the invention
[0004] The purpose of the present invention is to at least provide an application update management method, management system, device and storage medium, which can at least solve the technical problem of inefficient operation and poor stability of application updates, at least achieve accurate and high-quality management of version updates, while keeping device configuration information unchanged, improving user experience, and being able to perform version updates without affecting normal user use.
[0005] To solve the above technical problems, at least one embodiment of the present application provides an application update management method, including:
[0006] Obtaining an installation package of a first version of a target application from a host computer management system; the installation package at least includes a plurality of first business code files constructed in a decoupled manner and a first code configuration file recording information of each of the first business code files;
[0007] Compare the first code configuration file with the second code configuration file stored on the current system to determine the difference business code files between the multiple first business code files and the multiple second business code files recorded in the second code configuration file; the multiple second business code files are business code files corresponding to the second version of the target application installed on the current system;
[0008] The plurality of second service code files are updated based on the difference service code files, and updated second code configuration files corresponding to the plurality of updated second service code files are formed.
[0009] At least one embodiment of the present application also provides a host computer management system, including a message middleware and multiple host computers; the message middleware is used to receive and issue the installation package; the host computer is connected to the message middleware to execute the above-mentioned application update management method.
[0010] At least one embodiment of the present application also provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned application update management method.
[0011] At least one embodiment of the present application further provides a computer-readable storage medium storing a computer program, wherein the computer program implements the above-mentioned application update management method when executed by a processor.
[0012] The application update management method, management system, device and storage medium provided by the embodiments of the present application construct a business code file in a decoupled manner, and record the information of the business code file in a first code configuration file, so as to compare the first code configuration file with the second code configuration file stored on the current system, determine the difference business code file in the first business code file, and then use the difference business code file to update the second business code file, so that the application update can be replaced on demand, and the version update can be performed without affecting the normal use of the user, thereby realizing precise and high-quality management of version updates, while keeping the device configuration information unchanged, thereby improving the user experience.
[0013] In some optional embodiments, the updating of the plurality of second business code files based on the differential business code file includes: when the second business code file that the target application needs to load includes the differential business code file, the differential business code file is dynamically loaded from the upper computer management system based on the reflection mechanism of .NET, and the corresponding business code file in the current version of the target application is hot updated. By using the reflection mechanism of .NET, the updated differential code file can be dynamically loaded to achieve hot update of the application.
[0014] In some optional embodiments, the first code configuration file records a first hash digest of each of the first business code files, and the second code configuration file records a second hash digest of each of the second business code files;
[0015] The step of comparing the first code configuration file with the second code configuration file currently stored in the system to determine a difference between the plurality of first business code files and the plurality of second business code files recorded in the second code configuration file includes:
[0016] Comparing the first hash digest with the second hash digest to determine a different hash digest of the first hash digest relative to the second hash digest;
[0017] The first business code file corresponding to the difference hash summary is used to determine the difference business code file.
[0018] By using hash summary business code files for assignment, the update process can be verified through hash summary, and the difference code files can be accurately used for updating. Business code files that do not need to be changed will not be replaced and updated, reducing resource consumption and avoiding unnecessary work.
[0019] In some optional embodiments, the process of generating the installation package of the first version of the target application includes:
[0020] Constructing the plurality of first business code files of the first version of the target application;
[0021] Generate hash digests corresponding to the first business code files respectively;
[0022] Constructing the first code configuration file, wherein the first code configuration file at least records the first hash digest corresponding to each of the first business code files;
[0023] The multiple first business code files of the constructed first version are compiled with the first code configuration files corresponding to the multiple first business code files to generate an installation package of the first version of the target application.
[0024] In some optional embodiments, the installation package also includes a database file and a resource package file for loading a business code file; the business code file is constructed in a decoupled manner relative to the database file, the resource package file and the code configuration file.
[0025] In some optional embodiments, obtaining the first version installation package of the target application from the host computer management system includes:
[0026] Obtaining a file resource ID issued by the host computer management system and used to indicate the installation package to be downloaded;
[0027] In response to the application update task issued by the host computer management system, the current system is connected to the host computer management system using a file transfer protocol;
[0028] The installation package of the first version of the target application is downloaded from the host computer management system according to the file resource ID.
[0029] In some optional embodiments, the method further includes:
[0030] Monitor the download process of the installation package to determine whether the download is successful;
[0031] If the download is successful, the installation package is decompressed and integrity checked;
[0032] If the download fails or the integrity check fails, the step of downloading the first version of the installation package of the target application from the host computer management system according to the file resource ID is re-executed after a preset time interval. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] One or more embodiments are exemplarily described by the pictures in the corresponding drawings, and these exemplary descriptions do not constitute limitations on the embodiments.
[0034] Figure 1 This is a process of an application update management method provided by an embodiment of the present application Figure 1 ;
[0035] Figure 2 This is a process of an application update management method provided by an embodiment of the present application Figure 2 ;
[0036] Figure 3 An embodiment of the present application provides Figure 1 Step 101 of the process Figure 1 ;
[0037] Figure 4 This is a process of an application update management method provided by an embodiment of the present application Figure 3 ;
[0038] Figure 5 An embodiment of the present application provides Figure 1 The process of step 102 Figure 1 ;
[0039] Figure 6 is a schematic diagram of a host computer management system provided by another embodiment of the present application;
[0040] Figure 7 is a structural schematic diagram of an electronic device provided by another embodiment of the present application;
[0041] Figure 8 It is a schematic diagram of the structure of a computer storage medium provided by another embodiment of the present application. DETAILED DESCRIPTION
[0042] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the embodiments of the present application will be described in detail below in conjunction with the accompanying drawings. However, it will be appreciated by those skilled in the art that in the present application, many technical details are proposed in order to enable the reader to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical scheme claimed in the present application can also be implemented. The division of the following embodiments is for the convenience of description, and the specific implementation of the present application should not be construed as any limitation, and the various embodiments can be combined and referenced with each other under the premise of no contradiction.
[0043] In order to facilitate understanding of the embodiments of the present application, relevant content about application update is first introduced here.
[0044] With the increasing number of deployed host computers and the increasing complexity of device access, we are faced with the need to update the existing software to adapt to the changing application scenarios. In order to ensure that these deployed clients can be managed in a standardized manner and hot updates can be achieved without affecting the normal use of users, we need to adopt a more systematic and professional solution.
[0045] In actual applications, the host computer software is usually connected to various types of devices. If the device information needs to be reconfigured every time the version is updated, it will not only take a lot of debugging time, but also significantly affect the user experience. This method obviously cannot meet the requirements of efficient and stable operation. Therefore, we must find a method that can quickly and accurately update the version without affecting the normal operation of the user.
[0046] In order to solve the above-mentioned technical problems of inefficient application update and poor running stability, the present invention proposes an application update management method. The implementation details of the application update management method of this embodiment are specifically described below. The following content is only the implementation details provided for the convenience of understanding and is not necessary for the implementation of this solution.
[0047] Embodiment 1:
[0048] The application update management method of this embodiment can be applied to electronic devices with communication, computing and data storage capabilities. The specific process can be as follows: Figure 1 As shown, steps 101-103 are included, specifically including:
[0049] Step 101, obtaining an installation package of a first version of a target application from a host computer management system; the installation package at least includes a plurality of first business code files constructed in a decoupled manner and a first code configuration file recording information of each of the first business code files;
[0050] In some embodiments, Figure 2 As shown, the process of generating the first version installation package of the target application includes:
[0051] Step 201: construct the plurality of first business code files of the first version of the target application;
[0052] Step 202: Generate hash digests corresponding to the first business code files respectively;
[0053] Step 203: construct the first code configuration file, wherein the first code configuration file at least records the first hash digest corresponding to each of the first business code files;
[0054] Step 204: compile the multiple first business code files of the constructed first version and the first code configuration files corresponding to the multiple first business code files to generate an installation package of the first version of the target application.
[0055] In some examples, the installation package also includes a database file and a resource package file for loading the business code file; the business code file is constructed in a decoupled manner relative to the database file, the resource package file, and the code configuration file. In this embodiment, the business code file corresponds to each module in the application, that is, the business code file is divided according to each module, so that only the modules that need to be updated are replaced and loaded during subsequent updates.
[0056] Among them, the host computer management system can receive the installation package, and then send the installation package to the host computer that needs to be updated. The method provided in this embodiment is implemented by the host computer. Specifically, the host computer management system is a web terminal. When the host computer management system receives the installation package, it finds the host computer that needs to be updated according to the IP information of each host computer, and performs batch selection. After batch selection, the file resource ID corresponding to the installation package is uniformly sent, and the system decoupling and information isolation of each business are realized through the message queue.
[0057] Specifically, step 101, such as Figure 3 As shown, including:
[0058] Step 1011: Obtain the file resource ID issued by the host computer management system and used to indicate the installation package to be downloaded;
[0059] Step 1012: In response to the application update task issued by the host computer management system, the current system is connected to the host computer management system using a file transfer protocol;
[0060] Step 1013: Download the first version installation package of the target application from the host computer management system according to the file resource ID.
[0061] Specifically, the file transfer protocol may adopt an FTP system, so that the user can interact with the host computer management system through the application to achieve file transfer.
[0062] Further, such as Figure 4 As shown, in order to facilitate monitoring of the download process, the application update management method also includes:
[0063] Step 301: monitor the downloading process of the installation package to determine whether the download is successful;
[0064] Step 302: If the download is successful, the installation package is decompressed and integrity checked;
[0065] Step 303: If the download fails or the integrity check fails, the step of downloading the first version of the installation package of the target application from the host computer management system according to the file resource ID is re-executed after a preset time interval.
[0066] Among them, the application management method supports version rollback. During the installation package download process, the software package of the current version of the application is not deleted. Once the download fails or the integrity check fails, the current version software package can be used for version rollback to ensure the stability of the existing running version.
[0067] Furthermore, after the download is successful and passes the integrity check, the host computer management system updates the task status of the resource download to provide feedback on whether the task is completed or not, which is conducive to improving the user experience.
[0068] Step 102, comparing the first code configuration file with the second code configuration file stored on the current system, determining the difference business code files of the multiple first business code files relative to the multiple second business code files recorded in the second code configuration file; the multiple second business code files are business code files corresponding to the second version of the target application installed on the current system;
[0069] It can be understood that the first version and the second version respectively indicate different versions of the target application, wherein the difference information between the first version and the second version is compared with the second code configuration file stored on the current system using the first code configuration file, thereby facilitating targeted updates and loading according to the difference information in the comparison results, improving update efficiency, and avoiding loss of device configuration information.
[0070] Specifically, in step 101, the first code configuration file records the first hash digest of each of the first business code files, and the second code configuration file records the second hash digest of each of the second business code files. Based on this, in step 102, the difference can be compared through the hash digest. In step 102, Figure 5 As shown, specifically including:
[0071] Step 1021: Compare the first hash digest with the second hash digest to determine a difference hash digest between the first hash digest and the second hash digest;
[0072] Step 1022: Determine the difference business code file by using the first business code file corresponding to the difference hash summary.
[0073] Through step 102, the difference between the first code configuration file and the second code configuration file can be found using the hash summary, so as to facilitate dynamic loading and updating of the difference module and business code, avoid unnecessary work, and reduce resource loss.
[0074] Step 103: Update the plurality of second service code files based on the differential service code files, and form updated second code configuration files corresponding to the plurality of updated second service code files.
[0075] In some embodiments, step 103 specifically includes: when the second business code file that the target application needs to load includes the differential business code, the differential business code file is dynamically loaded from the upper computer management system based on the reflection mechanism of .NET, and the corresponding business code file in the current version of the target application is hot updated. By utilizing the reflection mechanism of the .net platform, the modules required in the assembly are dynamically loaded when the target application is running, that is, the business code files corresponding to the required modules are dynamically loaded from the first code configuration file of the upper computer management system. At the same time, in this embodiment, the business code files corresponding to the hash summary comparison results are used for targeted loading during the dynamic loading process, thereby utilizing hash verification to avoid unnecessary work, reduce resource consumption, and utilize reflection characteristics to implement hot updates of versions.
[0076] In some examples, when an abnormality occurs in the host computer management system, the application update management method further includes: generating an abnormality notification from the abnormal information of the host computer management system, and sending the notification to the user via email to notify the user of relevant information.
[0077] Among them, after the upper computer management system resumes service, operations are sent to each upper computer to update practical applications.
[0078] In this embodiment, a business code file is constructed by adopting a decoupling method, and the information of the business code file is recorded in a first code configuration file, so that the first code configuration file is compared with the second code configuration file stored on the current system to determine the difference business code file in the first business code file, and then the difference business code file is used to update the second business code file, so that the application update is replaced on demand, and the version can be updated without affecting the normal use of the user, keeping the device configuration information unchanged, and improving the user experience. At the same time, by using the reflection mechanism of .NET, the difference code file to be updated can be dynamically loaded to realize the hot update of the application.
[0079] Embodiment 2:
[0080] The application management method of this embodiment can be applied to electronic devices with communication, computing and data storage capabilities. The application management method of this embodiment is described by connecting multiple host computers with a host computer management system. In this embodiment, the host computer management system is a web-side host computer management system. The application management method specifically includes:
[0081] 101: When building an application project, separate the business code from the database file, configuration file, and resource file to achieve decoupling of data and business. The business code is divided into modules, and the module configuration file is used to record the corresponding code file of each module. A hash summary is made for each module code file as a whole and recorded in the module description file so that it can be compiled and generated as needed during the subsequent version update. The local distribution package is packaged into a software installation package;
[0082] 102: Upload the above installation package to the web-based host computer management system. After the upload is completed, select the current new version software installation package on the web side, and then find the host computer that needs to be updated according to the IP. After batch selecting the host computers, uniformly send the file resource ID. In this implementation step, the message queue is used to achieve system decoupling and business information isolation.
[0083] 103: After receiving the update task, the target host computer connects to the FTP file transfer protocol system to download the resource according to the resource ID, decompresses the downloaded resource, and performs a resource package integrity check. If the download fails or the integrity check fails, it will be downloaded again later. After the download is successful, the task status is manually returned, and the host computer management system updates the resource download task status.
[0084] 104: The upper computer reads the module configuration file and compares it with the new module configuration file, finds out the modules with inconsistent hash values in the current module configuration file and the new module configuration file, replaces the existing module code with the new module code, and dynamically loads the module and the new code. If the module is not changed, there is no need to replace and load the module code, thereby reducing resource consumption.
[0085] 105: We update the above hash value every time during compilation, and write the newly generated value into the module configuration file to realize the on-demand replacement of the above modules. We use the reflection mechanism of the .net platform to realize dynamic loading of the modules (classes) required in the assembly at runtime. In order to improve the performance overhead caused by reflection, we add hash verification to avoid unnecessary work, and use the above reflection characteristics to realize hot update of the upper computer software.
[0086] Embodiment three:
[0087] Another embodiment of the present application relates to a host computer management system. The implementation details of the host computer management system of this embodiment are specifically described below. The following content is only for the convenience of understanding the implementation details provided, and is not necessary for the implementation of this solution. The schematic diagram of the host computer management system of this embodiment can be as follows Figure 6 As shown, it includes a message middleware 801 and a plurality of host computers 802 .
[0088] The message middleware 801 is used to receive and issue the installation package;
[0089] The host computer 802 is connected to the message middleware 801 and is used to execute the application update management method in the above embodiments.
[0090] In some embodiments, the message middleware is used to batch select host computers whose applications need to be updated, and use message queues to decouple each host computer to achieve business information isolation, making it convenient to send installation packages to each host computer separately; the host computer is used to receive the update tasks issued by the message middleware, and use the file transfer protocol to connect to the message middleware to download the installation package.
[0091] It is worth mentioning that all modules involved in this embodiment are logic modules. In practical applications, a logic unit can be a physical unit, a part of a physical unit, or a combination of multiple physical units. In addition, in order to highlight the innovative part of this application, this embodiment does not introduce units that are not closely related to solving the technical problems proposed by this application, but this does not mean that there are no other units in this embodiment.
[0092] Embodiment 4:
[0093] Another embodiment of the present application relates to an electronic device, such as Figure 7 As shown, it includes: at least one processor 901; and a memory 902 that is communicatively connected to the at least one processor 901; wherein the memory 902 stores instructions that can be executed by the at least one processor 901, and the instructions are executed by the at least one processor 901 so that the at least one processor 901 can execute the application update management method in the above-mentioned embodiments.
[0094] Among them, the memory and the processor are connected in a bus manner, and the bus may include any number of interconnected buses and bridges, and the bus connects various circuits of one or more processors and memories together. The bus can also connect various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. The data processed by the processor is transmitted on a wireless medium via an antenna, and further, the antenna also receives data and transmits the data to the processor.
[0095] The processor is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory can be used to store data used by the processor when performing operations.
[0096] Embodiment five:
[0097] Another embodiment of the present application relates to a computer-readable storage medium, such as Figure 8 As shown, a computer program 31 is stored, and when the computer program 31 is executed by a processor, the above method embodiment is implemented.
[0098] That is, those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium, including a number of instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as: ROM), random access memory (Random Access Memory, referred to as: RAM), disk or optical disk and other media that can store program codes.
[0099] Those skilled in the art will appreciate that the above embodiments are specific embodiments for implementing the present application, and in actual applications, various changes may be made thereto in form and detail without departing from the spirit and scope of the present application.
Claims
1. An application update management method, characterized in that: include: Obtaining an installation package of a first version of a target application from a host computer management system; the installation package at least includes a plurality of first business code files constructed in a decoupled manner and a first code configuration file recording information of each of the first business code files; Comparing the first code configuration file with a second code configuration file currently stored in the system, determining a difference business code file between the plurality of first business code files and the plurality of second business code files recorded in the second code configuration file; The multiple second business code files are business code files corresponding to the second version of the target application installed on the current system; The plurality of second service code files are updated based on the difference service code files, and updated second code configuration files corresponding to the plurality of updated second service code files are formed.
2. The application update management method according to claim 1, characterized in that: The updating of the plurality of second service code files based on the difference service code files includes: When the second business code file that the target application needs to load includes the difference business code file, the difference business code file is dynamically loaded from the host computer management system based on the .NET reflection mechanism, and the corresponding business code file in the current version of the target application is hot updated.
3. The application update management method according to claim 1, characterized in that: The first code configuration file records a first hash digest of each of the first service code files, and the second code configuration file records a second hash digest of each of the second service code files; The step of comparing the first code configuration file with the second code configuration file stored in the current system to determine a difference between the plurality of first business code files and the plurality of second business code files recorded in the second code configuration file includes: Comparing the first hash digest with the second hash digest to determine a different hash digest of the first hash digest relative to the second hash digest; The first business code file corresponding to the difference hash summary is used to determine the difference business code file.
4. The application update management method according to claim 3, characterized in that: The process of generating the installation package of the first version of the target application includes: Constructing the plurality of first business code files of the first version of the target application; Generate hash digests corresponding to the first business code files respectively; Constructing the first code configuration file, wherein the first code configuration file at least records the first hash digest corresponding to each of the first business code files; The multiple first business code files of the constructed first version are compiled with the first code configuration files corresponding to the multiple first business code files to generate an installation package of the first version of the target application.
5. The application update management method according to claim 1, characterized in that: The installation package also includes a database file and a resource package file for loading a business code file; the business code file is constructed in a decoupled manner relative to the database file, the resource package file and the code configuration file.
6. The application update management method according to claim 1, characterized in that: The step of obtaining the first version of the installation package of the target application from the host computer management system includes: Obtaining a file resource ID issued by the host computer management system and used to indicate the installation package to be downloaded; In response to the application update task issued by the host computer management system, the current system is connected to the host computer management system by using a file transfer protocol; The installation package of the first version of the target application is downloaded from the host computer management system according to the file resource ID.
7. The application update management method according to claim 6, characterized in that: The method further comprises: Monitor the download process of the installation package to determine whether the download is successful; If the download is successful, the installation package is decompressed and integrity checked; If the download fails or the integrity check fails, the step of downloading the first version of the installation package of the target application from the host computer management system according to the file resource ID is re-executed after a preset time interval.
8. A host computer management system, characterized in that: It comprises a message middleware and a plurality of host computers; the message middleware is used to receive and issue the installation package; the host computer is connected to the message middleware and is used to execute the application update management method described in any one of claims 1-7.
9. A host computer management system according to claim 8, characterized in that: The message middleware is used to batch select host computers whose applications need to be updated, and use the message queue to decouple each host computer; the host computer is used to receive the update task issued by the message middleware, and use the file transfer protocol to connect to the message middleware to download the installation package.
10. An electronic device, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the application update management method according to any one of claims 1 to 7.
11. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the application update management method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
General game version incremental updating system and method
CN105511889A
Version management method, version updating method and version management system
CN110532016A
Application program management method and device, storage medium and computer equipment
CN112052036A
Business program online updating method and device
CN117348901A
Cited By
Code hot deployment method and device, electronic equipment and storage medium
CN121300810A