Service execution method, device, equipment, medium and product
By adopting a serverless application architecture and a stateless process scheduling engine in an enterprise-level process management system, the processor resources are dynamically managed, and the problems of low resource allocation efficiency and limited scalability in existing systems are solved, achieving efficient and flexible resource use and reducing operating costs.
Patent Information
- Application Number
- CN202411928376.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-03-28
AI Technical Summary
The existing enterprise-level process management system has problems such as inefficiency, waste of resources and limited scalability in resource allocation strategies, especially when resources are insufficient during peak business periods, which affects system performance.
It adopts a serverless application architecture and a stateless process scheduling engine to split the business process according to the business logic, and dynamically apply and release processor resources for each process node to ensure flexible use of resources.
It improves the utilization rate of server resources, reduces resource waste, enhances the scalability and reliability of the system, reduces operating costs, and improves the efficiency of business execution.
Smart Images

Figure CN119718668A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of business processing technology and can be applied to the field of financial technology, and in particular to a business execution method, device, equipment, medium and product. Background Art
[0002] As enterprises develop, the business scenarios and types of business they face gradually increase, and the performance of process management systems also needs to be optimized. Enterprise-level process management systems generally manage and execute business with the help of process engines. Process engines (PE) are a software tool or software service, which can be understood as a software engine that executes business or processes based on rules and conditions. It is used to manage and execute business processes, realize business process automation, improve business processing efficiency, and reduce the error rate of business execution.
[0003] Generally speaking, a business includes multiple process nodes. Currently, most enterprises use a centralized process scheduling engine to manage and execute various processes of various businesses, that is, they use a traditional server architecture, pre-configure server resources and process tasks that each server resource needs to handle, and there is a fixed correspondence between tasks and server resources. The configured server resources can only execute the corresponding process tasks. The execution efficiency of the business and the utilization of resources are limited by the resource allocation strategy. If more server resources are allocated to the low-peak business, it will lead to resource waste and even affect the execution of the peak business. Summary of the invention
[0004] The present invention provides a business execution method, device, equipment, medium and product, which can be applied to the field of financial technology. It can apply for processor resources for each process node according to the task details of each process node in the business, and release the processor resources of the process node after the execution of the process node is completed, so that it can execute other tasks. While ensuring the execution efficiency of the business, the utilization rate of server resources is improved and resource waste is reduced.
[0005] According to one aspect of the present invention, a service execution method is provided, the method comprising:
[0006] Determine, based on the business logic of the business to be executed, at least one process node of the business to be executed and an association relationship between at least one process node;
[0007] Using a preset target process scheduling engine, according to the association relationship of at least one process node and the total number of nodes, the execution resource of the to-be-executed business is determined; wherein the execution resource includes at least one server resource, the server resource corresponds to the process node, and the target process scheduling engine is a stateless process scheduling engine;
[0008] Based on the association relationship of at least one process node, at least one server resource is controlled to execute at least one process node to complete the business to be executed.
[0009] According to another aspect of the present invention, a service execution device is provided, and the service execution device is used to implement the service execution method in any embodiment of the present invention, and the device includes:
[0010] An acquisition module, used to determine at least one process node of the business to be executed and an association relationship between at least one process node based on the business logic of the business to be executed;
[0011] A determination module, used to determine the execution resources of the to-be-executed business according to the association relationship of at least one process node and the total number of nodes by using a preset target process scheduling engine; wherein the execution resources include at least one server resource, the server resource corresponds to the process node, and the target process scheduling engine is a stateless process scheduling engine;
[0012] The execution module is used to control at least one server resource to execute at least one process node based on the association relationship of at least one process node to complete the business to be executed.
[0013] According to another aspect of the present invention, there is provided an electronic device, the electronic device comprising:
[0014] at least one processor; and a memory communicatively coupled to the at least one processor;
[0015] The memory stores a computer program that can be executed by at least one processor, and the computer program is executed by at least one processor so that the at least one processor can execute the service execution method in any embodiment of the present invention.
[0016] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the service execution method in any embodiment of the present invention when executed.
[0017] According to another aspect of the present invention, a computer program product is provided. The computer program product includes a computer program. When the computer program is executed by a processor, the service execution method of any embodiment of the present invention is implemented.
[0018] The business execution method of the present invention includes: based on the business logic of the business to be executed, determining at least one process node of the business to be executed and the association relationship of at least one process node; using a pre-set target process scheduling engine, according to the association relationship of at least one process node and the total number of nodes, determining the execution resources of the business to be executed; wherein the execution resources include at least one server resource, the server resource and the process node correspond, and the target process scheduling engine is a stateless process scheduling engine; based on the association relationship of at least one process node, controlling at least one server resource to execute at least one process node to complete the business to be executed. The technical solution of the present invention will split the business according to the business logic of the business, and then apply for processor resources for each process node according to the task details of each process node in the business, and release the processor resources of the process node after the execution of the process node is completed, so that it can execute other tasks, and the use of server resources is highly flexible, and the utilization rate of server resources is improved while ensuring the execution efficiency of the business, and the waste of resources is reduced. The problem of pre-configuring server resources and the process tasks that each server resource needs to handle is solved. The configured server resources can only execute the corresponding process tasks. The business execution efficiency and resource utilization are limited by the resource allocation strategy. If more server resources are allocated to the off-peak period business, it will lead to resource waste and even affect the execution of peak period business.
[0019] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0021] Figure 1 It is a flowchart of a service execution method provided by the present invention;
[0022] Figure 2 is a schematic diagram of a service provided by the present invention;
[0023] Figure 3 It is a schematic diagram of a business process provided by the present invention;
[0024] Figure 4 It is a flowchart of another service execution method provided by the present invention;
[0025] Figure 5It is a structural schematic diagram of a service execution device provided by the present invention;
[0026] Figure 6 It is a structural schematic diagram of an electronic device provided by the present invention. DETAILED DESCRIPTION
[0027] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0028] It should be noted that the terms "first", "second", "initial", "intermediate", "candidate", "alternative", "target", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0029] At present, the process scheduling field usually adopts centralized process scheduling engines to manage and execute various business processes. These engines are usually deployed on fixed servers, responsible for receiving task requests, assigning tasks to corresponding execution nodes, and monitoring the execution status of tasks. There are the following disadvantages: 1) Low resource utilization efficiency, that is, traditional process scheduling engines usually need to pre-allocate fixed server resources. Even in the trough period of business, these resources will be occupied, resulting in resource waste; in the peak period of business, there may be insufficient resources, affecting system performance. 2) Limited scalability, that is, with the growth and change of business, traditional process scheduling engines need to upgrade hardware or reconstruct software to meet the growing business needs. Upgrading and reconstructing are not only costly, but also complicated, which may affect the stability and availability of the system. 3) Low cost-effectiveness, that is, traditional process scheduling engines need to continuously maintain server hardware and software, including but not limited to the purchase, maintenance, and upgrade of servers and software license fees, which increases the operating costs of enterprises.
[0030] The business execution method proposed in the present invention is a business implementation method of a stateless process scheduling engine based on a serverless application, which can solve the deficiencies of existing process scheduling engines in terms of resource utilization efficiency, scalability and cost-effectiveness, and has the advantages of high efficiency, flexibility and economy, and can adapt to various complex business scenarios. Stateless service means that the processing of a single request is independent and does not depend on the status of other requests before or after, so that server resources can execute tasks independently without being affected by other business processes.
[0031] Figure 1 This is a flowchart of a service execution method provided by the present invention. This embodiment can be applied to improving service execution efficiency, reducing resource consumption, dynamically adjusting process tasks that need to be executed in various services, etc. The method can be executed by the service execution device provided by the present invention. The device can be implemented in the form of hardware and / or software. In a specific embodiment, the device can be integrated in an electronic device. The following embodiments will be described by taking the device integrated in an electronic device as an example. Figure 1 , the method specifically comprises the following steps:
[0032] S101. Determine at least one process node of the business to be executed and an association relationship between at least one process node based on the business logic of the business to be executed.
[0033] The business to be executed can be understood as the business that needs to be processed in the enterprise, such as deploying applications, processing financial projects, deploying the application environment of financial projects, etc. The business logic of the business to be executed can be understood as the explanatory description of the business process of the business to be executed. A business may include multiple processes (i.e., process nodes). The business logic can be automatically generated according to the business characteristics, or it can be set by the user using the process definition language to determine the process relationship of the business (i.e., the association relationship between process nodes).
[0034] Specifically, the business to be executed can be a service in any one or more of the following application scenarios: cross-business system service collaboration scenario, customer journey end-to-end operation management scenario, business automation scenario, credit business processing scenario, operation intelligent scheduling scenario, task scheduling demand scenario, batch job scheduling scenario, business approval process scenario, order processing process scenario, human resources management process scenario, financial reimbursement process scenario, customer relationship management scenario and supply chain management scenario. The present invention does not limit this.
[0035] For example, assuming that the business logic of business A indicates that business A includes node tasks 1, 2, and 3 that are executed sequentially, then the process nodes of business A are considered to include node tasks 1, 2, and 3, and the association relationship between each process node is that node task 1 comes first, followed by node task 2 and 3. The flowchart of business A is as follows: Figure 2 As shown, Figure 2 It is a schematic diagram of a service provided by the present invention, and the service refers to the above-mentioned service A.
[0036] In one embodiment, S101 may specifically include: parsing the business logic of the business to be executed, obtaining at least one process node, node identification information of at least one process node, node type and node execution condition; determining the association relationship of at least one process node based on the node identification information, node type and node execution condition of at least one process node. The present invention parses the process nodes, process node details and association relationships of the business to be executed according to the business logic of the business to be executed, and then applies for server resources for each process node in a targeted manner, avoiding resource waste and improving resource utilization while ensuring smooth execution of the business.
[0037] Business logic can be used to describe the business process and logical sequence of the business to be executed. The process node is the component unit in the business process. The business process is the combination of multiple types of units. Therefore, the type information of the process node is different. The node types include start node, branch node, task node, merge node and end node. The association relationship of at least one process node is used to indicate the business process of the business to be executed, that is, the execution order of each process node.
[0038] Node identification information can be understood as the name, number and other information of the process node, which is used to distinguish each process node. Node execution conditions can be understood as the execution order of the process node, dependent nodes and other information, which is used to determine the position of the process node in the business process.
[0039] The start node can be understood as the startup task of the business to be executed, indicating the beginning of the business process; the task node can be understood as the task that needs to be executed in the business process, the branch node can be understood as a judgment node, which will determine the subsequent direction of the business process based on specific conditions, the merge node is the task node after multiple paths are merged, and the end node is used to indicate the end of the business process, that is, the business process is completed. Figure 3 This is a schematic diagram of a business process provided by the present invention, combined with Figure 3 Explain the business process. Figure 3The starting node in is the "start" node, indicating the beginning of the process, task node 1 is the "task1" task, branch node 1 is the "branch1" node, task node 2 is the "task2" task, task node 3 is the "task3" task, branch node 2 is the "branch2" node, task node 4 is the "task4" task, the merge node is the "merge" node, and the end node is the "end" node. Figure 3 Starting from the starting node, there are two parallel paths. One path is to execute the "task1" task first, and then enter the "branch1" branch node after executing the "task1" task. The branch node determines the subsequent direction based on specific conditions. If the conditions are met, the "task2" task is executed, and finally reaches the "merge" merge node. Similarly, the other path is to execute the "task3" task directly from the starting node, then enter the "branch2" branch node, execute the "task4" task after the conditions are met, and reach the "merge" merge node. At the "merge" node, the execution results of the two paths will be merged, and the process ends at the "end" node.
[0040] S102: using a preset target process scheduling engine, determining execution resources for the to-be-executed business according to the association relationship of at least one process node and the total number of nodes.
[0041] The total number of nodes can be understood as the number of process nodes of the business to be executed, for example, Figure 2 The number of process nodes in the business is 3. Figure 3 The number of process nodes in the business is 9. The execution resources include at least one server resource. The server resources correspond to the process nodes and are used to execute the tasks on the corresponding process nodes. The target process scheduling engine is a stateless process scheduling engine. The stateless process scheduling engine can isolate the tasks of each process node and execute them independently, so that they are no longer dependent on each other, improve the flexibility, maintainability, scalability and efficiency of business execution, and reduce business risks.
[0042] Combination Figure 2 , assuming that the allocation of server resources is one-to-one, then Figure 2 The server resources applied for by the business are server resource 1, server resource 2 and server resource 3, among which server resource 1 is used to execute node task 1, server resource 2 is used to execute node task 2, and server resource 3 is used to execute node task 3.
[0043] In one embodiment, S102 may specifically include: determining resource requirement information and parallel execution information of at least one process node based on the node information, association relationship and total number of nodes of at least one process node; determining at least one server resource based on the resource requirement information and parallel execution information of at least one process node.
[0044] The resource requirement information of a process node can be understood as the size, computing power, time and other information of the server resources required by the process node. The purpose of this setting is to apply for appropriate server resources for the process node, which can not only ensure the smooth execution of the tasks of the process node, but also reduce the waste of server resources. Parallel execution information can be understood as the explanatory description of the process nodes that can be executed in parallel, for example, Figure 3 The process nodes on the two paths can be executed in parallel, that is, the tasks corresponding to task node 1 and task node 3 can be started at the same time. The purpose of this setting is to improve the efficiency of business execution.
[0045] Specifically, server resources and process nodes can be one-to-one (server resources only execute the tasks of one process node and release the server resources after execution. The server resources applied for the second time are considered as a new server resource) or one-to-many (the same server resource can execute the tasks corresponding to two process nodes that do not conflict in time). Therefore, the number of server resources is less than or equal to the number of process nodes.
[0046] The present invention provides two server resource allocation methods, that is, provides a more comprehensive server resource application solution, and the user can determine the server resource application method in a targeted manner according to the business execution logic, thereby improving the user's usage experience.
[0047] On the one hand, taking the one-to-one server resources and process nodes as an example, based on the resource demand information and parallel execution information of at least one process node, at least one server resource is determined, including: using the target process scheduling engine to apply for a first server resource for at least one process node based on the resource demand information of at least one process node.
[0048] The first server resource includes at least one first sub-server resource, and the first sub-server resource corresponds to the process node one by one. Specifically, the present invention allocates server resources of different sizes to each process node according to the resource demand information of the process node.
[0049] Exemplarily, it is assumed that the process nodes of the business to be executed include node task 1, node task 2 and node task 3, the resource requirement information of node task 1 and node task 2 is requirement 1, the resource requirement information of node task 3 is requirement 2, the type of server resource corresponding to requirement 1 is type 1, and the type of server resource corresponding to requirement 2 is type 2. Different types of server resources have different information such as size and computing power. The present invention applies to obtain that the first server resource is the first sub-server resource 1, the first sub-server resource 2 and the first sub-server resource 3. The types of the first sub-server resource 1 and the first sub-server resource 2 are type 1, and the type of the first sub-server resource 3 is type 2. The first sub-server resource 1 corresponds to node task 1, the first sub-server resource 2 corresponds to node task 2, and the first sub-server resource 3 corresponds to node task 3.
[0050] On the other hand, taking the one-to-many server resources and process nodes as an example, based on the resource demand information and parallel execution information of at least one process node, at least one server resource is determined, including: based on the parallel execution information of at least one process node, the server resource reuse information of at least one process node is determined, and using the target process scheduling engine to apply for a second server resource for at least one process node according to the server resource reuse information and resource demand information of at least one process node.
[0051] The second server resource includes at least one second sub-server resource, and the number of the second sub-server resources is less than or equal to the number of process nodes.
[0052] Specifically, the server resource reuse information is used to indicate which process nodes can reuse the same server resources. The situations of reusing the same server resources include but are not limited to two or more process nodes whose processing times do not conflict, two or more process nodes whose processing times do not conflict and whose resource requirements are similar, and two or more process nodes that are consecutive and have a dependency relationship. Figure 2 If the three node tasks of the business can be executed in parallel, in order to improve the efficiency of business execution, a one-to-one allocation of server resources can be adopted. If the three node tasks cannot be executed in parallel and there is a sequence, the same server resources can be used to execute the node tasks in sequence, reducing the number of server resource scheduling and scheduling time, and improving business execution efficiency and stability.
[0053] S103: Based on the association relationship of at least one process node, control at least one server resource to execute at least one process node to complete the business to be executed.
[0054] Specifically, controlling at least one server resource to execute at least one process node based on the association relationship of at least one process node can be understood as controlling the server resources corresponding to each process node to execute each process node according to the execution order and dependency relationship of each process node, thereby maintaining the execution effect of each process node while ensuring the smooth execution of the business.
[0055] Exemplary, combined Figure 2 , assuming that server resource 1 corresponds to node task 1, server resource 2 corresponds to node task 2, and server resource 3 corresponds to node task 3, if each node task can be executed in parallel (that is, the dependencies of each process node are independent of each other), then control the three server resources to work simultaneously, server resource 1 executes the task corresponding to node task 1, server resource 2 executes the task corresponding to node task 2, and server resource 3 executes the task corresponding to node task 3. If each node task needs to be executed in sequence (that is, node task 2 depends on the execution result of node task 1, and node task 3 depends on the execution result of node task 2), then control server resource 1 to execute the task corresponding to node task 1, control server resource 2 to execute the task corresponding to node task 2 after node task 1 is executed, and control server resource 3 to execute the task corresponding to node task 3 after node task 2 is executed.
[0056] In one embodiment, S103 may specifically include: determining the execution order and dependency relationship of at least one process node based on the association relationship of at least one process node; and controlling the server resources corresponding to each process node to execute each process node based on the execution order and dependency relationship of at least one process node.
[0057] The execution order can be understood as the order of process nodes in the business process, for example, Figure 2 The ranking of node task 1 is 1, the ranking of node task 2 is 2, and the ranking of node task 3 is 3. In general, node tasks with dependencies need to wait for the dependent node tasks to be completed before they can be executed to ensure the execution effect of the node tasks. Node tasks without dependencies can be executed in parallel, for example, Figure 3 Task node 1 and task node 2 can be started at the same time to improve the execution efficiency of the business.
[0058] It is worth noting that the process scheduling engine of the present invention can automatically execute tasks (i.e., process nodes) according to the process definition. Each task is encapsulated into a stateless function and deployed on the serverless application platform. The serverless application platform will automatically expand and shrink the number of functions according to the load of the task to ensure that the task can be executed in time. At the same time, the platform will also monitor the execution status of the function. If a function fails to execute, the corresponding processing flow can be started, for example, automatically retrying and skipping the current task.
[0059] Furthermore, for any process node, when controlling the server resources to execute the process node, it also includes: determining whether the process node meets the abnormal execution condition; when the process node meets the abnormal execution condition, determining whether the process node is a necessary process node; if the process node is not a necessary process node, stopping the execution of the process node and starting the processing task of the next process node of the process node; if the process node is a necessary process node, using the target process scheduling engine to apply for backup server resources for the process node, and controlling the backup server resources to execute the process node.
[0060] Necessary process nodes can be understood as task nodes that must be executed in the business. The lack of execution results of necessary process nodes may lead to the failure of the entire business. Abnormal execution is adjusted to the execution result of the process node not being received within the preset time or the execution result of the process node being an execution failure. The advantage of this setting is that a fault-tolerant scheme is set for process nodes that have not responded for a long time and process nodes that have failed to execute, so as to avoid suspending the entire business process due to the failure or delay of one or more process nodes. It is worth noting that the present invention will initiate a secondary execution process for the necessary process nodes and reallocate resources for them. When the resources are allocated twice, the number of functions of the task can be appropriately increased to ensure that the necessary process nodes can be executed smoothly. For non-essential process nodes, the skip process will be started and the task of the next process node will continue to be executed. Of course, the execution of the non-essential process node can also be sent to the user for review. After the review, the user can trigger the secondary execution process or start the skip process. If the user confirms to start the skip process, it proves that the non-essential process node is negligible for the business and will no longer be executed. When the termination node is executed, the business execution is considered to be completed.
[0061] In the first aspect, the present invention can adopt a serverless application architecture to decompose the functions of the process scheduling engine into multiple stateless functions and deploy them on the serverless application platform of the cloud service provider. These functions can automatically expand and shrink according to business needs without pre-allocating fixed server resources. When there is a task request, the serverless application platform will automatically trigger the execution of the corresponding function to complete the scheduling and execution of the task. This architecture can greatly improve resource utilization efficiency and reduce costs. In the second aspect, the present invention can adopt a stateless design, that is, each function does not rely on any specific state information when executing a task. Such a design allows the function to execute tasks independently without being affected by other functions. Secondly, the stateless design can also improve the scalability and reliability of the system. When the processing capacity of the system needs to be increased, the number of functions can be simply increased without considering the synchronization and migration of the state. In the third aspect, the present invention provides an intuitive process definition language, which users can use to define various complex business processes to describe the logic and sequence of the business process. When the process is triggered, the process scheduling engine will automatically execute the task according to the process definition and monitor the execution status of the task. It is worth noting that the present invention will also monitor the execution of each process. If the task execution fails, the engine will automatically retry or take other fault-tolerant measures (adjust the task, execute the next task, etc.) to ensure the smooth execution of the business. Fourthly, the present invention can also provide a complete monitoring and management tool, allowing users to monitor the execution status of each process node in the business process in real time, resource usage and other information, and can also allow users to dynamically adjust and optimize node tasks and business processes through management tools, for example, modify the execution order of each process node, add process nodes, delete process nodes, modify the execution priority of the task when the task execution time is too long, or increase the number of tasks The function (aimed at improving execution efficiency), etc. The purpose of this setting is to meet the ever-changing business needs in real time.
[0062] The beneficial effects of the technical solution of the present invention are: 1) Improving resource utilization efficiency, that is, the present invention adopts a serverless application architecture and a stateless design, and the process scheduling engine can automatically expand and shrink according to business needs, without the need to pre-allocate fixed server resources, which greatly improves resource utilization efficiency. 2) Enhanced scalability, that is, the stateless design allows the system to easily increase the number of functions to meet growing business needs; secondly, the serverless application architecture provides powerful scalability and can quickly respond to business changes. 3) Reduce costs, that is, the present invention does not require the maintenance of server hardware and software, the operating cost of the process scheduling engine is low, and the serverless application architecture is pay-as-you-go, which can also reduce unnecessary paid items and further reduce corporate costs. 4) Improve reliability, that is, the fault-tolerant mechanism of the stateless design and serverless application architecture can ensure the high reliability of the system, and even if a function fails to execute, it will not affect the operation of the entire system.
[0063] The technical solution of the above embodiment will split the business according to the business logic of the business, and then apply for processor resources for each process node according to the task details of each process node in the business, and release the processor resources of the process node after the process node is executed, so that it can execute other tasks. The use of server resources is highly flexible, and the utilization rate of server resources is improved while ensuring the execution efficiency of the business, reducing resource waste. It solves the problem of pre-configuring server resources and process tasks that each server resource needs to process. The configured server resources can only execute the corresponding process tasks. The execution efficiency of the business and the utilization rate of resources are limited by the resource allocation strategy. If more server resources are allocated to the low-peak period business, it will lead to resource waste and even affect the execution of the peak period business.
[0064] Figure 4 is a flow chart of another service execution method provided by the present invention. This embodiment provides a preferred service execution method based on the above embodiment. Specifically, Figure 4 As shown, the method specifically includes:
[0065] S201. Analyze the business logic of the business to be executed, and obtain at least one process node, node identification information of at least one process node, node type, and node execution condition.
[0066] S202: Determine an association relationship of at least one process node based on node identification information, node type, and node execution condition of at least one process node.
[0067] Among them, the node types include a start node, a branch node, a task node, a merge node and a termination node, and the association relationship of at least one process node is used to indicate the business process of the business to be executed.
[0068] S203: Determine resource requirement information and parallel execution information of at least one process node based on the node information, association relationship and total number of nodes of at least one process node.
[0069] S204: Determine at least one server resource based on the resource requirement information and parallel execution information of at least one process node.
[0070] Among them, the number of server resources is less than or equal to the number of process nodes.
[0071] Specifically, when applying for server resources for at least one process node based on resource demand information of at least one process node using the target process scheduling engine, the server resources correspond to the process nodes one by one, that is, the number of server resources is equal to the number of process nodes. Based on the parallel execution information of at least one process node, the server resource reuse information of at least one process node is determined, and when applying for server resources for at least one process node based on the server resource reuse information and resource demand information of at least one process node using the target process scheduling engine, there may be reuse of server resources, and at this time, the number of server resources is less than or equal to the number of process nodes.
[0072] S205. Based on the association relationship of at least one process node, determine the execution order and dependency relationship of at least one process node.
[0073] S206. Based on the execution order and dependency relationship of at least one process node, control the server resources corresponding to each process node to execute each process node to complete the business to be executed.
[0074] It is worth noting that when executing each process node, the execution status of each process node will also be monitored. When a process node is abnormal, corresponding measures will be taken in a timely manner to avoid meaningless resource consumption and ensure the smooth execution of the pending business.
[0075] The technical solution of the above embodiment will split the business according to the business logic of the business, and then apply for processor resources for each process node according to the task details of each process node in the business, and release the processor resources of the process node after the process node is executed, so that it can execute other tasks. The use of server resources is highly flexible, and the utilization rate of server resources is improved while ensuring the execution efficiency of the business, reducing resource waste. It solves the problem of pre-configuring server resources and process tasks that each server resource needs to process. The configured server resources can only execute the corresponding process tasks. The execution efficiency of the business and the utilization rate of resources are limited by the resource allocation strategy. If more server resources are allocated to the trough period business, it will lead to resource waste and even affect the execution of the peak period business. Secondly, in the above embodiment, multiple process nodes with no dependency and no conflict in server resources can be executed in parallel to improve the efficiency of business execution; multiple process nodes with no conflict in processing time can also be processed by the same server resource to reduce the scheduling frequency of server resources and improve the stability of business processing.
[0076] Figure 5 Schematic diagram of the structure of a service execution device provided by the present invention. Figure 5 As shown, the device includes: an acquisition module 301, a determination module 302 and an execution module 303.
[0077] The acquisition module 301 is used to determine at least one process node of the business to be executed and an association relationship between at least one process node based on the business logic of the business to be executed.
[0078] Determination module 302 is used to use a pre-set target process scheduling engine to determine the execution resources of the business to be executed based on the association relationship of at least one process node and the total number of nodes; wherein the execution resources include at least one server resource, the server resource corresponds to the process node, and the target process scheduling engine is a stateless process scheduling engine.
[0079] The execution module 303 is used to control at least one server resource to execute at least one process node based on the association relationship of at least one process node to complete the business to be executed.
[0080] Optionally, the acquisition module 301 is specifically used to parse the business logic of the business to be executed, obtain at least one process node, node identification information of at least one process node, node type and node execution condition; based on the node identification information, node type and node execution condition of at least one process node, determine the association relationship of at least one process node, wherein the node type includes a start node, a branch node, a task node, a merge node and an end node, and the association relationship of at least one process node is used to indicate the business process of the business to be executed.
[0081] Optionally, the determination module 302 is specifically used to determine the resource requirement information and parallel execution information of at least one process node based on the node information, association relationship and total number of nodes of at least one process node; based on the resource requirement information and parallel execution information of at least one process node, determine at least one server resource, wherein the number of server resources is less than or equal to the number of process nodes.
[0082] Optionally, the determination module 302 is specifically configured to:
[0083] Using the target process scheduling engine, based on the resource demand information of the at least one process node, applying for a first server resource for the at least one process node, wherein the first server resource includes at least one first sub-server resource, and the first sub-server resource corresponds to the process node one by one;
[0084] Alternatively, based on the parallel execution information of at least one process node, the server resource reuse information of at least one process node is determined, and using the target process scheduling engine, according to the server resource reuse information and resource requirement information of at least one process node, a second server resource is applied for at least one process node, wherein the second server resource includes at least one second sub-server resource, and the number of the second sub-server resources is less than or equal to the number of process nodes.
[0085] Optionally, the execution module 303 determines the execution order and dependency of at least one process node based on the association relationship of at least one process node; based on the execution order and dependency of at least one process node, controls the server resources corresponding to each process node to execute each process node.
[0086] Optionally, for any process node, the execution module 303 is specifically used to determine whether the process node meets the abnormal execution condition; wherein the abnormal execution is adjusted to the failure to receive the execution result of the process node within a preset time period or the execution result of the process node is an execution failure; when the process node meets the abnormal execution condition, determine whether the process node is a necessary process node; if the process node is not a necessary process node, stop executing the process node, and start the processing task of the next process node of the process node; if the process node is a necessary process node, use the target process scheduling engine to apply for backup server resources for the process node, and control the backup server resources to execute the process node.
[0087] The service execution device provided in the above embodiments can execute the service execution method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0088] Figure 6: is a schematic diagram of the structure of an electronic device provided by the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0089] like Figure 6 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (also called random access memory, RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, ROM 12 and RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0090] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0091] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a business execution method.
[0092] In some embodiments, the service execution method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the service execution method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the service execution method in any other appropriate manner (e.g., by means of firmware).
[0093] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0094] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0095] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device, or equipment. A computer-readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0096] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0097] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server) or a computing system that includes middleware components (e.g., an application server) or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein) or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0098] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0099] In one embodiment, the present invention further includes a computer program product, the computer program product includes a computer program, and when the computer program is executed by a processor, the service execution method of any embodiment of the present invention is implemented.
[0100] The computer program product may be implemented in a computer program code for performing the operation of the present invention written in one or more programming languages or a combination thereof, including object-oriented programming languages and conventional procedural programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0101] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0102] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A service execution method, characterized in that: include: Determine, based on the business logic of the business to be executed, at least one process node of the business to be executed and an association relationship between the at least one process node; Using a preset target process scheduling engine, according to the association relationship of the at least one process node and the total number of nodes, determining the execution resources of the to-be-executed business; wherein the execution resources include at least one server resource, the server resource corresponds to the process node, and the target process scheduling engine is a stateless process scheduling engine; Based on the association relationship of the at least one process node, the at least one server resource is controlled to execute the at least one process node to complete the business to be executed.
2. The method according to claim 1, characterized in that The determining, based on the business logic of the business to be executed, at least one process node of the business to be executed and the association relationship between the at least one process node includes: Parsing the business logic of the to-be-executed business to obtain the at least one process node, node identification information of the at least one process node, node type, and node execution condition; Based on the node identification information, node type and node execution condition of the at least one process node, the association relationship of the at least one process node is determined, wherein the node type includes a start node, a branch node, a task node, a merge node and an end node, and the association relationship of the at least one process node is used to indicate the business process of the business to be executed.
3. The method according to claim 1, characterized in that The determining, according to the association relationship of the at least one process node and the total number of nodes, the execution resource of the to-be-executed business includes: Determine resource requirement information and parallel execution information of the at least one process node based on the node information, association relationship and total number of nodes of the at least one process node; Based on the resource requirement information and the parallel execution information of the at least one process node, the at least one server resource is determined, wherein the number of the server resources is less than or equal to the number of the process nodes.
4. The method according to claim 3, characterized in that The determining the at least one server resource based on the resource requirement information and the parallel execution information of the at least one process node includes: Using the target process scheduling engine, based on the resource requirement information of the at least one process node, applying for a first server resource for the at least one process node, wherein the first server resource includes at least one first sub-server resource, and the first sub-server resource corresponds to the process node one by one; or, Based on the parallel execution information of the at least one process node, the server resource reuse information of the at least one process node is determined, and using the target process scheduling engine, according to the server resource reuse information and resource requirement information of the at least one process node, a second server resource is applied for the at least one process node, wherein the second server resource includes at least one second sub-server resource, and the number of the second sub-server resources is less than or equal to the number of the process nodes.
5. The method according to claim 1, characterized in that: The controlling the at least one server resource to execute the at least one process node based on the association relationship of the at least one process node includes: Determining the execution order and dependency relationship of the at least one process node based on the association relationship of the at least one process node; Based on the execution order and dependency relationship of the at least one process node, the server resources corresponding to each process node are controlled to execute each process node.
6. The method according to claim 1, characterized in that For any process node, when controlling the server resources to execute the process node, it also includes: Determine whether the process node meets an abnormal execution condition; wherein the abnormal execution condition is that the execution result of the process node is not received within a preset time period or the execution result of the process node is an execution failure; When the process node satisfies the abnormal execution condition, determining whether the process node is a necessary process node; If the process node is not the necessary process node, then the execution of the process node is stopped, and a processing task of a next process node of the process node is started; If the process node is the necessary process node, the target process scheduling engine is used to apply for backup server resources for the process node, and the backup server resources are controlled to execute the process node.
7. A service execution device, characterized in that: Used to implement the service execution method described in any one of claims 1 to 6, the service execution device includes: An acquisition module, used to determine at least one process node of the to-be-executed business and an association relationship between the at least one process node based on the business logic of the to-be-executed business; A determination module, used to determine the execution resources of the to-be-executed business according to the association relationship of the at least one process node and the total number of nodes by using a preset target process scheduling engine; wherein the execution resources include at least one server resource, the server resource corresponds to the process node, and the target process scheduling engine is a stateless process scheduling engine; An execution module is used to control the at least one server resource to execute the at least one process node based on the association relationship of the at least one process node to complete the to-be-executed business.
8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively coupled to the at least one processor; The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the service execution method described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the service execution method described in any one of claims 1 to 6 when executed.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the computer program implements the service execution method according to any one of claims 1 to 6.