Method and apparatus for processing tasks between different business systems
By using a pipelined approach to process tasks across heterogeneous systems, the problems of high maintenance costs and insufficient orchestration capabilities in existing technologies are solved, enabling efficient and stable business processing and automated processing of complex logic, thereby improving development efficiency and service availability.
Patent Information
- Application Number
- CN202610416485.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-31
- Publication Date
- 2026-07-03
AI Technical Summary
Existing technologies suffer from high maintenance costs, slow response speeds, and lack of orchestration capabilities in communication between heterogeneous systems, making them unable to handle complex logic and data format conversion issues.
Tasks are broken down into multiple stages using predefined configuration files, and a pipelined approach is adopted to process tasks. This approach supports configuration by non-developers, decoupling business logic from program code, and includes built-in retry and error handling mechanisms.
It improved development efficiency, ensured efficient, stable and traceable business processing, supported the handling of complex application scenarios, and enhanced the high availability of services.
Smart Images

Figure CN122332052A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, specifically to a method, apparatus, medium, electronic device, and computer program product for processing tasks between different business systems. Background Technology
[0002] In modern internet architecture, webhooks have become the standard method for real-time communication between heterogeneous systems (different business systems). Examples include payment system callbacks, Git code commit notifications, and instant messaging push notifications. Existing technical solutions typically employ the following two methods:
[0003] (1) Hard-coded development model: For each third-party Webhook request, developers need to write dedicated Controller interfaces, Service business logic code, and data transformation code on the server side. However, whenever a new third-party service (system) is integrated, or the parameter structure of an existing service changes (such as changing field names) or the business process changes (such as adding authentication steps), the core code needs to be modified, and a complete release process of compilation, packaging, and redeployment needs to be carried out, resulting in high maintenance costs and slow response speed.
[0004] (2) Simple gateway forwarding mode: Using Nginx or a basic API gateway to directly forward requests to backend services. However, its functionality is limited and lacks orchestration capabilities. It can only perform simple pass-through and cannot handle "multi-step dependency" logic (e.g., first requesting interface A to obtain a token, using the token to request interface B to obtain data, and finally pushing the data to interface C). At the same time, it cannot solve the problem of heterogeneous data format conversion (e.g., converting XML format to a specific JSON format), resulting in the backend service still needing to handle a lot of adaptation work. Summary of the Invention
[0005] This application provides a method, apparatus, medium, electronic device, and computer program product for processing tasks between different business systems.
[0006] In a first aspect, embodiments of this application provide a method for processing tasks between different business systems, for an electronic device, including:
[0007] Triggering steps: Start the task based on external requests or internal scheduled tasks;
[0008] The filing step involves generating a unique task number for the task and allocating an independent cache space for the task to store the initial data of the task and the intermediate results during the execution process.
[0009] The decomposition step involves obtaining the pipeline settings corresponding to the business scenario of the task from a predefined configuration file, and decomposing the task into multiple stages that form the pipeline based on the pipeline settings.
[0010] The execution steps involve sequentially executing each stage in the pipeline. After the current stage is completed, the execution result is checked. If the execution result indicates success, the next stage in the pipeline is started. If it fails, the task is retried or terminated according to a preset strategy.
[0011] Secondly, embodiments of this application provide an apparatus for processing tasks between different business systems, comprising:
[0012] The triggering unit starts the task based on an external request or an internal timer;
[0013] The filing unit generates a unique task number for the task and allocates an independent cache space for the task to store the initial data of the task and intermediate results during the execution process;
[0014] The decomposition unit obtains the pipeline settings corresponding to the business scenario of the task from a predefined configuration file, and decomposes the task into multiple stages that form a pipeline based on the pipeline settings.
[0015] The execution unit sequentially executes each stage in the pipeline. After the current stage is completed, the execution result is checked. If the execution result indicates success, the next stage in the pipeline is started. If it fails, the task is retried or terminated according to a preset strategy.
[0016] Thirdly, embodiments of this application provide a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform one of the methods for processing tasks between different business systems as described in the first aspect.
[0017] Fourthly, embodiments of this application provide an electronic device, including: one or more processors; one or more memories; the one or more memories storing one or more programs, which, when executed by the one or more processors, cause the electronic device to perform a method for processing tasks between different business systems as described in the first aspect above.
[0018] Fifthly, embodiments of this application provide a computer program product including computer-executable instructions, which are executed by a processor to implement a method for processing tasks between different business systems as described in the first aspect.
[0019] In this invention, complex business logic (tasks) can be broken down into multiple stages forming a pipeline using predefined configuration files, without modifying the Java source code. This invention can mix and orchestrate multiple different types of stages within the same pipeline, thereby handling complex application scenarios.
[0020] This invention supports access configuration by non-developers (such as operations and maintenance personnel and technical support personnel), which greatly improves development efficiency.
[0021] Each stage in this invention executes independently and in isolation, and the built-in preset strategies (retry and error handling mechanisms) ensure high service availability. The configuration file in this invention defines the execution order, type, and parameters of each stage, thus decoupling business logic from program code.
[0022] The core value of this invention lies in standardization and automation. It breaks down complex business logic into pipelines, employing a unified pipeline model for both handling immediate external requests and executing periodic internal plans, ensuring efficient, stable, and traceable business processing. Attached Figure Description
[0023] Figure 1 According to embodiments of this application, a scenario for processing tasks between different business systems is illustrated;
[0024] Figure 2 According to an embodiment of this application, a flowchart of a method for processing tasks between different business systems is shown;
[0025] Figure 3 According to an embodiment of this application, a structural diagram of an apparatus for processing tasks between different business systems is shown;
[0026] Figure 4 According to an embodiment of this application, a block diagram of an electronic device is shown. Detailed Implementation
[0027] The illustrative embodiments of this application include, but are not limited to, methods, apparatuses, media, electronic devices, and computer program products for processing tasks between different business systems.
[0028] The embodiments of this application will now be described in further detail with reference to the accompanying drawings.
[0029] Figure 1 This illustrates a scenario where tasks are processed between different business systems, according to an embodiment of this application. For example... Figure 1As shown, the docking system 100 executes tasks, thereby transmitting task-related information between the first system 101 and the second system 102. The first system 101 and the second system 102 are not within the service management of the docking system 100, and the first system 101 and the second system 102 are heterogeneous systems.
[0030] Figure 2 A flowchart illustrating a method for processing tasks between different business systems according to an embodiment of this application is shown, for use in... Figure 4 The electronic device 1400 is shown. The docking system 100 can be implemented by the electronic device 1400.
[0031] In step S21, the task is started based on an external request or an internal timer.
[0032] Specifically, when an external request is received from the first system 101, the task corresponding to the external request is started. For example, when the first system 101 sends a task to the docking system 100 via an HTTP request, the docking system 100 starts the task.
[0033] Understandably, upon receiving the task, the source of the information packet related to the task is identified, and it is confirmed which business scenario the task belongs to. For example, this is a business scenario where the first system 101 needs to send a message to the second system 102.
[0034] In addition, the task can be automatically started at a preset time point according to the built-in internal timed task.
[0035] Internal scheduled tasks, for example, might require retrieving data from an external website every morning at 8:00 AM or synchronizing data hourly, i.e., scheduled task startup. Understandably, the built-in timer in the interface system 100 runs 24 / 7, monitoring the preset schedule. When the set time is reached (e.g., 8:00 AM daily), the interface system 100 automatically wakes up and generates a virtual startup command. It also automatically fills in the preset query conditions (e.g., "query data from the past 24 hours"), simulating a manual initiation (starting) of the task.
[0036] In the filing step S22, a unique task number is generated for the task, and an independent cache space is allocated for the task to store the initial data of the task and the intermediate results during the execution process.
[0037] The cache space is used to store the following: the initial data of the task passed in when the task is started; the intermediate results generated during the execution of each stage; and the execution status and return value of each stage.
[0038] Before formal processing, the interface system 100 will create a separate temporary workspace for the current task. For example, a unique task ID will be generated for each task. All data, whether from external sources or parameters generated by scheduled tasks, will be stored in this cache space. This cache space will accompany the entire task process, storing intermediate results generated at each stage.
[0039] In step S23, the pipeline settings corresponding to the business scenario of the task are obtained from the predefined configuration file, and the task is decomposed into multiple stages that form the pipeline based on the pipeline settings.
[0040] The configuration file is stored in the docking system 100, and includes pipeline settings related to each task. Understandably, the pipeline settings include multiple stages for completing the corresponding task and define how each stage operates.
[0041] For example, based on the business scenario of the current task, the corresponding pipeline settings are obtained from the configuration file, and the current task is broken down into multiple stages forming a pipeline based on the pipeline settings. The type of each stage (i.e., the action performed) can be different, such as: performing data adaptation and conversion (i.e., converting the data format of the first system 101 into a data format that the second system 102 can recognize and process), sending HTTP requests, sending notifications to the second system 102, retrieving required information from the database (commonly used for data retrieval for scheduled tasks), etc.
[0042] For example, based on pipeline settings, the current task can be broken down into three different types of stages, which form a pipeline. As an example, the execution content of each stage is as follows.
[0043] Phase 1: Obtain the first format data (e.g., key) sent by the first system 101, and then put the data into the cache.
[0044] Phase 2: Retrieve the first-format data from the cache, convert it into a second-format data that the second system 102 can understand (i.e., recognize and process), and store it in the cache (e.g., using a key to form the token in the header of an HTTP request). Understandably, this data format conversion ensures that the interface system 100 can seamlessly interface with any third-party platform (e.g., the second system 102) without modifying the core of the interface system 100.
[0045] Phase 3: Send the second format data to the second system 102 via an HTTP request.
[0046] Understandably, each stage represents an atomic operation, such as an HTTP request, a database query, or a data cache.
[0047] It is understood that one task corresponds to one pipeline, and one pipeline includes multiple stages of different types. It is understood that this invention can orchestrate multiple stages of different types within the same pipeline. It is understood that because the execution data (e.g., intermediate results) of each stage is stored in a cache space, this invention can share data across different stages.
[0048] It is understood that the configuration file in this invention defines the execution order, type, and parameters of each stage, thereby decoupling business logic from program code.
[0049] In step S24, each stage in the pipeline is executed sequentially. After the current stage is completed, the execution result is checked. If the execution result indicates success, the next stage in the pipeline is started. If it fails, the task is retried or terminated according to a preset strategy.
[0050] Specifically, after the current stage is executed, the execution result is checked, and if the result is successful, the next stage is executed, until all stages are completed. If it fails, the task is retried or terminated according to a preset strategy.
[0051] For example, after stage 1 is executed, the execution result is checked. If successful, the next stage in the pipeline, stage 2, is executed.
[0052] If the task fails, it will be retried or terminated according to a preset strategy. Preset strategies include, but are not limited to, one or more of the following: determining whether to retry based on the failure type; customizing the number of retries; refreshing and retrying after a specific failure. It is understood that preset strategies may also include other custom retry strategies.
[0053] For example, if the token has expired, you can preset the option to obtain a new token and try again.
[0054] Furthermore, if the current stage's execution result indicates that subsequent stages should be skipped, the task will end directly.
[0055] Specifically, the interface system 100 will determine whether to "skip a step" based on the content of the execution result. For example, if the query result is empty, it may directly skip the subsequent "send notification" stage and end the task directly.
[0056] Release cached resources and log task execution when all stages are completed or the task terminates.
[0057] Specifically, once all stages are completed or the task is terminated for any reason, the cache space is destroyed and computing resources are released. In addition, the interface system 100 records the complete process of this task (including when it started, when it ended, and the results of each step) and generates an operation report for subsequent auditing and traceability.
[0058] In this invention, complex business logic (tasks) can be broken down into multiple stages forming a pipeline using predefined configuration files, without modifying the Java source code. This invention can mix and orchestrate multiple different types of stages within the same pipeline, thereby handling complex application scenarios.
[0059] This invention supports access configuration by non-developers (such as operations and maintenance personnel and technical support personnel), which greatly improves development efficiency.
[0060] Each stage in this invention executes independently and in isolation, and the built-in preset strategies (retry and error handling mechanisms) ensure high service availability. The configuration file in this invention defines the execution order, type, and parameters of each stage, thus decoupling business logic from program code.
[0061] The core value of this invention lies in standardization and automation. It breaks down complex business logic into pipelines, employing a unified pipeline model for both handling immediate external requests and executing periodic internal plans, ensuring efficient, stable, and traceable business processing.
[0062] The present invention also provides an apparatus for processing tasks between different business systems, such as... Figure 3 As shown, the device 30 includes:
[0063] Trigger unit 301 starts the task based on an external request or an internal timer;
[0064] The filing unit 302 generates a unique task number for the task and allocates an independent cache space for the task to store the initial data of the task and the intermediate results during the execution process;
[0065] The decomposition unit 303 obtains the pipeline settings corresponding to the business scenario of the task from a predefined configuration file, and decomposes the task into multiple stages that form a pipeline based on the pipeline settings.
[0066] The execution unit 304 sequentially executes each stage in the pipeline. After the current stage is completed, the execution result is checked. If the execution result indicates success, the next stage in the pipeline is started. If it fails, the task is retried or terminated according to a preset strategy.
[0067] It is understandable that the triggering unit 301, the filing unit 302, the disassembly unit 303, and the execution unit 304 can be connected via... Figure 4 The processor 1404 in the electronic device 1400 has the functions of these modules or units to implement them.
[0068] The present invention also provides a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform [operations]. Figure 1 The method shown.
[0069] The present invention also provides a computer program product, including computer-executable instructions, which are executed by processor 1404 to carry out [the program]. Figure 1 The method shown.
[0070] Now for reference Figure 4 , Figure 4 An example electronic device 1400 according to an embodiment of the present invention is illustrated schematically. In one embodiment, the electronic device 1400 may include one or more processors 1404, a system control logic unit 1408 connected to at least one of the processors 1404, a system memory 1412 connected to the system control logic unit 1408, a non-volatile memory (NVM) 1416 connected to the system control logic unit 1408, and a network interface 1420 connected to the system control logic unit 1408.
[0071] In some embodiments, processor 1404 may include one or more single-core or multi-core processors. In some embodiments, processor 1404 may include any combination of general-purpose processors and special-purpose processors (e.g., graphics processors, application processors, baseband processors, etc.). In embodiments where electronic device 1400 employs an eNB (Evolved Node B) or RAN (Radio Access Network) controller, processor 1404 may be configured to perform various conforming embodiments, such as... Figure 1 The example shown.
[0072] In some embodiments, the system control logic unit 1408 may include any suitable interface controller to provide any suitable interface to at least one of the processors 1404 and / or any suitable device or component communicating with the system control logic unit 1408.
[0073] In some embodiments, the system control logic unit 1408 may include one or more memory controllers to provide an interface to the system memory 1412. The system memory 1412 may be used to load and store data and / or instructions. In some embodiments, the system memory 1412 of the electronic device 1400 may include any suitable volatile memory, such as suitable dynamic random access memory (DRAM).
[0074] The non-volatile memory 1416 may include one or more tangible, non-transitory computer-readable media for storing data and / or instructions. In some embodiments, the non-volatile memory 1416 may include any suitable non-volatile memory such as flash memory and / or any suitable non-volatile storage device, such as at least one of HDD (Hard Disk Drive), CD (Compact Disc) drive, and DVD (Digital Versatile Disc) drive.
[0075] The non-volatile memory 1416 may include a portion of the storage resources on the device on which the electronic device 1400 is installed, or it may be accessible by the electronic device, but is not necessarily part of the electronic device. For example, the non-volatile memory 1416 may be accessed over a network via network interface 1420.
[0076] Specifically, system memory 1412 and non-volatile memory 1416 may each include a temporary copy and a permanent copy of instruction 1424. Instruction 1424 may include, when executed by at least one of processors 1404, causing electronic device 1400 to perform, as Figure 1 The instructions for the method shown. In some embodiments, the instructions 1424, hardware, firmware and / or software components thereof may additionally / alternatively be located in the system control logic unit 1408, the network interface 1420 and / or the processor 1404.
[0077] Network interface 1420 may include a transceiver for providing a radio interface to electronic device 1400, thereby enabling communication with any other suitable device (such as a front-end module, antenna, etc.) via one or more networks. In some embodiments, network interface 1420 may be integrated into other components of electronic device 1400. For example, network interface 1420 may be integrated into at least one of processor 1404, system memory 1412, non-volatile memory 1416, and firmware device (not shown) with instructions, which, when at least one of processor 1404 executes the instructions, enable electronic device 1400 to perform as follows: Figure 1 The method shown.
[0078] The network interface 1420 may further include any suitable hardware and / or firmware to provide a multiple-input multiple-output radio interface. For example, the network interface 1420 may be a network adapter, a wireless network adapter, a telephone modem, and / or a wireless modem.
[0079] In one embodiment, at least one of the processors 1404 may be packaged together with the logic of one or more controllers for the system control logic unit 1408 to form a system package (SiP). In another embodiment, at least one of the processors 1404 may be integrated on the same die with the logic of one or more controllers for the system control logic unit 1408 to form a system on chip (SoC).
[0080] The electronic device 1400 may further include an input / output (I / O) device 1432. The I / O device 1432 may include a user interface enabling a user to interact with the electronic device 1400; the peripheral component interface is designed to allow peripheral components to also interact with the electronic device 1400. In some embodiments, the electronic device 1400 may also include sensors for determining at least one of environmental conditions and location information related to the electronic device 1400.
[0081] In some embodiments, the user interface may include, but is not limited to, a display (e.g., a liquid crystal display, a touch screen display, etc.), a speaker, a microphone, one or more cameras (e.g., a still image camera and / or a video camera), a flashlight (e.g., a light-emitting diode flash), and a keyboard.
[0082] Various embodiments of the mechanisms disclosed in this application can be implemented in hardware, software, firmware, or combinations of these implementation methods. Embodiments of this application can be implemented as computer programs or program code executable on a programmable system, the programmable system including at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device.
[0083] Program code can be applied to input instructions to execute the functions described in this application and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, the processing system includes any system having a processor such as, for example, a digital signal processor (DSP), a microcontroller, an application-specific integrated circuit (ASIC), or a microprocessor.
[0084] The program code can be implemented using a high-level procedural language or an object-oriented programming language to communicate with the processing system. Assembly language or machine language can also be used when needed. In fact, the mechanisms described in this application are not limited to any particular programming language. In either case, the language can be a compiled language or an interpreted language.
[0085] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried or stored thereon on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, the instructions may be distributed via a network or through other computer-readable media. Therefore, machine-readable media may include any mechanism for storing or transmitting information in a machine-readable (e.g., computer-readable) form, including but not limited to floppy disks, optical disks, CD-ROMs, magneto-optical disks, read-only memory (CD-ROM), random access memory (RAM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), magnetic cards or optical cards, flash memory, or tangible machine-readable storage for transmitting information (e.g., carrier waves, infrared signals, digital signals, etc.) using the Internet in the form of electrical, optical, acoustic, or other propagation signals. Therefore, machine-readable media include any type of machine-readable medium suitable for storing or transmitting electronic instructions or information in a machine-readable (e.g., computer-readable) form.
[0086] In the accompanying drawings, some structural or methodological features may be shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order may not be necessary. Rather, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. Furthermore, the inclusion of structural or methodological features in a particular figure does not imply that such features are required in all embodiments, and in some embodiments, these features may be omitted or may be combined with other features.
[0087] It should be noted that all units / modules mentioned in the device embodiments of this application are logical units / modules. Physically, a logical unit / module can be a physical unit / module, a part of a physical unit / module, or a combination of multiple physical units / modules. The physical implementation of these logical units / modules themselves is not the most important factor; the combination of functions implemented by these logical units / modules is the key to solving the technical problems proposed in this application. Furthermore, to highlight the innovative aspects of this application, the above-described device embodiments of this application have not introduced units / modules that are not closely related to solving the technical problems proposed in this application. This does not mean that the above-described device embodiments do not contain other units / modules.
[0088] It should be noted that in the examples and description of this patent, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one" does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0089] Although this application has been illustrated and described with reference to certain preferred embodiments thereof, those skilled in the art should understand that various changes in form and detail may be made thereto without departing from the spirit and scope of this application.
Claims
1. A method for processing tasks between different business systems for an electronic device, comprising: include: Triggering steps: Start the task based on external requests or internal scheduled tasks; The filing step involves generating a unique task number for the task and allocating an independent cache space for the task to store the initial data of the task and the intermediate results during the execution process. The decomposition step involves obtaining the pipeline settings corresponding to the business scenario of the task from a predefined configuration file, and decomposing the task into multiple stages that form the pipeline based on the pipeline settings. The execution steps involve sequentially executing each stage in the pipeline. After the current stage is completed, the execution result is checked. If the execution result indicates success, the next stage in the pipeline is started. If it fails, the task is retried or terminated according to a preset strategy.
2. The method of claim 1, wherein, The different business systems include a first system and a second system. The electronic device is an interface system. The first system and the second system are not within the service management scope of the interface system. The docking system transmits information related to the task between the first system and the second system.
3. The method of claim 2, wherein, The configuration file is stored in the interface system, and the configuration file includes pipeline settings related to each task. The pipeline setup includes multiple stages for completing the corresponding task, and defines the operation mode of each stage.
4. The method according to any one of claims 1-3, characterized in that, One task corresponds to one pipeline, and one pipeline includes multiple stages of different types.
5. The method of claim 2, wherein, Receive the external request from the first system, thereby initiating the task corresponding to the external request, or The task is automatically started at a preset time point according to the built-in internal timed task.
6. The method of claim 1, wherein, The cache space is used to store the following content: The initial data of the task passed in when the task is started; Intermediate results generated during the execution of each stage; The execution status and return value of each stage.
7. The method according to claim 1, characterized in that, Release cached resources and log task execution when all stages are completed or the task terminates.
8. The method according to claim 1, characterized in that, If the current stage's execution result determines that subsequent stages should be skipped, then the task will end directly.
9. The method according to claim 1, characterized in that, The preset strategy includes one or more of the following: Determine whether to retry based on the failure type; Customize the number of retries; If a specific failure occurs, refresh and try again.
10. An apparatus for processing tasks between different business systems, characterized in that, include: The triggering unit starts the task based on an external request or an internal timer; The filing unit generates a unique task number for the task and allocates an independent cache space for the task to store the initial data of the task and intermediate results during the execution process; The decomposition unit obtains the pipeline settings corresponding to the business scenario of the task from a predefined configuration file, and decomposes the task into multiple stages that form a pipeline based on the pipeline settings. The execution unit sequentially executes each stage in the pipeline. After the current stage is completed, the execution result is checked. If the execution result indicates success, the next stage in the pipeline is started. If it fails, the task is retried or terminated according to a preset strategy.
11. A computer-readable storage medium, characterized in that, The storage medium stores instructions that, when executed on a computer, cause the computer to perform the method of processing tasks between different business systems as described in any one of claims 1-9.
12. An electronic device, characterized in that, include: One or more processors; One or more memories; the one or more memories storing one or more programs, which, when executed by the one or more processors, cause the electronic device to perform the method of processing tasks between different business systems as described in any one of claims 1-9.
13. A computer program product comprising computer-executable instructions, characterized in that, The instructions are executed by the processor to implement the method of processing tasks between different business systems as described in any one of claims 1-9.