A program hot update system and update method based on multi-service uninterrupted

By designing a multi-service uninterrupted program hot update system, the problems of user usage interruption and data corruption during application updates in the prior art are solved, intelligent update operations are realized, and the adaptability and efficiency of updates are improved.

CN119225768BActive Publication Date: 2025-05-13ZHEJIANG YIYUN TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411415553.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-11
Publication Date
2025-05-13
Estimated Expiration
2044-10-11

AI Technical Summary

Technical Problem

The prior art cannot achieve uninterrupted updates when the application is updated, resulting in interruption of user usage and risk of data corruption or loss.

Method used

A program hot update system based on multi-services is designed, including content review module, content intervention module, service management module, update selection module and update execution module. By performing content review, service process monitoring and update mode selection on the application's update package, intelligent update operation is achieved.

Benefits of technology

It enables uninterrupted updates of applications during operation, reduces the risk of data corruption or loss, and improves the adaptability and efficiency of updates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119225768B_ABST
    Figure CN119225768B_ABST
Patent Text Reader

Abstract

The present invention discloses a program hot update system and an update method based on uninterrupted multi-services, relates to the field of program hot update, solves the problem that the existing update mode needs to interrupt the service function for updating, comprises a content review module, a content intervention module, a service management module, an update selection module, an update execution module and a server, the content review module is used to review the package body content of the update package corresponding to the application program, the content intervention module is used to execute the response measures for the update package, the service management module monitors the service usage of the application program, the update selection module selects the update task of the application program, and the update execution module is used to execute the update operation of the application program. The present invention realizes the intelligent selection of program updates based on the application program characteristics.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of program hot update, and in particular to a program hot update system and an update method based on uninterrupted multi-services. Background Art

[0002] Program hot update technology is a technology that updates program code or data without interrupting user use. It is especially suitable for application scenarios that require high availability and fast response, such as games, enterprise applications, etc. Through hot update, developers can dynamically modify and replace the program's bytecode or resource files without stopping the service. Hot update mainly relies on dynamic loading and replacement of class bytecode. In addition, the reflection mechanism is also widely used in the hot update process. Through reflection, the method and field information of the class is obtained, and the corresponding method is called or the bytecode is modified.

[0003] Under the current technical background, applications generally use the whole package update mode when updating. Due to the limitation of the update mode, users will inevitably interrupt the current use process when updating the program. At the same time, there is a risk of data corruption or data loss for data that is not saved in time.

[0004] To this end, the present invention proposes a program hot update system and update method based on uninterrupted multi-services. Summary of the invention

[0005] In view of the deficiencies in the prior art, the present invention aims to provide a program hot update system and update method based on multi-service uninterrupted.

[0006] The technical problems to be solved by the present invention are:

[0007] The problem of how to make adaptive decisions about update plans based on the application's running process data.

[0008] In order to achieve the above object, the present invention adopts the following technical solutions:

[0009] In the first aspect, a program hot update system based on multi-service uninterrupted operation includes a content review module, a content intervention module, a service management module, an update decision module, an update execution module and a server;

[0010] The content review module is used to review the package body content of the update package corresponding to the application program, and review the content of the update package corresponding to the application program;

[0011] The content intervention module executes countermeasures according to the content of the update package corresponding to the application program;

[0012] The service management module monitors the service usage of the application program and obtains the service process data of the application program;

[0013] The update decision module decides the update task of the application program and obtains the update mode of the application program;

[0014] The update execution module is used to execute the update operation of the application according to the update mode.

[0015] Furthermore, the service process data includes service functions of the application program and process occupancy and storage occupancy of each service function in the application program.

[0016] Furthermore, the review process of the content review module specifically includes:

[0017] After the update package corresponding to the application is uploaded, the update package is unpacked to obtain the package content data of the update package, and the virus sample data stored in the database is also obtained;

[0018] Compare the update package content data with the virus sample data;

[0019] If the comparison result between the package content data and any virus sample data is completely consistent, the content of the update package is determined to be dangerous;

[0020] If the comparison results between the package content data and any virus sample data are inconsistent, the content of the update package is determined to be safe;

[0021] If the comparison result between the package content data and any virus sample data is partially consistent, the content overlap between the package content data and the virus sample data is calculated.

[0022] Furthermore, the review process of the content review module specifically includes:

[0023] Compare the content overlap between the package content data and the virus sample data with the standard overlap;

[0024] If the content overlap is less than the standard overlap, the content of the update package is determined to be suspected risk content;

[0025] If the content overlap is greater than or equal to the standard overlap, the content of the update package is determined to be dangerous content.

[0026] Furthermore, the response measures of the content intervention module are as follows:

[0027] If the content of the update package is safe, no additional operation is performed;

[0028] If the content of the update package is suspected of risk, the update package will be temporarily suspended and the developer will be informed of the content modification.

[0029] If the content of the update package is dangerous, the application corresponding to the update package will be temporarily removed from the shelves.

[0030] Furthermore, the monitoring process of the service management module is specifically as follows:

[0031] Real-time monitoring of application service process data;

[0032] Get the process usage of each service function in the application through the task manager;

[0033] Use the traffic monitor to obtain the storage usage of each service item in the application.

[0034] Furthermore, the working process of the update decision module specifically includes:

[0035] Obtain an update package of the application, map the package body content of the update package with the program content of the application, obtain the service functions to be updated in the application and the update data volume of each service function to be updated,

[0036] The service functions to be updated are included in the service functions of the application. If the service functions of the application are increased during the hot update, the number of the service functions to be updated and the service functions will increase synchronously.

[0037] Obtain the process occupancy and storage occupancy of each service function to be updated in the application, and calculate the update task volume of the application.

[0038] Furthermore, the working process of the update decision module specifically includes:

[0039] Compare the application update workload with the standard workload;

[0040] If the update task amount is less than or equal to the first standard task amount, determining that the update mode of the application is immediate whole package update;

[0041] If the update task amount is greater than the first standard task amount and less than or equal to the second standard task amount, determining that the update mode of the application is immediate sub-package update;

[0042] If the update task amount is greater than the second standard task amount, determining that the update mode of the application is delayed whole package update;

[0043] Among them, the values ​​of the first standard task amount and the second standard task amount are both greater than zero, and the first standard task amount is less than the second standard task amount.

[0044] Furthermore, the update operation of the update execution module specifically includes:

[0045] If the application's update mode is immediate whole package update, each service function will immediately and synchronously perform data update operations;

[0046] If the update mode of the application is instant sub-package update, the update operation is divided into several steps according to the service functions, and the data update operation is performed on the service functions that are not in use first. When the service functions are in use, the data update operation is suspended until the service functions are not in use. The data update operation is continued;

[0047] If the update mode of the application is delayed whole package update, the whole package update will be performed when the user stops using the application or opens the application next time.

[0048] In a second aspect, the present invention further proposes a method for hot updating a program based on uninterrupted multi-service operation, wherein the steps of the updating method specifically include:

[0049] Step S101, the program developer uploads the update package of the application to the application store, and the user terminal downloads the update package through the application store;

[0050] Step S102, the content review module reviews the content of the update package of the application program, and obtains the content of the update package. The content intervention module executes countermeasures according to the content.

[0051] Step S103, after the review of the update package corresponding to the application is completed, the service management module monitors the service usage of the application to obtain the service process data of the application, and the update decision module determines the update task of the application to obtain the update mode of the application;

[0052] Step S104: the update execution module executes the update operation of the application according to the update mode.

[0053] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are:

[0054] The present invention firstly performs a package body content review on the update package of the application through the content review module to obtain the content situation of the update package, then executes the countermeasures according to the content situation through the content intervention module, and then uses the service management module to monitor the service usage of the application to obtain the service process data of the application, and then uses the update selection module to select the update task of the application to obtain the update mode of the application, and finally uses the update execution module to execute the update operation of the application according to the update mode. The present invention realizes the intelligent selection of the update plan of the application. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] In order to facilitate understanding by those skilled in the art, the present invention is further described below with reference to the accompanying drawings.

[0056] Figure 1 is the overall system block diagram of the present invention;

[0057] Figure 2 It is a schematic diagram of the principle of updating the decision module in the present invention;

[0058] Figure 3 The present invention is a flow chart of the method. DETAILED DESCRIPTION

[0059] The technical solution of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, other embodiments obtained by ordinary technicians in this field without creative work are all within the scope of protection of the present invention.

[0060] Example 1: Please refer to Figure 1 and Figure 2 As shown, the technical solution provided by the present invention is: a program hot update system based on multi-service uninterrupted operation, including a database, a content review module, a content intervention module, a service management module, an update decision module, an update execution module and a server;

[0061] In this embodiment, the user terminal downloads and updates the application through the application store. The application is uploaded to the application store by the program developer. Specifically, the program developer packages the application body to obtain an installation package and uploads it to the application store. The user installs the application by downloading the installation package, or packages the updated content of the application to obtain an update package and uploads it to the application store. The application is hot updated by downloading the update package. In this embodiment, the update package is preferably used as the update path of the application.

[0062] In this embodiment, the content review module is used to review the package content of the update package corresponding to the application program. The review process is as follows:

[0063] After the update package corresponding to the application is uploaded, the update package is unpacked to obtain the package content data of the update package, and the virus sample data stored in the database is also obtained. It can be understood that the package content data and the virus sample data are data sets at the code text level;

[0064] Compare the update package content data with the virus sample data;

[0065] If the comparison result between the package content data and any virus sample data is completely consistent, the content of the update package is determined to be dangerous;

[0066] If the comparison result between the package content data and any virus sample data is partially consistent, the content overlap degree NC between the package content data and the virus sample data is calculated according to the formula. The specific formula is as follows:

[0067] NC = JJ / BJ;

[0068] JJ=BT∩YB;

[0069] BJ = BT ∪ YB;

[0070] Among them, BT is the set of package content data, YB is the set of virus sample data, JJ is the data volume of the intersection between package content data and virus sample data, and BJ is the data volume of the union between JJ and virus sample data;

[0071] Compare the content overlap between the package content data and the virus sample data with the standard overlap;

[0072] If the content overlap is less than the standard overlap, the content of the update package is determined to be suspected risk content;

[0073] If the content overlap is greater than or equal to the standard overlap, the content of the update package is determined to be dangerous content;

[0074] If the comparison result between the package content data and any virus sample data is inconsistent, the content of the update package is determined to be safe content.

[0075] Furthermore, the content review module synchronizes the content of the update package corresponding to the application to the content intervention module, and the content intervention module executes countermeasures according to the content. The specific countermeasures are as follows:

[0076] If the content of the update package is safe, no additional operation is performed;

[0077] If the content of the update package is suspected of risk, the update package will be temporarily suspended and the developer will be informed of the content modification.

[0078] If the content of the update package is dangerous, the application corresponding to the update package will be temporarily removed from the shelves.

[0079] Furthermore, after the review of the update package corresponding to the application is completed, the service management module is used to monitor the service usage of the application. The monitoring process is as follows:

[0080] Real-time monitoring of the service process data of the application, including the service functions of the application and the process occupancy and storage occupancy of each service function in the application;

[0081] Among them, the process occupancy is the amount of data calls to the application itself during the operation of the service function, and the storage occupancy is the occupancy of the data storage area during the operation of the service function. In the actual working process, the process occupancy of each service function in the application is obtained through the task manager, and the storage occupancy of each service item in the application is obtained through the traffic monitor;

[0082] The service management module sends the service process data of the application program to the server, and the server sends the service process data of the application program to the update decision module.

[0083] See also Figure 2 As shown, the update decision module is used to decide the update task of the application program, and the decision process is as follows:

[0084] Get the update package of the application, map the package body content of the update package with the program content of the application, obtain the service functions to be updated in the application and the update data volume GLi of each service function to be updated, i is the number of the service function, the upper limit of i is n, and n is equal to the number of types of service functions in the application, such as Figure 2 As shown, the list of services to be updated is the service functions to be updated included in the application. For example, the application has 5 service functions and 4 service functions to be updated. In this hot update, the data of the 4 service functions to be updated are updated, and the data of the remaining 1 service function is not updated.

[0085] In the actual working process, if the service functions of the application are increased during the hot update, the service functions to be updated and the number of service functions to be updated will increase simultaneously. For example, before the hot update, the application has 5 service functions, no service functions to be updated, and 1 service function to be added. In this hot update, the application has 6 service functions, 1 service function to be updated, and the data of the remaining 5 service functions are not updated;

[0086] Obtain the process occupancy ZDi and storage occupancy CDi of each service function to be updated in the application, and calculate the update task volume RW of the application according to the formula. The specific formula is as follows:

[0087]

[0088] Among them, e is a natural constant, a1 and a2 are weight coefficients of fixed values, a1 is the process occupancy weight, and a2 is the storage occupancy weight. It can be understood that the update task volume is used to reflect the running load of the update package on the application carrier during the hot update, that is, the larger the value of the update task volume, the more frequently the application will freeze and become unresponsive during the hot update process;

[0089] Compare the application update workload with the standard workload;

[0090] If the update task amount is less than or equal to the first standard task amount, determining that the update mode of the application is immediate whole package update;

[0091] If the update task amount is greater than the first standard task amount and less than or equal to the second standard task amount, determining that the update mode of the application is immediate sub-package update;

[0092] If the update task amount is greater than the second standard task amount, determining that the update mode of the application is delayed whole package update;

[0093] Among them, the values ​​of the first standard task amount and the second standard task amount are both greater than zero, and the first standard task amount is less than the second standard task amount.

[0094] In this embodiment, the update decision module sends the update mode of the application to the server, and the server synchronizes the update mode of the application to the update execution module, and the update execution module is used to execute the update operation of the application according to the update mode. The update operation specifically includes:

[0095] If the application's update mode is immediate whole package update, each service function will immediately and synchronously perform data update operations;

[0096] If the update mode of the application is instant sub-package update, the update operation is divided into several steps according to the service functions, and the data update operation is performed on the service functions that are not in use first. When the service functions are in use, the data update operation is suspended until the service functions are not in use. The data update operation is continued;

[0097] If the update mode of the application is delayed whole package update, the whole package update will be performed when the user stops using the application or opens the application next time.

[0098] In this embodiment, the content of the update package of the application is first reviewed by the content review module to obtain the content of the update package, and then the content intervention module executes the response measures according to the content, and then the service management module is used to monitor the service usage of the application to obtain the service process data of the application, and then the update decision module is used to select the update task of the application to obtain the update mode of the application, and finally the update execution module is used to execute the update operation of the application according to the update mode. The present invention realizes the intelligent selection of the update plan of the application.

[0099] In this application, if corresponding calculation formulas appear, the above calculation formulas are all dimensionless and take their numerical calculations. The weight coefficients, proportional coefficients and other coefficients in the formulas are set to a result value obtained by quantifying each parameter. The size of the weight coefficient and the proportional coefficient can be determined as long as it does not affect the proportional relationship between the parameter and the result value.

[0100] Example 2: Please refer to Figure 3 As shown, based on another concept of the same invention, a method for hot updating of programs based on uninterrupted multi-services is now proposed, comprising the following steps:

[0101] Step S101, the program developer uploads the update package of the application to the application store, and the user terminal downloads the update package through the application store;

[0102] Step S102, the content review module reviews the content of the update package of the application program, and obtains the content of the update package. The content intervention module executes countermeasures according to the content.

[0103] In this embodiment, the content review module in step S102 includes the following sub-steps:

[0104] Step S1021, after the update package corresponding to the application is uploaded, the update package is unpacked to obtain the package content data of the update package, and the virus sample data stored in the database is also obtained;

[0105] Step S1022, traversing and comparing the package content data of the update package with the virus sample data;

[0106] Step S1023: If the comparison result between the package content data and any virus sample data is inconsistent, the content of the update package is determined to be safe content.

[0107] Step S1024: If the comparison result between the package content data and any virus sample data is completely consistent, the content of the update package is determined to be dangerous content;

[0108] Step S1025: If the comparison result between the package content data and any virus sample data is partially consistent, the content overlap between the package content data and the virus sample data is calculated according to the formula, and the content overlap between the package content data and the virus sample data is compared with the standard overlap. If the content overlap is less than the standard overlap, the content of the update package is determined to be suspected risk content; if the content overlap is greater than or equal to the standard overlap, the content of the update package is determined to be dangerous content.

[0109] In this embodiment, the content intervention module in step S102 includes the following sub-steps:

[0110] Step S1026: If the content of the update package is safe content, no additional operation is performed;

[0111] Step S1027, if the content of the update package is suspected of risky content, the update package listing process is suspended and feedback on content modification is provided to the program developer;

[0112] Step S1028: If the content of the update package is dangerous, the application corresponding to the update package is temporarily removed from the shelves.

[0113] Step S103, after the review of the update package corresponding to the application is completed, the service management module monitors the service usage of the application to obtain the service process data of the application, and the update decision module determines the update task of the application to obtain the update mode of the application;

[0114] In this embodiment, updating the decision module in step S103 includes the following sub-steps:

[0115] Step S1031, obtaining an update package of the application, and mapping the package body content of the update package with the program content of the application;

[0116] Step S1032, then obtaining the service functions to be updated in the application and the update data volume of each service function to be updated;

[0117] Step S1033, finally obtaining the process occupancy and storage occupancy of each service function to be updated in the application, and calculating the update task amount of the application;

[0118] Step S1034, comparing the update task volume of the application with the standard task volume;

[0119] Step S1035, if the update task amount is less than or equal to the first standard task amount, determining that the update mode of the application is instant full package update;

[0120] Step S1036, if the update task amount is greater than the first standard task amount and less than or equal to the second standard task amount, then determining that the update mode of the application is instant sub-package update;

[0121] Step S1037: If the update task amount is greater than the second standard task amount, it is determined that the update mode of the application is delayed whole package update.

[0122] Step S104, the update execution module executes the update operation of the application according to the update mode;

[0123] The updating execution module in step S104 includes the following sub-steps:

[0124] Step S1041, if the update mode of the application is immediate whole package update, each service function immediately and synchronously performs data update operation;

[0125] Step S1042, if the update mode of the application is instant sub-package update, the update operation is divided into several steps according to the service function, and the data update operation is performed on the service function in an unused state first, and the data update operation is suspended when the service function is in use, and the data update operation is continued until the service function is in an unused state;

[0126] Step S1043, if the update mode of the application is delayed whole package update, the whole package update is performed when the user stops using the application or opens the application next time.

[0127] The preferred embodiments of the present invention disclosed above are only used to help explain the present invention. The preferred embodiments do not describe all the details in detail, nor do they limit the invention to only specific implementation methods. Obviously, many modifications and changes can be made according to the content of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present invention, so that those skilled in the art can understand and use the present invention well. The present invention is limited only by the claims and their full scope and equivalents.

Claims

1. A program hot update system based on multi-service uninterrupted operation, characterized in that: It includes content review module, content intervention module, service management module, update decision module, update execution module and server; The content review module is used to review the package body content of the update package corresponding to the application program, and review the content of the update package corresponding to the application program; The content intervention module executes countermeasures according to the content of the update package corresponding to the application program; The review process of the content review module specifically includes: After the update package corresponding to the application is uploaded, the update package is unpacked to obtain the package content data of the update package, and the virus sample data stored in the database is obtained at the same time; Compare the update package content data with the virus sample data; If the comparison result between the package content data and any virus sample data is completely consistent, the content of the update package is determined to be dangerous; If the comparison results between the package content data and any virus sample data are inconsistent, the content of the update package is determined to be safe; If the comparison result between the package content data and any virus sample data is partially consistent, the content overlap between the package content data and the virus sample data is calculated; When the update package corresponding to the application is reviewed, the service management module monitors the service usage of the application and obtains the service process data of the application; the update decision module decides the update task of the application and obtains the update mode of the application; the update execution module is used to execute the update operation of the application according to the update mode; The working process of the update decision module specifically includes: Obtain an update package of the application, map the package body content of the update package with the program content of the application, obtain the service functions to be updated in the application and the update data volume GLi of each service function to be updated, where i is the number of the service function, the upper limit value of i is n, and n is equal to the number of types of service functions in the application, wherein the service functions to be updated are included in the service functions of the application, and if the service functions of the application are increased during the hot update, the number of the service functions to be updated and the service functions are increased synchronously; Get the process occupancy ZDi and storage occupancy CDi of each service function to be updated in the application, according to the formula Calculate the update task volume RW of the application, where e is a natural constant, a1 is the process occupancy weight, and a2 is the storage occupancy weight; Compare the application update workload with the standard workload; If the update task amount is less than or equal to the first standard task amount, determining that the update mode of the application is immediate whole package update; If the update task amount is greater than the first standard task amount and less than or equal to the second standard task amount, determining that the update mode of the application is immediate sub-package update; If the update task amount is greater than the second standard task amount, determining that the update mode of the application is delayed whole package update; Among them, the values ​​of the first standard task amount and the second standard task amount are both greater than zero, and the first standard task amount is less than the second standard task amount.

2. A program hot update system based on multi-service uninterrupted operation according to claim 1, characterized in that: The service process data includes the service functions of the application and the process occupancy and storage occupancy of each service function in the application.

3. A program hot update system based on multi-service uninterrupted operation according to claim 1, characterized in that: The review process of the content review module specifically includes: Compare the content overlap between the package content data and the virus sample data with the standard overlap; If the content overlap is less than the standard overlap, the content of the update package is determined to be suspected risk content; If the content overlap is greater than or equal to the standard overlap, the content of the update package is determined to be dangerous content.

4. A program hot update system based on multi-service uninterrupted operation according to claim 3, characterized in that: The specific countermeasures of the content intervention module are as follows: If the content of the update package is safe, no additional operation is performed; If the content of the update package is suspected of risk, the update package will be temporarily suspended and the developer will be informed of the content modification. If the content of the update package is dangerous, the application corresponding to the update package will be temporarily removed from the shelves.

5. The system for hot updating of programs based on uninterrupted multi-service operation according to claim 2, characterized in that: The monitoring process of the service management module is as follows: Real-time monitoring of application service process data; Get the process usage of each service function in the application through the task manager; Use the traffic monitor to obtain the storage usage of each service item in the application.

6. The program hot update system based on multi-service uninterrupted operation according to claim 1, characterized in that: The update operation of the update execution module specifically includes: If the application's update mode is immediate whole package update, each service function will immediately and synchronously perform data update operations; If the update mode of the application is instant sub-package update, the update operation is divided into several steps according to the service functions, and the data update operation is performed on the service functions that are not in use first. When the service functions are in use, the data update operation is suspended until the service functions are not in use. The data update operation is continued; If the update mode of the application is delayed whole package update, the whole package update will be performed when the user stops using the application or opens the application next time.

7. A method for hot updating of programs based on uninterrupted multi-service operation, characterized in that: Using the program hot update system based on uninterrupted multi-services as described in any one of claims 1 to 6, the updating method steps specifically include: Step S101, the program developer uploads the update package of the application to the application store, and the user terminal downloads the update package through the application store; Step S102, the content review module reviews the content of the update package of the application program, and obtains the content of the update package. The content intervention module executes countermeasures according to the content. Step S103, after the review of the update package corresponding to the application is completed, the service management module monitors the service usage of the application to obtain the service process data of the application, and the update decision module determines the update task of the application to obtain the update mode of the application; Step S104: the update execution module executes the update operation of the application according to the update mode.

Citation Information

Patent Citations

  • Hot-update solution of program

    CN105260209A