Service recommendation combination method based on BPMN
By combining offline reinforcement learning, BPMN and Argo workflow, a BPMN-based service recommendation combination method is provided, which solves the problem that a single service cannot meet complex needs and API selection is difficult, achieves efficient service combination and recommendation, and improves user experience. Experience and recommendation accuracy.
Patent Information
- Application Number
- CN202410671544.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-28
- Publication Date
- 2024-08-23
Smart Images

Figure CN118535145A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of service recommendation combination, and in particular to a service recommendation combination method based on BPMN (Business Process Modeling Notation). Background Art
[0002] With the rapid development of Internet technology, more and more Web services appear in human life, and various software in the cloud have been widely used. In the current service-oriented environment, the number of service types and application systems is numerous and explosive. In recent years, many companies have launched a large number of services and products that users can access and use. However, with the increase in the number of mass services, it is difficult for a single service to meet the complex needs of users. Faced with the current service-oriented environment, a simple service may not be able to meet complex business needs due to its functional limitations. Therefore, in order to meet various business needs, it is necessary to combine individual services to generate applications with rich functions. Based on the advantages of reusability and interoperability, service composition plays a vital role in combining multiple atomic services to meet complex user needs.
[0003] Web services are usually presented in the form of APIs (Application Programming Interfaces). Each API receives input parameters and returns execution results to complete a specific and relatively single function. With the rapid growth of large-scale and complex services, it is becoming increasingly difficult to find suitable APIs for developers to build composite applications.
[0004] Offline reinforcement learning is a research field that has gradually attracted attention in recent years. It aims to provide a powerful framework for online decision-making by learning from historical data. Although with the continuous updating of algorithms, offline reinforcement learning has demonstrated its application value in many fields, such as recommendation systems, games, and robot control, it also faces a series of challenges and many problems need to be solved. In offline reinforcement learning algorithms, models are trained in batches using offline historical datasets that are collected without real-time interaction. This makes offline reinforcement learning very suitable for training with limited data and can effectively take advantage of large historical datasets.
[0005] BPMN uses a series of graphic symbols. It is process-centric and can be used to describe, manage and optimize business processes. It also meets the technical requirements of user demand expression. When representing the flow of business processes, it uses standardized definitions and protocols for process modeling. BPMN supports enterprise organizations in describing their work goals and improving business efficiency by creating and maintaining business processes. BPMN also provides a series of additional toolkits and technical extensions for process modeling, execution, monitoring and optimization. BPMN has a wide range of applications in many industries and fields, including: manufacturing, BPMN can be used to manage and optimize manufacturing processes to improve production efficiency and quality; financial services, BPMN can be used to manage and optimize financial services processes to improve customer satisfaction and reduce costs; healthcare, BPMN can be used to manage and optimize healthcare processes to improve patient satisfaction and reduce medical errors; retail, BPMN can be used to manage and optimize retail processes to improve customer satisfaction and increase sales. In short, BPMN is a powerful business process management tool and technology that can be used to manage and optimize business processes in various industries and fields.
[0006] Argo workflow is a Git open source project based on Kubernetes. It runs a container-based workflow execution engine locally on Kubernetes. The present invention has localized Argo and used it to run the API recommended for users. It supports DAG (directed acyclic graph) and step-based workflows, and provides an interface that allows users to write, start and run multi-step processes using a custom DSL similar to traditional YAML. Each step in the workflow can be placed in a separate container to implement its function with relatively independent logic, and finally complete the workflow task under the conditions of data dependency and logical dependency. Argo can easily define dependencies, build workflows through custom programming languages, and provide an interactive UI interface to help users observe the operation of the process. Argo provides a simple and powerful way to define, deploy and monitor complex workflows based on Kubernetes. By implementing each step as a container, Argo can handle complex dependencies, loops, etc., and supports functions such as file flow management, monitoring and logging. Summary of the invention
[0007] The present invention combines the characteristics of offline reinforcement learning, BPMN and Argo workflow, and provides a service recommendation combination method based on BPMN. The actual business workflow is deployed in the container using the microservice architecture. The user does not need to learn how to write deployment documents. The whole process from workflow design to actual deployment can be realized, which greatly reduces the threshold for microservice deployment.
[0008] The service recommendation combination method based on BPMN includes the following steps:
[0009] Step 1: The user designs a workflow that only includes graphic elements and natural language descriptions through the process editing interface and stores it in BPMN format;
[0010] The middle of the process editing interface is a canvas, on which the user draws the process; the left side is a list of graphic elements, and the top is a function button, including a one-click deployment function button; the right side is a custom module, which supports users to customize each graphical element;
[0011] Graphic elements refer to graphic elements, which are divided into four types: flow objects, connecting objects, swimlanes and artifacts.
[0012] The workflow design process is:
[0013] First, the user draws the required graphics elements in the process editing interface and connects them in sequence; at the same time, each graphics element node is edited through natural language description to obtain a BPMN flow chart.
[0014] The drawing of graphics elements includes editing, dragging, adding and deleting graphics elements.
[0015] Step 2: According to the structural information of the BPMN diagram and the natural language description of each node, the graphical BPMN flowchart is converted into a reinforcement learning problem;
[0016] The MDP of a reinforcement learning problem is defined as the following tuple M = (S, A, R):
[0017] (1) State S: State S includes the service service_pre of the previous task and the description description of the current task, where the description of the current task is converted into a semantic vector through the semantic similarity module.
[0018] (2) Action A: In service composition, the agent's action A is the service selected for the current task, denoted as service_cur.
[0019] (3) Reward R: Accordingly, the reward R is determined by the QoS of the service and the user’s feedback score. The QoS indicators include latency, popularity, and level, which represent the latency, popularity, and service level of the recommended service, respectively. The higher the user’s feedback score, the more the recommended service can meet the user’s needs.
[0020]
[0021] Step 3: Recommend APIs for each task node of the BPMN flowchart through the offline reinforcement learning model and the online reinforcement learning model, and further recommend services through the API;
[0022] The input of the offline reinforcement learning model and the online reinforcement learning model is S = [PreAPI (previous node API), Description (current node description)], and the output is A = [CurAPI (current node recommended API)]; the offline reinforcement learning model outputs the top-n service set with the highest confidence, denoted as services offline ; The online reinforcement learning model outputs a recommended service result, denoted as service online ; The calculation formula for the final service recommendation result is:
[0023]
[0024] Step 4: Users rate the recommended services, and collect user feedback information and data, which are saved in the log database;
[0025] Organize user feedback information data into<S,A,R> In the form of, S = [PreAPI (previous node API), Description (current node description)], A = CurAPI (current node API), R is the reward.
[0026] Step 5: Use the user's feedback information data to train the offline reinforcement learning model and the online reinforcement learning model, and return to step 3 to obtain the final service recommendation result;
[0027] First, the offline reinforcement learning model is trained with user feedback information data in the log database at a fixed time period, and the offline reinforcement learning model is updated after the training is completed; during the training period, a copy of the offline reinforcement learning model is deployed on the online reinforcement learning model;
[0028] At the same time, the online reinforcement learning model is trained based on the real-time feedback data from users. At this time, the service recommendation is jointly determined by the offline reinforcement learning model copy and the real-time updated online reinforcement learning model.
[0029] Finally, after the offline reinforcement learning model training is completed, the updated offline reinforcement learning model and the real-time updated online reinforcement learning model are used together to make decisions on service recommendations.
[0030] Step 6: Submit the workflow based on the final service recommendation result. The user clicks the Run button to execute the workflow and observes and records the running results.
[0031] After submitting the workflow, the BPMN flowchart bound to the API is executed through Argo. Specifically, the system front end performs status mapping and log tracking on the execution of the Argo workflow. Users can view the API execution status and running results in real time. After the system binds the API to it, the workflow is submitted. After the operation is successful, the front end will use a mark to remind the user of the process status change. At the same time, after clicking the task node, the execution result will be displayed in a pop-up box.
[0032] Step 7: When all microservices of each node class have been recommended and executed, the BPMN-based service recommendation combination method is completed.
[0033] The interactive system that implements the above-mentioned service recommendation combination method includes a BPMN front-end that describes user needs, a back-end that implements the reinforcement learning algorithm, and an Argo-based service execution engine tool. It maps the BPMN process framework to the Argo workflow, executes the BPMN diagram bound to the API, scores the recommendation results, runs the process, and views the API execution log.
[0034] The advantages of the present invention are:
[0035] (1) The present invention provides a service recommendation combination method based on BPMN, which uses a visual process editing interface and is user-friendly. Users only need to interact with the visual interface to complete their own demand modeling and obtain recommendation results and view real-time operation logs, thereby saving users' learning costs and simplifying their operations.
[0036] (2) The present invention provides a service recommendation combination method based on BPMN, which uses a reinforcement learning model to make service recommendations and uses user feedback information to adjust and optimize the recommendation algorithm to improve the accuracy and satisfaction of the recommendations. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 A flowchart of a service recommendation combination method based on BPMN according to the present invention;
[0038] Figure 2 A front-end interface created for editing the BPMN-based workflow adopted by the present invention;
[0039] Figure 3 A front-end interface for displaying recommendation results for each BPMN process node in an embodiment of the present invention;
[0040] Figure 4 A front-end interface for completing service recommendations for each BPMN process node in the embodiment of the present invention;
[0041] Figure 5It is a front-end interface for users to interactively score each BPMN process node in the embodiment of the present invention;
[0042] Figure 6 A working module based on a reinforcement learning algorithm established for the present invention;
[0043] Figure 7 A collaborative flow chart of the offline reinforcement learning model and the online reinforcement learning model used in the present invention;
[0044] Figure 8 It is the front-end interface after the workflow in the embodiment of the present invention is successfully executed;
[0045] Fig. 9 This is a schematic diagram showing the execution results of a task node after the workflow is completed in an embodiment of the present invention. DETAILED DESCRIPTION
[0046] The present invention will be further described in detail below with reference to the accompanying drawings and implementation examples.
[0047] The present invention provides a service recommendation combination method based on BPMN, such as Figure 1 As shown, the following steps are taken:
[0048] Step 1: The user designs a workflow that only includes graphics and natural language descriptions through the process editing interface and stores it in the bpmn format;
[0049] like Figure 2 As shown in the figure, on the left side of the process editing interface are a series of graphical elements that comply with the BPMN2.0 specification. In the middle is the canvas, where users edit processes. The process editing interface supports users to draw various graphic elements by dragging and dropping. The buttons above are some supported functions. The one-click deployment function will send the user's completed process file to the BPMN to YAML component. The right side shows that the interface also supports users to define each graphical element. The id is a random id automatically generated for the element when it is dragged to the canvas.
[0050] The functions of the process editing interface include: list of process elements; editing, dragging, adding, and deleting process elements; modifying the attribute values of process elements;
[0051] Users can sequentially connect the graphics elements into a complete business process according to their needs, and use natural language to describe and edit each node;
[0052] A primitive is a group of graphic elements, such as an activity is a rectangle and a route is a diamond. There are four types of graphic elements: flow objects, connecting objects, swimlanes, and artifacts.
[0053] The present invention extends the Vue functional component of BPMN, allowing developers to bind an API to each task node while drawing a BPMN diagram.
[0054] Step 2: According to the structural information of the bpmn graph and the natural language description of each node, the graphical bpmn graph is converted into a reinforcement learning problem.
[0055] Specifically, the MDP (Markov Decision Process) of the reinforcement learning problem is defined as the following tuple M = (S, A, R):
[0056] (1) State S: State S mainly includes the service service_pre of the previous task and the description description of the current task.
[0057] (2) Action A: In service composition, the agent's action A is the service selected for the current task, denoted as service_cur.
[0058] (3) Reward R: Accordingly, the reward R is mainly determined by the QoS (quality of service) of the service and the user's feedback score. QoS indicators such as latency, popularity, and level represent the latency, popularity, and service level of the recommended service, respectively; the user's feedback score reflects the user's feedback. The higher the user score, the more the recommended service can meet the user's needs.
[0059]
[0060] In this way, it is ensured that the decision-making process of service combination can be better described and optimized, and that the model can capture the QoS fluctuations of services in a timely manner, thereby further improving the performance of recommended services and increasing user satisfaction.
[0061] For example, refer to Figure 3 , the workflow includes three tasks, and their recommended services are a, b and c. At this time, in the second task, the user's evaluation of the recommended service b of task 2 is 80 points. In this scenario, the present invention defines the corresponding state S = {a, search for related reports}, the action A of the agent is service b, and the reward R can be calculated according to the formula.
[0062] It is particularly important to note that the program needs to convert the task description (searching for relevant reports) into a semantic vector when calculating S. To achieve this goal, the present invention uses an open source module for calculating semantic similarity to obtain the semantic vector of the task description.
[0063] Step 3: Generate personalized service recommendations in real time, and the results of service recommendations are fed back on the bpmn graphical interface for users to view.
[0064] The ultimate goal of the algorithm is to Figure 2 The BPMN diagram shown in the figure recommends suitable APIs for each task node. Two reinforcement learning models, offline and online, are used for joint recommendation. The input of the model is S = [PreAPI (previous node API), Description (current node description)], and the output is A = [CurAPI (recommended API for the current node)]. The specific strategy is that the offline model will output the top-n service set ranked by confidence, denoted as services offline Similarly, the online model will output the service result recommended by the online model (different from the offline model outputting a set of actions, the online model only outputs one action), recorded as service online .
[0065] Therefore, the final service recommendation result will be calculated according to the following formula:
[0066]
[0067] like Figure 4 As shown in the figure, the effect of completing the service recommendation for each task node is shown, where each box represents a task node, and the functions of the services recommended for it are described in brackets. At the same time, at the data layer, each task node also corresponds to the service ID recommended by the node.
[0068] Step 4: Receive user feedback and collect data.
[0069] like Figure 5 As shown, users rate the recommended results to improve the model, and the user's tags are organized into<S,A,R> The form of is provided for reinforcement learning training, where S = [PreAPI (previous node API), Description (current node description)], A = CurAPI (current node API).
[0070] In addition, the training data directly generated in step 2 includes text format such as API description, so it needs to be processed into vectors. Based on the algorithm for calculating semantic similarity, the present invention implements a function for calculating semantic vectors and completes the conversion from text to vectors.
[0071] Step 5: Use the user's feedback information data to train the offline reinforcement learning model and the online reinforcement learning model, and return to step 3 to obtain the final service recommendation result;
[0072] like Figure 6 and Figure 7As shown in the figure, in the training phase, on the one hand, the training of the offline reinforcement learning model is to store all the feedback data in the database, and use the full amount of data for model training in a fixed time period. Considering that the offline model is updated slowly, and users may use the system more frequently in a short period of time, a copy of the offline model will be deployed online during training and updated after the training is completed. On the other hand, the online reinforcement learning model that is trained separately learns in real time based on user feedback and makes decisions together with the offline model.
[0073] Step 6. After recommending and binding services for the user's task flow, the user can click the Run button to execute the service and observe and record the running results.
[0074] After submitting the process, the system front-end will map the status of the Argo workflow and track the logs, so that users can view the API execution status and running results in real time. After the system binds the API to it, it will submit the workflow. After the operation is successful, the front-end will use a green check mark to remind the user of the process status change, such as Figure 8 As shown; at the same time, after clicking the task node, the pop-up box on the right will also display the execution result, such as Fig. 9 As shown;
[0075] Argo Workflows is an open source Kubernetes-native workflow engine based on container technology, which has the function of coordinating and scheduling parallel jobs. Argo Workflows can be defined and implemented through Kubernetes CRD (Custom Resource Definition), which can be run on any Kubernetes cluster to orchestrate highly parallel work.
[0076] Specifically, the present invention maps each bpmn task node bound to an API to a container of the Argo backend, and maps the bpmn process framework to an Argo workflow. Each workflow contains one or more containers, and there are dependencies between these containers according to the business logic of BPMN.
[0077] Step 7: When all microservices of each node class have been recommended and executed, the BPMN-based service recommendation combination method is completed.
[0078] The components of the present invention include a BPMN front-end that describes user needs, a back-end that implements a reinforcement learning algorithm, and an Argo-based service execution engine tool. The BPMN process framework can be mapped to an Argo workflow, the BPMN diagram bound to the API can be executed, the recommendation results can be scored, the process can be run, and the API execution log can be viewed. An interactive system that can recommend and combine various services for users has been built, which has certain practicality.
[0079] On the one hand, the present invention provides a visual process editing interface, supports the use of drag-and-drop method to draw various graphic elements of the process, and orderly connects them into a complete business process; provides instant setting of process attributes and attributes of each business link in the process, as well as saving, submitting and deploying the process.
[0080] On the other hand, the present invention combines the logical structure of the flowchart and the user feedback mechanism to transform the service recommendation combination problem into the problem of recommending services for flowchart task nodes, and then models the problem as a Markov process, defining states, actions, scores, etc.
Claims
1. A service recommendation combination method based on BPMN, characterized in that: The following steps are involved: Step 1: The user designs a workflow that only includes graphics and natural language descriptions through the process editing interface, stores it in BPMN format, and converts the graphical BPMN flowchart into a reinforcement learning problem; The MDP of a reinforcement learning problem is defined as the following tuple M = (S, A, R): (1) State S: State S includes the service service_pre of the previous task and the description description of the current task, where the description of the current task is converted into a semantic vector through the semantic similarity module; (2) Action A: In the service composition, the agent's action A is the service selected for the current task, denoted as service_cur; (3) Reward R: Accordingly, the reward R is determined by the QoS of the service and the user’s feedback score; the QoS indicators include latency, popularity, and level, which represent the latency, popularity, and service level of the recommended service, respectively; Step 2: Use the offline reinforcement learning model and the online reinforcement learning model to recommend APIs for each task node in the BPMN flowchart, and further recommend services through the APIs. The input of the offline reinforcement learning model and the online reinforcement learning model is S = [PreAPI, Description], and the output is A = [CurAPI]; the offline reinforcement learning model outputs the top-n service set with the highest confidence, denoted as services offline ; The online reinforcement learning model outputs a recommended service result, denoted as service online ; The calculation formula for the final service recommendation result is: Step 3: Users rate the recommended services, and collect user feedback information and data, which are saved in the log database; Step 4: Use the user's feedback information data to train the offline reinforcement learning model and the online reinforcement learning model, and return to step 2 to obtain the final service recommendation result; First, the offline reinforcement learning model is trained with user feedback information data in the log database at a fixed time period, and the offline reinforcement learning model is updated after the training is completed; during the training period, a copy of the offline reinforcement learning model is deployed on the online reinforcement learning model; At the same time, the online reinforcement learning model is trained based on the real-time feedback data from users. At this time, the service recommendation is jointly determined by the offline reinforcement learning model copy and the real-time updated online reinforcement learning model. Finally, after the offline reinforcement learning model training is completed, the updated offline reinforcement learning model and the real-time updated online reinforcement learning model are used together to make decisions on service recommendations; Step 5: Submit the workflow based on the final service recommendation result. The user clicks the Run button to execute the workflow and observes and records the running results. Step 6: When all microservices of each node class have been recommended and executed, the BPMN-based service recommendation combination method is completed.
2. A service recommendation combination method based on BPMN according to claim 1, characterized in that: The middle of the process editing interface is a canvas, on which the user draws the process; On the left is the graphic element list, and above are the function buttons; on the right is the custom module, which supports users to customize each graphical element.
3. The service recommendation combination method based on BPMN according to claim 1, characterized in that: The workflow design process is as follows: first, the user draws the required graphics elements in the process editing interface and connects the graphics elements in sequence; then, each graphics element node is edited through natural language description to obtain a BPMN flowchart.
4. The service recommendation combination method based on BPMN according to claim 3 is characterized in that: The drawing of graphics elements includes editing, dragging, adding and deleting graphics elements.
5. A BPMN-based service recommendation and combination method according to any one of claims 1 to 4, characterized in that: Graphic elements refer to graphic elements, which are divided into four types: flow objects, connecting objects, swimlanes and artifacts.
6. The service recommendation combination method based on BPMN according to claim 1, characterized in that: The calculation formula of reward R is:
7. The service recommendation combination method based on BPMN according to claim 1, characterized in that: The process of step execution workflow is: After submitting the workflow, the BPMN flowchart bound to the API is executed through Argo. Specifically, the system front end performs status mapping and log tracking on the execution of the Argo workflow, and the user can view the API execution status and running results in real time; after the operation is successful, the front end will use a mark to remind the user of the process status change; when the task node is clicked, the execution result is displayed in a pop-up box.
8. An interactive system for implementing the service recommendation combination method of claim 1, characterized in that: It includes a BPMN front-end that describes user needs, a back-end that implements reinforcement learning algorithms, and an Argo-based service execution engine tool. It maps the BPMN process framework to Argo workflows, executes BPMN diagrams bound to APIs, scores recommendation results, runs processes, and views API execution logs.
Citation Information
Cited By
Method for designing a task system using a object lifecycle-based state transition diagram
KR102964554B1
