CN116089040A - Service flow scheduling method and device, electronic equipment and storage medium - Google Patents
Service flow scheduling method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN116089040A CN116089040A CN202310019650.XA CN202310019650A CN116089040A CN 116089040 A CN116089040 A CN 116089040A CN 202310019650 A CN202310019650 A CN 202310019650A CN 116089040 A CN116089040 A CN 116089040A
- Authority
- CN
- China
- Prior art keywords
- scene
- service
- execution
- scheduling
- flow
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 167
- 238000003860 storage Methods 0.000 title claims abstract description 17
- 230000008569 process Effects 0.000 claims abstract description 94
- 230000001960 triggered effect Effects 0.000 claims description 34
- 230000000977 initiatory effect Effects 0.000 claims description 33
- 238000012545 processing Methods 0.000 claims description 32
- 230000004044 response Effects 0.000 claims description 26
- 239000000725 suspension Substances 0.000 claims description 21
- 238000004590 computer program Methods 0.000 claims description 7
- 230000009191 jumping Effects 0.000 claims description 6
- 238000005516 engineering process Methods 0.000 abstract description 10
- 238000004140 cleaning Methods 0.000 description 17
- 238000010586 diagram Methods 0.000 description 8
- 238000011161 development Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 230000008878 coupling Effects 0.000 description 2
- 238000010168 coupling process Methods 0.000 description 2
- 238000005859 coupling reaction Methods 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000002618 waking effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
- G06F9/4881—Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/52—Program synchronisation; Mutual exclusion, e.g. by means of semaphores
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/30—Computing systems specially adapted for manufacturing
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention discloses a business process scheduling method and a device, electronic equipment and a storage medium thereof, and relates to the field of financial science and technology or other related fields, wherein the scheduling method comprises the following steps: and receiving a financing task request, calling a service flow corresponding to the product type through an asynchronous thread, scheduling each service scene according to the scene sequence in the service flow, and closing the asynchronous thread to determine success of the financing task under the condition that all execution results indicate that the service scene is successfully executed. The invention solves the technical problem of lower dispatching efficiency of the business process of the financing task in the related technology.
Description
Technical Field
The present invention relates to the field of financial science and technology, and in particular, to a business process scheduling method and apparatus, an electronic device, and a storage medium.
Background
The online financing service involves complex flow, various products, and the problems of difficult development, incapability of automatic processing of the service and the like caused by non-uniform interfaces and architectures of matched systems. Therefore, unified management of business processes related to these products and automatic scheduling of the business are urgent problems to be solved.
Automatic scheduling of processes is an important content in various business applications, and the business has common characteristics: the condition needs to be satisfied for execution, which is accomplished by a series of scene sequential executions. At present, the method has wide application in the fields of PaaS (Platform as aService, namely platform serving as a service) platform, product production technology, system integration, automatic monitoring and the like, and has relatively few application in the financial field, in particular in the financial business processing field.
In the related art, the automatic scheduling of the process is completed by a series of scene sequential execution, the current business scenes are mostly completed by a special module, and the process starting conditions and scene sequence definitions are all solidified in the module, so that the process of the business processing is likely to be similar, and related codes need to be modified or re-developed once the requirements are changed. With the increase of the demands, the number of modules is increased, the management is difficult, the development workload is large, the repetition exists, and the working efficiency is seriously reduced.
In view of the above problems, no effective solution has been proposed at present.
Disclosure of Invention
The embodiment of the invention provides a business process scheduling method and device, electronic equipment and storage medium, which are used for at least solving the technical problem of low efficiency of scheduling business processes of financing tasks in related technologies.
According to an aspect of an embodiment of the present invention, there is provided a scheduling method of a service flow, including: receiving a financing task request, wherein the financing task request carries product types, and each product type corresponds to a business process; calling the business process corresponding to the product type through an asynchronous thread; scheduling each service scene according to the scene sequence in the service flow, wherein the scene sequence is the execution sequence of each service scene which is determined in advance, and returning an execution result after each service scene is executed; and closing the asynchronous thread under the condition that all the execution results indicate that the service scene is successfully executed, and determining that the financing task is successful.
Optionally, before receiving the financing task request, further comprising: configuring the corresponding business process for each product type; marking a scene identifier for each service scene, wherein the service scene is configured with a method name, wherein the method name is used for calling a preset service, and the preset service is used for processing the service under the service scene; and determining the sequence of the scene identifications based on the business flow, and generating the scene sequence.
Optionally, before receiving the financing task request, further comprising: setting a jump rule, wherein the jump rule is used for determining a jump scene identification of a service scene to be jumped after triggering a jump condition when executing a current service scene; and setting a failed retry rule, wherein the failed retry rule is used for determining a retry scene identifier of a service scene to be executed when the current service scene fails to be executed.
Optionally, the step of scheduling each service scenario according to the scenario sequence in the service flow includes: under the condition that the service flow is triggered by the financing task request, sequentially calling the service scenes indicated by the scene identifiers according to the sequence of the scene identifiers in the scene sequence, and jumping to the service scene to be jumped indicated by the jump scene identifiers after triggering the jump condition when executing the current service scene; under the condition that the service flow is triggered by a failed retry request, scheduling the service scene to be executed indicated by the retry scene identifier according to the failed retry rule, and after the execution of the service scene to be executed is completed, sequentially calling the service scenes indicated by the scene identifiers after the retry scene identifier according to the sequence of the scene identifiers in the scene sequence; under the condition that the service flow is triggered by a restoration termination request, scheduling a service scene which fails to be executed last time, and after the execution of the service scene which fails to be executed last time is completed, sequentially calling the service scenes indicated by the scene identifications after the scene identifications corresponding to the service scene which fails to be executed last time according to the sequence of the scene identifications in the scene sequence; and under the condition that the service flow is triggered by a wakeup request, scheduling a currently suspended service scene, and after the execution of the currently suspended service scene is completed, sequentially calling the service scenes indicated by the scene identifications after the scene identifications corresponding to the currently suspended service scene according to the sequence of the scene identifications in the scene sequence.
Optionally, after each service scenario is scheduled according to the scenario sequence in the service flow, the method further includes: executing the currently scheduled service scene to obtain the execution result; receiving an execution instruction under the condition that the execution result indicates that the execution of the service scene fails; under the condition that the execution instruction is a failed retry instruction, initiating the failed retry request, and migrating the historical execution data of the last execution failed service scene and the subsequent service scene to a historical execution log table; clearing the historical execution data, and calling the preset service corresponding to the method name based on the method name of the currently scheduled business scene under the condition that clearing is completed; and processing the service under the service scene by adopting the preset service, and recording the execution data in the processing process to a current execution log table.
Optionally, after receiving the execution instruction, the method further includes: terminating the business flow and initiating whether to resume the termination request to the external equipment under the condition that the execution instruction is a flow termination instruction, wherein the external equipment responds to whether to resume the termination request and returns a first response result; under the condition that the first response result indicates to resume the ending flow, initiating the resume ending request; suspending the business flow and initiating whether to resume a suspension request to the external equipment under the condition that the execution instruction is a flow suspension instruction, wherein the external equipment responds whether to resume the suspension request and returns a second response result; and under the condition that the second response result indicates to resume the suspension flow, initiating the wake-up request.
Optionally, after receiving the financing task request, further comprising: creating an asynchronous thread; controlling the asynchronous thread to acquire a distributed lock corresponding to the service identifier based on the service identifier carried by the financing task request; and starting the asynchronous thread under the condition that the asynchronous thread successfully acquires the distributed lock.
According to another aspect of the embodiment of the present invention, there is also provided a scheduling apparatus for a service flow, including: the system comprises a receiving unit, a processing unit and a processing unit, wherein the receiving unit is used for receiving financing task requests, the financing task requests carry product types, and each product type corresponds to a business process; the calling unit is used for calling the business flow corresponding to the product type through an asynchronous thread; the scheduling unit is used for scheduling each service scene according to the scene sequence in the service flow, wherein the scene sequence is a predetermined execution sequence of each service scene, and after each service scene is executed, an execution result is returned; and the determining unit is used for closing the asynchronous thread and determining successful financing task under the condition that all the execution results indicate successful execution of the service scene.
Optionally, the scheduling device further includes: the first configuration module is used for configuring the corresponding business flow for each product type before receiving the financing task request; the first marking module is used for marking scene identifiers for each business scene, wherein the business scenes are configured with method names, the method names are used for calling preset services, and the preset services are used for processing businesses in the business scenes; the first generation module is used for determining the sequence of the scene identifications based on the business process and generating the scene sequence.
Optionally, the scheduling device further includes: the first setting module is used for setting a jump rule before receiving the financing task request, wherein the jump rule is used for determining a jump scene identification of a service scene to be jumped after triggering a jump condition when executing the current service scene; and the second setting module is used for setting a failed retry rule, wherein the failed retry rule is used for determining a retry scene identifier of a service scene to be executed when the current service scene is retried after the current service scene is executed.
Optionally, the scheduling unit includes: the first scheduling module is used for sequentially calling the service scenes indicated by the scene identifiers according to the sequence of the scene identifiers in the scene sequence under the condition that the service flow is triggered by the financing task request, and jumping to the service scene to be jumped indicated by the jumped scene identifier after triggering the jumping condition when executing the current service scene; the second scheduling module is used for scheduling the service scene to be executed indicated by the retry scene identifier according to the failure retry rule under the condition that the service flow is triggered by the failure retry request, and sequentially calling the service scenes indicated by the scene identifiers after the retry scene identifier according to the sequence of the scene identifiers in the scene sequence after the execution of the service scene to be executed is completed; the third scheduling module is used for scheduling the last execution failure business scene under the condition that the business process is triggered by the restoration termination request, and sequentially calling the business scenes indicated by the scene identifiers after the scene identifiers corresponding to the last execution failure business scene according to the sequence of the scene identifiers in the scene sequence after the execution of the last execution failure business scene is completed; and the fourth scheduling module is used for scheduling the currently suspended service scene under the condition that the service flow is triggered by the wakeup request, and sequentially calling the service scenes indicated by the scene identifications after the scene identifications corresponding to the currently suspended service scene according to the sequence of the scene identifications in the scene sequence after the execution of the currently suspended service scene is completed.
Optionally, the scheduling device further includes: the first execution module is used for executing the currently scheduled business scenes after scheduling each business scene according to the scene sequence in the business process to obtain the execution result; the first receiving module is used for receiving an execution instruction under the condition that the execution result indicates that the execution of the service scene fails; the first initiating module is used for initiating the failed retry request and migrating the historical execution data of the last execution failure service scene and the subsequent service scene to a historical execution log table under the condition that the execution instruction is a failed retry instruction; the first cleaning module is used for cleaning the historical execution data and calling the preset service corresponding to the method name based on the method name of the currently scheduled business scene under the condition that cleaning is completed; the first processing module is used for processing the service under the service scene by adopting the preset service and recording the execution data in the processing process to a current execution log table.
Optionally, the scheduling device further includes: the first termination module is used for terminating the business flow and initiating whether to resume the termination request to the external equipment after receiving the execution instruction under the condition that the execution instruction is the flow termination instruction, wherein the external equipment responds whether to resume the termination request and returns a first response result; the second initiating module is used for initiating the restoration termination request under the condition that the first response result indicates restoration termination flow; the first suspension module is used for suspending the business process and initiating whether to resume a suspension request to the external equipment under the condition that the execution instruction is a process suspension instruction, wherein the external equipment responds to whether to resume the suspension request and returns a second response result; and the third initiating module is used for initiating the awakening request under the condition that the second response result indicates to resume the pause flow.
Optionally, the scheduling device further includes: the first creation module is used for creating an asynchronous thread after receiving the financing task request; the first control module is used for controlling the asynchronous thread to acquire a distributed lock corresponding to the service identifier based on the service identifier carried by the financing task request; and the first starting module is used for starting the asynchronous thread under the condition that the asynchronous thread successfully acquires the distributed lock.
According to another aspect of the embodiment of the present invention, there is further provided a computer readable storage medium, where the computer readable storage medium includes a stored computer program, where when the computer program runs, a device where the computer readable storage medium is controlled to execute the scheduling method of the above-mentioned business process.
According to another aspect of the embodiment of the present invention, there is also provided an electronic device, including one or more processors and a memory, where the memory is configured to store one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the method for scheduling a business process.
In the present disclosure, a financing task request is received, a business process corresponding to a product type is called through an asynchronous thread, each business scenario is scheduled according to a scenario sequence in the business process, and the asynchronous thread is closed to determine that the financing task is successful when all execution results indicate that the business scenario is successfully executed. In the method, the corresponding business processes can be called according to the product types carried in the received financing task requests, each business scene is sequentially scheduled according to the scene sequence in the business processes, and the asynchronous thread is closed after all business scenes are successfully executed to finish the current financing task.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiments of the invention and together with the description serve to explain the invention and do not constitute a limitation on the invention. In the drawings:
FIG. 1 is a flow chart of an alternative business process scheduling method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an alternative configurable multi-business process automatic dispatch system in accordance with an embodiment of the present invention;
FIG. 3 is a flow chart of an alternative sequence of generating scenes in accordance with an embodiment of the invention;
FIG. 4 is a schematic diagram of an alternative configurable multi-business process automatic scheduling method in accordance with an embodiment of the present invention;
FIG. 5 is a schematic diagram of an alternative business process scheduler according to an embodiment of the present invention;
fig. 6 is a block diagram of a hardware structure of an electronic device (or mobile device) for a scheduling method of a business process according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that, the method and the device for scheduling the business process in the present disclosure may be used in the financial technology field when the business process is scheduled, and may also be used in any field other than the financial technology field when the business process is scheduled, and the application field of the method and the device for scheduling the business process in the present disclosure is not limited.
It should be noted that, related information (including, but not limited to, user equipment information, user personal information, etc.) and data (including, but not limited to, data for presentation, analyzed data, etc.) related to the present disclosure are information and data authorized by a user or sufficiently authorized by each party. For example, an interface is provided between the system and the relevant user or institution, before acquiring the relevant information, the system needs to send an acquisition request to the user or institution through the interface, and acquire the relevant information after receiving the consent information fed back by the user or institution.
The following embodiments of the present invention are applicable to various systems/applications/devices for scheduling business processes. The invention provides a configurable multi-service flow automatic scheduling method, which constructs a set of mature and complete multi-service flow automatic scheduling system through a flow management module, a front end control module, a flow scheduling execution module, a data cleaning module, an exception processing module, a log module and the like, thereby realizing the high configurability of the flow. According to the method, interaction relations among different systems can be automatically processed according to a pre-configured business process, linkage among intelligent and efficient heterogeneous matched systems is achieved, manual intervention scenes can be triggered conveniently, and application scenes are greatly expanded.
The present invention will be described in detail with reference to the following examples.
Example 1
According to an embodiment of the present invention, there is provided an embodiment of a method of scheduling a business process, it being noted that the steps shown in the flowchart of the figures may be performed in a computer system such as a set of computer executable instructions, and, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in an order other than that shown or described herein.
Fig. 1 is a flowchart of an alternative business process scheduling method according to an embodiment of the present invention, as shown in fig. 1, the method includes the following steps:
step S101, a financing task request is received, wherein the financing task request carries product types, and each product type corresponds to a business process.
Step S102, calling a business flow corresponding to the product type through an asynchronous thread.
Step S103, scheduling each service scene according to the scene sequence in the service flow, wherein the scene sequence is the execution sequence of each service scene which is determined in advance, and returning an execution result after each service scene is executed.
And step S104, closing the asynchronous thread and determining that the financing task is successful under the condition that all execution results indicate that the service scene is successfully executed.
Through the steps, the financing task request can be received, the business flow corresponding to the product type is called through the asynchronous thread, each business scene is scheduled according to the scene sequence in the business flow, and the asynchronous thread is closed to determine that the financing task is successful under the condition that all execution results indicate that the business scene is successfully executed. In the embodiment of the invention, the corresponding business processes can be called according to the product types carried in the received financing task request, each business scene is sequentially scheduled according to the scene sequence in the business processes, and the asynchronous thread is closed after all business scenes are successfully executed to finish the current financing task, and the financing task request can be efficiently processed by calling the pre-configured business processes, so that the working efficiency is improved, and the technical problem of lower scheduling efficiency of the business processes of the financing task in the related technology is solved.
Embodiments of the present invention will be described in detail with reference to the following steps.
FIG. 2 is a schematic diagram of an alternative configurable multi-business process automatic dispatch system, as shown in FIG. 2, according to an embodiment of the present invention, comprising: the system comprises a flow management module, a front-end control module, a flow scheduling execution module, a data cleaning module, an exception handling module and a log module, wherein each external application system (such as an application system 1, an application system 2, an application system 3, an application system n and the like) can interact with the flow management module in the multi-service flow automatic scheduling system, and the functions of each module are as follows:
The flow management module is used for maintaining business flows of different products, and comprises the following steps: product type-different product flows, scene identification-different scenes of a single product business flow, scene sequence-identification scene default execution sequence, method name-execution scene triggered service, jump rule-special scene execution sequence control, failure retry rule-failure retry start scene identification, and the like. And the flow management module can maintain the business flow of each product in a system page and store the business flow in a database for reading when the flow is scheduled, and can be directly implemented in a configuration file aiming at the application with less flow change, and only the flow reading mode is required to be switched.
The front-end control module is used for displaying all the services, checking the execution condition of the specific scene of the service from the details, and carrying out failed retry or termination operation on the execution failure scene.
The flow scheduling execution module comprises: the system comprises a starting unit, an automatic scheduling unit, a failure retry unit, a flow execution failure unit, a flow pause unit and a flow termination unit, wherein the starting unit can be realized in a multithreading asynchronous triggering mode, and a distributed lock can be set to support the application of a distributed environment.
And the data cleaning module is used for cleaning the service data of the related scene when the retry is failed or the process terminates operation, and the data cleaning logic of the data cleaning module is specifically realized by different products.
And the exception handling module is used for handling exceptions encountered in the execution process of all scenes, automatically stopping the current thread and setting the task scene as failure.
And the log module is used for recording the execution record of each scene.
In an embodiment of the present invention, optionally, before receiving the financing task request, the method further includes: configuring a corresponding business process for each product type; marking a scene identifier for each service scene, wherein the service scene is configured with a method name, wherein the method name is used for calling a preset service, and the preset service is used for processing the service under the service scene; and determining the sequence of the scene identifications based on the business process, and generating the scene sequence.
FIG. 3 is a flow chart of an alternative sequence of generating scenes, as shown in FIG. 3, according to an embodiment of the invention, including the steps of:
step S301, configuring corresponding business processes for each product type;
step S302, marking a scene identifier for each service scene, wherein the service scene is configured with a method name, wherein the method name is used for calling a preset service, and the preset service is used for processing the service under the service scene;
Step S303, determining the sequence of scene identifications based on the business process, and generating the scene sequence.
In the embodiment of the invention, different business processes (such as corresponding business processes for bond type products and corresponding business processes for stock type products) can be configured for products of different product types to meet different product application requirements. In addition, a scene identifier (used for identifying different scenes of a product business process) can be marked for each business scene, the business scene can be configured with a method name, and the method name is used for calling preset service so as to process business under the business scene through the preset service.
The order of scene identifications may then be determined from the business processes to generate a scene order (i.e., the order of business scenes performed by the type of product).
Optionally, before receiving the financing task request, further comprising: setting a jump rule, wherein the jump rule is used for determining a jump scene identification of a service scene to be jumped after triggering a jump condition when executing a current service scene; and setting a failed retry rule, wherein the failed retry rule is used for determining a retry scene identifier of a service scene to be executed when the current service scene fails to be executed.
In the embodiment of the invention, a jump rule (namely, an execution sequence control rule under a special service scene) can be set, and the jump rule is used for determining a jump scene identifier of a service scene to be jumped after triggering a jump condition when executing the current service scene. For example, if a jump condition is triggered when a certain service scenario is executed (for example, the execution result value reaches a certain range), the execution of the service scenario indicated by the jump scenario identifier can be directly jumped to according to the jump rule. And, a failed retry rule (i.e., a rule for setting a failed retry start scenario identification) may be set, which is used to determine a retry scenario identification of a service scenario to be executed when a retry is performed after a failure of executing the current service scenario. For example, when a certain service scenario fails to execute, a retry may be performed, and then according to a failed retry rule, the service scenario indicated by the retry scenario identifier needs to be executed first during the retry.
Step S101, a financing task request is received, wherein the financing task request carries product types, and each product type corresponds to a business process.
In the embodiment of the invention, the financing task request initiated by the external application system can be received first, the financing task request carries the product types, and each product type is preconfigured with a corresponding business flow.
Optionally, after receiving the financing task request, further comprising: creating an asynchronous thread; based on the service identifier carried by the financing task request, controlling an asynchronous thread to acquire a distributed lock corresponding to the service identifier; in the event that the asynchronous thread successfully acquires the distributed lock, the asynchronous thread is started.
In the embodiment of the invention, after the financing task request is received, a starting unit in the flow scheduling execution module can be called first, the starting unit can firstly create an asynchronous thread, acquire a distributed lock (automatically released after the lock is overtime) according to a service unique identifier (namely, a service identifier carried by the financing task request), and then start the asynchronous thread (namely, based on the service identifier carried by the financing task request, control the asynchronous thread to acquire the distributed lock corresponding to the service identifier, and start the asynchronous thread under the condition that the asynchronous thread successfully acquires the distributed lock).
Step S102, calling a business flow corresponding to the product type through an asynchronous thread.
In the embodiment of the invention, the asynchronous thread can acquire the business flow corresponding to the product type from the flow management module and send the business flow to the automatic scheduling unit in the flow scheduling execution module for business scene scheduling (namely, the business flow corresponding to the product type is called through the asynchronous thread).
Step S103, scheduling each service scene according to the scene sequence in the service flow, wherein the scene sequence is the execution sequence of each service scene which is determined in advance, and returning an execution result after each service scene is executed.
Optionally, the step of scheduling each service scenario according to the scenario sequence in the service flow includes: under the condition that the service flow is triggered by the financing task request, sequentially calling the service scenes indicated by the scene identifiers according to the sequence of the scene identifiers in the scene sequence, and jumping to the service scene to be jumped indicated by the jumped scene identifiers after triggering the jump condition when executing the current service scene; under the condition that a service flow is triggered by a failed retry request, scheduling a service scene to be executed indicated by a retry scene identifier according to a failed retry rule, and after the execution of the service scene to be executed is completed, sequentially calling the service scenes indicated by the scene identifiers after the retry scene identifier according to the sequence of the scene identifiers in the scene sequence; under the condition that a service flow is triggered by a restoration termination request, scheduling a service scene which fails to be executed last time, and sequentially calling service scenes indicated by scene identifications after scene identifications corresponding to the service scene which fails to be executed last time according to the sequence of the scene identifications in the scene sequence after the execution of the service scene which fails to be executed last time is completed; and under the condition that the service flow is triggered by the wake-up request, scheduling the currently suspended service scene, and after the execution of the currently suspended service scene is completed, sequentially calling the service scene indicated by the scene identifier after the scene identifier corresponding to the currently suspended service scene according to the sequence of the scene identifiers in the scene sequence.
In the embodiment of the present invention, each service scenario may be scheduled according to a scenario sequence in the service flow (the scenario sequence is a predetermined execution sequence of each service scenario), and after each service scenario is executed, an execution result (execution success or failure) is returned, which specifically includes:
if the service flow is triggered by the financing task request, the service scene indicated by the scene identifier can be sequentially called according to the sequence of the scene identifiers in the scene sequence (i.e. default execution is started from the first scene specified by the scene sequence if the financing task request is newly received), and the service scene to be skipped indicated by the skip scene identifier is skipped after the skip condition is triggered when the current service scene is executed (i.e. the skip condition is triggered when the current service scene is executed), and the exception handling module and the call log module can be started to record the execution condition of the service scene.
If the service flow is triggered by the failed retry request, the service scenario to be executed indicated by the retry scenario identification is scheduled according to the failed retry rule (i.e., if the service flow is triggered by the failed retry, the first execution scenario can be acquired according to the failed retry rule), and after the execution of the service scenario to be executed is completed, the service scenario indicated by the scenario identification after the retry scenario identification is sequentially invoked according to the order of the scenario identification in the scenario order.
If the service flow is triggered by the resume termination request, the service scenario with the last execution failure (namely, if the service flow is triggered again after the flow is terminated, the scenario with the last execution failure can be executed first), and after the execution of the service scenario with the last execution failure is completed, the service scenario indicated by the scenario identification after the scenario identification corresponding to the service scenario with the last execution failure is sequentially invoked according to the sequence of the scenario identification in the scenario sequence.
If the service flow is triggered by the wakeup request, the currently suspended service scenario (i.e. if the service flow is triggered by task wakeup, the execution can be started from the suspended scenario) can be scheduled, and after the execution of the currently suspended service scenario is completed, the service scenario indicated by the scenario identifier after the scenario identifier corresponding to the currently suspended service scenario is sequentially invoked according to the sequence of the scenario identifiers in the scenario sequence.
Optionally, after each service scenario is scheduled according to the scenario sequence in the service flow, the method further includes: executing the current scheduled service scene to obtain an execution result; receiving an execution instruction under the condition that the execution result indicates that the service scene fails to be executed; under the condition that the execution instruction is a failed retry instruction, initiating a failed retry request, and migrating historical execution data of a last execution failure service scene and subsequent service scenes to a historical execution log table; clearing historical execution data, and calling a preset service corresponding to a method name based on the method name of the currently scheduled service scene under the condition that clearing is completed; and processing the service under the service scene by adopting the preset service, and recording the execution data in the processing process to the current execution log table.
In the embodiment of the invention, the current scheduled service scene can be executed to obtain the execution result. If the execution result indicates that the execution of the current service scene fails, an execution instruction sent by the external device can be received, if the execution instruction is a failed retry instruction, a failed retry request can be initiated, historical execution data of the last service scene with the last execution failure and the subsequent service scene are migrated to a historical execution log table (namely, a calling log module migrates the data of the initial scene and the subsequent scene in the last current execution log table to the historical process scene execution log table), then the historical execution data is cleaned (namely, a data cleaning module is called to clean the service data generated by the last execution), and under the condition that the cleaning is completed, a preset service (service processing service) corresponding to the method name is called according to the method name of the currently scheduled service scene, the service under the service scene is processed by adopting the preset service, and the execution data in the processing process is recorded to the current execution log table.
Optionally, after receiving the execution instruction, the method further includes: under the condition that the execution instruction is a flow termination instruction, terminating the service flow, and initiating whether to resume the termination request to the external equipment, wherein the external equipment responds to whether to resume the termination request and returns a first response result; under the condition that the first response result indicates to resume the termination flow, initiating a resume termination request; under the condition that the execution instruction is a flow pause instruction, pausing the service flow, and initiating whether to resume the pause request to the external equipment, wherein the external equipment responds whether to resume the pause request and returns a second response result; and under the condition that the second response result indicates to resume the suspension flow, initiating a wake-up request.
In the embodiment of the invention, if the execution instruction is a flow termination instruction, the business flow is terminated, whether to resume the termination request is initiated to the external equipment, the external equipment can respond to the resume termination request and return a first response result (including that the resume termination flow is agreed or not) and if the first response result indicates that the resume termination flow is agreed, the resume termination request can be initiated. If the response result is not received after the preset time length is exceeded (the setting can be carried out according to the actual situation), the process is considered to be not required to be restored, a process termination unit in the process scheduling execution module is called, the log module is triggered to record the log, the data cleaning module cleans garbage data, the asynchronous thread is ended, and the task is terminated.
If the execution instruction is a flow suspension instruction, suspending the business flow, initiating whether to resume the suspension request to the external equipment, responding whether to resume the suspension request by the external equipment, and returning a second response result (including that the suspension flow is agreed to be resumed or the suspension flow is not agreed to be resumed), and if the second response result indicates that the suspension flow is resumed, initiating a wakeup request. If the response result is not received after the preset time length is exceeded (the setting can be carried out according to the actual situation), the pause flow is considered not to be required to be restored.
And step S104, closing the asynchronous thread and determining that the financing task is successful under the condition that all execution results indicate that the service scene is successfully executed.
In the embodiment of the invention, if all the execution results indicate that the service scene is successfully executed, the asynchronous thread is closed, and the financing task is determined to be successful (namely, all the scenes are normally executed, the asynchronous thread is ended, and the task is successful).
In this embodiment, if a scenario is successfully executed, but a flow suspension unit in the flow scheduling execution module is invoked, the asynchronous thread ends and the task is suspended. If a certain scene fails to execute and invokes a failed retry unit in the flow scheduling execution module, the asynchronous thread ends, the task fails, and a failed retry can be performed in the front-end control module. If a certain scene fails to execute and invokes a flow termination unit in the flow scheduling execution module, the asynchronous thread ends and the failure ends.
The following detailed description is directed to alternative embodiments.
In this embodiment, the external service may call the starting unit, the starting unit creates an asynchronous thread and triggers the corresponding automatic scheduling unit according to the product type, the automatic scheduling unit executes scheduling according to the scene sequence of the flow management module, in the scheduling process, the corresponding service processing module is called according to the method name of each scene to complete the service processing of the scene, the started asynchronous thread terminates the thread until all service scenes are executed, an exception is thrown out in the scheduling execution, or a certain scene actively triggers the flow termination unit, so that the situation of termination due to the exception may be failed to retry in the front end control module, each scene may call the log module to record the log to the flow scene execution log table before executing, and when the retry is failed, the log module is called to transfer the retry starting scene and the subsequent scene data in the last execution log table to the history flow scene execution log table, and retry is recorded in the execution log table.
FIG. 4 is a schematic diagram of an alternative configurable multi-business process automatic scheduling method according to an embodiment of the present invention, as shown in FIG. 4, comprising the steps of:
step one: and receiving a financing task request, or triggering a failed retry or flow termination on an interface of the front-end control module, or waking up a task in suspension externally, so as to call a starting unit in the flow scheduling execution module.
Step two: the starting unit firstly creates an asynchronous thread, acquires a distributed lock (the distributed lock can be automatically released after the lock is overtime) according to the unique service identifier, and then acquires a corresponding product flow scene from the flow management module and sends the product flow scene to the automatic scheduling unit.
Step three: the automatic scheduling unit acquires a first execution scene and performs scene execution:
(1) If the newly received financing task request is received, default execution is started from the first scenario;
(2) If the retry is failed, acquiring a first execution scene according to a failed retry rule;
(3) If the flow is terminated, the scene is failed in the last execution;
(4) If external wakeup, execution begins from the paused scene.
Step four: the automatic scheduling unit judges the instruction type:
(1) If the execution log table is failed to retry, the calling log module transfers the retry starting scene and the follow-up scene data in the last execution log table to the historical process scene execution log table, and the data cleaning module is called to clean the service data generated by the last execution;
(2) If the flow is terminated, a lost flow termination unit is called, a log module is triggered to record a log, a data cleaning module cleans garbage data, an asynchronous thread is ended, and a task is terminated.
Step five: the automatic scheduling unit starts default sequential execution from the first execution scene, if the configuration jump rule is executed according to the rule, the exception handling module is started, and the log module is called to record the execution condition of the scene:
(1) The normal execution of all scenes is ended, and the asynchronous thread is ended, and the execution is ended;
(2) If the execution of a certain scene is successful, but the flow pause unit is called to pause the flow, the asynchronous thread is ended, the pause is executed through the flow pause unit, and the external wakeup can be performed subsequently;
(3) If the execution of a certain scene fails, judging whether to terminate, if not, calling a flow execution failure unit to perform the execution failure, and subsequently, carrying out failed retry or flow termination; if so, an out-of-flow termination unit may be invoked, the asynchronous thread ends, and the failure terminates.
In the embodiment of the invention, the execution scene and the execution sequence of the flow can be defined in the flow management module, the operation is simple and convenient, and the flexibility and the universality are enhanced. Meanwhile, the business processes of different types of products can meet the application requirements of different products, the repeated scenes are directly configured with the same method names, business logic can be conveniently modified, repeated development is avoided, and the working efficiency is improved. And interaction relations among different systems can be automatically processed according to a pre-configured business process, so that intelligent and efficient linkage among heterogeneous matched systems is realized.
The following describes in detail another embodiment.
Example two
The scheduling apparatus for a business process provided in this embodiment includes a plurality of implementation units, where each implementation unit corresponds to each implementation step in the first embodiment.
Fig. 5 is a schematic diagram of an alternative service flow scheduling apparatus according to an embodiment of the present invention, as shown in fig. 5, the scheduling apparatus may include: a receiving unit 50, a calling unit 51, a scheduling unit 52, a determining unit 53, wherein,
the receiving unit 50 is configured to receive a financing task request, where the financing task request carries product types, and each product type corresponds to a business process;
a calling unit 51, configured to call a service flow corresponding to a product type through an asynchronous thread;
the scheduling unit 52 is configured to schedule each service scenario according to a scenario sequence in the service flow, where the scenario sequence is a predetermined execution sequence of each service scenario, and after execution of each service scenario is completed, an execution result is returned;
and the determining unit 53 is configured to close the asynchronous thread and determine that the financing task is successful when all execution results indicate that the service scenario is executed successfully.
In the above scheduling device, the receiving unit 50 may receive the financing task request, the calling unit 51 may call the service flow corresponding to the product type through the asynchronous thread, the scheduling unit 52 may schedule each service scenario according to the scenario sequence in the service flow, and the determining unit 53 may close the asynchronous thread to determine that the financing task is successful when all the execution results indicate that the service scenario is successfully executed. In the embodiment of the invention, the corresponding business processes can be called according to the product types carried in the received financing task request, each business scene is sequentially scheduled according to the scene sequence in the business processes, and the asynchronous thread is closed after all business scenes are successfully executed to finish the current financing task, and the financing task request can be efficiently processed by calling the pre-configured business processes, so that the working efficiency is improved, and the technical problem of lower scheduling efficiency of the business processes of the financing task in the related technology is solved.
Optionally, the scheduling apparatus further includes: the first configuration module is used for configuring corresponding business processes for each product type before receiving the financing task request; the first marking module is used for marking scene identifiers for each service scene, wherein the service scene is configured with a method name, the method name is used for calling a preset service, and the preset service is used for processing the service under the service scene; the first generation module is used for determining the sequence of scene identification based on the business process and generating the scene sequence.
Optionally, the scheduling apparatus further includes: the first setting module is used for setting a jump rule before receiving the financing task request, wherein the jump rule is used for determining a jump scene identifier of a service scene to be jumped after triggering a jump condition when executing the current service scene; the second setting module is used for setting a failed retry rule, wherein the failed retry rule is used for determining a retry scene identifier of a service scene to be executed when the current service scene is executed for retry after the current service scene is executed for failure.
Optionally, the scheduling unit includes: the first scheduling module is used for sequentially calling the service scenes indicated by the scene identifiers according to the sequence of the scene identifiers in the scene sequence under the condition that the service flow is triggered by the financing task request, and jumping to the service scene to be jumped indicated by the jumped scene identifiers after triggering the jump condition when executing the current service scene; the second scheduling module is used for scheduling the service scene to be executed indicated by the retry scene identifier according to the failure retry rule under the condition that the service flow is triggered by the failure retry request, and sequentially calling the service scene indicated by the scene identifier after the retry scene identifier according to the sequence of the scene identifiers in the scene sequence after the execution of the service scene to be executed is completed; the third scheduling module is used for scheduling the last execution failure business scene under the condition that the business process is triggered by the restoration termination request, and sequentially calling the business scenes indicated by the scene identifications after the scene identifications corresponding to the last execution failure business scene according to the sequence of the scene identifications in the scene sequence after the execution of the last execution failure business scene is completed; and the fourth scheduling module is used for scheduling the currently suspended service scene under the condition that the service flow is triggered by the wakeup request, and sequentially calling the service scene indicated by the scene identifier after the scene identifier corresponding to the currently suspended service scene according to the sequence of the scene identifier in the scene sequence after the execution of the currently suspended service scene is completed.
Optionally, the scheduling apparatus further includes: the first execution module is used for executing the currently scheduled business scene after scheduling each business scene according to the scene sequence in the business process to obtain an execution result; the first receiving module is used for receiving an execution instruction under the condition that the execution result indicates that the execution of the service scene fails; the first initiating module is used for initiating a failure retry request under the condition that the execution instruction is a failure retry instruction, and migrating historical execution data of a last execution failure service scene and subsequent service scenes to a historical execution log table; the first cleaning module is used for cleaning the historical execution data and calling a preset service corresponding to the method name based on the method name of the currently scheduled business scene under the condition that cleaning is completed; the first processing module is used for processing the business under the business scene by adopting the preset service and recording the execution data in the processing process to the current execution log table.
Optionally, the scheduling apparatus further includes: the first termination module is used for terminating the business flow and initiating whether to resume the termination request to the external equipment after receiving the execution instruction under the condition that the execution instruction is the flow termination instruction, wherein the external equipment responds to whether to resume the termination request and returns a first response result; the second initiating module is used for initiating a restoration termination request under the condition that the first response result indicates the restoration termination flow; the first pause module is used for pausing the business flow and initiating whether to resume the pause request to the external equipment under the condition that the execution instruction is the flow pause instruction, wherein the external equipment responds to whether to resume the pause request and returns a second response result; and the third initiating module is used for initiating a wakeup request under the condition that the second response result indicates to resume the pause flow.
Optionally, the scheduling apparatus further includes: the first creation module is used for creating an asynchronous thread after receiving the financing task request; the first control module is used for controlling the asynchronous thread to acquire the distributed lock corresponding to the service identifier based on the service identifier carried by the financing task request; the first starting module is used for starting the asynchronous thread under the condition that the asynchronous thread successfully acquires the distributed lock.
The scheduling apparatus may further include a processor and a memory, and the receiving unit 50, the calling unit 51, the scheduling unit 52, the determining unit 53, and the like may be stored in the memory as program units, and the processor may execute the program units stored in the memory to implement the corresponding functions.
The processor includes a kernel, and the kernel fetches a corresponding program unit from the memory. The kernel can set one or more than one kernel parameters, and under the condition that all execution results indicate that the service scene is successfully executed, the asynchronous thread is closed, and the success of the financing task is determined.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM), which includes at least one memory chip.
The present application also provides a computer program product adapted to perform, when executed on a data processing device, a program initialized with the method steps of: and receiving a financing task request, calling a service flow corresponding to the product type through an asynchronous thread, scheduling each service scene according to the scene sequence in the service flow, and closing the asynchronous thread to determine success of the financing task under the condition that all execution results indicate that the service scene is successfully executed.
According to another aspect of the embodiment of the present invention, there is also provided a computer readable storage medium, where the computer readable storage medium includes a stored computer program, where when the computer program is executed, a device on which the computer readable storage medium is located is controlled to execute the scheduling method of the service flow described above.
According to another aspect of the embodiment of the present invention, there is also provided an electronic device, including one or more processors and a memory, where the memory is configured to store one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method for scheduling a business process described above.
Fig. 6 is a block diagram of a hardware structure of an electronic device (or mobile device) for a scheduling method of a business process according to an embodiment of the present invention. As shown in fig. 6, the electronic device may include one or more processors 602 (shown in fig. 6 as 602a, 602b, … …,602 n) (the processor 602 may include, but is not limited to, a microprocessor MCU, a programmable logic device FPGA, etc.) and a memory 604 for storing data. In addition, the method may further include: a display, an input/output interface (I/O interface), a Universal Serial Bus (USB) port (which may be included as one of the ports of the I/O interface), a network interface, a keyboard, a power supply, and/or a camera. It will be appreciated by those of ordinary skill in the art that the configuration shown in fig. 6 is merely illustrative and is not intended to limit the configuration of the electronic device described above. For example, the electronic device may also include more or fewer components than shown in FIG. 6, or have a different configuration than shown in FIG. 6.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
In the foregoing embodiments of the present invention, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed technology content may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of the units, for example, may be a logic function division, and may be implemented in another manner, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely a preferred embodiment of the present invention and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present invention, which are intended to be comprehended within the scope of the present invention.
Claims (10)
1. A method for scheduling a business process, comprising:
receiving a financing task request, wherein the financing task request carries product types, and each product type corresponds to a business process;
calling the business process corresponding to the product type through an asynchronous thread;
scheduling each service scene according to the scene sequence in the service flow, wherein the scene sequence is the execution sequence of each service scene which is determined in advance, and returning an execution result after each service scene is executed;
and closing the asynchronous thread under the condition that all the execution results indicate that the service scene is successfully executed, and determining that the financing task is successful.
2. The scheduling method of claim 1, further comprising, prior to receiving the financing task request:
configuring the corresponding business process for each product type;
Marking a scene identifier for each service scene, wherein the service scene is configured with a method name, wherein the method name is used for calling a preset service, and the preset service is used for processing the service under the service scene;
and determining the sequence of the scene identifications based on the business flow, and generating the scene sequence.
3. The scheduling method of claim 2, further comprising, prior to receiving the financing task request:
setting a jump rule, wherein the jump rule is used for determining a jump scene identification of a service scene to be jumped after triggering a jump condition when executing a current service scene;
and setting a failed retry rule, wherein the failed retry rule is used for determining a retry scene identifier of a service scene to be executed when the current service scene fails to be executed.
4. A scheduling method according to claim 3, wherein the step of scheduling each service scenario according to the scenario order in the service flow comprises:
under the condition that the service flow is triggered by the financing task request, sequentially calling the service scenes indicated by the scene identifiers according to the sequence of the scene identifiers in the scene sequence, and jumping to the service scene to be jumped indicated by the jump scene identifiers after triggering the jump condition when executing the current service scene;
Under the condition that the service flow is triggered by a failed retry request, scheduling the service scene to be executed indicated by the retry scene identifier according to the failed retry rule, and after the execution of the service scene to be executed is completed, sequentially calling the service scenes indicated by the scene identifiers after the retry scene identifier according to the sequence of the scene identifiers in the scene sequence;
under the condition that the service flow is triggered by a restoration termination request, scheduling a service scene which fails to be executed last time, and after the execution of the service scene which fails to be executed last time is completed, sequentially calling the service scenes indicated by the scene identifications after the scene identifications corresponding to the service scene which fails to be executed last time according to the sequence of the scene identifications in the scene sequence;
and under the condition that the service flow is triggered by a wakeup request, scheduling a currently suspended service scene, and after the execution of the currently suspended service scene is completed, sequentially calling the service scenes indicated by the scene identifications after the scene identifications corresponding to the currently suspended service scene according to the sequence of the scene identifications in the scene sequence.
5. The scheduling method of claim 4, further comprising, after scheduling each service scenario according to a scenario order in the service flow:
executing the currently scheduled service scene to obtain the execution result;
receiving an execution instruction under the condition that the execution result indicates that the execution of the service scene fails;
under the condition that the execution instruction is a failed retry instruction, initiating the failed retry request, and migrating the historical execution data of the last execution failed service scene and the subsequent service scene to a historical execution log table;
clearing the historical execution data, and calling the preset service corresponding to the method name based on the method name of the currently scheduled business scene under the condition that clearing is completed;
and processing the service under the service scene by adopting the preset service, and recording the execution data in the processing process to a current execution log table.
6. The scheduling method of claim 5, further comprising, after receiving the execution instruction:
terminating the business flow and initiating whether to resume the termination request to the external equipment under the condition that the execution instruction is a flow termination instruction, wherein the external equipment responds to whether to resume the termination request and returns a first response result;
Under the condition that the first response result indicates to resume the ending flow, initiating the resume ending request;
suspending the business flow and initiating whether to resume a suspension request to the external equipment under the condition that the execution instruction is a flow suspension instruction, wherein the external equipment responds whether to resume the suspension request and returns a second response result;
and under the condition that the second response result indicates to resume the suspension flow, initiating the wake-up request.
7. The scheduling method of claim 1, further comprising, after receiving the financing task request:
creating an asynchronous thread;
controlling the asynchronous thread to acquire a distributed lock corresponding to the service identifier based on the service identifier carried by the financing task request;
and starting the asynchronous thread under the condition that the asynchronous thread successfully acquires the distributed lock.
8. A business process scheduling apparatus, comprising:
the system comprises a receiving unit, a processing unit and a processing unit, wherein the receiving unit is used for receiving financing task requests, the financing task requests carry product types, and each product type corresponds to a business process;
the calling unit is used for calling the business flow corresponding to the product type through an asynchronous thread;
The scheduling unit is used for scheduling each service scene according to the scene sequence in the service flow, wherein the scene sequence is a predetermined execution sequence of each service scene, and after each service scene is executed, an execution result is returned;
and the determining unit is used for closing the asynchronous thread and determining successful financing task under the condition that all the execution results indicate successful execution of the service scene.
9. A computer readable storage medium, characterized in that the computer readable storage medium comprises a stored computer program, wherein the computer program when run controls a device in which the computer readable storage medium is located to perform the scheduling method of the business process according to any one of claims 1 to 7.
10. An electronic device comprising one or more processors and a memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of scheduling a business process of any of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310019650.XA CN116089040A (en) | 2023-01-06 | 2023-01-06 | Service flow scheduling method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310019650.XA CN116089040A (en) | 2023-01-06 | 2023-01-06 | Service flow scheduling method and device, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116089040A true CN116089040A (en) | 2023-05-09 |
Family
ID=86198667
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310019650.XA Pending CN116089040A (en) | 2023-01-06 | 2023-01-06 | Service flow scheduling method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116089040A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116976610A (en) * | 2023-07-28 | 2023-10-31 | 东莞盟大集团有限公司 | Intelligent scheduling system and method based on 5G technology |
CN117112432A (en) * | 2023-09-05 | 2023-11-24 | 中电金信软件有限公司 | Flow retry method, device, computer equipment and storage medium |
-
2023
- 2023-01-06 CN CN202310019650.XA patent/CN116089040A/en active Pending
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116976610A (en) * | 2023-07-28 | 2023-10-31 | 东莞盟大集团有限公司 | Intelligent scheduling system and method based on 5G technology |
CN116976610B (en) * | 2023-07-28 | 2024-01-26 | 东莞盟大集团有限公司 | Intelligent scheduling system and method based on 5G technology |
CN117112432A (en) * | 2023-09-05 | 2023-11-24 | 中电金信软件有限公司 | Flow retry method, device, computer equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109086986B (en) | Job scheduling method and device | |
CN103034554B (en) | The ETL dispatching system that a kind of error correction is restarted and automatic decision starts and method | |
CN108090731B (en) | Information processing method and device | |
CN110175677A (en) | Automatic update method, device, computer equipment and storage medium | |
CN116089040A (en) | Service flow scheduling method and device, electronic equipment and storage medium | |
CN110427258B (en) | Resource scheduling control method and device based on cloud platform | |
CN112181619B (en) | Batch service scheduling method, device, equipment and medium | |
US10067793B2 (en) | Data processing method and apparatus for executing task code using reservation instruction and release instruction | |
CN111210340B (en) | Automatic task processing method, device, server and storage medium | |
CN105308566B (en) | The expansible timing device wheel of on-demand | |
CN110109741B (en) | Method and device for managing circular tasks, electronic equipment and storage medium | |
CN111507608A (en) | Work order early warning method and device and storage medium | |
CN114816730A (en) | Robot process automation cloud service system and implementation method | |
CN110188258B (en) | Method and device for acquiring external data by using crawler | |
CN113778650B (en) | Task scheduling method, device, electronic device and storage medium | |
CN113658351B (en) | Method and device for producing product, electronic equipment and storage medium | |
CN110795224A (en) | Automatic operation and maintenance system and method based on infrastructure | |
CN114327835A (en) | Distributed task scheduling method and device, processor and electronic equipment | |
CN108521524B (en) | Agent collaborative task management method and device, computer equipment and storage medium | |
CN118227296A (en) | Task backtracking method, device, computing equipment and storage medium | |
CN111190725A (en) | Task processing method and device, storage medium and server | |
CN114816583B (en) | Flink-based data automatic processing method and device and electronic equipment | |
CN115048158A (en) | Process arranging and calling method, system and computer equipment thereof | |
CN115904650A (en) | Timed task supervision method and device under Linux system | |
CN112732479A (en) | Data backup method and device for distributed system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |