Business execution method, device, equipment and medium
By abstracting logical units and process control statements into XML nodes and generating target XML description files for deployment, the problems of low writing efficiency and high cost during business execution are solved, and efficient business execution and development efficiency are improved.
Patent Information
- Application Number
- CN202411908120.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2044-12-24
AI Technical Summary
During the business execution process, the existing technology has problems such as low program writing efficiency and high development costs, resulting in low business execution efficiency.
By obtaining multiple logical units configured, and abstracting each logical unit into a task node based on XML language, obtaining process control statements, process trigger methods, process return statements, etc., and abstracting them into corresponding nodes. Call and assemble from these nodes based on the target business demand data, generate the target XML description file, and deploy it as the target service.
It realizes code-free development, improves the efficiency and flexibility of business execution, and reduces development costs and time.
Smart Images

Figure CN119356662B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a service execution method, device, equipment and medium. Background Art
[0002] With the continuous development and accumulation of the software development industry, how to develop software efficiently and concisely to execute corresponding business has become an urgent problem that needs to be solved.
[0003] However, the existing technology still has the following problems when executing business:
[0004] 1. When developing data integration or data middle platform, developers often need to call interfaces or services in various business fields to organize and integrate data, and usually need to use programming languages to write code by hand. This not only has low development efficiency and slow demand response, but also makes it impossible to intuitively examine its logical structure;
[0005] 2. In recent years, visual low-code development has developed rapidly, but it is still impossible to cover 100% of various tricky business scenarios. For some customized and complex business logic, a small amount of code still needs to be written to solve it. Summary of the invention
[0006] In view of the above, it is necessary to provide a business execution method, device, equipment and medium, aiming to solve the problem of low program writing efficiency and high development cost during business execution, which leads to low business execution efficiency.
[0007] A service execution method, the service execution method comprising:
[0008] Obtain multiple configured logical units, and abstract each logical unit into each task node based on XML language;
[0009] Acquire multiple configured process control statements, and abstract each process control statement into each process control node based on the XML language;
[0010] Acquire multiple configured process trigger methods, and abstract each process trigger method into each process trigger node based on the XML language;
[0011] Obtaining the configured process return statement and process end statement, and abstracting each process return statement and each process end statement into each process return node based on the XML language;
[0012] In response to an execution instruction for a target business, parsing the execution instruction to obtain target business demand data;
[0013] According to the target business demand data, corresponding nodes are called from each task node, each process control node, each process trigger node and each process return node for assembly to obtain a target XML description file corresponding to the target business;
[0014] Sending the target XML description file to a backend to deploy the target XML description file as a target service;
[0015] When it is detected that the call to the target service is completed, the execution result of the target service is obtained as the execution result of the target business.
[0016] According to a preferred embodiment of the present invention, the abstraction of each logical unit into each task node based on XML language includes:
[0017] Get the functionality of each logical unit;
[0018] According to the function of each logic unit, node input, node output and node configuration data are set for each logic unit to obtain each task node.
[0019] According to a preferred embodiment of the present invention, the target XML description file corresponding to the target business is obtained by calling corresponding nodes from each task node, each process control node, each process trigger node and each process return node for assembly according to the target business demand data, and includes:
[0020] Determining the logic units associated with the target business and the execution order of each logic unit according to the business demand data;
[0021] Selecting at least one target service node from each task node according to the logic unit associated with the target service;
[0022] According to the execution order, nodes are selected from each process control node, each process trigger node and each process return node to sort and connect the at least one target business node to obtain the target XML description file.
[0023] According to a preferred embodiment of the present invention, the target XML description file corresponding to the target business is obtained by calling corresponding nodes from each task node, each process control node, each process trigger node and each process return node for assembly according to the target business demand data, and further comprising:
[0024] During the assembly process, the node type, node action name, node identifier, node name, node input, and node output of each node called are obtained;
[0025] Configure the XML tag name according to the node type, configure the XML type attribute according to the node action name, configure the XML attribute id according to the node identifier, configure the XML attribute name according to the node name, configure the XML sub-tag config according to the node input, and configure the XML sub-tag outputSchema according to the node output, to obtain the target XML description file;
[0026] The node identifier is also used to reference the running instance of the corresponding node when executing the target business, and to obtain the input parameters and output parameters of the corresponding node by executing the corresponding running instance.
[0027] According to a preferred embodiment of the present invention, sending the target XML description file to a backend to deploy the target XML description file as a target service includes:
[0028] Sending the target XML description file to the backend for persistent storage, so that the backend can deploy the target service according to the saved target XML description file;
[0029] Wherein, in the process of deploying the target service, the backend parses the saved target XML description file to obtain XML description information, generates a backend execution statement according to the XML description information, and deploys the backend execution statement as the target service;
[0030] Among them, when the backend execution statement is generated according to the XML description information, the corresponding processing class and method are determined according to the XML tag name and the type attribute, and the corresponding input parameter acquisition method is determined according to the sub-tag config to construct the business execution code; the return result of the business execution code is assembled into a format that conforms to the sub-tag outputSchema.
[0031] According to a preferred embodiment of the present invention, the method further comprises:
[0032] When the target service is a reusable service, the target XML description file is encapsulated as a service node with input and output for invocation by other services.
[0033] According to the preferred embodiment of the present invention:
[0034] The process control node includes a conditional branch node, a parallel execution node and a loop execution node; wherein the conditional branch node is used to execute a corresponding task node when a configuration condition is met, the parallel execution node is used to execute multiple task nodes in parallel, and the loop execution node is used to execute multiple task nodes in a loop according to a configuration rule;
[0035] The process trigger node includes a Webhook trigger, a scheduled task trigger, and a database trigger; wherein the Webhook trigger is used to trigger the execution of the corresponding task node by configuring and sending an http request, the scheduled task trigger is used to trigger the execution of the corresponding task node through a configured scheduled task, and the database trigger is used to trigger the execution of the corresponding task node by monitoring changes in data in the database.
[0036] A service execution device, the service execution device comprising:
[0037] Abstract unit, used to obtain multiple configured logical units and abstract each logical unit into each task node based on XML language;
[0038] The abstraction unit is further used to obtain multiple configured process control statements, and abstract each process control statement into each process control node based on the XML language;
[0039] The abstraction unit is further used to obtain multiple configured process triggering methods, and abstract each process triggering method into each process trigger node based on the XML language;
[0040] The abstraction unit is further used to obtain the configured process return statement and process end statement, and abstract each process return statement and each process end statement into each process return node based on the XML language;
[0041] A parsing unit, configured to respond to an execution instruction for a target service and parse the execution instruction to obtain target service demand data;
[0042] An assembling unit, used to call corresponding nodes from each task node, each process control node, each process trigger node and each process return node for assembly according to the target business demand data, so as to obtain a target XML description file corresponding to the target business;
[0043] A deployment unit, configured to send the target XML description file to a backend to deploy the target XML description file as a target service;
[0044] The acquiring unit is configured to acquire the execution result of the target service as the execution result of the target business when it is detected that the call to the target service is completed.
[0045] A computer device, comprising:
[0046] a memory storing at least one instruction; and
[0047] A processor executes the instructions stored in the memory to implement the service execution method.
[0048] A computer-readable storage medium stores at least one instruction, and the at least one instruction is executed by a processor in a computer device to implement the service execution method.
[0049] It can be seen from the above technical scheme that the present invention can abstract each logical unit into each task node based on the XML language, abstract each process control statement into each process control node, abstract each process trigger method into each process trigger node, and abstract each process return statement and each process end statement into each process return node. Since the abstraction obtains a multi-dimensional minimum execution unit, it can cope with various different business processes; according to the target business demand data, the corresponding nodes are called from each task node, each process control node, each process trigger node and each process return node for assembly, and the target XML description file corresponding to the target business is obtained, and the target XML description file is deployed as a target service, thereby realizing codeless development through XML and being able to execute the business more efficiently. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 It is a flow chart of a preferred embodiment of the service execution method of the present invention;
[0051] Figure 2 It is a functional module diagram of a preferred embodiment of the service execution device of the present invention;
[0052] Figure 3 It is a structural diagram of a computer device of a preferred embodiment of the service execution method of the present invention. DETAILED DESCRIPTION
[0053] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention is described in detail below with reference to the accompanying drawings and specific embodiments.
[0054] like Figure 1 FIG. 1 is a flow chart of a preferred embodiment of the service execution method of the present invention. According to different requirements, the order of the steps in the flow chart can be changed, and some steps can be omitted.
[0055] The business execution method is applied to one or more computer devices, which are devices that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and their hardware includes but is not limited to microprocessors, application specific integrated circuits (ASICs), programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.
[0056] The computer device may be any electronic product that can perform human-computer interaction with a user, such as a personal computer, a tablet computer, a smart phone, a personal digital assistant (PDA), a game console, an interactive network television (IPTV), a smart wearable device, etc.
[0057] The computer device may also include a network device and / or a user device, wherein the network device includes, but is not limited to, a single network server, a server group consisting of multiple network servers, or a cloud consisting of a large number of hosts or network servers based on cloud computing.
[0058] The server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), as well as big data and artificial intelligence platforms.
[0059] Among them, Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0060] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0061] The network where the computer device is located includes but is not limited to the Internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (VPN), etc.
[0062] S10, obtaining multiple configured logic units, and abstracting each logic unit into each task node based on XML (Extensible Markup Language).
[0063] In this embodiment, the logic unit may include various services, functional modules, API (Application Programming Interface) and the like.
[0064] In this embodiment, the abstraction of each logical unit into each task node based on XML language includes:
[0065] Get the functionality of each logical unit;
[0066] According to the function of each logic unit, node input, node output and node configuration data are set for each logic unit to obtain each task node.
[0067] For example, the task nodes may include Redis operations, sending emails, querying databases, sending HTTP (Hypertext Transfer Protocol) requests, etc.
[0068] The task nodes are various nodes that expose input and output to the outside, which are concise and intuitive and support visual arrangement.
[0069] S11, obtaining multiple configured process control statements, and abstracting each process control statement into each process control node based on the XML language.
[0070] In this embodiment, the process control nodes include conditional branch nodes, parallel execution nodes and loop execution nodes.
[0071] The conditional branch node is used to execute the corresponding task node when the configuration condition is met, the parallel execution node is used to execute multiple task nodes in parallel, and the loop execution node is used to loop execute multiple task nodes according to the configuration rule.
[0072] S12, obtaining multiple configured process triggering methods, and abstracting each process triggering method into each process trigger node based on the XML language.
[0073] In this embodiment, the process trigger node includes a Webhook trigger, a scheduled task trigger, and a database trigger.
[0074] Among them, the Webhook trigger is used to trigger the execution of the corresponding task node by configuring and sending an http request, the scheduled task trigger is used to trigger the execution of the corresponding task node through the configured scheduled task, and the database trigger is used to trigger the execution of the corresponding task node by monitoring the changes in data in the database.
[0075] S13, obtaining the configured process return statement and process end statement, and abstracting each process return statement and each process end statement into each process return node based on the XML language.
[0076] Since the process can have different returns under different conditions, there can be multiple process return nodes in a business execution process.
[0077] Furthermore, in a complete sub-process, the node after the process return node will be regarded as an invalid node.
[0078] S14, in response to an execution instruction for the target business, parsing the execution instruction to obtain target business demand data.
[0079] In this embodiment, the execution instruction may be triggered by relevant business personnel, developers or testers, and may be executed according to different business scenarios.
[0080] In this embodiment, the target service demand data may include data related to service execution, such as a specific execution process of the service.
[0081] S15, according to the target business demand data, call the corresponding nodes from each task node, each process control node, each process trigger node and each process return node for assembly to obtain a target XML description file corresponding to the target business.
[0082] In this embodiment, the target XML description file corresponding to the target business is obtained by calling corresponding nodes from each task node, each process control node, each process trigger node and each process return node for assembly according to the target business demand data, and includes:
[0083] Determining the logic units associated with the target business and the execution order of each logic unit according to the business demand data;
[0084] Selecting at least one target service node from each task node according to the logic unit associated with the target service;
[0085] According to the execution order, nodes are selected from each process control node, each process trigger node and each process return node to sort and connect the at least one target business node to obtain the target XML description file.
[0086] In this embodiment, the target XML description file corresponding to the target business is obtained by calling corresponding nodes from each task node, each process control node, each process trigger node and each process return node for assembly according to the target business demand data, and further includes:
[0087] During the assembly process, the node type, node action name, node identifier, node name, node input, and node output of each node called are obtained;
[0088] Configure the XML tag name according to the node type, configure the XML type attribute according to the node action name, configure the XML attribute id according to the node identifier, configure the XML attribute name according to the node name, configure the XML sub-tag config according to the node input, and configure the XML sub-tag outputSchema according to the node output, to obtain the target XML description file;
[0089] The node identifier is also used to reference the running instance of the corresponding node when executing the target business, and to obtain the input parameters and output parameters of the corresponding node by executing the corresponding running instance.
[0090] Through the above embodiments, code-free development can be achieved, thereby assisting in the rapid execution of business.
[0091] S16, sending the target XML description file to a backend to deploy the target XML description file as a target service.
[0092] In this embodiment, sending the target XML description file to the backend to deploy the target XML description file as a target service includes:
[0093] Sending the target XML description file to the backend for persistent storage, so that the backend can deploy the target service according to the saved target XML description file;
[0094] Wherein, in the process of deploying the target service, the backend parses the saved target XML description file to obtain XML description information, generates a backend execution statement according to the XML description information, and deploys the backend execution statement as the target service;
[0095] Among them, when the backend execution statement is generated according to the XML description information, the corresponding processing class and method are determined according to the XML tag name and the type attribute, and the corresponding input parameter acquisition method is determined according to the sub-tag config to construct the business execution code; the return result of the business execution code is assembled into a format that conforms to the sub-tag outputSchema.
[0096] Furthermore, after being deployed as the target service, it can wait for the front-end call.
[0097] S17, when it is detected that the call to the target service is completed, obtaining the execution result of the target service as the execution result of the target business.
[0098] Through the above embodiments, services can be quickly deployed based on a codeless development model, and corresponding businesses can be executed. While reducing development costs, efficient execution of businesses is also achieved.
[0099] In this embodiment, the method further includes:
[0100] When the target service is a reusable service, the target XML description file is encapsulated as a service node with input and output for invocation by other services.
[0101] Through the above embodiments, the existing business process can be further reused, thereby further reducing development costs and improving development efficiency. In addition, since the development time is reduced, the overall efficiency of business execution is also improved, and the reuse of existing business processes can also reduce development errors.
[0102] In this embodiment, the XML description file may also be rendered into a visual UI (User Interface) interface, so that the user may directly maintain and update the corresponding XML description file through interactive operations such as dragging and dropping.
[0103] It can be seen from the above technical scheme that the present invention can abstract each logical unit into each task node based on the XML language, abstract each process control statement into each process control node, abstract each process trigger method into each process trigger node, and abstract each process return statement and each process end statement into each process return node. Since the abstraction obtains a multi-dimensional minimum execution unit, it can cope with various different business processes; according to the target business demand data, the corresponding nodes are called from each task node, each process control node, each process trigger node and each process return node for assembly, and the target XML description file corresponding to the target business is obtained, and the target XML description file is deployed as a target service, thereby realizing codeless development through XML and being able to execute the business more efficiently.
[0104] like Figure 2 As shown, it is a functional module diagram of a preferred embodiment of the business execution device of the present invention. The business execution device 11 includes an abstraction unit 110, a parsing unit 111, an assembly unit 112, a deployment unit 113, and an acquisition unit 114. The module / unit referred to in the present invention refers to a series of computer program segments that can be executed by a processor and can complete fixed functions, which are stored in a memory. In this embodiment, the functions of each module / unit will be described in detail in subsequent embodiments.
[0105] The abstraction unit 110 is used to obtain multiple configured logic units and abstract each logic unit into each task node based on XML language;
[0106] The abstraction unit 110 is further used to obtain multiple configured process control statements, and abstract each process control statement into each process control node based on the XML language;
[0107] The abstraction unit 110 is further used to obtain multiple configured process triggering methods, and abstract each process triggering method into each process trigger node based on the XML language;
[0108] The abstraction unit 110 is further used to obtain the configured process return statement and process end statement, and abstract each process return statement and each process end statement into each process return node based on the XML language;
[0109] The parsing unit 111 is used for parsing the execution instruction to obtain the target business demand data in response to the execution instruction of the target business;
[0110] The assembling unit 112 is used to call corresponding nodes from each task node, each process control node, each process trigger node and each process return node for assembly according to the target business demand data to obtain a target XML description file corresponding to the target business;
[0111] The deployment unit 113 is used to send the target XML description file to the backend to deploy the target XML description file as a target service;
[0112] The acquisition unit 114 is configured to acquire the execution result of the target service as the execution result of the target business when it is detected that the call to the target service is completed.
[0113] It can be seen from the above technical scheme that the present invention can abstract each logical unit into each task node based on the XML language, abstract each process control statement into each process control node, abstract each process trigger method into each process trigger node, and abstract each process return statement and each process end statement into each process return node. Since the abstraction obtains a multi-dimensional minimum execution unit, it can cope with various different business processes; according to the target business demand data, the corresponding nodes are called from each task node, each process control node, each process trigger node and each process return node for assembly, and the target XML description file corresponding to the target business is obtained, and the target XML description file is deployed as a target service, thereby realizing codeless development through XML and being able to execute the business more efficiently.
[0114] like Figure 3 FIG. 1 is a schematic diagram of the structure of a computer device of a preferred embodiment of the service execution method of the present invention.
[0115] The computer device 1 may include a memory 12 , a processor 13 , and a bus, and may also include a computer program stored in the memory 12 and executable on the processor 13 , such as a service execution program.
[0116] Those skilled in the art will appreciate that the schematic diagram is merely an example of the computer device 1 and does not constitute a limitation on the computer device 1. The computer device 1 may be a bus-type structure or a star-type structure. The computer device 1 may also include more or less other hardware or software than shown in the diagram, or a different arrangement of components. For example, the computer device 1 may also include input and output devices, network access devices, etc.
[0117] It should be noted that the computer device 1 is only an example, and other existing or future electronic products that are suitable for the present invention should also be included in the protection scope of the present invention and included here by reference.
[0118] The memory 12 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a mobile hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a magnetic memory, a disk, an optical disk, etc. In some embodiments, the memory 12 may be an internal storage unit of the computer device 1, such as a mobile hard disk of the computer device 1. In other embodiments, the memory 12 may also be an external storage device of the computer device 1, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the computer device 1. Further, the memory 12 may also include both an internal storage unit of the computer device 1 and an external storage device. The memory 12 may not only be used to store application software and various types of data installed in the computer device 1, such as the code of the business execution program, etc., but also be used to temporarily store data that has been output or is to be output.
[0119] In some embodiments, the processor 13 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and a combination of various control chips. The processor 13 is the control core (Control Unit) of the computer device 1, and uses various interfaces and lines to connect various components of the entire computer device 1, and executes various functions and processes data of the computer device 1 by running or executing programs or modules (such as executing business execution programs, etc.) stored in the memory 12, and calling data stored in the memory 12.
[0120] The processor 13 executes the operating system of the computer device 1 and various installed applications. The processor 13 executes the applications to implement the steps in the above-mentioned various service execution method embodiments, for example Figure 1 Steps shown.
[0121] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory 12 and executed by the processor 13 to implement the present invention. The one or more modules / units may be a series of computer-readable instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer program in the computer device 1. For example, the computer program may be divided into an abstraction unit 110, a parsing unit 111, an assembly unit 112, a deployment unit 113, and an acquisition unit 114.
[0122] The above-mentioned integrated unit implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, and includes a number of instructions for enabling a computer device (which can be a personal computer, a computer device, or a network device, etc.) or a processor to execute a part of the service execution method described in each embodiment of the present invention.
[0123] If the module / unit integrated in the computer device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware devices through a computer program. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of each of the above-mentioned method embodiments can be implemented.
[0124] The computer program includes computer program code, which may be in source code form, object code form, executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory, etc.
[0125] Furthermore, the computer-readable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the blockchain node, etc.
[0126] The blockchain referred to in this invention is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the blockchain underlying platform, platform product service layer, and application service layer.
[0127] The bus can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 The bus is represented by only one straight line, but it does not mean that there is only one bus or one type of bus. The bus is configured to realize the connection and communication between the memory 12 and at least one processor 13, etc.
[0128] Although not shown, the computer device 1 may also include a power source (such as a battery) for supplying power to various components. Preferably, the power source may be logically connected to the at least one processor 13 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include any components such as one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, and power status indicators. The computer device 1 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
[0129] Furthermore, the computer device 1 may also include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is usually used to establish a communication connection between the computer device 1 and other computer devices.
[0130] Optionally, the computer device 1 may further include a user interface, which may be a display, an input unit (such as a keyboard), or a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the computer device 1 and to display a visual user interface.
[0131] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.
[0132] It can be understood by those skilled in the art that Figure 3The structure shown does not constitute a limitation on the computer device 1, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.
[0133] Combination Figure 1 , the memory 12 in the computer device 1 stores a plurality of instructions to implement a service execution method, and the processor 13 can execute the plurality of instructions to implement:
[0134] Obtain multiple configured logical units, and abstract each logical unit into each task node based on XML language;
[0135] Acquire multiple configured process control statements, and abstract each process control statement into each process control node based on the XML language;
[0136] Acquire multiple configured process trigger methods, and abstract each process trigger method into each process trigger node based on the XML language;
[0137] Obtaining the configured process return statement and process end statement, and abstracting each process return statement and each process end statement into each process return node based on the XML language;
[0138] In response to an execution instruction for a target business, parsing the execution instruction to obtain target business demand data;
[0139] According to the target business demand data, corresponding nodes are called from each task node, each process control node, each process trigger node and each process return node for assembly to obtain a target XML description file corresponding to the target business;
[0140] Sending the target XML description file to a backend to deploy the target XML description file as a target service;
[0141] When it is detected that the call to the target service is completed, the execution result of the target service is obtained as the execution result of the target business.
[0142] Specifically, the specific implementation method of the processor 13 for the above instructions can refer to Figure 1 The description of the relevant steps in the corresponding embodiments will not be repeated here.
[0143] It should be noted that the data involved in this case were all obtained legally.
[0144] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.
[0145] The present invention can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present invention can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present invention can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0146] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0147] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0148] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0149] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the appended claims rather than the above description, so it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any attached figure mark in the claims should not be regarded as limiting the claims involved.
[0150] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the present invention can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.
[0151] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.
Claims
1. A service execution method, characterized in that: The service execution method comprises: Obtain multiple configured logical units, and abstract each logical unit into each task node based on XML language; Acquire multiple configured process control statements, and abstract each process control statement into each process control node based on the XML language; Acquire multiple configured process trigger methods, and abstract each process trigger method into each process trigger node based on the XML language; Obtaining the configured process return statement and process end statement, and abstracting each process return statement and each process end statement into each process return node based on the XML language; In response to an execution instruction for a target business, parsing the execution instruction to obtain target business demand data; According to the target business demand data, corresponding nodes are called from each task node, each process control node, each process trigger node and each process return node for assembly to obtain a target XML description file corresponding to the target business; Sending the target XML description file to a backend to deploy the target XML description file as a target service; When it is detected that the call to the target service is completed, the execution result of the target service is obtained as the execution result of the target business.
2. The service execution method according to claim 1, characterized in that: The XML-based abstraction of each logical unit into each task node includes: Get the functionality of each logical unit; According to the function of each logic unit, node input, node output and node configuration data are set for each logic unit to obtain each task node.
3. The service execution method according to claim 1, characterized in that: The target XML description file corresponding to the target business is obtained by calling corresponding nodes from each task node, each process control node, each process trigger node and each process return node for assembly according to the target business demand data, and comprising: Determining the logic units associated with the target business and the execution order of each logic unit according to the business demand data; Selecting at least one target service node from each task node according to the logic unit associated with the target service; According to the execution order, nodes are selected from each process control node, each process trigger node and each process return node to sort and connect the at least one target business node to obtain the target XML description file.
4. The service execution method according to claim 1, characterized in that: The step of calling corresponding nodes from each task node, each process control node, each process trigger node and each process return node for assembly according to the target business demand data to obtain a target XML description file corresponding to the target business also includes: During the assembly process, the node type, node action name, node identifier, node name, node input, and node output of each node called are obtained; Configure the XML tag name according to the node type, configure the XML type attribute according to the node action name, configure the XML attribute id according to the node identifier, configure the XML attribute name according to the node name, configure the XML sub-tag config according to the node input, and configure the XML sub-tag outputSchema according to the node output, to obtain the target XML description file; The node identifier is also used to reference the running instance of the corresponding node when executing the target business, and to obtain the input parameters and output parameters of the corresponding node by executing the corresponding running instance.
5. The service execution method according to claim 4, characterized in that: The sending the target XML description file to the backend to deploy the target XML description file as a target service includes: Sending the target XML description file to the backend for persistent storage, so that the backend can deploy the target service according to the saved target XML description file; Wherein, in the process of deploying the target service, the backend parses the saved target XML description file to obtain XML description information, generates a backend execution statement according to the XML description information, and deploys the backend execution statement as the target service; Among them, when the backend execution statement is generated according to the XML description information, the corresponding processing class and method are determined according to the XML tag name and the type attribute, and the corresponding input parameter acquisition method is determined according to the sub-tag config to construct the business execution code; the return result of the business execution code is assembled into a format that conforms to the sub-tag outputSchema.
6. The service execution method according to claim 1, characterized in that: The method further comprises: When the target service is a reusable service, the target XML description file is encapsulated as a service node with input and output for invocation by other services.
7. The service execution method according to claim 1, characterized in that: The process control node includes a conditional branch node, a parallel execution node and a loop execution node; wherein the conditional branch node is used to execute a corresponding task node when a configuration condition is met, the parallel execution node is used to execute multiple task nodes in parallel, and the loop execution node is used to execute multiple task nodes in a loop according to a configuration rule; The process trigger node includes a Webhook trigger, a scheduled task trigger, and a database trigger; wherein the Webhook trigger is used to trigger the execution of the corresponding task node by configuring and sending an http request, the scheduled task trigger is used to trigger the execution of the corresponding task node through a configured scheduled task, and the database trigger is used to trigger the execution of the corresponding task node by monitoring changes in data in the database.
8. A service execution device, characterized in that: The service execution device comprises: Abstract unit, used to obtain multiple configured logical units and abstract each logical unit into each task node based on XML language; The abstraction unit is further used to obtain multiple configured process control statements, and abstract each process control statement into each process control node based on the XML language; The abstraction unit is further used to obtain multiple configured process triggering methods, and abstract each process triggering method into each process trigger node based on the XML language; The abstraction unit is further used to obtain the configured process return statement and process end statement, and abstract each process return statement and each process end statement into each process return node based on the XML language; A parsing unit, configured to respond to an execution instruction for a target service and parse the execution instruction to obtain target service demand data; An assembling unit, used to call corresponding nodes from each task node, each process control node, each process trigger node and each process return node for assembly according to the target business demand data, so as to obtain a target XML description file corresponding to the target business; A deployment unit, configured to send the target XML description file to a backend to deploy the target XML description file as a target service; The acquiring unit is configured to acquire the execution result of the target service as the execution result of the target business when it is detected that the call to the target service is completed.
9. A computer device, characterized in that: The computer device comprises: a memory storing at least one instruction; and A processor executes instructions stored in the memory to implement the service execution method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one instruction, and the at least one instruction is executed by a processor in a computer device to implement the service execution method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Control layer coding method for service combination
CN108647019A
Script processing method and device for service assembly
CN109976713A