Method, device, equipment and storage medium for graceful upgrade of batch processing application

CN115827034BActive Publication Date: 2026-10-27CHINA CONSTRUCTION BANK
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211362239.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-02
Publication Date
2026-10-27
Estimated Expiration
2042-11-02

AI Technical Summary

Technical Problem

[0003]这种升级方式的问题在于,在批处理应用升级的过程中需要反复进行人工干预,容易出现操作风险

Benefits of technology

[0029]本申请第四方面提供一种计算机存储介质,用于存储计算机程序,所述计算机程序被执行时,具体用于实现本申请第一方面任意一项所提供的批处理应用优雅升级的方法。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115827034B_ABST
    Figure CN115827034B_ABST
Patent Text Reader

Abstract

The application provides a method, device, equipment and storage medium for gracefully upgrading a batch processing application. The method comprises: obtaining a version upgrade instruction and setting a preset state identifier bit to an abort state; pausing the batch processing application from processing batch tasks when it is determined that the state identifier bit is in the abort state; determining whether there is a batch task being processed; upgrading the batch processing application to a target version specified by the version upgrade instruction if there is no batch task being processed; setting the state identifier bit to a release state; and resuming the batch processing application to process batch tasks when it is determined that the state identifier bit is in the release state. The state of the state identifier bit is used to control the batch processing application to pause processing batch tasks during version upgrade and to resume processing batch tasks after the upgrade is completed, thereby achieving graceful upgrade of the batch processing application without manual intervention.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of batch processing technology, and in particular to a method, apparatus, device, and storage medium for gracefully upgrading batch processing applications. Background Technology

[0002] When upgrading existing batch processing applications (also known as bulk processing applications), in order to avoid the upgrade affecting the batch tasks in progress, the existing technical solutions are usually as follows: temporarily adjust the execution time of the batch tasks in advance so that the execution time of the batch tasks is staggered from the time window of the upgrade, or manually pause the processing of the batch tasks, and then perform the application upgrade. After the upgrade is completed, the batch tasks are executed according to the adjusted time, or the paused batch tasks are manually resumed.

[0003] The problem with this upgrade method is that it requires repeated manual intervention during the batch application upgrade process, which can easily lead to operational risks. Summary of the Invention

[0004] To address the shortcomings of the prior art, the present invention provides a method, apparatus, device, and storage medium for gracefully upgrading batch processing applications, thereby providing a graceful upgrade solution for batch processing applications without manual intervention.

[0005] The first aspect of this application provides a method for gracefully upgrading a batch processing application, comprising:

[0006] The system receives a version upgrade instruction and sets a preset status flag to the aborted state; wherein, the batch processing application pauses processing batch tasks when it determines that the status flag is in the aborted state.

[0007] Determine if there are any batch tasks currently being processed;

[0008] If there are no batch tasks currently being processed, upgrade the batch processing application to the target version specified by the version upgrade instruction;

[0009] The status flag is set to the allowable state; wherein, when the batch processing application determines that the status flag is in the allowable state, it resumes processing batch tasks.

[0010] Optionally, after determining whether there are currently any batch tasks being processed, the method further includes:

[0011] If there are currently batch tasks being processed, return to the step of determining whether there are currently batch tasks being processed, until it is determined that there are currently no batch tasks being processed.

[0012] Optionally, the method further includes:

[0013] Each time the status flag is set to either a halted or permitted state, the status of the status flag and the time the status flag is set are recorded in the upgrade log.

[0014] Optionally, after upgrading the batch application to the target version specified by the version upgrade instruction, the method further includes:

[0015] Output application upgrade prompt information; wherein, the application upgrade prompt information includes at least the version information of the target version.

[0016] When the status flag is in the suspended state, the batch processing application periodically checks whether the status of the status flag has changed to the released state according to a preset detection cycle.

[0017] A second aspect of this application provides an apparatus for gracefully upgrading batch processing applications, comprising:

[0018] The setting unit is used to obtain the version upgrade instruction and set the preset status flag to the aborted state; wherein, the batch processing application suspends the processing of batch tasks when it determines that the status flag is in the aborted state.

[0019] The judgment unit is used to determine whether there are currently batch tasks being processed.

[0020] An upgrade unit is used to upgrade the batch processing application to the target version specified by the version upgrade instruction if there are no batch tasks currently being processed.

[0021] A recovery unit is used to set the status flag to the release state; wherein, when the batch processing application determines that the status flag is in the release state, it resumes processing the batch tasks.

[0022] Optionally, the determining unit is further configured to:

[0023] If there are currently batch tasks being processed, return to the step of determining whether there are currently batch tasks being processed, until it is determined that there are currently no batch tasks being processed.

[0024] Optionally, the device further includes:

[0025] The recording unit is used to record the status of the status flag bit and the time of setting the status flag bit in the upgrade log each time the status flag bit is set to the aborted status or the released status.

[0026] A third aspect of this application provides an electronic device, including a memory and a processor;

[0027] The memory is used to store computer programs;

[0028] The processor is used to execute the computer program, specifically to implement the method for gracefully upgrading batch applications provided in any of the first aspects of this application.

[0029] The fourth aspect of this application provides a computer storage medium for storing a computer program, which, when executed, is specifically used to implement the method for gracefully upgrading batch processing applications provided in any one of the first aspects of this application.

[0030] This application provides a method, apparatus, device, and storage medium for gracefully upgrading a batch processing application. The method includes: obtaining a version upgrade instruction and setting a preset status flag to a suspended state; pausing batch processing when the status flag is determined to be in a suspended state; determining whether there are currently any batch tasks being processed; if there are no currently any batch tasks being processed, upgrading the batch processing application to the target version specified by the version upgrade instruction; setting the status flag to a permitted state; and resuming batch processing when the status flag is determined to be in a permitted state. This solution achieves graceful upgrading of the batch processing application without manual intervention by controlling the status flag to pause batch task processing during version upgrades and resume processing after the upgrade is completed. Attached Figure Description

[0031] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0032] Figure 1 A flowchart illustrating a method for gracefully upgrading a batch application, as provided in this application embodiment;

[0033] Figure 2 An interactive diagram of a batch processing application and an upgrade program provided for an embodiment of this application;

[0034] Figure 3 A schematic diagram of a device for gracefully upgrading batch processing applications provided in an embodiment of this application;

[0035] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0036] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0037] The following are some of the terms and related explanations that may be involved in this application.

[0038] Batch processing applications, also known as batch processing applications, are applications that process a series of tasks in batches. They typically use built-in or external scheduling tools to set the execution sequence, allowing the application to process the tasks one by one according to that sequence. When an application needs to be upgraded, the task sequence usually needs to be adjusted beforehand and then restored afterwards. Furthermore, because version upgrade windows are not fixed, the timing adjustments cannot be precisely controlled.

[0039] When upgrading existing batch processing applications (also known as bulk processing applications), in order to avoid the upgrade affecting the batch tasks in progress, the existing technical solutions are usually as follows: temporarily adjust the execution time of the batch tasks in advance so that the execution time of the batch tasks is staggered from the time window of the upgrade, or manually pause the processing of the batch tasks, and then perform the application upgrade. After the upgrade is completed, the batch tasks are executed according to the adjusted time, or the paused batch tasks are manually resumed.

[0040] It is obvious that existing technical solutions have two approaches when upgrading application versions. One approach requires adjusting the execution time of batch tasks in advance and then restoring it afterward, which necessitates two changes, introducing operational risks and hindering unattended operation. The other approach is to pause batch tasks before the application version upgrade and resume them afterward. This also requires two manual interventions and is prone to operational risks when there are many tasks.

[0041] To address the problems existing in the prior art, this application provides a method for gracefully upgrading batch processing applications. Please refer to [link to relevant documentation]. Figure 1 Here is a flowchart of the method, which may include the following steps.

[0042] In this embodiment, each step can be performed by an upgrade program used to upgrade batch processing applications.

[0043] S101, obtain the version upgrade instruction and set the preset status flag to the aborted state.

[0044] In particular, batch processing applications pause processing batch tasks when the status flag is determined to be in an aborted state.

[0045] Version upgrade commands can be obtained through any of the following methods.

[0046] The first method of obtaining the package is as follows: The upgrade program can detect in real time whether there is an installation package for the batch application on the local hard drive. When the installation package is detected, the version information of the package is parsed to obtain the version number corresponding to the package.

[0047] The upgrade program then compares the version number of the installation package with the version number of the currently running batch application. If the version number of the installation package is lower than the version number of the currently running batch application, it is determined that no upgrade is needed. If the version number of the installation package is higher than the version number of the currently running batch application, it is determined that the batch application needs to be upgraded. Thus, the upgrade command can be automatically generated based on the version number of the installation package.

[0048] The version upgrade command obtained using the first method specifies the target version, which is the version of the installation package detected on the local hard drive.

[0049] The second method involves connecting the server device hosting the upgrade program to at least one client device. Maintenance personnel can input the upgrade command on the client device, which then sends the command to the upgrade program.

[0050] In the second method of obtaining the version, the target version specified in the version upgrade command is the version manually specified by the operations and maintenance personnel when editing the version upgrade command.

[0051] In this embodiment, the status flag can be implemented in multiple ways.

[0052] As an example, one alternative implementation of the status flag is to add a status flag field to the configuration file of the database or batch processing application, and the field value can be "abort" or "allow".

[0053] When the status flag needs to be set to the aborted state, the upgrade program sets the value of the status flag field to "aborted". When the status flag needs to be set to the released state, the upgrade program sets the value of the status flag field to "release". Correspondingly, the batch application can determine the current status of the status flag by reading the value of the status flag field.

[0054] In another example, the status flag can also be a binary bit, which can be 0 or 1. When the value of the binary bit is 0, it indicates that the status flag is in the aborted state, and when the value of the binary bit is 1, it indicates that the status flag is in the released state. Thus, the upgrade program can set the aborted or released state by setting the value of this binary bit, and the batch application can determine whether it is in the aborted or released state by using the value of this binary bit.

[0055] S102, determine if there are any batch tasks currently being processed.

[0056] If there are currently batch tasks being processed, return to the step of determining whether there are currently batch tasks being processed, that is, execute step S102 again until it is determined that there are currently no batch tasks being processed.

[0057] If there are no batch tasks currently being processed, proceed to step S103.

[0058] After the upgrade program sets the status flag to the aborted state, the batch processing application may already be processing a batch task. In this case, the batch processing application cannot immediately pause the processing of the batch task, but needs to continue processing the current batch task. Only after the current batch task is completed can the processing of subsequent batch tasks be paused.

[0059] By performing step S102, the batch processing application can be avoided in the above-mentioned situations.

[0060] In some optional embodiments, after executing S102 and determining that there are currently batch tasks being processed, S102 can be executed again after a certain period of time. For example, the waiting time can be set to 1 minute, or other values ​​can be set according to the actual situation, without limitation.

[0061] In other words, after determining that there are currently batch tasks being processed, you can wait for 1 minute and then check again to see if there are any batch tasks being processed. This process continues until it is determined that there are no batch tasks being processed.

[0062] The purpose of waiting a certain amount of time before repeating the check is that batch task processing takes time. Therefore, when a batch task is detected as being processed, it may not be completed immediately. If the check is repeated immediately, it may yield the same result as the previous check, and the upgrade program will perform too many checks, consuming excessive processor resources. Waiting a certain amount of time before repeating the check avoids duplicate results and reduces the number of checks performed by the upgrade program, thereby reducing the processor resources consumed by the upgrade program.

[0063] In step S102, there are multiple ways to determine whether there are currently batch tasks being processed.

[0064] The first way to determine if there are batch tasks in progress is:

[0065] Each batch processing application maintains a list of batch task statuses corresponding to that application. This list records the execution status of each batch task that the application plans to execute. The execution status can be any one of the following: not started, in progress, failed, or successful.

[0066] Based on the batch task status list, the upgrade program can query the batch task status list of the batch processing application to be upgraded, and check the execution status of each batch task in the list one by one. If the check finds that the execution status of each batch task in the list is not "in execution", it can be determined that there is no batch task currently being processed. Conversely, if the check finds that at least one batch task in the list has the execution status of "in execution", it can be determined that there is a batch task currently being processed.

[0067] The second way to determine if there are batch tasks in progress is:

[0068] The upgrade program sends a query request to the batch processing application that needs the upgrade. This query request retrieves task information for the batch tasks currently being processed by the application. If the upgrade program receives task information from the application, it can determine that there are currently batch tasks being processed. Conversely, if the upgrade program does not receive task information from the application, it can determine that there are currently no batch tasks being processed.

[0069] S103 upgrades the batch application to the target version specified by the version upgrade command.

[0070] Referring to step S101, when the upgrade program obtains the version upgrade instruction in the first way, the target version is the version of the installation package stored on the local hard disk of the server where the upgrade program is located. When the upgrade program obtains the version upgrade instruction in the second way, the target version is the version specified by the operation and maintenance personnel on the client device.

[0071] Optionally, the version upgrade instruction may carry the storage path of the installation package for the target version to be upgraded. When the upgrade program executes S103, it can read the installation package of the target version according to the storage path in the version upgrade instruction, and then call the pre-edited installation script to install the installation package of the target version, thereby upgrading the currently running batch application to the target version corresponding to the installation package.

[0072] S104, set the status flag to the release status.

[0073] For specific configuration methods, please refer to the implementation method of the status flag bit described in step S101, which will not be repeated here.

[0074] In particular, batch processing applications resume processing batch tasks when the status flag is determined to be in the release state.

[0075] As can be seen, in the method provided in this embodiment, the status flag is equivalent to a signal light. When the status flag is in the stopped state, it is equivalent to the signal light being red, at which time the batch processing application pauses the execution of the batch tasks. When the status flag is in the allowed state, it is equivalent to the signal light being green, at which time the batch processing application resumes the execution of the batch tasks, that is, it continues to execute the batch tasks from where it was previously paused according to the original execution plan.

[0076] Optionally, the method also includes:

[0077] Each time the status flag is set to either aborted or permitted status, the status flag and the time it was set are recorded in the upgrade log.

[0078] For example, the status of the status flag and the time when the status flag was set can be recorded in the upgrade log in the format shown in Table 1 below.

[0079] Table 1

[0080] Aborted status T0 Release status T1 …… ……

[0081] The status field in Table 1 indicates the status of the status flag after each setting. For example, after the upgrade program executes S101 once, the status flag is in the aborted state. The setting time field indicates the time when the upgrade program executes this setting. For example, executing S101 at time T0 sets the status flag to the aborted state.

[0082] The benefit of recording the above information is that it makes it easier for operations and maintenance personnel to determine the time of each version upgrade of the batch processing application, as well as how many version upgrades the batch processing application has undergone in a recent period.

[0083] Optionally, after upgrading the batch application to the target version specified by the version upgrade command, it also includes:

[0084] Output application upgrade prompt message.

[0085] The application upgrade notification should include at least the version information of the target version.

[0086] Version information for the target version may include the version number of the target version, the new features of the target version compared to the previous version, and the possible differences in operation between the target version's batch application and the previous batch application.

[0087] The version number of the target version can be obtained by the upgrade program during the upgrade process by parsing the installation package of the target version.

[0088] Information such as new features and operational differences in the target version can be edited in advance by the operations and maintenance personnel in the version log corresponding to the target version. The version log of the target version can be stored together with the installation package of the target version, or it can be stored separately in a different path than the installation package of the target version.

[0089] After the upgrade program upgrades the batch application to the target version, it can read the version log of the target version to obtain the new features and operational differences of the target version.

[0090] Application upgrade notifications can be sent from the server device where the upgrade program is located to every client device connected to that server device, and then displayed on the screen of the client device, so that relevant maintenance personnel can view the version information of the target version after the upgrade in a timely manner.

[0091] Optionally, when the status flag is in the aborted state, the batch processing application periodically checks whether the status flag has changed to the release state according to a preset detection cycle.

[0092] The length of the testing cycle can be set as needed and is not limited.

[0093] For example, the detection cycle can be set to 2 minutes.

[0094] In some optional embodiments, the detection period may not be set. In this case, when the status flag is in the stopped state, the batch processing application can continuously detect whether the status flag has changed to the released state.

[0095] This application provides a method for gracefully upgrading a batch processing application. The method includes: obtaining a version upgrade instruction and setting a preset status flag to a suspended state; pausing batch processing when the batch processing application determines that the status flag is in a suspended state; determining whether there are currently any batch tasks being processed; if there are no currently any batch tasks being processed, upgrading the batch processing application to the target version specified in the version upgrade instruction; setting the status flag to a permitted state; and resuming batch processing when the batch processing application determines that the status flag is in a permitted state. This solution achieves graceful upgrading of the batch processing application without manual intervention by controlling the status flag to pause batch task processing during version upgrades and resume processing after the upgrade is completed.

[0096] Please see Figure 2 This is a schematic diagram illustrating the interaction between the batch processing application and the upgrade program using the method provided in this embodiment.

[0097] After the batch application starts, execute the following steps.

[0098] S201, Identify whether the status flag is in the release state.

[0099] If the status flag is not in the pass state, i.e., the status flag is in the stop state, proceed to step S202; if the status flag is in the pass state, proceed to step S203.

[0100] S202, waiting for the preset detection cycle.

[0101] During the waiting detection period, if the batch processing application had a batch task already being processed before the waiting started, the batch processing application will continue processing the batch task until it is finished. If the batch processing application did not have a batch task being processed before the waiting started, the batch processing application may not perform any operation during the waiting period.

[0102] For example, the detection cycle can be 2 minutes, or it can be any other duration, which can be set as needed and is not limited.

[0103] Steps S201 and S202 are equivalent to Figure 1 In the corresponding embodiment:

[0104] Batch processing applications pause processing batch tasks when the status flag is set to the aborted state.

[0105] When the status flag is in the aborted state, the batch processing application periodically checks whether the status flag has changed to the released state according to the preset detection cycle.

[0106] S203, execute batch tasks.

[0107] Step S203 is equivalent to Figure 1 In the corresponding embodiment:

[0108] When the batch processing application determines that the status flag is in the allowed state, it resumes processing batch tasks.

[0109] The upgrade process involves the following steps.

[0110] S204, set the status flag to the aborted state.

[0111] Step S204 is equivalent to Figure 1 Step S101 in the process shown.

[0112] S205, determine if there are batch tasks to be executed.

[0113] If yes, execute S205 again; otherwise, execute step S206.

[0114] Step S205 is equivalent to Figure 1 Step S102 in the process shown.

[0115] S206, upgraded.

[0116] Step S206 is equivalent to Figure 1 Step S103 in the process shown.

[0117] S207, set the status flag to the release status.

[0118] Step S207 is equivalent to Figure 1 Step S104 in the process shown.

[0119] Based on the method for gracefully upgrading batch processing applications provided in the embodiments of this application, the embodiments of this application also provide an apparatus for gracefully upgrading batch processing applications. Please refer to [link to relevant documentation]. Figure 3 This is a schematic diagram of the structure of the device, which may include the following units.

[0120] Setting unit 301 is used to obtain version upgrade instructions and set the preset status flag to the aborted state.

[0121] In particular, batch processing applications pause processing batch tasks when the status flag is determined to be in an aborted state.

[0122] Judgment unit 302 is used to determine whether there are currently batch tasks being processed.

[0123] Upgrade unit 303 is used to upgrade the batch processing application to the target version specified by the version upgrade instruction if there are no batch tasks currently being processed.

[0124] The recovery unit 304 is used to set the status flag to the release status.

[0125] In particular, batch processing applications resume processing batch tasks when the status flag is determined to be in the release state.

[0126] Optionally, the judgment unit 302 is also used for:

[0127] If there are currently batch tasks being processed, return to the step of determining whether there are currently batch tasks being processed, until it is determined that there are currently no batch tasks being processed.

[0128] Optionally, the device may also include:

[0129] The recording unit 305 is used to record the status of the status flag and the time of setting the status flag in the upgrade log each time the status flag is set to the aborted status or the released status.

[0130] Optionally, the device may also include:

[0131] The output unit 306 is used to output application upgrade prompt information; wherein the application upgrade prompt information includes at least the version information of the target version.

[0132] The specific working principle of the batch application graceful upgrade device provided in this embodiment can be found in the relevant steps of the batch application graceful upgrade method provided in any embodiment of this application, and will not be repeated here.

[0133] This application provides an apparatus for gracefully upgrading a batch processing application. The apparatus includes: a setting unit 301 that receives a version upgrade instruction and sets a preset status flag to a suspended state; the batch processing application suspends processing batch tasks when the status flag is determined to be in a suspended state; a judging unit 302 that judges whether there are currently any batch tasks being processed; an upgrade unit 303 that, if there are currently no batch tasks being processed, upgrades the batch processing application to the target version specified by the version upgrade instruction; and a recovery unit 304 that sets the status flag to a allowed state; the batch processing application resumes processing batch tasks when the status flag is determined to be in a allowed state. This solution achieves graceful upgrading of the batch processing application without manual intervention by controlling the status flag to pause processing batch tasks during version upgrades and resume processing after the upgrade is completed.

[0134] This application provides an electronic device; please refer to [link / reference]. Figure 4 It includes a memory 401 and a processor 402.

[0135] Among them, memory 401 is used to store computer programs;

[0136] The processor 402 is used to execute a computer program, which, when executed, is specifically used to implement the method for gracefully upgrading batch applications provided in any embodiment of this application.

[0137] This application also provides a computer storage medium for storing a computer program, which, when executed, is specifically used to implement the method for gracefully upgrading batch processing applications provided in any embodiment of this application.

[0138] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0139] It should be noted that the concepts of "first" and "second" mentioned in this invention are only used to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.

[0140] Those skilled in the art will be able to implement or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for gracefully upgrading batch processing applications, characterized in that, include: The system receives a version upgrade instruction and sets a preset status flag to an aborted state. The status flag is used to transmit control signals between the batch processing application and the upgrade program. When the batch processing application determines that the status flag is in an aborted state, it suspends the processing of batch tasks. Determine if there are any batch tasks currently being processed; If there are no batch tasks currently being processed, upgrade the batch processing application to the target version specified by the version upgrade instruction; The status flag is set to the allowed state; wherein, when the batch processing application determines that the status flag is in the allowed state, it resumes processing batch tasks. If there are currently batch tasks being processed, return to the step of determining whether there are currently batch tasks being processed, until it is determined that there are currently no batch tasks being processed.

2. The method according to claim 1, characterized in that, The method further includes: Each time the status flag is set to either a halted or permitted state, the status of the status flag and the time the status flag is set are recorded in the upgrade log.

3. The method according to claim 1, characterized in that, After upgrading the batch application to the target version specified by the version upgrade instruction, the method further includes: Output application upgrade prompt information; wherein, the application upgrade prompt information includes at least the version information of the target version.

4. The method according to any one of claims 1 to 3, characterized in that, When the status flag is in the suspended state, the batch processing application periodically checks whether the status of the status flag has changed to the released state according to a preset detection cycle.

5. An apparatus for gracefully upgrading batch processing applications, characterized in that, include: The setting unit is used to obtain the version upgrade instruction and set the preset status flag to the aborted state; wherein, the status flag is used to transmit control signals between the batch processing application and the upgrade program, and the batch processing application suspends the processing of batch tasks when it determines that the status flag is in the aborted state. The judgment unit is used to determine whether there are currently batch tasks being processed. An upgrade unit is used to upgrade the batch processing application to the target version specified by the version upgrade instruction if there are no batch tasks currently being processed. A recovery unit is used to set the status flag to the release state; wherein, when the batch processing application determines that the status flag is in the release state, it resumes processing the batch tasks. The determination unit is also used for: If there are currently batch tasks being processed, return to the step of determining whether there are currently batch tasks being processed, until it is determined that there are currently no batch tasks being processed.

6. The apparatus according to claim 5, characterized in that, The device further includes: The recording unit is used to record the status of the status flag bit and the time of setting the status flag bit in the upgrade log each time the status flag bit is set to the aborted status or the released status.

7. An electronic device, characterized in that, Including memory and processor; The memory is used to store computer programs; The processor is used to execute the computer program, specifically to implement the method for gracefully upgrading batch applications as described in any one of claims 1 to 4.

8. A computer storage medium, characterized in that, Used to store computer programs, which, when executed, are specifically used to implement the method for gracefully upgrading batch applications as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • System upgrading method and system upgraded by means of method

    CN103677870A

  • System and method for upgrading software in a distributed computer system

    US6976079B1