Operation control method, device, equipment, medium and program product

By introducing custom job switches and operation control components with surround section technology in distributed batch operations, the problems of batch job stability and emergency response complexity are solved, and simplified emergency processes and efficient operation and maintenance management are achieved.

CN120010955APending Publication Date: 2025-05-16INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510161287.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-13
Publication Date
2025-05-16

AI Technical Summary

Technical Problem

In existing distributed systems, the stability of batch operations is difficult to guarantee, resulting in abnormal job interruptions, the emergency mechanism is not flexible enough, manual adjustment of job status or modifying code logic is complex and risky, and timeliness is poor.

Method used

By customizing the job switch, the job control component is pre-built with the surround section technology, determine whether annotations are added to the target job, obtain the value of dynamic parameters, determine the status of the job switch, and call the application side to execute the job or directly return to the successful execution.

Benefits of technology

It reduces the emergency complexity of distributed batch operations, simplifies the change process of operation and maintenance methods, improves the maturity of operation and maintenance, realizes fast and convenient emergency treatment, and reduces human resources investment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120010955A_ABST
    Figure CN120010955A_ABST
Patent Text Reader

Abstract

The invention discloses an operation control method and device, equipment and a program product. The method is executed by a job control component pre-constructed through a surround section technology, and comprises the following steps: after determining that a target job is initialized, judging whether an annotation is added into the target job; after it is determined that the annotation is added in the target job, the operation of obtaining the value of the dynamic parameter according to the annotation and a newly-added configuration file of the target job is executed; and according to an acquisition result of the value of the dynamic parameter, determining an operation on-off state of the target operation, and according to the on-off state, selecting and calling an application side to execute the target operation, or directly determining a processing mode of the target operation in which the target operation is successfully executed. The above technical scheme is suitable for the field of distributed technology, and can reduce the emergency complexity of the distributed batch operation, simplify the change process of the operation processing mode and improve the operation and maintenance maturity by customizing the operation switch and controlling the processing mode of the distributed batch operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of distributed technology, and in particular to a job control method, device, equipment and program product. Background Art

[0002] Host batch jobs and platform-based batch jobs are gradually migrated to the distributed batch architecture. However, with the development of the business, business functions are gradually increasing, business processing logic is becoming more and more complex, batch jobs are increasing, and the dependencies between batch jobs are gradually increasing.

[0003] In existing distributed systems, there are problems such as a large number of application nodes, increased interactions between nodes, and difficulty in ensuring the stability of distributed messaging systems and distributed databases, which can easily lead to abnormal interruptions of batch jobs.

[0004] In the existing production and operation process of distributed batch jobs, when the job cannot run normally due to environmental problems or other system reasons, the emergency mechanism is not flexible enough, and the emergency handling of job abnormalities can only be achieved by manually adjusting the job status or modifying the job code logic through production changes. However, by manually adjusting the job status, the subsequent jobs that have a dependency relationship with the abnormal job cannot be triggered, making the subsequent jobs always in a pending state. The process of modifying the job code logic through production changes is relatively complicated and risky, with poor timeliness, and requires a lot of human resources for modification, which is not conducive to production safety. Summary of the invention

[0005] The present invention provides a job control method, device, equipment and program product, which can control the processing mode of distributed batch jobs through custom job switches, reduce the emergency complexity of distributed batch jobs, simplify the change process of job processing methods, and improve operation and maintenance maturity.

[0006] According to one aspect of the present invention, there is provided a job control method, which is performed by a job control component pre-built by using a wrap-around aspect technology, and includes:

[0007] After determining that the target job has completed initialization, determining whether to add annotations to the target job; wherein the target job is any job in the batch job issued by the batch job console;

[0008] After adding annotations to the target job, an operation is performed to obtain the value of the dynamic parameter according to the annotations and the newly added configuration file of the target job;

[0009] Determine the job switch state of the target job according to the acquisition result of the value of the dynamic parameter, and select to call the application side to execute the target job according to the switch state, or directly determine the processing method of the target job if the target job is successfully executed;

[0010] The job control component is inserted into the execution code of the distributed batch job in the form of a slice.

[0011] Optionally, perform operations to obtain the values ​​of dynamic parameters based on the annotations and the newly added configuration files of the target job, including:

[0012] According to the switch type in the annotation, determine whether it is a custom switch;

[0013] If yes, the return value of the custom judgment method is obtained, and the return value of the custom judgment method is determined as the value of the dynamic parameter;

[0014] If not, the namespace where the dynamic parameter of the target job is located is determined according to the annotation or the newly added configuration file, and the value of the dynamic parameter is obtained in the dynamic parameter center according to the switch value in the annotation and the namespace.

[0015] The advantage of this setting is that in production emergency scenarios, you only need to adjust the value of the dynamic parameter in the dynamic parameter center to control the processing method of the job. The operation is simple and there is no need to publish application changes, install patches, or restart containers. It can maximize the timeliness of the emergency shutdown business process of production operations.

[0016] Optionally, the job switch state of the target job is determined according to the result of obtaining the value of the dynamic parameter, including any of the following:

[0017] When the switch type is a custom switch, if the value of the dynamic parameter is a first parameter value, the switch state is determined to be an on state, and if the value of the dynamic parameter is a second parameter value, the switch state is determined to be an off state;

[0018] When the switch type is a numerical switch, if the value of the dynamic parameter is a third parameter value, the switch state is determined to be an on state, and if the value of the dynamic parameter is a fourth parameter value, the switch state is determined to be an off state;

[0019] When the switch type is a date switch, it is determined whether the dynamic parameter is the target date indicated by the date switch; if so, the switch state is determined to be an on state, otherwise, the switch state is determined to be a off state.

[0020] The advantage of this setting is that with the help of the state judgment mechanism based on dynamic parameters of different types of switches, precise control of the switch state on or off can be achieved, and a variety of optional types of switches are provided to control operations with different requirements separately.

[0021] Optionally, according to the switch state, selecting to call the application side to execute the target job, or directly determining a processing method for the target job that is successfully executed, includes:

[0022] When the switch state is on, the application side is called to execute the target job, and the execution result returned by the application side is sent to the batch job console;

[0023] When the switch state is off, the target job execution success is directly returned to the batch job console.

[0024] The advantage of this setting is that the target job that does not need to be executed on the application side can directly return the result of successful execution to the batch job console, so that the subsequent jobs can be processed normally. This solves the problem in the existing distributed batch job process that when a job is abnormal, the batch job processing will be interrupted, resulting in the inability to execute the subsequent jobs normally.

[0025] Optionally, according to the result of obtaining the value of the dynamic parameter, determining the job switch state of the target job, and according to the switch state, selecting to call the application side to execute the target job, or directly determining the processing method of the target job that successfully executes the target job, further includes:

[0026] When it is determined that there is an abnormality in the process of obtaining dynamic parameters, it is determined whether to continue to execute the batch job according to the interruption configuration value in the newly added configuration file;

[0027] If yes, determine the processing method of the target job according to the switch default value configuration value in the newly added configuration file;

[0028] If not, the processing flow of the batch job is interrupted.

[0029] The advantage of this setting is that it provides a flexible fault-tolerant method. When an exception occurs in the process of obtaining dynamic parameters, temporary emergency processing can be performed according to pre-configured values ​​to reduce manual intervention, avoid overreaction when an exception occurs, and avoid directly interrupting batch job processing and causing unnecessary business interruptions.

[0030] Optionally, after determining that an abnormality exists in the process of obtaining dynamic parameters, the method further includes:

[0031] Determine whether to send an alarm based on the monitoring alarm configuration value in the newly added configuration file;

[0032] When it is determined to send an alarm, the alarm component is called to send an event monitoring alarm for the target job.

[0033] The advantage of this setting is that when it is determined to send an alarm, the alarm component is called to send the event monitoring alarm of the target job, which realizes the automation of the alarm process. By using the monitoring alarm configuration value in the newly added configuration file, the alarm rules can be flexibly customized according to different business needs, job importance and other factors.

[0034] According to another aspect of the present invention, there is provided a job control device, which is executed by a job control component pre-built by using a wrap-around section technology, and includes:

[0035] An annotation checking module is used to determine whether annotations are added to the target job after determining that the target job has completed initialization; wherein the target job is any job in the batch job issued by the batch job console;

[0036] A dynamic parameter acquisition module is used to, after adding annotations to a target job, perform an operation of acquiring the value of a dynamic parameter according to the annotations and a newly added configuration file of the target job;

[0037] A job processing module, used to determine the job switch state of the target job according to the acquisition result of the value of the dynamic parameter, and select to call the application side to execute the target job according to the switch state, or directly determine the processing method of the target job if the target job is successfully executed;

[0038] The job control component is inserted into the execution code of the distributed batch job in the form of a slice.

[0039] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0040] at least one processor; and

[0041] a memory communicatively connected to the at least one processor; wherein,

[0042] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the job control method described in any embodiment of the present invention.

[0043] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the job control method described in any embodiment of the present invention when executed.

[0044] According to another aspect of the present invention, a computer program product is provided. The computer program product includes a computer program. When the computer program is executed by a processor, the job control method according to any embodiment of the present invention is implemented.

[0045] The technical solution of the embodiment of the present invention determines whether to add annotations to the target job after determining that the target job has completed initialization. After determining that the annotations are added to the target job, the operation of obtaining the values ​​of dynamic parameters according to the annotations and the newly added configuration file of the target job is executed. According to the acquisition result of the values ​​of the dynamic parameters, the job switch state of the target job is determined, and according to the switch state, it is selected to call the application side to execute the target job, or directly determine the processing method of the target job if the target job is successfully executed. The value of the dynamic parameter can be judged through the aspect before the job is executed, and then whether the distributed batch production job executes the business logic can be controlled, and then the processing method of the production job can be effectively controlled according to the demand, thereby simplifying the emergency process of distributed batch jobs, reducing the emergency operation steps, reducing the production emergency cost, and increasing the flexibility of distributed batch job emergency.

[0046] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0048] Figure 1 is a flow chart of a job control method provided according to Embodiment 1 of the present invention;

[0049] Figure 2 is a flow chart of an existing batch job processing provided according to an embodiment of the present invention;

[0050] Figure 3 is a batch job processing flow chart provided according to an embodiment of the present invention;

[0051] Figure 4 is a flow chart of another job control method provided according to Embodiment 2 of the present invention;

[0052] Figure 5 is a structural schematic diagram of a job control device provided according to Embodiment 3 of the present invention;

[0053] Figure 6 It is a schematic diagram of the structure of an electronic device for implementing the job control method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0054] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. 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, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0055] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0056] Embodiment 1

[0057] Figure 1 This is a flowchart of a job control method provided in the first embodiment of the present invention. This embodiment can be applied to the case where the job processing method is controlled by the job switch when the job operation is abnormal and has no impact on the production business. The method can be executed by a job control device, which can be implemented in the form of hardware and / or software and can generally be configured in a computer or processor with data processing functions. Figure 1 As shown, the method includes:

[0058] S110: After determining that the target job has completed initialization, determine whether to add annotations to the target job.

[0059] The target job is any job in the batch jobs issued by the batch job console.

[0060] Optionally, the job control method may be executed by a job control component pre-built around aspect technology, and the job control component is inserted into the execution code of the distributed batch job in the form of an aspect.

[0061] It is understandable that in the job flow of distributed batch jobs, when the preceding jobs cannot run normally, if these preceding tasks that cannot run normally have no business impact on production, then the subsequent jobs should continue to be executed to ensure the normal operation of the business. At this time, the preceding jobs need not enter the processing flow, but return the result of successful execution to the batch job console. However, in the prior art, there is no corresponding technical means to quickly and conveniently skip the processing flow of jobs that cannot run normally.

[0062] Optionally, the target job may refer to any job in a distributed batch job.

[0063] Figure 2 For an existing batch job processing flow, such as Figure 2 As shown, in the prior art, the batch job processing flow is: the batch controller sends the job execution instruction; the job is initialized; the application side business logic is called to process the job; the application side returns information to the batch job console according to the business processing result; when the business processing result is that the job is executed successfully, the job execution success is returned to the batch job console; when the business processing result is that the job execution fails, the job execution failure is returned to the batch job console; after returning the information, the processing flow of the current job is terminated. It can be seen that in the prior art, if the job execution fails, the job execution failure is directly returned, and the subsequent job cannot continue to execute.

[0064] Optionally, the present invention proposes to control the job switch based on dynamic parameters after the job is initialized, so as to determine whether the target job enters the application-side processing flow.

[0065] Optionally, a job control section may be added after the job is initialized through the wrap-around section technology, and the job control method described in the present invention may be implemented through the job control section.

[0066] Figure 3 is an optional batch job processing flow chart proposed by the present invention, such as Figure 3 As shown in the figure, after the job is initialized, a job switch judgment aspect, that is, a job control aspect, is added. If the switch is on, the application-side business logic processing is called up. If the switch is off, the result of successful job execution is returned to the batch controller, which is also the batch job console.

[0067] Optionally, for jobs that require intervention or control, annotations can be introduced in the job, and the annotations contain at least a switch type, a switch value, and a first namespace. For example, the annotation can be @jobswitch(switchkey='XXX', switchtype=value / batchDate / workDate / customtype, namespace='XXX'), where switchkey is the switch value, switchtype is the switch type, namespace is the first namespace, and the switch types are divided into value, batchDate / workDate, and costomtype.

[0068] Optionally, if no annotation is added to the target job, the business logic processing on the application side can be directly called to send the target job to the application side for execution.

[0069] S120: After adding the annotation to the target job, an operation of obtaining the value of the dynamic parameter according to the annotation and the newly added configuration file of the target job is performed.

[0070] Optionally, after adding annotations to the target job, determine whether the switch type is a custom switch. Continuing with the previous example, when the switch type is value or batchDate / workDate, the switch type is a non-custom switch. When the switch type is costomtype, the switch type is determined to be a custom switch.

[0071] Optionally, for a custom switch, the annotation also includes the beanname of the custom switch interface. The interface is called according to the beanname to execute the judgment logic written by the user in the interface, and the return value of the interface is used as the value of the dynamic parameter. The return value can be true or false.

[0072] In an optional example, the judgment logic written by the user may be whether the current date is an odd number, and if so, return true, otherwise, return false.

[0073] Optionally, for a non-customized switch, you need to determine the specified namespace in the dynamic parameter center based on the annotation or the newly added configuration file, and determine the value of the dynamic parameter in the specified namespace based on the switch value.

[0074] Optionally, a new configuration file is also preloaded in the target job. The new configuration file is configured in the resource directory of the target job. The configuration items in the new configuration file may include a second namespace, interrupt configuration, switch default value configuration, and monitoring alarm configuration.

[0075] Optionally, when the namespace value is configured in the first namespace in the annotation, the value of the dynamic parameter is obtained in the dynamic parameter center according to the value of the first namespace; when the first namespace in the annotation is not configured, the value of the dynamic parameter is obtained in the dynamic parameter center according to the value of the second namespace in the newly added configuration file.

[0076] Furthermore, when the first namespace in the annotation and the second namespace in the newly added configuration file both configure the value of the namespace, the value in the first namespace is selected; the second namespace can be configured with two values ​​corresponding to jobswitch.namespace and batchtool.namespace at the same time. When no value is configured in the first namespace, first determine whether jobswitch.namespace in the second namespace has a configuration value. If so, obtain the value of the dynamic parameter in the dynamic parameter center according to the value configured in jobswitch.namespace. If not, obtain the value of the dynamic parameter in the dynamic parameter center according to the value configured in batchtool.namespace.

[0077] It is understandable that the dynamic parameter center may involve a large number of dynamic parameters for different purposes. Through the namespace, these different types of parameters can be divided into different categories. According to the namespace, the switch value can be searched in the specified area in the dynamic parameter center.

[0078] Optionally, the switch value supports specifying parameter keys and job names. When the switchkey value is configured, the configured switchkey is used as the key value of the dynamic parameter parameter. If the switchkey value is not configured, the job name of the target job is used as the dynamic parameter switch name. If multiple jobs need to share a key, the same switchkey can be configured.

[0079] Continuing with the previous example, when switchkey in the annotation = 'a', the dynamic parameter with the key value of a is determined in the dynamic parameter center, and then the value of the dynamic parameter of the target job is determined. When the switchkey in the annotation is not configured with a value, the dynamic parameter with the key value of the target job name is determined in the dynamic parameter center, and then the value of the dynamic parameter of the target job is determined.

[0080] S130. Determine the job switch state of the target job according to the acquisition result of the dynamic parameter value, and select to call the application side to execute the target job according to the switch state, or directly determine the processing method of the target job that has been successfully executed.

[0081] Optionally, when the switch type is a numerical switch value, if the value of the dynamic parameter is 0, the job switch state of the target job is determined to be closed; if the value of the dynamic parameter is 1, the job switch state of the target job is determined to be open.

[0082] Optionally, when the switch type is a date switch batchDate / workDate, it is determined whether the value of the dynamic parameter is the current batch date / online date. If so, the job switch state of the target job is determined to be on, otherwise, the job switch state of the target job is off. Switches of the batchDate / workDate type are generally suitable for one-time jobs.

[0083] Optional. When the switch type is customtype, if the return value is false, the job switch status of the target job is closed; if the return value is true, the job switch status of the target job is opened.

[0084] Optionally, when it is determined that the job switch of the target job is in the on state, it is determined that the target job can be executed by the application side, then the business logic processing on the application side is called up, and the result of successful or failed execution is returned to the batch job console according to the execution result on the application side; when it is determined that the job switch of the target job is in the off state, the target job is not executed, and the result of successful execution of the target job is directly fed back to the batch job console.

[0085] The technical solution of the embodiment of the present invention determines whether to add annotations to the target job after determining that the target job has completed initialization. After determining that the annotations are added to the target job, the operation of obtaining the values ​​of dynamic parameters according to the annotations and the newly added configuration file of the target job is executed. According to the acquisition result of the values ​​of the dynamic parameters, the job switch state of the target job is determined, and according to the switch state, it is selected to call the application side to execute the target job, or directly determine the processing method of the target job if the target job is successfully executed. The value of the dynamic parameter can be judged through the aspect before the job is executed, and then whether the distributed batch production job executes the business logic can be controlled, and then the processing method of the production job can be effectively controlled according to the demand, thereby simplifying the emergency process of distributed batch jobs, reducing the emergency operation steps, reducing the production emergency cost, and increasing the flexibility of distributed batch job emergency.

[0086] Embodiment 2

[0087] Figure 4 This is a flowchart of a job control method provided by Embodiment 2 of the present invention. This embodiment specifically describes the job control method based on the above embodiments. Figure 4 As shown, the method includes:

[0088] S210: After determining that the target job has completed initialization, determine whether to add annotations to the target job.

[0089] S220. After adding annotations to the target job, determine whether it is a custom switch based on the switch type in the annotation; if so, execute step S230; if not, execute step S240.

[0090] S230, obtaining the return value of the custom judgment method, and determining the return value of the custom judgment method as the value of the dynamic parameter; executing step S250.

[0091] Optionally, if the switch type is a custom switch, the value of the dynamic parameter can be determined by executing the judgment logic of the custom switch without calling the corresponding value in the dynamic parameter center.

[0092] S240. Determine the namespace where the dynamic parameters of the target job are located according to the annotation or the newly added configuration file, and obtain the value of the dynamic parameter in the dynamic parameter center according to the switch value and the namespace in the annotation; execute step S250.

[0093] It is understandable that in order to facilitate emergency handling of production operations, a dynamic parameter center should be connected and at least one parameter calling method of the dynamic parameter center should be supported.

[0094] The advantage of this setting is that in production emergency scenarios, you only need to adjust the value of the dynamic parameter in the dynamic parameter center to control the processing method of the job. The operation is simple and there is no need to publish application changes, install patches, or restart containers. It can maximize the timeliness of the emergency shutdown business process of production operations.

[0095] S250. Determine the job switch state of the target job according to the acquisition result of the dynamic parameter value.

[0096] Wherein, determining the job switch state of the target job according to the result of obtaining the value of the dynamic parameter may include any of the following:

[0097] When the switch type is a custom switch, if the value of the dynamic parameter is a first parameter value, the switch state is determined to be an on state, and if the value of the dynamic parameter is a second parameter value, the switch state is determined to be an off state;

[0098] When the switch type is a numerical switch, if the value of the dynamic parameter is a third parameter value, the switch state is determined to be an on state, and if the value of the dynamic parameter is a fourth parameter value, the switch state is determined to be an off state;

[0099] When the switch type is a date switch, it is determined whether the dynamic parameter is the target date indicated by the date switch; if so, the switch state is determined to be an on state, otherwise, the switch state is determined to be a off state.

[0100] S260: According to the switch state, select to call the application side to execute the target job, or directly determine the processing method of the target job that is successfully executed.

[0101] Among them, according to the switch state, selecting to call the application side to execute the target job, or directly determining the processing method of the target job that is successfully executed, may include:

[0102] When the switch state is on, the application side is called to execute the target job, and the execution result returned by the application side is sent to the batch job console;

[0103] When the switch state is off, the target job execution success is directly returned to the batch job console.

[0104] Optionally, according to the result of obtaining the value of the dynamic parameter, determining the job switch state of the target job, and according to the switch state, selecting to call the application side to execute the target job, or directly determining the processing method of the target job that successfully executes the target job, may also include:

[0105] When it is determined that there is an abnormality in the process of obtaining dynamic parameters, it is determined whether to continue to execute the batch job according to the interruption configuration value in the newly added configuration file;

[0106] If yes, determine the processing method of the target job according to the switch default value configuration value in the newly added configuration file;

[0107] If not, the processing flow of the batch job is interrupted.

[0108] In an optional example, when it is determined that there is an exception in the process of obtaining dynamic parameters, the interrupt configuration value in the newly added configuration file can be obtained first, and whether to continue executing the batch job can be determined based on the interrupt configuration value. For example, the interrupt configuration can be jobswitch.interrupt=true / false. When the interrupt configuration value is true, the processing flow of the batch job is interrupted. If it is false, the batch job continues to be executed.

[0109] Furthermore, after it is determined to continue executing the batch job, the processing method of the target job is determined according to the switch default value configuration in the newly added configuration file. For example, the switch default value configuration can be jobswitch.defaultkeyvalue=0 / 1. When the switch default value configuration value is 0, the job logic is not executed, and the result of successful execution is directly returned to the batch job console; otherwise, the target job is sent to the application side for continued execution.

[0110] Optionally, after determining that an abnormality exists in the process of obtaining dynamic parameters, the following may also be included:

[0111] Determine whether to send an alarm based on the monitoring alarm configuration value in the newly added configuration file;

[0112] When it is determined to send an alarm, the alarm component is called to send an event monitoring alarm for the target job.

[0113] In an optional example, after determining that there is an abnormality in the process of obtaining dynamic parameters, it is also possible to determine whether to send an alarm based on the monitoring alarm configuration in the newly added configuration file. For example, the monitoring alarm configuration can be jobswitch.amcevent=true / false. When the monitoring alarm configuration value is true, it is determined to send an alarm. When the monitoring alarm configuration value is false, it is determined not to send an alarm.

[0114] The technical solution of the embodiment of the present invention determines whether to add annotations to the target job after determining that the target job has completed initialization. After determining that the annotations are added to the target job, the operation of obtaining the values ​​of dynamic parameters according to the annotations and the newly added configuration file of the target job is executed. According to the acquisition result of the values ​​of the dynamic parameters, the job switch state of the target job is determined, and according to the switch state, it is selected to call the application side to execute the target job, or directly determine the processing method of the target job if the target job is successfully executed. The value of the dynamic parameter can be judged through the aspect before the job is executed, and then whether the distributed batch production job executes the business logic can be controlled, and then the processing method of the production job can be effectively controlled according to the demand, thereby simplifying the emergency process of distributed batch jobs, reducing the emergency operation steps, reducing the production emergency cost, and increasing the flexibility of distributed batch job emergency.

[0115] Embodiment 3

[0116] Figure 5 This is a schematic diagram of the structure of a job control device provided in Embodiment 3 of the present invention. Figure 5 As shown, the device includes: an annotation checking module 310 , a dynamic parameter acquisition module 320 and a job processing module 330 .

[0117] The annotation checking module 310 is used to determine whether annotations are added to the target job after determining that the target job has completed initialization.

[0118] The dynamic parameter acquisition module 320 is used to perform an operation of acquiring the value of the dynamic parameter according to the annotation and the newly added configuration file of the target job after adding the annotation to the target job.

[0119] The job processing module 330 is used to determine the job switch state of the target job according to the acquisition result of the dynamic parameter value, and according to the switch state, select to call the application side to execute the target job, or directly determine the processing method of the target job if the target job is successfully executed.

[0120] The technical solution of the embodiment of the present invention determines whether to add annotations to the target job after determining that the target job has completed initialization. After determining that the annotations are added to the target job, the operation of obtaining the values ​​of dynamic parameters according to the annotations and the newly added configuration file of the target job is executed. According to the acquisition result of the values ​​of the dynamic parameters, the job switch state of the target job is determined, and according to the switch state, it is selected to call the application side to execute the target job, or directly determine the processing method of the target job if the target job is successfully executed. The value of the dynamic parameter can be judged through the aspect before the job is executed, and then whether the distributed batch production job executes the business logic can be controlled, and then the processing method of the production job can be effectively controlled according to the demand, thereby simplifying the emergency process of distributed batch jobs, reducing the emergency operation steps, reducing the production emergency cost, and increasing the flexibility of distributed batch job emergency.

[0121] Based on the above embodiments, the dynamic parameter acquisition module 320 can be specifically used for:

[0122] According to the switch type in the annotation, determine whether it is a custom switch;

[0123] If yes, the return value of the custom judgment method is obtained, and the return value of the custom judgment method is determined as the value of the dynamic parameter;

[0124] If not, the namespace where the dynamic parameter of the target job is located is determined according to the annotation or the newly added configuration file, and the value of the dynamic parameter is obtained in the dynamic parameter center according to the switch value in the annotation and the namespace.

[0125] Based on the above embodiments, the job processing module 330 may include a job switch state determination unit for performing any of the following:

[0126] When the switch type is a custom switch, if the value of the dynamic parameter is a first parameter value, the switch state is determined to be an on state, and if the value of the dynamic parameter is a second parameter value, the switch state is determined to be an off state;

[0127] When the switch type is a numerical switch, if the value of the dynamic parameter is a third parameter value, the switch state is determined to be an on state, and if the value of the dynamic parameter is a fourth parameter value, the switch state is determined to be an off state;

[0128] When the switch type is a date switch, it is determined whether the dynamic parameter is the target date indicated by the date switch; if so, the switch state is determined to be an on state, otherwise, the switch state is determined to be a off state.

[0129] Based on the above embodiments, the job processing module 330 may further include a job processing mode determination unit, which is used to:

[0130] When the switch state is on, the application side is called to execute the target job, and the execution result returned by the application side is sent to the batch job console;

[0131] When the switch state is off, the target job execution success is directly returned to the batch job console.

[0132] Based on the above embodiments, the job processing module 330 can also be specifically used for:

[0133] When it is determined that there is an abnormality in the process of obtaining dynamic parameters, it is determined whether to continue to execute the batch job according to the interruption configuration value in the newly added configuration file;

[0134] If yes, determine the processing method of the target job according to the switch default value configuration value in the newly added configuration file;

[0135] If not, the processing flow of the batch job is interrupted.

[0136] On the basis of the above embodiments, an alarm monitoring module may also be included, which is used to:

[0137] Determine whether to send an alarm based on the monitoring alarm configuration value in the newly added configuration file;

[0138] When it is determined to send an alarm, the alarm component is called to send an event monitoring alarm for the target job.

[0139] The operation control device provided in the embodiment of the present invention can execute the operation control method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0140] Embodiment 4

[0141] Figure 6A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0142] like Figure 6 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0143] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0144] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor 11 executes the various methods and processes described above, such as the job control method described in the embodiment of the present invention. That is:

[0145] After determining that the target job has completed initialization, determining whether to add annotations to the target job; wherein the target job is any job in the batch job issued by the batch job console;

[0146] After adding annotations to the target job, an operation is performed to obtain the value of the dynamic parameter according to the annotations and the newly added configuration file of the target job;

[0147] According to the acquisition result of the value of the dynamic parameter, the job switch state of the target job is determined, and according to the switch state, the application side is selected to be called to execute the target job, or the processing method of the target job that is successfully executed is directly determined; wherein the job control component is inserted into the execution code of the distributed batch job in the form of a section.

[0148] In some embodiments, the job control method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the job control method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the job control method in any other appropriate manner (e.g., by means of firmware).

[0149] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0150] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0151] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0152] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0153] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0154] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0155] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0156] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for controlling a job, characterized in that: Executed by pre-built job control components using wrapper technology, including: After determining that the target job has completed initialization, determining whether to add annotations to the target job; wherein the target job is any job in the batch job issued by the batch job console; After adding annotations to the target job, an operation is performed to obtain the value of the dynamic parameter according to the annotations and the newly added configuration file of the target job; Determine the job switch state of the target job according to the acquisition result of the value of the dynamic parameter, and select to call the application side to execute the target job according to the switch state, or directly determine the processing method of the target job if the target job is successfully executed; The job control component is inserted into the execution code of the distributed batch job in the form of a slice.

2. The method according to claim 1, characterized in that Perform operations to obtain the values ​​of dynamic parameters based on annotations and newly added configuration files of the target job, including: According to the switch type in the annotation, determine whether it is a custom switch; If yes, the return value of the custom judgment method is obtained, and the return value of the custom judgment method is determined as the value of the dynamic parameter; If not, the namespace where the dynamic parameter of the target job is located is determined according to the annotation or the newly added configuration file, and the value of the dynamic parameter is obtained in the dynamic parameter center according to the switch value in the annotation and the namespace.

3. The method according to claim 2, characterized in that According to the result of obtaining the value of the dynamic parameter, the job switch state of the target job is determined, including any of the following: When the switch type is a custom switch, if the value of the dynamic parameter is a first parameter value, the switch state is determined to be an on state, and if the value of the dynamic parameter is a second parameter value, the switch state is determined to be an off state; When the switch type is a numerical switch, if the value of the dynamic parameter is a third parameter value, the switch state is determined to be an on state, and if the value of the dynamic parameter is a fourth parameter value, the switch state is determined to be an off state; When the switch type is a date switch, it is determined whether the dynamic parameter is the target date indicated by the date switch; if so, the switch state is determined to be an on state, otherwise, the switch state is determined to be a off state.

4. The method according to claim 1, characterized in that According to the switch state, the application side is selected to execute the target job, or a processing method of the target job that is successfully executed is directly determined, including: When the switch state is on, the application side is called to execute the target job, and the execution result returned by the application side is sent to the batch job console; When the switch state is off, the target job execution success is directly returned to the batch job console.

5. The method according to claim 2, characterized in that: According to the acquisition result of the value of the dynamic parameter, the job switch state of the target job is determined, and according to the switch state, the application side is selected to execute the target job, or the processing method of the target job that the target job is successfully executed is directly determined, and also includes: When it is determined that there is an abnormality in the process of obtaining dynamic parameters, it is determined whether to continue to execute the batch job according to the interruption configuration value in the newly added configuration file; If yes, determine the processing method of the target job according to the switch default value configuration value in the newly added configuration file; If not, the processing flow of the batch job is interrupted.

6. The method according to claim 5, characterized in that After determining that there is an abnormality in the process of obtaining dynamic parameters, it also includes: Determine whether to send an alarm based on the monitoring alarm configuration value in the newly added configuration file; When it is determined to send an alarm, the alarm component is called to send an event monitoring alarm for the target job.

7. A work control device, characterized in that: Executed by pre-built job control components using wrapper technology, including: An annotation checking module is used to determine whether annotations are added to the target job after determining that the target job has completed initialization; wherein the target job is any job in the batch job issued by the batch job console; A dynamic parameter acquisition module is used to, after adding annotations to a target job, perform an operation of acquiring the value of a dynamic parameter according to the annotations and a newly added configuration file of the target job; A job processing module, used to determine the job switch state of the target job according to the acquisition result of the value of the dynamic parameter, and select to call the application side to execute the target job according to the switch state, or directly determine the processing method of the target job if the target job is successfully executed; The job control component is inserted into the execution code of the distributed batch job in the form of a slice.

8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the job control method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the job control method according to any one of claims 1 to 6 when executed.

10. A computer program product, characterized in that The computer program product comprises a computer program, which, when executed by a processor, implements the job control method according to any one of claims 1 to 6.