Batch task hot deployment method, device and equipment and storage medium

By encapsulating the business and dynamically constructing beans in the financial system, hot deployment of batch tasks is achieved, which solves the problems of heavy development workload and long service gaps caused by adding and deleting tasks in the financial system, and improves the efficiency and flexibility of task operations.

CN120743320AActive Publication Date: 2025-10-03湖南长银五八消费金融股份有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511232739.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-01
Publication Date
2025-10-03
Estimated Expiration
2045-09-01

AI Technical Summary

Technical Problem

The frequent addition and deletion of batch tasks in financial systems results in heavy workload for developers and long periods of system service downtime.

Method used

By screening and encapsulating the target financial system's business, a basic service layer is formed. Reusable components are used to construct initial beans, and batch tasks are dynamically loaded and unloaded to the task pool of the Spring batch framework to realize changes in task status during operation.

Benefits of technology

It reduces the workload of developers, reduces the risk of system service interruption, improves the efficiency and flexibility of task operations, and avoids service interruption caused by traditional downtime.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120743320A_ABST
    Figure CN120743320A_ABST
Patent Text Reader

Abstract

The invention discloses a batch task hot deployment method and device, equipment and a storage medium, and relates to the technical field of data hot deployment, and the method comprises the following steps: packaging a target service to obtain a reusable component; obtaining an initial task configuration file, constructing different initial Bean, and obtaining target batch tasks by using the initial Bean; screening out first target Bean from the initial Bean, and judging whether each target batch task is a task loaded into the task pool for the first time or not according to each first target Bean to obtain a judgment result; and loading each target batch task to a task pool according to a judgment result, and calling a reusable component by using a second target Bean included in the first target Bean in the task pool so as to change the tasks in the financial system when the financial system is in a running state. Through arrangement of basic services and real-time introduction of the tasks, loading and unloading of the batch tasks are realized under the condition that online release is not needed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data hot deployment, and in particular to a batch task hot deployment method, device, equipment and storage medium. Background Art

[0002] Financial systems are characterized by complex operations and logic, and they must meet the data and functional requirements of multiple parties, including users, back-office personnel, finance personnel, auditors, and external parties. Because these requirements typically require large amounts of data, financial systems typically use batch tasks executed during the day and at the end of the day to calculate and aggregate data. Frequent increases and changes in requirements require frequent adjustments to batch tasks, resulting in frequent additions and deletions of batch tasks.

[0003] Currently, the common approach to frequently adding and deleting batch tasks in financial systems is: To add a new batch task, the corresponding business functionality must be developed based on the needs, the corresponding data changes, aggregation, and statistics must be made. The corresponding batch task is then defined, tested, and released online after downtime. This ensures that the new batch task is added to the system and regularly activated. To delete a batch task, the corresponding batch task must also be deleted or commented out, tested, and released online after downtime. If the batch task is subsequently needed, the same process as adding a new batch task must be repeated. This approach results in a high workload for developers and long periods of downtime in system services. Summary of the Invention

[0004] In view of this, the purpose of the present invention is to provide a batch task hot deployment method, device, equipment and storage medium, which can realize the loading and unloading of batch tasks without the need for online release by arranging basic services and task real-time input. The specific scheme is as follows:

[0005] In a first aspect, the present application provides a method for hot deployment of batch tasks, comprising:

[0006] Screening initial businesses in the target financial system, encapsulating the target businesses screened from the initial businesses to obtain reusable components corresponding to the target businesses, and forming a basic service layer using the reusable components;

[0007] Obtaining initial task configuration files in different file formats, dynamically constructing different initial beans based on each of the initial task configuration files, and using each of the initial beans to obtain each target batch task;

[0008] Filtering the first target beans corresponding to the target batch tasks from the initial beans, traversing the first target beans, and determining whether the target batch tasks are the first tasks loaded into the target task pool based on the first target beans, to obtain a corresponding determination result; wherein the target task pool is a task pool in the Spring batch framework corresponding to the target financial system;

[0009] Based on the judgment result, each of the target batch tasks is loaded into the target task pool, and in the target task pool, the second target bean included in the first target bean is used to call each of the reusable components in the basic service layer, so as to change the tasks in the target financial system when the target financial system is in a running state; wherein the first target bean is a job corresponding to each of the target batch tasks, and the second target bean is a ManagerStep included in the job.

[0010] Optionally, the initial Bean includes Job, ManagerStep, partitioner, Master-side message channel, Master-side output stream, WorkerStep, Worker-side message channel, and Worker-side input stream.

[0011] Optionally, the dynamically constructing different initial beans based on the initial task configuration files includes:

[0012] Performing file format conversion on the initial task configuration files in different file formats to convert each of the initial task configuration files into a target task configuration file in a target file format;

[0013] Each target task configuration file is converted into a target entity, the target entity corresponding to the target task configuration file is parsed to obtain target task configuration parameters, and different initial beans are dynamically constructed according to each target task configuration parameter.

[0014] Optionally, the loading each target batch task into the target task pool according to the judgment result includes:

[0015] If the judgment result indicates that each target batch task is a task loaded into the target task pool for the first time, the first target bean corresponding to each target batch task is added to the target task pool, and the second target bean corresponding to the first target bean is added to the target task pool, so as to load each target batch task into the target task pool.

[0016] Optionally, the loading each target batch task into the target task pool according to the judgment result includes:

[0017] If the judgment result indicates that each target batch task is not a task loaded into the target task pool for the first time, the historical first target bean corresponding to each target batch task is deleted from the target task pool, the historical second target bean corresponding to the historical first target bean is deleted from the target task pool, and the partitioner, the master-side message channel, the master-side output stream, the worker-side message channel, and the worker-side input stream corresponding to the historical first target bean are deleted from the target task pool;

[0018] Adding a new first target bean corresponding to each target batch task to the target task pool, and adding a new second target bean corresponding to the new first target bean to the target task pool, so as to load each target batch task into the target task pool.

[0019] Optionally, the batch task hot deployment method further includes: obtaining a task name corresponding to the batch task to be uninstalled, and searching the target task pool for a first target bean to be uninstalled corresponding to the batch task to be uninstalled according to the task name;

[0020] Deleting the first target bean that needs to be uninstalled corresponding to the batch task that needs to be uninstalled from the target task pool, and searching for the second target bean that needs to be uninstalled corresponding to the first target bean that needs to be uninstalled from the target task pool;

[0021] The second target bean to be uninstalled is deleted from the target task pool, and the partitioner, the master-side message channel, the master-side output stream, the worker-side message channel, and the worker-side input stream corresponding to the first target bean to be uninstalled are deleted from the target task pool, so as to change the tasks in the target financial system when the target financial system is in a running state.

[0022] In a second aspect, the present application provides a batch task hot deployment device, comprising:

[0023] A business encapsulation module is used to screen the initial businesses in the target financial system, encapsulate the target businesses screened from the initial businesses, obtain reusable components corresponding to each target business, and use each reusable component to form a basic service layer;

[0024] The batch task acquisition module obtains initial task configuration files in different file formats, dynamically constructs different initial beans based on each of the initial task configuration files, and uses each of the initial beans to obtain each target batch task;

[0025] A task judgment module is configured to filter out the first target beans corresponding to each target batch task from each of the initial beans, traverse each of the first target beans, and determine, based on each of the first target beans, whether each target batch task is a task loaded into a target task pool for the first time, thereby obtaining a corresponding judgment result; wherein the target task pool is a task pool in the Spring batch framework corresponding to the target financial system;

[0026] a task loading module, configured to load each of the target batch tasks into the target task pool based on the judgment result, and to call each of the reusable components in the basic service layer in the target task pool using the second target bean contained in the first target bean, so as to change the tasks in the target financial system when the target financial system is in operation; wherein the first target bean is a job corresponding to each of the target batch tasks, and the second target bean is a ManagerStep contained in the job.

[0027] Optionally, the initial Bean includes Job, ManagerStep, partitioner, Master-side message channel, Master-side output stream, WorkerStep, Worker-side message channel, and Worker-side input stream;

[0028] Accordingly, the device further includes:

[0029] A task name acquisition module is used to obtain the task name corresponding to the batch task to be uninstalled, and search the target task pool for the first target bean to be uninstalled corresponding to the batch task to be uninstalled according to the task name;

[0030] A first Bean deletion module is configured to delete the first target Bean to be uninstalled corresponding to the batch task to be uninstalled from the target task pool, and search the target task pool for the second target Bean to be uninstalled corresponding to the first target Bean to be uninstalled;

[0031] The second bean deletion module is configured to delete the second target bean to be uninstalled from the target task pool, and delete the partitioner, the master-side message channel, the master-side output stream, the worker-side message channel, and the worker-side input stream corresponding to the first target bean to be uninstalled from the target task pool, so as to modify the tasks in the target financial system when the target financial system is in operation.

[0032] In a third aspect, the present application provides an electronic device, comprising:

[0033] Memory, used to store computer programs;

[0034] A processor is used to execute the computer program to implement the aforementioned batch task hot deployment method.

[0035] In a fourth aspect, the present application provides a computer-readable storage medium for storing a computer program, which implements the aforementioned batch task hot deployment method when executed by a processor.

[0036] In this application, the initial businesses in the target financial system are first screened, and the target businesses screened out from the initial businesses are encapsulated to obtain reusable components corresponding to each of the target businesses, and the reusable components are used to form a basic service layer; then, initial task configuration files in different file formats are obtained, different initial beans are dynamically constructed based on each of the initial task configuration files, and each of the initial beans is used to obtain each target batch task; then, the first target beans corresponding to each of the target batch tasks are screened out from each of the initial beans, and each of the first target beans is traversed to determine whether each of the target batch tasks is a task loaded into the target task pool for the first time, so as to obtain a corresponding judgment result; wherein, the target task pool is the Spring Framework corresponding to the target financial system. The task pool in the batch framework; finally, according to the judgment result, each of the target batch tasks is loaded into the target task pool, and the second target Bean contained in the first target Bean is used in the target task pool to call each of the reusable components in the basic service layer, so as to change the tasks in the target financial system when the target financial system is in operation; wherein, the first target Bean is the Job corresponding to each of the target batch tasks, and the second target Bean is the ManagerStep contained in the Job. It can be seen that the present application encapsulates the commonly used businesses in the financial system to form corresponding reusable components, and summarizes them in the basic service layer. In this way, when the system needs to use these businesses, it does not need to recode and retest the businesses. It can be achieved by directly calling the reusable components in the basic service layer, which greatly reduces the workload of developers and reduces the risk of problems in functional development. The task logic is defined by the configuration file, and the system parses the configuration at runtime and dynamically generates the corresponding Job Bean and Step Bean, registers them with the Spring container and task scheduling pool, so that the task can be executed immediately, avoiding the service interruption caused by downtime in the traditional way. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0038] Figure 1 This is a flow chart of a batch task hot deployment method disclosed in this application;

[0039] Figure 2This is a schematic diagram of a hot deployment loading task process disclosed in this application;

[0040] Figure 3 This is a schematic diagram of a specific hot deployment loading task process disclosed in this application;

[0041] Figure 4 This is a schematic diagram of a hot deployment and uninstallation task process disclosed in this application;

[0042] Figure 5 This is a structural diagram of a batch task hot deployment device disclosed in this application;

[0043] Figure 6 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION

[0044] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. 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 making creative efforts are within the scope of protection of the present invention.

[0045] Currently, the way to modify batch tasks in financial systems is problematic, resulting in heavy developer workload and long downtime for system services. To address this, this application provides a batch task hot deployment method that orchestrates basic services and tasks in real time, enabling batch tasks to be loaded and unloaded without requiring a live release.

[0046] See also Figure 1 As shown, an embodiment of the present invention discloses a batch task hot deployment method, including:

[0047] Step S11 : Screening the initial businesses in the target financial system, encapsulating the target businesses screened out from the initial businesses to obtain reusable components corresponding to the target businesses, and using the reusable components to form a basic service layer.

[0048] In this implementation, the basic business operations involved in batch tasks are summarized and refined into a basic service layer, which includes various small-scale basic services. When batch tasks need to be added or deleted, the basic services are orchestrated and transmitted in real time, allowing batch tasks to be loaded and unloaded without the need for online release.

[0049] In this embodiment, based on the business experience of the financial system, it is necessary to first summarize and summarize the commonly used basic data modification, aggregation, and statistical functions (i.e., the target business), and then encapsulate these summarized functions one by one at a smaller granularity to form a basic service layer. At this point, the generated basic service layer can cover more than 90% of business scenarios. By encapsulating commonly used functions one by one and forming a basic service layer, on the one hand, a standardized interface is provided, which facilitates the financial system to dynamically call the interface to implement functions, eliminating the need to repeat business-specific coding every time a task is changed, reducing the workload of developers. On the other hand, by encapsulating at the business granularity, flexible orchestration is supported, increasing the flexibility of business use.

[0050] Step S12: obtaining initial task configuration files in different file formats, dynamically constructing different initial beans based on the initial task configuration files, and obtaining target batch tasks using the initial beans.

[0051] It should be noted that the initial Bean in this embodiment includes Job, ManagerStep, partitioner, Master-side message channel, Master-side output stream, WorkerStep, Worker-side message channel, and Worker-side input stream.

[0052] In this embodiment, the process of dynamically constructing different initial beans based on each initial task configuration file may specifically include: performing file format conversion on initial task configuration files of different file formats to convert each initial task configuration file into a target task configuration file of a target file format; converting each target task configuration file into a target entity, parsing the target entity corresponding to the target task configuration file to obtain target task configuration parameters, and dynamically constructing different initial beans according to each target task configuration parameter; specifically, Figure 2As shown, first, task configuration files in various formats (i.e., initial task configuration files) are unified into a standard file format, and files in the standard file format (i.e., target task configuration files) are converted into standard resource entities (i.e., target entities); the standard resource entities are parsed to obtain the various task configuration parameters required by the system; and then, based on the configuration parameters, the various beans required for the Spring Batch batch task definition are constructed, such as: Job, ManagerStep, partitioner, Master-side message channel, Master-side output stream, WorkerStep, Worker-side message channel, Worker-side input stream, etc. It can be understood that this embodiment supports multiple ways of configuring tasks, such as XML files, Excel files, and JSON files. The initial task configuration file includes the batch task ID (Identity Document, i.e., identity identifier), name, execution time, execution frequency, function blocks of the basic service layer called during execution, call order, execution post-processing, and other information.

[0053] It should be noted that the above-mentioned beans such as Job, Step, Partitioner, and message channel of Spring Batch that are dynamically generated according to configuration parameters include the following key components: JobBuilderFactory: builds Job instances; StepBuilderFactory: builds Step instances; Partitioner: implements data sharding and parallel processing.

[0054] Step S13: Filter out the first target beans corresponding to each of the target batch tasks from each of the initial beans, traverse each of the first target beans, and determine whether each of the target batch tasks is a task loaded into the target task pool for the first time based on each of the first target beans to obtain a corresponding judgment result; wherein, the target task pool is a task pool in the Spring batch framework corresponding to the target financial system.

[0055] In this embodiment, the various Spring Batch-related beans constructed by the constructor are first aggregated to select the Spring Batch Job Bean (i.e., the first target Bean), which serves as the overall task definition for each target batch task. Each Spring Batch Job Bean is then traversed and processed in sequence, first determining whether the target batch task corresponding to the Spring Batch Job Bean is being unloaded and then loaded, or whether it is being loaded for the first time, to obtain the corresponding judgment result. It should be noted that the judgment result on whether the target batch task is being loaded into the target task pool for the first time affects how the target batch task is added to the task pool.

[0056] Step S14: Load each of the target batch tasks into the target task pool based on the judgment result, and use the second target bean included in the first target bean in the target task pool to call each of the reusable components in the basic service layer, so as to change the tasks in the target financial system when the target financial system is in operation; wherein the first target bean is a job corresponding to each of the target batch tasks, and the second target bean is a ManagerStep included in the job.

[0057] In a specific implementation, the process of loading each target batch task into the target task pool according to the judgment result may specifically include: if the judgment result indicates that each target batch task is a task loaded into the target task pool for the first time, then adding the first target bean corresponding to each target batch task to the target task pool, and adding the second target bean corresponding to the first target bean to the target task pool, so as to load each target batch task into the target task pool.

[0058] In another specific implementation, if the judgment result indicates that each target batch task is not a task loaded into the target task pool for the first time, the historical first target bean corresponding to each target batch task is deleted from the target task pool, the historical second target bean corresponding to the historical first target bean is deleted from the target task pool, and the partitioner, the master-side message channel, the master-side output stream, the worker-side message channel, and the worker-side input stream corresponding to the historical first target bean are deleted from the target task pool; a new first target bean corresponding to each target batch task is added to the target task pool, and the second target bean corresponding to the new first target bean is added to the target task pool, so as to load each target batch task into the target task pool;

[0059] The above process of loading the target batch task into the target task pool is as follows: Figure 3 As shown, first traverse each JobBean in turn to determine whether the target batch task corresponding to the current JobBean is added to the target task pool for the first time. If so, the JobBean and StepBean corresponding to the target batch task are added to the target task pool. If not, the historical JobBean and historical StepBean corresponding to the target batch task are deleted from the target task pool, and the new JobBean and new StepBean are added to the target task pool.

[0060] Specifically, the process of adding target batch tasks to tasks is as follows:

[0061] 101. Aggregate the various Spring Batch related beans constructed by the constructor and filter out the Spring Batch JobBean, which serves as the overall task definition for each batch task;

[0062] 102. Traverse each Spring Batch Job Bean and process them in sequence. First, determine whether the task is unloaded first and then loaded or loaded for the first time. If it is the first time loading, jump to step 106; if it is unloaded first and then loaded, continue to step 103;

[0063] 103. Delete the Job Bean from the Spring Batch executable task pool;

[0064] 104. Delete the Step Bean under the Job Bean in the Spring Batch executable step pool;

[0065] 105. Delete the beans related to the Job Bean, such as the partitioner, Master-side message channel, Master-side output stream, Worker-side message channel, and Worker-side input stream;

[0066] 106. Add the Job Bean to the Spring Batch executable task pool;

[0067] 107. Add the Step Bean under the Job Bean to the Spring Batch executable step pool.

[0068] In this embodiment, in addition to adding batch tasks to the task pool, it also includes the operation of deleting batch tasks from the target task pool. Accordingly, the batch task hot deployment method in this embodiment also includes: obtaining the task name corresponding to the batch task to be uninstalled, and searching the target task pool for the first target bean to be uninstalled corresponding to the batch task to be uninstalled according to the task name; deleting the first target bean to be uninstalled corresponding to the batch task to be uninstalled from the target task pool, and searching the target task pool for the second target bean to be uninstalled corresponding to the first target bean to be uninstalled; deleting the second target bean to be uninstalled from the target task pool, and deleting the partitioner, Master-side message channel, Master-side output stream, Worker-side message channel, and Worker-side input stream corresponding to the first target bean to be uninstalled from the target task pool, so as to change the tasks in the target financial system when the target financial system is in operation; the above process of uninstalling tasks from the target task pool is as follows: Figure 4As shown, first pass in the task name of the batch task to be uninstalled, find the Job Bean corresponding to the task from the target resource pool based on the task name, delete the Job Bean, find the Step Bean corresponding to the Job Bean, and delete the Step Bean; the specific process is as follows:

[0069] 201. Enter the name of the batch task to be uninstalled;

[0070] 202. Find the Job Bean corresponding to the batch task in the Spring Batch executable task pool and delete it;

[0071] 203. Find the Step Bean under the Job Bean corresponding to the batch task in the Spring Batch executable step pool and delete it;

[0072] 204. Delete beans related to the Job Bean, such as the partitioner, the Master-side message channel, the Master-side output stream, the Worker-side message channel, and the Worker-side input stream.

[0073] This embodiment parses configuration files (such as JSON / XML files) and dynamically creates job and step bean definitions at runtime using the BeanDefinitionRegistry. The generated bean definitions are then registered with the Spring container, making them manageable beans. Because the Spring container supports dynamic addition and removal of beans, changes to tasks take effect without a system restart. This eliminates the traditional Spring Batch maintenance approach of adding and deleting tasks. Spring Batch tasks can be loaded and unloaded with hot deployment, eliminating the risk of frequent online releases and minimizing the time gaps in financial system availability during online releases. By establishing a rich user experience, batch tasks can be loaded, unloaded, updated, and parameterized. These operations also support multi-task processing and templated operations, improving operational efficiency, reducing operational risks, and enhancing usability. By encapsulating frequently used functions in the financial system, adding and deleting batch tasks is transformed from development tasks into system functions, significantly improving the efficiency of batch task operations and enabling more efficient integration with business needs.

[0074] It can be seen that this application encapsulates the commonly used businesses in the financial system to form corresponding reusable components, and aggregates them in the basic service layer. In this way, when the system needs to use these businesses, there is no need to recode and retest the businesses. It can be achieved by directly calling the reusable components in the basic service layer, which greatly reduces the workload of developers and reduces the risk of problems in functional development. By defining the task logic through the configuration file, the system parses the configuration at runtime and dynamically generates the corresponding Job Bean and Step Bean, and registers them with the Spring container and task scheduling pool, so that the task can be executed immediately, avoiding service interruption caused by downtime in traditional methods.

[0075] like Figure 5 As shown, an embodiment of the present invention discloses a batch task hot deployment device, comprising:

[0076] The business encapsulation module 11 is used to screen the initial businesses in the target financial system, encapsulate the target businesses screened from the initial businesses, obtain reusable components corresponding to each target business, and use the reusable components to form a basic service layer;

[0077] The batch task acquisition module 12 acquires initial task configuration files in different file formats, dynamically constructs different initial beans based on each of the initial task configuration files, and uses each of the initial beans to acquire each target batch task;

[0078] The task judgment module 13 is configured to filter out the first target beans corresponding to each target batch task from each of the initial beans, traverse each of the first target beans, and determine, based on each of the first target beans, whether each target batch task is a task loaded into the target task pool for the first time, thereby obtaining a corresponding judgment result; wherein the target task pool is a task pool in the Spring batch framework corresponding to the target financial system;

[0079] The task loading module 14 is configured to load each of the target batch tasks into the target task pool based on the judgment result, and to call each of the reusable components in the basic service layer in the target task pool using the second target bean included in the first target bean, so as to change the tasks in the target financial system when the target financial system is in operation; wherein the first target bean is a job corresponding to each of the target batch tasks, and the second target bean is a ManagerStep included in the job.

[0080] It can be seen that this application encapsulates the commonly used businesses in the financial system to form corresponding reusable components, and aggregates them in the basic service layer. In this way, when the system needs to use these businesses, there is no need to recode and retest the businesses. It can be achieved by directly calling the reusable components in the basic service layer, which greatly reduces the workload of developers and reduces the risk of problems in functional development. By defining the task logic through the configuration file, the system parses the configuration at runtime and dynamically generates the corresponding Job Bean and Step Bean, and registers them with the Spring container and task scheduling pool, so that the task can be executed immediately, avoiding service interruption caused by downtime in traditional methods.

[0081] In some specific embodiments, the batch task acquisition module 12 may specifically include:

[0082] a format conversion unit, configured to perform file format conversion on the initial task configuration files in different file formats, so as to convert each of the initial task configuration files into a target task configuration file in a target file format;

[0083] The configuration parameter acquisition unit is used to convert each target task configuration file into a target entity, parse the target entity corresponding to the target task configuration file to obtain target task configuration parameters, and dynamically construct different initial beans according to each target task configuration parameter.

[0084] In some specific embodiments, the task loading module 14 may specifically include:

[0085] The first task loading unit is configured to add the first target bean corresponding to each target batch task to the target task pool if the judgment result indicates that each target batch task is loaded into the target task pool for the first time, and add the second target bean corresponding to the first target bean to the target task pool, so as to load each target batch task into the target task pool.

[0086] In some specific embodiments, the task loading module 14 may specifically include:

[0087] a task deleting unit, configured to, if the judgment result indicates that each target batch task is not a task loaded into the target task pool for the first time, delete the historical first target bean corresponding to each target batch task from the target task pool, delete the historical second target bean corresponding to the historical first target bean from the target task pool, and delete the partitioner, the master-side message channel, the master-side output stream, the worker-side message channel, and the worker-side input stream corresponding to the historical first target bean from the target task pool;

[0088] The second task loading unit is used to add a new first target bean corresponding to each target batch task to the target task pool, and add a new second target bean corresponding to the new first target bean to the target task pool, so as to load each target batch task into the target task pool.

[0089] In some specific embodiments, the batch task hot deployment device further includes:

[0090] A task name acquisition module is used to obtain the task name corresponding to the batch task to be uninstalled, and search the target task pool for the first target bean to be uninstalled corresponding to the batch task to be uninstalled according to the task name;

[0091] A first Bean deletion module is configured to delete the first target Bean to be uninstalled corresponding to the batch task to be uninstalled from the target task pool, and search the target task pool for the second target Bean to be uninstalled corresponding to the first target Bean to be uninstalled;

[0092] The second bean deletion module is configured to delete the second target bean to be uninstalled from the target task pool, and delete the partitioner, the master-side message channel, the master-side output stream, the worker-side message channel, and the worker-side input stream corresponding to the first target bean to be uninstalled from the target task pool, so as to modify the tasks in the target financial system when the target financial system is in operation.

[0093] Furthermore, the embodiment of the present application also discloses an electronic device, Figure 6 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram should not be considered as any limitation to the scope of application of the present application.

[0094] Figure 6This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the batch task hot deployment method disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0095] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device. The communication protocol it follows is any communication protocol that can be applied to the technical solution of this application and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world. Its specific interface type can be selected according to specific application needs and is not specifically limited here.

[0096] In addition, the memory 22 as a carrier for resource storage can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon may include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.

[0097] The operating system 221 is used to manage and control the hardware devices on the electronic device 20 and the computer program 222, which can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of implementing the batch task hot deployment method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program capable of completing other specific tasks.

[0098] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when executed by a processor, the computer program implements the aforementioned method for hot deployment of batch tasks. The specific steps of this method can be referred to the corresponding contents disclosed in the aforementioned embodiments and will not be repeated here.

[0099] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from the other embodiments. Reference can be made to the descriptions of the identical or similar parts between the various embodiments. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple, and the relevant parts can be referred to the descriptions of the methods.

[0100] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0101] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

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

[0103] The above is a detailed introduction to the technical solution provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for those skilled in the art, according to the ideas of the present application, there may be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A batch task hot deployment method, characterized in that: include: Screening initial businesses in the target financial system, encapsulating the target businesses screened from the initial businesses to obtain reusable components corresponding to the target businesses, and forming a basic service layer using the reusable components; Obtaining initial task configuration files in different file formats, dynamically constructing different initial beans based on each of the initial task configuration files, and using each of the initial beans to obtain each target batch task; Filtering the first target beans corresponding to the target batch tasks from the initial beans, traversing the first target beans, and determining whether the target batch tasks are the first tasks loaded into the target task pool based on the first target beans, to obtain a corresponding determination result; wherein the target task pool is a task pool in the Spring batch framework corresponding to the target financial system; Based on the judgment result, each of the target batch tasks is loaded into the target task pool, and in the target task pool, the second target bean included in the first target bean is used to call each of the reusable components in the basic service layer, so as to change the tasks in the target financial system when the target financial system is in a running state; wherein the first target bean is a job corresponding to each of the target batch tasks, and the second target bean is a ManagerStep included in the job.

2. The batch task hot deployment method according to claim 1, characterized in that: The initial Bean includes Job, ManagerStep, partitioner, Master-side message channel, Master-side output stream, WorkerStep, Worker-side message channel, and Worker-side input stream.

3. The batch task hot deployment method according to claim 1, characterized in that: The dynamically constructing different initial beans based on each of the initial task configuration files includes: Performing file format conversion on the initial task configuration files in different file formats to convert each of the initial task configuration files into a target task configuration file in a target file format; Each target task configuration file is converted into a target entity, the target entity corresponding to the target task configuration file is parsed to obtain target task configuration parameters, and different initial beans are dynamically constructed according to each target task configuration parameter.

4. The batch task hot deployment method according to claim 1, characterized in that: The step of loading each target batch task into the target task pool according to the judgment result includes: If the judgment result indicates that each target batch task is a task loaded into the target task pool for the first time, the first target bean corresponding to each target batch task is added to the target task pool, and the second target bean corresponding to the first target bean is added to the target task pool, so as to load each target batch task into the target task pool.

5. The batch task hot deployment method according to claim 2, characterized in that: The step of loading each target batch task into the target task pool according to the judgment result includes: If the judgment result indicates that each target batch task is not a task loaded into the target task pool for the first time, the historical first target bean corresponding to each target batch task is deleted from the target task pool, the historical second target bean corresponding to the historical first target bean is deleted from the target task pool, and the partitioner, the master-side message channel, the master-side output stream, the worker-side message channel, and the worker-side input stream corresponding to the historical first target bean are deleted from the target task pool; Adding a new first target bean corresponding to each target batch task to the target task pool, and adding a new second target bean corresponding to the new first target bean to the target task pool, so as to load each target batch task into the target task pool.

6. The batch task hot deployment method according to claim 2, characterized in that: Also includes: Obtain the task name corresponding to the batch task to be uninstalled, and search the target task pool for the first target bean to be uninstalled corresponding to the batch task to be uninstalled according to the task name; Deleting the first target bean that needs to be uninstalled corresponding to the batch task that needs to be uninstalled from the target task pool, and searching for the second target bean that needs to be uninstalled corresponding to the first target bean that needs to be uninstalled from the target task pool; The second target bean to be uninstalled is deleted from the target task pool, and the partitioner, the master-side message channel, the master-side output stream, the worker-side message channel, and the worker-side input stream corresponding to the first target bean to be uninstalled are deleted from the target task pool, so as to change the tasks in the target financial system when the target financial system is in a running state.

7. A batch task hot deployment device, characterized in that: include: A business encapsulation module is used to screen the initial businesses in the target financial system, encapsulate the target businesses screened from the initial businesses, obtain reusable components corresponding to each target business, and use each reusable component to form a basic service layer; The batch task acquisition module obtains initial task configuration files in different file formats, dynamically constructs different initial beans based on each of the initial task configuration files, and uses each of the initial beans to obtain each target batch task; A task judgment module is configured to filter out the first target beans corresponding to each target batch task from each of the initial beans, traverse each of the first target beans, and determine, based on each of the first target beans, whether each target batch task is a task loaded into a target task pool for the first time, thereby obtaining a corresponding judgment result; wherein the target task pool is a task pool in the Spring batch framework corresponding to the target financial system; a task loading module, configured to load each of the target batch tasks into the target task pool based on the judgment result, and to call each of the reusable components in the basic service layer in the target task pool using the second target bean contained in the first target bean, so as to change the tasks in the target financial system when the target financial system is in operation; wherein the first target bean is a job corresponding to each of the target batch tasks, and the second target bean is a ManagerStep contained in the job.

8. The batch task hot deployment device according to claim 7, characterized in that: The initial Bean includes Job, ManagerStep, partitioner, Master-side message channel, Master-side output stream, WorkerStep, Worker-side message channel, and Worker-side input stream; Accordingly, the device further includes: A task name acquisition module is used to obtain the task name corresponding to the batch task to be uninstalled, and search the target task pool for the first target bean to be uninstalled corresponding to the batch task to be uninstalled according to the task name; A first Bean deletion module is configured to delete the first target Bean to be uninstalled corresponding to the batch task to be uninstalled from the target task pool, and search the target task pool for the second target Bean to be uninstalled corresponding to the first target Bean to be uninstalled; The second bean deletion module is configured to delete the second target bean to be uninstalled from the target task pool, and delete the partitioner, the master-side message channel, the master-side output stream, the worker-side message channel, and the worker-side input stream corresponding to the first target bean to be uninstalled from the target task pool, so as to modify the tasks in the target financial system when the target financial system is in operation.

9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the batch task hot deployment method according to any one of claims 1 to 6.

10. A computer-readable storage medium, characterized in that Used to store a computer program, which, when executed by a processor, implements the batch task hot deployment method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method for automatically constructing functional component based on multi-scene application

    CN114063982A

  • Providing an improved web user interface framework for building web applications

    US20150046915A1