Process execution control system, method and device, computer equipment and medium
By separating the main process from external systems through a client-service module separation strategy, the problem of high system coupling in existing technologies is solved, enabling flexible expansion and efficient data flow, reducing expansion costs, and improving the system's configurability and operational consistency.
Patent Information
- Application Number
- CN202511078748.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-01
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2045-08-01
AI Technical Summary
In existing technologies, the integration of policy process execution with external systems suffers from high system coupling, rigid architecture, difficulty in flexible expansion, and the need to modify policy execution logic when data sources or external services change.
The main process and external systems are executed by separating the client and service modules. The main process module generates data operation requests, the client forwards the requests according to the configuration information, and the service module calls the external system to perform operations. Distributed locks are used to resolve multi-node concurrency conflicts, and a two-level caching mechanism is used to improve the efficiency of configuration retrieval.
It decouples the main strategy execution process from external systems, simplifies the integration process, reduces expansion costs, improves configurability, ensures operational consistency and data flow closure, and optimizes system resource utilization.
Smart Images

Figure CN121008940A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of policy process execution, in particular to a process execution control system, method, device, computer equipment and medium. BACKGROUND
[0002] With the continuous development of the field of policy process execution, technologies for realizing the interaction of policy execution main processes with various data sources and external systems (such as user login services, advertising platforms, Python model services, etc.) have appeared. The core of this technology is to connect policy execution main processes and external data and services through technical means to support the smooth running of policies.
[0003] Currently, the method used in this field is to realize the above interaction by relying on customized integration code, which specifically involves writing connection and query logic for different data sources, writing calling code for external services, and writing data format conversion code, etc.
[0004] However, this mode has the problems of high system coupling, rigid architecture, difficulty in flexible expansion, and the need to modify policy execution logic when data sources or external services change. SUMMARY
[0005] Therefore, it is necessary to provide a process execution control system, method, device, computer equipment and medium capable of decoupling process execution and external systems.
[0006] In a first aspect, the present application provides a process execution control system, which includes a main process module including at least one node, and a client and a service module pre-configured for the node, wherein,
[0007] The main process module is configured to generate a data operation request according to the configuration information of the client and send the data operation request to the client;
[0008] The client is configured to forward the data operation request to the service module according to the configuration information;
[0009] The service module is configured to call a pre-configured external system to perform corresponding operations according to the data operation request through the external system.
[0010] In one embodiment, the configuration information of the client includes address information of the service module and request parameters, and the main process module is configured to obtain corresponding parameters from a pre-set context according to the request parameters and generate a data operation request according to the obtained parameters;
[0011] The client is configured to send the data operation request to the service module according to the address information of the service module.
[0012] In one of the embodiments, the service module is configured to receive the result returned by the external system.
[0013] The client is further configured to receive the result returned by the service module, extract the new field in the result, and store the new field in the context.
[0014] In one of the embodiments, when the operation objects in the data operation requests initiated by the clients corresponding to the plurality of nodes are the same, the service modules corresponding to the nodes are configured to sequentially call the corresponding external systems according to the distributed locks previously set for the service modules.
[0015] In one of the embodiments, the configuration information of the client is previously stored in the redis cache and the memory of the server on which the main process module is deployed.
[0016] The main process module is further configured to obtain the configuration information of the client from the memory, and when the configuration information of the client does not exist in the memory, obtain the configuration information of the client from the redis cache.
[0017] In the second aspect, the application provides a control method for process execution, comprising:
[0018] Obtaining the configuration information of the client previously configured for the node in the process;
[0019] Generating a data operation request according to the configuration information of the client, and sending the data operation request to the client;
[0020] Calling the service module previously configured for the node through the client;
[0021] Calling the corresponding external system through the service module, so as to execute the corresponding operation through the external system according to the data operation request.
[0022] In one of the embodiments, the configuration information of the client comprises address information of the service module, request parameters and request methods, and the method further comprises:
[0023] Determining the corresponding service module according to the purpose of the node, and obtaining the address information, request parameters and request methods of the service module;
[0024] Determining the configuration information of the client according to the address information, request parameters and request methods of the service module;
[0025] Configuring the node according to the configuration information of the service module and the client.
[0026] In the third aspect, the application provides a control device for process execution, comprising:
[0027] An obtaining module configured to obtain the configuration information of the client previously configured for the node in the process;
[0028] The sending module is configured to generate a data operation request according to the configuration information of the client, and send the data operation request to the client.
[0029] The calling module is configured to call a service module pre-configured for the node through the client.
[0030] The processing module is configured to call a corresponding external system through the service module, so that the corresponding operation is performed through the external system according to the data operation request.
[0031] In a fourth aspect, the present application provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the control method for process execution provided in any of the embodiments of the second aspect of the present application when executing the computer program.
[0032] In a fifth aspect, the present application provides a computer readable storage medium having a computer program stored thereon, wherein the computer program is executable on a processor to implement the steps of the control method for process execution provided in any of the embodiments of the second aspect of the present application.
[0033] The above control system, method, device, computer device and medium for process execution separate the main process module of policy execution from the integrated parts of various external systems through the client and the service module, so that the main process module only needs to focus on the policy execution logic of itself and does not need to involve specific external interaction details, greatly simplifying the integration process, realizing decoupling, thereby simplifying the integration process of process execution and various external systems, and improving the configurable degree. When a new external system is added, only the corresponding lightweight service module needs to be implemented, without the need to modify the program of the main process module, thereby reducing the expansion cost. BRIEF DESCRIPTION OF DRAWINGS
[0034] Figure 1 The structural block diagram of the control system for process execution in some embodiments;
[0035] Figure 2 The flowchart of the control method for process execution in some embodiments;
[0036] Figure 3 The flowchart of the control method for process execution in some embodiments;
[0037] Figure 4 The structural block diagram of the control device for process execution in some embodiments;
[0038] Figure 5 The internal structure diagram of the computer device in some embodiments. DETAILED DESCRIPTION
[0039] In order to make the purposes, technical solutions and advantages of the present application clearer, further detailed description will be made to the present application in combination with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.
[0040] In a first aspect, the present application provides a control system for process execution, as shown in the accompanying drawings, the system comprises a main process module, the main process module comprises at least one node, the system further comprises a client and a service module configured in advance for the node, wherein the main process module is configured to generate a data operation request according to the configuration information of the client and send the data operation request to the client, the client is configured to forward the data operation request to the service module according to the configuration information, and the service module is configured to call a pre-configured external system and execute a corresponding operation through the external system according to the data operation request. Figure 1
[0041] Wherein, process execution: refers to the whole process of promoting a certain business process from start to finish according to preset steps (composed of multiple nodes).
[0042] Node: refers to a specific step unit in the process, each node corresponds to a specific task, and the client needs to be pre-configured to realize interaction with the external system.
[0043] Main process module: refers to the core module for controlling the whole process execution, responsible for logically connecting nodes, generating operation requests and coordinating the work of the client.
[0044] Service module: refers to an intermediate module for interfacing with external systems, receiving requests forwarded by the client, and calling corresponding external systems to execute specific operations.
[0045] Client: refers to an intermediate component connecting the main process module and the service module, forwarding the request generated by the main process to the service module according to the configuration information.
[0046] Specifically, the configuration information of the client: refers to the information configured in advance for the node, which is used to guide the work of the client, such as the request mode of the client, to ensure that the client can correctly forward the request.
[0047] Data operation request: refers to the instruction (such as querying data, calling services, etc.) generated by the main process module according to the configuration information of the client, which is used to trigger the operation of the external system.
[0048] External system: refers to external resources or services that need to be interacted with during process execution, such as various data sources and external service systems, etc.
[0049] Specifically, the main flow module advances the node by logic, generates a corresponding data operation request according to the configuration information of the current node client, and sends the data operation request to the client of the node. The client forwards the received data operation request to the corresponding service module according to its own configuration information. After receiving the request, the service module calls the pre-configured external system, and the external system performs specific operations according to the request to complete the node task.
[0050] The present application realizes the decoupling of the policy execution main flow and the external system by introducing the client and the service module as intermediate modules, which will be analyzed as follows:
[0051] In the traditional method, the policy execution main flow is directly integrated with the data source and the external service by hard coding, which causes the interaction logic of the main flow and the external system to be deeply bound, and one party needs to be modified synchronously.
[0052] In the present application, the main flow module is only responsible for generating a data operation request and sending the request to the client through the configuration information of the client, without needing to care about how the request is passed to the external system, the specific interface format of the external system, or the data processing logic. The client only forwards the request to the corresponding service module according to the configuration information, and does not participate in the business logic of the main flow or the specific operation of the external system.
[0053] Further, the service module specially interfaces with the external system, is responsible for calling the external system to perform operations, is logically isolated from the main flow and the client, and only establishes contact through request forwarding. When the external system (such as a data source or a service interface) changes, only the corresponding service module needs to be modified (such as adjusting the calling logic or adapting a new interface), and the main flow module and the client do not need to be changed; when a new external system is added, only the corresponding service module needs to be added and the client needs to be configured, and the main flow does not need to be modified. Through this layered delivery mechanism from the main flow to the client to the service module and then to the external system, each party only interacts through preset configuration information, avoiding direct binding, thereby realizing decoupling.
[0054] In one embodiment, the configuration information of the client includes address information of the service module and request parameters, the main flow module is configured to obtain corresponding parameters from a pre-set context according to the request parameters, and generate a data operation request according to the obtained parameters,
[0055] The client is configured to send the data operation request to the service module according to the address information of the service module.
[0056] The address information of the service module refers to a network address (such as a uniform resource locator) used to locate the service module, which is information that the client can accurately find and connect to the service module.
[0057] Request parameter: refers to a parameter rule or template pre-configured in the client for generating a data operation request. For example, the request parameter can contain fields such as "user id", "query date", etc. The main flow needs to obtain the actual user id and date value from the context.
[0058] Context: refers to a data set accumulated during the execution of the flow, which can be shared by each module, including the state information of the current flow, intermediate results, external inputs, etc. For example, the form data submitted by the user, the execution results of the previous node, system environment variables, etc. The main flow module can extract the specific values required by the request parameter from it.
[0059] Specifically, the configuration information of the client can be:
[0060] {
[0061] "url":"http: / / ip:port / slef / server / user / firstLoginTime",
[0062] "requestMethod":"POST",
[0063] "requestParams":{
[0064] "uid":"${SLEFContext.uid}"
[0065] }
[0066] }
[0067] Among them, the configuration information includes the address information of the service module, that is, url (uniform resource locator, uniform resource locator), also includes the request method POST (POST Method), and also includes the request parameter uid, wherein the uid is specifically configured to obtain the uid from the context, that is, this configuration information is used to indicate that the corresponding uid from the context is obtained as the request parameter of this request.
[0068] As can be seen, the present application can extract the address information of the node corresponding service module, the request parameter and other information from the configuration information of the node corresponding client, further generate the corresponding data operation request according to the request parameter, and send the generated data operation request to the corresponding service module according to the address information of the service module.
[0069] In the present application, the client can be connected to multiple service modules. For different service modules, only the configuration items of the client need to be configured correspondingly. For example, when a new service module is replaced, the address information of the service module in the client configuration is modified accordingly, and the request parameters are modified accordingly.
[0070] The beneficial effects of this embodiment are that, through the service module address information and request parameters in the client configuration, the main process module can accurately obtain the required parameters from the context and generate a data operation request, and the client can accurately forward the request according to the address information, ensuring that the request is generated and delivered to the service module in a standardized and unbiased manner.
[0071] In one of the embodiments, the service module is configured to receive the result returned by the external system, and the client is further configured to receive the result returned by the service module, extract the new field in the result, and store the new field in the context.
[0072] For example, the current node needs to query the first login time of the user. The client corresponding to the current node sends a request to query the first login time of the user to the service module of the current node. The service module forwards the request to query the first login time of the user to the corresponding external system, and the external system returns the first login time of the user. Assuming that the result returned by the external user service system is:
[0073] response={“uid”:“uid1”,“firstLoginTime”:“2025-06-03”}, after the client obtains the returned result, it iterates through all the fields in the returned result, and then sets the new field firstLoginTime to the context, i.e. SLEFContext.firstLoginTime=“2025-06-03” is set to the context, for the next node to call.
[0074] The beneficial effects of this embodiment are that, after the service module receives the result returned by the external system, the client receives and processes it, extracts the new field and stores it in the context, ensuring that the new data generated by external interaction can be reused by subsequent nodes in the process, forming a coherent flow of data in the process, and realizing closed-loop transmission of results and updating of the context.
[0075] In one of the embodiments, when the operation objects in the data operation requests initiated by the clients corresponding to multiple nodes are the same, the service modules corresponding to the nodes are configured to call the corresponding external systems in turn according to the distributed locks set for the service modules in advance.
[0076] The operation object refers to the target entity that is commonly operated by multiple nodes or strategy processes, for example, the same coupon of the same user, or the same advertising account, etc.
[0077] Distributed locks are mechanisms used in distributed systems to control concurrent access to the same resource by multiple nodes, ensuring that only one node can perform operations on that resource at a time, thus avoiding conflicts.
[0078] Because there are many service modules abstracted from decoupling, they may be deployed on different service resources. For operations that are prone to inaccurate amount changes, coupon issuance, and redemption, such as amount changes, coupon over-inventory issuance, or redemption, which cannot be performed concurrently, distributed locks need to be added to different service modules for control.
[0079] Specifically, if multiple data operation requests reuse the same service module, a distributed lock can be set in that service module to control concurrency.
[0080] If multiple data operation requests involve different service modules (such as different service modules for issuing and redeeming coupons), the same distributed lock can be configured for these service modules. The granularity of the lock is precise down to the user UID and coupon code, ensuring that only one operation can be performed on the same coupon for the same user at the same time. This avoids data chaos caused by simultaneous issuance and redemption, or over-issuance caused by multiple concurrent coupon issuance processes.
[0081] For example, suppose multiple strategy processes need to query the inventory quantity of the same coupon and then issue it to users. To avoid over-issuance caused by multiple strategies issuing coupons to users concurrently at the same time, this application can take different measures for different situations, as follows:
[0082] Scenario 1: Assuming both scenarios involve issuing coupons and reuse the same service module, a distributed lock can be added to this service module for control.
[0083] Scenario Two: Assume Process One involves a user receiving an external third-party coupon (e.g., a coupon for 10 yuan off purchases of 20 yuan or more) upon meeting certain conditions; this corresponds to the coupon issuance service module. Process Two involves a user redeeming an external third-party coupon (also for 10 yuan off purchases of 20 yuan or more) in a specific scenario; this corresponds to the coupon redemption service module. These are two different service modules that can share the same distributed lock for control. The granularity of the distributed lock can be the user's UID and the coupon code. This means that by using a distributed lock, operations on the same coupon for the same user can be performed simultaneously.
[0084] For example, in the scenario of customer acquisition, process one needs to adjust the budget of advertising account 1 after the decision of the strategy process. Process two needs to stop advertising account 1 after the decision of the strategy process. The control granularity of the distributed lock can be an advertising account, that is, only one operation can be executed at the same time for the same advertising account. Therefore, when developing the service module, the distributed lock needs to be correctly identified and used in the logic code.
[0085] The embodiment has the beneficial effect that the conflict problem of concurrent operations on the same operation object by multiple nodes or multiple service modules is solved by the distributed lock (precise control according to operation objects), and the consistency of operations is guaranteed.
[0086] In one of the embodiments, the configuration information of the client is pre-stored in the redis cache and the memory of the server on which the main process module is deployed. The main process module is further configured to obtain the configuration information of the client from the memory, and obtain the configuration information of the client from the redis cache when the configuration information of the client does not exist in the memory.
[0087] The memory cache refers to the cache in the local memory of the server on which the main process module is deployed, and belongs to the first-level cache, which is used for the main process module to preferentially query.
[0088] The redis cache can be the cache in the independently deployed redis server, and belongs to the second-level cache. When there is no valid configuration in the memory cache, the main process module queries from the redis cache.
[0089] In order to guarantee that the node can efficiently obtain the correct configuration information of the client when executing, a two-level cache mechanism is used to store and query the configuration in the application, and the specific logic is as follows:
[0090] The main process module generates a unique process number when being configured, and each node corresponds to a unique node number and a dedicated client configuration. These configurations are pushed to the above-mentioned two-level cache (memory cache and redis cache).
[0091] When the node is executed, the main process module preferentially queries the configuration information of the client of the node from the local memory cache, and directly uses it if it is not invalid. If there is no valid configuration in the memory cache, the configuration information is queried from the redis cache, and the queried configuration information is stored in the memory cache again for use in the subsequent short period of time.
[0092] The embodiment has the beneficial effect that the first-level cache, that is, the local memory cache, reduces the remote query overhead, and the second-level cache, that is, the redis cache, is used as a supplement. The two-level cache reduces the direct query to the underlying database, and especially avoids the problem of frequent access to the database when the node is executed, thereby optimizing the system resource occupation.
[0093] In a first aspect, the application provides a control method for process execution, as shown in Figure 2 The control method for process execution comprises:
[0094] In step S21, configuration information of a client previously configured for a node in the process is acquired.
[0095] In step S22, a data operation request is generated according to the configuration information of the client, and the data operation request is sent to the client.
[0096] In step S23, a service module previously configured for the node is invoked through the client.
[0097] In step S24, a corresponding external system is invoked through the service module, so that the corresponding operation is performed through the external system according to the data operation request.
[0098] Specifically, the above-mentioned control method for process execution is applied to a main process module, wherein the main process module comprises at least one node, and the node in the process is equivalent to the node in the main process module.
[0099] Specifically, the specific implementation of each of steps S21 to S24 can refer to the specific description of the control system for process execution mentioned above, and is not specifically limited here.
[0100] In one embodiment, the configuration information of the client comprises address information of the service module, request parameters and request methods, and the control method for process execution can further comprise: determining the corresponding service module according to the purpose of the node, and acquiring the address information, request parameters and request methods corresponding to the service module; determining the configuration information of the client according to the address information, request parameters and request methods of the service module; and configuring the node according to the service module and the configuration information of the client.
[0101] The purpose of the node can be, for example, data query, file upload or user verification.
[0102] Specifically, the specific purpose of the current node is determined first. According to the purpose of the node and the application scenarios, i.e. purposes, of each service module, the corresponding service module is found. From the matched service module, its address information such as interface url, request parameters such as data fields to be transmitted and request methods such as GET (GET Method), POST are extracted. The above-mentioned acquired information is integrated to form the configuration information of the client. The configuration information of the client is configured to the corresponding node, so that it can normally invoke the service module.
[0103] The application can manage the name, application scenario, purpose description and configuration information of the corresponding client of the service module through a unified interface, support operators to view related information and fuzzy search, and assist in configuration decision-making.
[0104] Specifically, the name of the service module can be displayed in the interface as a unique identifier. The application scenarios corresponding to the service module, such as user login verification scenarios and order payment callback scenarios, can also be displayed in the interface. The specific purposes of each application scenario, such as user login verification scenarios for processing user identity information verification and order payment callback scenarios for receiving result notifications from third-party payment platforms, can also be displayed.
[0105] Further, the configuration information of the corresponding client can also be associated and displayed, including service address, request parameter, request method, etc., corresponding to the client reuse demand.
[0106] Specifically, the present application can be classified and displayed by module, which facilitates the operation personnel to quickly locate the service module under the business scenario to which the node belongs when configuring the policy process node. Fuzzy search based on keywords such as name, scenario, and purpose is supported, for example, entering payment can filter out all service modules related to payment, reducing the search cost.
[0107] The corresponding relationship between the node and the service module and the client is associated and displayed on the interface layout, allowing the operation personnel to intuitively understand the configuration chain and avoid mismatching.
[0108] In this way, the structured management of service modules is realized, and through the search and association display function, efficient configuration reference is provided for operation personnel, solving the problem of matching efficiency in the configuration process caused by the rapid growth of service modules.
[0109] In another embodiment, the present application can also input the related information of all service modules into a large model, and identify service modules with high similarity or repeated functions through the large model; during business use, reference the recommendation suggestions given by the large model to assist in selecting appropriate service modules.
[0110] In one embodiment, the process may be modified due to changes in business operations, and to ensure that the policy process is updated in a timely manner after the configuration is changed, and to prevent the policy process from executing the latest policy process configuration during execution, on the one hand, when the configuration information of the process is changed, the change event of the configuration information is listened to, and the configuration information of the redis cache is updated in real time.
[0111] On the other hand, a timing task such as querying the policy process configuration information every 2 minutes can be used, and if a changed policy process is found, the new policy process configuration information is updated to the redis cache, so as to ensure that the configuration information is updated in a timely manner after the configuration information is changed. redis cache.
[0112] The embodiment has the beneficial effects that: by matching and configuring the service module according to node usage, it is ensured that the node can accurately dock the required service. The key information of the service module is converted into client configuration, avoiding manual input of a large number of parameters, reducing operation complexity and error rate. When the address, parameters and the like of the service module change, only the corresponding configuration information needs to be updated, without modifying the core logic of the node, facilitating system maintenance and iteration.
[0113] In a possible application scenario, refer to Figure 3 , the flow execution control method of the present application will be further described in the steps of the scenario of issuing a coupon after a user application is completed. As shown in Figure 3 , the SLEF Server in Figure 3 corresponds to the service module, the SLEF Client corresponds to the client, and the external user service system, the external coupon service system and the external SMS platform correspond to the external system. In Figure 3 , the flow execution control method can include:
[0114] Node 1 generates an event message of a user application completion after a user application completion conversion behavior occurs. The event message contains uid (user id), eventCode (event code), applyCompleteTime (application completion time), and the context in the flow execution is SLEFContext. Assuming that the uid of the user application completion event message is “uid1”, the eventCode is “applyComplete”, and the applyCompleteTime is “2025-06-03”, when node 1 receives the user application completion event, the related field information in the event message is set to the context, and the updated information in the context is as follows:
[0115] SLEFContext.uid=“uid1”, SLEFContext.eventCode=“applyComplete”, SLEFContext.applyCompleteTime=“2025-06-03”.
[0116] Node 2 queries the first login time of the user from the external user service system. Assuming that the address of the SLEF Server is “http: / / ip:port / slef / server / user / firstLoginTime”, and the request mode is POST.
[0117] The configuration information of the client corresponding to node 2 is as follows:
[0118] {
[0119] "url": "http: / / ip:port / slef / server / user / firstLoginTime",
[0120] "requestMethod": "POST",
[0121] "requestParams": {
[0122] "uid": "${SLEFContext.uid}"
[0123] }
[0124] }
[0125] When the execution reaches node 2, node 2 fills in the corresponding parameters according to the configuration of requestParams in the configuration information of the client. According to the configuration information of the client, the configuration of uid in the request parameter requestParams is ${SLEFContext.uid}, which means that the value of the uid variable in the context SLEFContext is filled into the parameter, and the value of the uid variable has been set in the SLEFContext at node 1, that is, the request parameter uid = uid1. Then the corresponding SLEF Server is called according to the configuration of url, and then the SLEF Server calls the external user service system to query the first login time of the user. Assuming that the result returned by the external user service system is response = {“uid”:“uid1”,“firstLoginTime”:“2025-06-03”}, after the SLEF Client obtains the returned result, all fields in the result are traversed, and then the new field firstLoginTime is set in the context, that is, SLEFContext.firstLoginTime = “2025-06-03”.
[0126] Node 3 judges whether the user's apply complete time is equal to the first login time (only judges the year, month and day, and ignores the time, minute and second), that is, judges whether the user's apply complete time and the first login time are the same day. The judgment is whether the dates of the apply complete time and the first login time in the strategy execution flow context are equal, that is, whether the SLEFContext.applyCompleteTime and SLEFContext.firstLoginTime fields are equal. If the dates of the SLEFContext.applyCompleteTime and SLEFContext.firstLoginTime fields are equal, it represents that the user's apply complete time and the first login time are the same day, and enters node 4. If the dates of the SLEFContext.applyCompleteTime and SLEFContext.firstLoginTime fields are not equal, it represents that the user's apply complete time and the first login time are not the same day, and enters the next node 5. Node 4 and node 5 are two branches, only one of which is executed.
[0127] Node 4 queries the number of 50 yuan coupons from the external coupon service. It is assumed that the address of the SLEF Server is "http: / / ip:port / slef / server / coupon / count", and the request method is POST.
[0128] The configuration information of the client corresponding to the node is as follows:
[0129] {
[0130] "url":"http: / / ip:port / slef / server / coupon / count",
[0131] "requestMethod":"POST",
[0132] "requestParams":{
[0133] "couponCode":"${SLEFContext.couponCode}"
[0134] }
[0135] }
[0136] When executing to node 4, node 4 fills in the corresponding parameters according to the configuration of requestParams in the configuration information of the client. For example, node 4 selects a 50-yuan coupon, and assumes that the coupon code is "coupon_50", the coupon code "coupon_50" is set to the context SLEFContext, that is, SLEFContext.couponCode = "coupon_50"; the coupon name is "50-yuan coupon", and the coupon name "50-yuan coupon" is set to the context SLEFContext of policy execution, that is, SLEFContext.couponName = "50-yuan coupon". According to the configuration of the client, the configuration of couponCode in the request parameter requestParams is ${SLEFContext.couponCode}, which means that the value of the couponCode variable in the context is filled into the parameter, that is, the request parameter couponCode = "coupon_50". Then, the corresponding SLEF Server is called according to the configuration of the url, and then the SLEF Server calls the external coupon system to query the number of coupons with the coupon code coupon_50. Assuming that the external coupon system returns the result response = { "couponCode": "coupon_50", "couponCount": "100"}, the client obtains the returned result, then traverses all fields in the result, and then sets the new field couponCount to the context SLEFContext, that is, SLEFContext.couponCount = "100".
[0137] Node 5 queries the number of 30-yuan coupons from the external coupon service. The external service is a coupon system, and the SLEF Server corresponding to node 5 interacts with the external coupon system, and assumes that the address of the SLEF Server is "http: / / ip:port / slef / server / coupon / count", and the request method is POST.
[0138] The configuration information of the client corresponding to the node is as follows:
[0139] {
[0140] "url":"http: / / ip:port / slef / server / coupon / count",
[0141] "requestMethod":"POST",
[0142] "requestParams": {
[0143] "couponCode": "${SLEFContext.couponCode}"
[0144] }
[0145] }
[0146] When the execution reaches node 5, node 5 fills the corresponding parameters according to the configuration of requestParams in the configuration information of the client. For example, node 5 selects a 30-yuan coupon, and assumes that the coupon code is "coupon_30". The coupon code "coupon_30" is set to the context SLEFContext, that is, SLEFContext.couponCode = "coupon_30". The coupon name is "30-yuan coupon", and the coupon name "30-yuan coupon" is set to the context SLEFContext, that is, SLEFContext.couponName = "30-yuan coupon". According to the configuration information of the client, the configuration of couponCode in the request parameter requestParams is ${SLEFContext.couponCode}, which means that the value of the couponCode variable in the context is filled into the parameter, that is, the request parameter couponCode = "coupon_30". Then, the corresponding SLEF Server is called according to the configuration of the url, and then the SLEF Server calls the external coupon system to query the quantity of the coupon with the coupon code coupon_30. Assuming that the result returned by the external coupon system is response = { "couponCode": "coupon_30", "couponCount": "30"}, after the SLEF Client obtains the returned result, all fields in the result are traversed, and then the newly added field couponCount is set to the upper context, that is, SLEFContext.couponCount = 30.
[0147] Node 6 judges whether the quantity of the coupon queried from the external coupon service system is greater than 0. Since the quantity of the coupon data has been set to the couponCount field in the context SLEFContext by the previous branch (node 4 or node 5), it is judged whether the quantity of the coupon is greater than 0, that is, whether SLEFContext.couponCount is greater than 0.
[0148] If SLEFContext.couponCount is greater than 0, it means that the coupon still has valid inventory, and the coupon can be issued to the user. If it is less than or equal to 0, it means that the coupon does not have valid inventory, and the coupon cannot be issued to the user, and the process is directly ended.
[0149] Node 7 calls the external coupon service system to issue a coupon to the user, and needs to inform the external coupon system who (user uid) to issue what coupon (coupon code). If it is executed from the previous branch node 4, the coupon issued to the user is a 50 yuan coupon, and the coupon code is coupon_50. If it is executed from the previous branch node 5, the coupon issued to the user is a 30 yuan coupon, and the coupon code is coupon_30. The external system is an external coupon service system, and node 7 corresponds to the SLEF Server interacting with the external coupon service system. It is assumed that the address of the SLEF Server is "http: / / ip:port / slef / server / coupon / issue", and the request method is POST.
[0150] The configuration information of the client corresponding to this node is as follows:
[0151] {
[0152] "url":"http: / / ip:port / slef / server / coupon / issue",
[0153] "requestMethod":"POST",
[0154] "requestParams":{
[0155] "uid":"${SLEFContext.uid}",
[0156] "couponCode":"${SLEFContext.couponCode}"
[0157] }
[0158] }
[0159] When the execution reaches node 7, node 7 fills in the corresponding parameters according to the configuration of requestParams in the configuration information of the client. The values of uid and couponCode have been set in the context SLEFContext by the previous nodes, i.e., uid takes the value of uid in the context SLEFContext, which is "uidl"; couponCode takes the value of couponCode in the context SLEFContext, i.e., coupon_50 or coupon_30. Then, node 7 calls the SLEF Server corresponding to the node 7 according to the configuration of url, the SLEF Server corresponding to node 7 encapsulates the ability to call the external coupon service system, forwards the request parameters to the external coupon service system, and parses the returned result of the external coupon service system,
[0160] Further, the SLEF Server corresponding to node 7 converts it into a unified return format { "uid": "uidl", "couponCode": "coupon_30", "issueStatus": "success"}. Then, the SLEF Server returns the result to the client again. After the client obtains the returned result, it traverses all the fields in the result, and then sets the new field issueStatus to the context SLEFContext, i.e., SLEFContext.issueStatus = "success".
[0161] Node 8 judges whether the user's coupon issuing status is successful. Since node 7 has set the user coupon issuing status issueStatus to the context SLEFContext, it is judged whether the coupon is successfully issued by judging whether the coupon issuing status issueStatus in the context SLEFContext is equal to "success". If SLEFContext.issueStatus is equal to "success", it indicates that the user has successfully issued the coupon, and then the process continues to the next node 9. If SLEFContext.issueStatus is not equal to "success", it indicates that the user has failed to issue the coupon, and then the process ends.
[0162] Node 9 calls the external short message platform to send a coupon short message to the user, informs the user of what coupon he has obtained, and asks him to experience it quickly to activate the user's subsequent conversion. The external system is the external short message platform, and the SLEF Server corresponding to node 9 interacts with the external short message platform. It is assumed that the address of the SLEF Server is "http: / / ip:port / slef / server / message / send", and the request method is POST.
[0163] The configuration information for the client corresponding to this node is as follows:
[0164] {
[0165] "url":"http: / / ip:port / slef / server / message / send",
[0166] "requestMethod":"POST",
[0167] "requestParams":{
[0168] "uid":"${SLEFContext.uid}",
[0169] "message": "You have received a coupon for ${SLEFContext.couponName}. Come and experience it now for great deals!"
[0170] }
[0171] }
[0172] When node 9 is executed, it retrieves the corresponding parameters based on the requestParams configuration in the client's configuration information and populates them. Previous nodes have already set the values of uid and couponName in the SLEFContext; that is, uid is taken from the uid value in the SLEFContext, which is "uid1"; couponName is taken from the couponName value in the SLEFContext, which is either "50 yuan coupon" or "30 yuan coupon". Then, based on the URL configuration, the corresponding SLEF Server is called. The SLEF Server encapsulates the ability to call an external SMS platform to send SMS messages to the user, forwarding the request parameters to the external SMS platform. Since the external SMS platform processes the user's SMS sending task asynchronously and does not return the SMS sending result to the user in real time, the SLEF Server does not need to wait for the external SMS platform to return the final sending result, but directly returns the default result to the client, and then the process ends.
[0173] In a second aspect, this application provides a control device for process execution, such as Figure 4 As shown, the control device for process execution includes: an acquisition module 41, a sending module 42, a calling module 43, and a processing module 44, wherein:
[0174] The acquisition module 41 is used to acquire the configuration information of the client that has been pre-configured for the nodes in the process;
[0175] The sending module 42 is configured to generate a data operation request according to the configuration information of the client, and send the data operation request to the client.
[0176] The calling module 43 is configured to call a service module pre-configured for the node through the client.
[0177] The processing module 44 is configured to call a corresponding external system through the service module, so that the corresponding operation is performed through the external system according to the data operation request.
[0178] In some embodiments, the configuration information of the client includes address information of the service module, request parameters and request methods, the processing module 44 determines the corresponding service module according to the use of the node, and obtains the address information, the request parameters and the request methods corresponding to the service module, determines the configuration information of the client according to the address information, the request parameters and the request methods of the service module, and configures the node according to the service module and the configuration information of the client.
[0179] In a third aspect, the present application provides a computer device, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the control method for flow execution provided in any one of the embodiments of the first aspect of the present application when executing the computer program.
[0180] In one embodiment, the computer device can be a server, and its internal structure diagram can be as shown in Figure 5 The computer device comprises a processor, a memory, a network interface and a database connected through a system bus. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is configured to communicate with an external terminal through a network connection. The computer program is executed by the processor to implement the control method for flow execution.
[0181] In a fourth aspect, the present application provides a computer readable storage medium having a computer program stored thereon, and the computer program is executed by a processor to implement the steps of the control method for flow execution provided in any one of the embodiments of the first aspect of the present application.
[0182] The computer readable storage medium can be Figure 5 the computer readable storage medium in the computer device as shown in
[0183] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The above-mentioned computer program can be stored in a non-volatile computer readable storage medium, and when the computer program is executed, the processes of the above-mentioned embodiments of each method can be included. Any reference to memory, storage, databases, or other media in the embodiments provided by the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0184] The technical features of the above embodiments can be combined in any way. In order to make the description simple, not all possible combinations of the technical features in the above embodiments are described, but as long as the combination of the technical features does not exist, it should be considered as the scope of the present application.
[0185] The above embodiments only express several implementation manners of the present application, and the description is more specific and detailed, but it should not be understood as a limitation on the scope of the patent. It should be pointed out that for ordinary skilled in the art, without departing from the concept of the present application, some modifications and improvements can be made, which are all within the scope of the present application. Therefore, the scope of the patent protection of the present application should be subject to the appended claims.
Claims
1. A control system for process execution, characterized in that, The system includes a main process module, which includes at least one node. The system also includes a client and service module pre-configured for the node. The main process module is used to generate a data operation request based on the client's configuration information and send the data operation request to the client. The client is used to forward the data operation request to the service module according to the configuration information; The service module is used to call a pre-configured external system, and the external system performs the corresponding operation according to the data operation request.
2. The system according to claim 1, characterized in that, The client's configuration information includes the address information of the service module and request parameters. The main process module is used to obtain the corresponding parameters from the pre-set context according to the request parameters, and generate the data operation request according to the obtained parameters. The client is used to send the data operation request to the service module based on the address information of the service module.
3. The method according to claim 2, characterized in that, The service module is used to receive the results returned by the external system; The client is also used to receive the results returned by the service module, extract the newly added fields from the results, and store the newly added fields into the context.
4. The system according to claim 1, characterized in that, When multiple clients on different nodes initiate data operation requests that involve the same object, the service modules corresponding to each node are used to sequentially call the corresponding external systems based on the distributed locks pre-set for the service modules.
5. The system according to claim 1, characterized in that, The client's configuration information is pre-stored in the Redis cache and in the memory of the server where the main process module is deployed; The main process module is also used to obtain the client's configuration information from the memory, and when the client's configuration information is not present in the memory, to obtain the client's configuration information from the Redis cache.
6. A method for controlling process execution, characterized in that, The method includes: Retrieve the client configuration information that has been pre-configured for the nodes in the process; A data operation request is generated based on the client's configuration information, and the data operation request is sent to the client; The client invokes the service module pre-configured for the node. The service module calls the corresponding external system to perform the corresponding operation based on the data operation request.
7. The method according to claim 1, characterized in that, The client's configuration information includes the service module's address information, request parameters, and request method. The method further includes: The corresponding service module is determined based on the purpose of the node, and the address information, request parameters and request method of the service module are obtained. The client's configuration information is determined based on the address information, request parameters, and request method of the service module; Configure the node according to the configuration information of the service module and the client.
8. A control device for process execution, characterized in that, The device includes: The acquisition module is used to obtain the configuration information of the client that has been pre-configured for the nodes in the process; The sending module is used to generate a data operation request based on the client's configuration information and send the data operation request to the client; The calling module is used to call the service module pre-configured for the node through the client; The processing module is used to call the corresponding external system through the service module, so that the external system can perform the corresponding operation according to the data operation request.
9. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 6 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 6 to 7.
Citation Information
Patent Citations
Process control method and system
CN114565285A
Process business engine system
CN116976817A
General data flow approval system, method, equipment and medium
CN117522319A
Lightweight process engine implementation method and device, computer equipment and storage medium
CN119718454A
Data processing method and apparatus for implementing cross-domain request at webpage end, and related device
WO2021218018A1