Business process arrangement method, device, computer equipment and storage medium
By collecting and classifying business logic shards from historical business processes, using prediction models to match target shards, and dynamically orchestrate business processes, the problems of complex business processes development and maintenance are solved, flexible orchestration and expansion are achieved, and code reuse rate and maintainability are improved.
Patent Information
- Application Number
- CN202411987971.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-08
AI Technical Summary
During the development of business system, complex business processes lead to deep and complex code call links, which are not conducive to maintenance and modification, and traditional business process management systems cannot adapt to complex and changing business scenarios and rapidly changing market environments.
By collecting and classifying business logic shards from historical business processes, responding to the drag and configuration instructions of task nodes, dynamically orchestrate business processes, and using prediction models to match target business logic shards, to achieve flexible orchestration and expansion of business processes.
It realizes flexible orchestration and expansion of business processes, avoids duplicate development, improves code reuse and maintainability, adapts to complex and changeable business needs, and reduces development time and maintenance costs.
Smart Images

Figure CN119781760A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a business process orchestration method, apparatus, computer equipment and storage medium. Background Art
[0002] At present, in the process of business system development, developers develop codes according to business processes. When encountering complex business processes, the code call links developed are often deep and complex, which is not conducive to later maintenance and modification. In addition, when developing different functions, some processes with similar processing logic are often encountered. These business logics are generally called as some public methods. Usually, these public methods are known through mutual communication between developers. When there are many developers in the team, omissions are inevitable.
[0003] At present, enterprises are facing increasingly complex business needs and a rapidly changing market environment. Although traditional business process management systems can handle certain business process automation, they are unable to cope with complex and changing business scenarios and are unable to adapt to ever-changing business needs. Summary of the invention
[0004] Based on this, it is necessary to provide a business process orchestration method, apparatus, computer equipment and storage medium that can utilize existing business logic fragments and avoid repeated development in order to address the above technical problems.
[0005] In a first aspect, the present application provides a business process orchestration method, comprising:
[0006] Collect multiple business logic fragments from historical business processes and classify the business logic fragments;
[0007] In response to a drag command of a current task node in the current business process, the current task node is placed at a corresponding position;
[0008] In response to the configuration instruction of the current task node, obtaining a target business logic shard matching the current task node according to the category of the business logic shard;
[0009] Configure the current task node according to the target business logic shard to orchestrate the current business process.
[0010] In one embodiment, multiple business logic fragments are collected from historical business processes, including:
[0011] A plurality of business logic slices are collected from the historical business process according to the identification information of the pre-set business logic slices.
[0012] In one embodiment, the business process orchestration method further includes:
[0013] Collect the microservices corresponding to each business logic shard;
[0014] Receive business requests and call the target business process that matches the business request from the orchestrated business processes;
[0015] Get each business logic slice in the target business process and the microservices corresponding to each business logic slice;
[0016] The microservices of each business logic slice execute the corresponding business logic slice to process the business request.
[0017] In one embodiment, the current task node includes multiple nodes, and the business process orchestration method further includes:
[0018] During the execution of the current business process, the current task node assigns the processing result of the corresponding business logic slice to the process variable, and passes the process variable to the business logic slice in the next current task node.
[0019] In one embodiment, the business process orchestration method further includes:
[0020] Monitor the version information of each business logic shard in the current business process;
[0021] When new version information exists, monitor the execution of the current business process;
[0022] When the current business process is completed, the new version information will replace the old version information.
[0023] In one embodiment, the business process orchestration method further includes:
[0024] Place the icon of the target business logic slice at the specified position of the current task node.
[0025] In one embodiment, the business process orchestration method further includes:
[0026] In response to the configuration instruction of the current task node, configure any one or more of the following items of the current task node:
[0027] Business script configuration, business message configuration, business notification rule configuration, business permission configuration, and event trigger rule configuration.
[0028] In one embodiment, in response to a configuration instruction of a current task node, obtaining a target business logic slice matching the current task node according to a category of the business logic slice includes:
[0029] Pre-train prediction models based on the categories of business logic sharding;
[0030] Responding to the configuration instruction of the current task node, obtaining key features of the current task node;
[0031] Input the key features of the current task node into the prediction model to obtain the target business logic shard matching the current task node;
[0032] The training steps of the prediction model include:
[0033] Collect the dependencies between each business logic shard and other business logic shards and the task nodes to which each business logic shard belongs;
[0034] Extract key features of task nodes belonging to each business logic shard and construct a first feature vector;
[0035] Constructing a second feature vector according to the category of each business logic shard and the dependency relationship with other business logic shards;
[0036] The prediction model is trained according to the first eigenvector and the second eigenvector.
[0037] In a second aspect, the present application provides a business process orchestration device, including:
[0038] The collection module is used to collect multiple business logic slices from historical business processes and classify the business logic slices;
[0039] The arrangement module is used to respond to the drag command of the current task node in the current business process and place the current task node in the corresponding position;
[0040] A configuration module, configured to respond to a configuration instruction of a current task node and obtain a target business logic slice matching the current task node according to the category of the business logic slice;
[0041] The processing module is used to configure the current task node according to the target business logic sharding to orchestrate the current business process.
[0042] 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, wherein when the processor executes the computer program, the steps of the business process orchestration method provided in any one of the embodiments of the present application in the first aspect are implemented.
[0043] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the business process orchestration method provided in any embodiment of the present application in the first aspect.
[0044] The above-mentioned business process arrangement method, device, computer equipment and storage medium can make full use of existing business logic fragments by collecting and classifying business logic fragments from historical business processes, avoiding repeated development of similar functions and improving code reuse rate. The classification of business logic fragments promotes the standardization of business logic, enables the development team to follow unified specifications, and improves code quality and maintainability. By responding to the drag and configuration instructions of the current task node, the user can flexibly adjust the position of the current task node and configure the corresponding business logic fragment as needed, quickly realize the arrangement of different business processes, and meet diversified business needs. In addition, it is convenient to add new business logic fragments or modify existing fragments, and it is easy to expand and improve business processes to adapt to business development changes. Developers do not need to write complex business logic from scratch, and directly select existing business logic fragments for configuration, saving development time and energy and accelerating project delivery. This application also provides visual operations, and the drag and configuration operations of the current task node are intuitive and visual, reducing the difficulty of development, facilitating communication and collaboration between business personnel and technical personnel, and improving work efficiency. The business logic fragments are clearly classified, and when problems occur in the business process, the relevant fragments can be quickly located and modified to reduce maintenance costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 A flowchart of a business process orchestration method in some embodiments;
[0046] Figure 2 A schematic diagram of a business process that has been arranged in some embodiments;
[0047] Figure 3 A schematic diagram of a business process that has been arranged in some embodiments;
[0048] Figure 4 It is a functional flow chart in some embodiments;
[0049] Figure 5 It is a structural block diagram of a business process orchestration device in some embodiments;
[0050] Figure 6 1 is a diagram of the internal structure of a computer device in some embodiments. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction 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.
[0052] In a first aspect, the present application provides a business process orchestration method, such as Figure 1 As shown, this method is applied to Figure 1 The terminal in is used as an example to illustrate, including the following steps:
[0053] Step S11, collecting multiple business logic slices from historical business processes, and classifying the business logic slices.
[0054] Business process orchestration refers to combining multiple business activities or services in a certain order and rules to complete a more complex business task. This kind of orchestration usually involves cross-system interaction, such as coordination between ERP (Enterprise Resource Planning), CRM (Customer Relationship Management), SCM (Supply Chain Management) and other systems.
[0055] Business logic slicing is a basic unit with specific functions and independent logic in the business process. It is a business fragment extracted from each business service, with a business logic slicing identifier and written in a specified format. It has the following characteristics:
[0056] First, functional independence. It can complete a specific business function or task, such as data verification, calculation processing, process branch judgment, etc., and can be independently developed, tested and maintained.
[0057] Second, identifiability. With a specific business logic segment identifier, it can be accurately identified and distinguished from other business segments by systems or tools such as the business process center, making it easier to collect and manage operations.
[0058] Third, standardization. It needs to be written in the prescribed format to ensure that it can be correctly parsed and executed in the business process, including specifications in terms of data structure, code specifications, interface definitions, etc.
[0059] Fourth, reusability. It can be reused in different business processes or business scenarios, which improves the reusability and development efficiency of business logic and avoids repeated development.
[0060] Fifth, composition. Multiple business logic shards can be combined according to certain business rules and process sequences to build a complete business process and realize complex business functions.
[0061] Specifically, the present application can start collecting business segments with business logic segment identifiers when each business service is started, and can trigger the collection action by embedding a corresponding collection module or interface call code in the business service startup code.
[0062] Furthermore, during the operation of the business service, the preset business logic sharding identifier is used to screen out business fragments that meet the requirements, such as identifying them through specific tags in the code, keywords in the metadata, etc., and then these identified business logic shards are extracted for temporary storage, which can be stored in a cache or a temporary data structure.
[0063] Furthermore, the established rules for different business types are obtained from the process designer and other places where business category information is maintained, and the criteria for distinguishing the categories to which each business logic slice belongs are clarified. Each collected business logic slice is traversed, and the business category to which it belongs is determined based on the obtained business type rules, and then it is classified into the corresponding category grouping. For example, different folders, different fields of a data table, or different data sets can be used to store different categories of business logic slices.
[0064] Step S12, in response to the drag instruction of the current task node in the current business process, placing the current task node at a corresponding position.
[0065] Among them, business process refers to the workflow process composed of a series of tasks, activities, and links organized in sequence and logical relationship in order to achieve specific business goals. It has a clear starting point and end point. Each task node carries a specific business operation or processing step. The nodes are interconnected through specific process directions (such as sequence, branching, loop, etc.), so that the entire business can be carried out in an orderly manner. The procurement process, sales process, leave approval process, etc. in the enterprise are typical examples of business processes.
[0066] The current task node in a business process refers to an independent unit with a specific business function or operation in the entire business process. It is one of the basic elements that constitute the business process. Business logic shards can be deployed in task nodes, and one task node can deploy one or more business logic shards.
[0067] Specifically, the present application can build a front-end interface, construct a visual business process editing interface, display each task node with a visual element (such as a rectangular frame, icon, etc.), and set it to a draggable state.
[0068] Furthermore, event monitoring and command acquisition are performed. Use JavaScript to monitor the drag-related events of the task node in the front-end interface, such as dragstart (start dragging), drag (drag in progress), dragend (drag end) and other events. When the dragend event is detected, it means that the user has completed a drag operation. At this time, the relevant information of the task node and the relevant information of the target location to be placed are obtained (for example, the target location is determined by obtaining the coordinates corresponding to the mouse release position, the container element where it is located, etc.).
[0069] Furthermore, according to the result returned by the backend (or after direct operation by the frontend), the display position of the current task node in the business process on the visualization interface is updated so that the user can intuitively see that the current task node has been placed in the corresponding new position.
[0070] In this application, business process orchestration is performed through business orchestration components. Business orchestration components refer to various reusable functional units used to build business processes, mainly including business execution components and remote call components. Among them, the business execution component is responsible for executing specific business logic or operations, and is the part of the business process that actually handles business tasks. The remote call component is mainly used to interact with other systems or services to achieve data sharing and function calls, and expand the functions and scope of business processes.
[0071] In addition, the business orchestration component of this application supports all task node types in the open source process engine: UserTask, Manual Task, Service Task, Send Task, and Receive Task. The function of each task node type is basically unchanged. User Task is used for tasks waiting for human intervention. When the process reaches this task, the process instance will be suspended, waiting for manual operations. Manual Task is similar to User Task, but it does not require automatic triggering by the system, but requires manual triggering. Service Task: A task used to call external services. In this task, the process engine will call external services to perform some operations. Send Task: A task used to send information, usually used for API integration or message notification. Receive Task: A task used to wait for external information, usually used for API integration or message notification. The execution component of the business logic fragment of the business process center is based on the transformation of Manual Task, and the execution component of the cross-service call in the business logic fragment is based on the transformation of Service Task.
[0072] Please refer to Figure 2 , Figure 2 FIG. 1 is a schematic diagram of a business process in an embodiment. Figure 2In the figure, business A, business B, business C, and business D are each a business logic segment, and each box is a task node. When choreographing a business, you first need to display the collected business logic segments on the page by category or hide them. Drag the task node (the box in the figure) to the corresponding position on the page, and then put the business logic segment into the corresponding component to choreograph a business process.
[0073] Please continue to refer to Figure 3 , Figure 3 FIG. 1 is a schematic diagram of a business process in another embodiment. Figure 3 In the process of business orchestration, there are multiple task nodes, each of which is deployed with a corresponding business logic shard. For example, K is a business logic shard, and the box where K is located is a task node. Complex orchestration logic can be implemented in the business orchestration process, such as serial, parallel, selection, conditional, and loop, etc.
[0074] In addition, the business orchestration method of the present application can achieve a highly coordinated and seamless state with the exclusive gateway, parallel gateway, inclusive gateway, and event gateway in the process engine in terms of function, logic, and practical application. For example, each type of gateway has its own unique functions, such as the exclusive gateway implements a single branch selection after conditional judgment, the parallel gateway supports multi-task parallel execution, the inclusive gateway can flexibly select one or more branches, and the event gateway triggers the process direction based on events. In business orchestration, they accurately match specific business rules and requirements, work together, and fully and accurately implement complex business logic.
[0075] Step S13, in response to the configuration instruction of the current task node, obtaining a target business logic slice matching the current task node according to the category of the business logic slice.
[0076] The configuration instructions here are to configure the current task node, wherein the configuration of the current task node may include the configuration of multiple attributes, one of which includes the configuration of the business logic shard of the current task node. Configuring the business logic shard refers to establishing an association relationship between the current task node and one or more business logic shards.
[0077] Specifically, the present application can monitor the configuration instructions for the current task node. When it is detected that a user triggers a corresponding configuration operation (such as clicking a configuration button, etc.), the configuration instruction event is obtained.
[0078] Furthermore, the current task node information is determined. First, the relevant attributes of the current task node of the currently triggered configuration instruction are clarified, such as the node name, the business process module to which it belongs, the function type and other information, which can be obtained from the attribute data of the node object.
[0079] Furthermore, the business logic shard categories are queried. The categories of all business logic shards are obtained from the existing business logic shard classification storage structure (such as storage divided by category in a database table, classified data sets in memory, etc.), and the different categories of business logic shards are known.
[0080] Furthermore, the target business logic shard is matched. According to the specific requirements and attributes of the current task node, the target business logic shard that matches the current task node is selected from each category through certain matching rules (for example, if the current task node is used for data processing, the business logic shard belonging to the "data processing" category is searched; if the node is responsible for process branch judgment, the relevant shard in the "logic judgment" category is matched, etc.). This may involve traversing the shard collections in different categories and comparing the key information such as the functional description and applicable scenarios of each shard to determine the matching degree.
[0081] Step S14, configuring the current task node according to the target business logic slice to orchestrate the current business process.
[0082] Among them, configuring the current task node according to the target business logic shard refers to establishing a mapping relationship between the target business logic shard and the current task node, so as to configure the target business logic shard as the business logic shard of the current task node. When the configuration of each current task node of the current business flow is completed, it means that the current business process orchestration is completed.
[0083] Specifically, after determining that the current task node has configured the relevant business logic slice, update the association between the current task node and other nodes in the current business process, such as adjusting the order, setting branch conditions, etc., to ensure the logical integrity and coherence of the entire business process. This may require corresponding modifications in the data structure storing the business process structure (such as the process definition table in the database, the process object model in the memory, etc.) to record the new process arrangement.
[0084] Furthermore, the legitimacy and integrity of the orchestrated business process are verified, such as whether there are circular references, whether all necessary current task nodes have been reasonably configured, etc. If the verification is passed, the newly orchestrated business process configuration information is saved (in a database or configuration file or other corresponding storage media) so that the business process can be executed according to this orchestration later.
[0085] In one embodiment, collecting a plurality of business logic slices from a historical business process includes: collecting a plurality of business logic slices from the historical business process according to preset identification information of the business logic slices.
[0086] The identification information of the business logic shard is a specific symbol, label or metadata used to clearly mark and distinguish different business logic shards in the business process. The following are some common identification information:
[0087] First, annotations. In programming, annotations are often used to identify business logic fragments, such as the @LogicFragment annotation mentioned in this article. Annotations can be marked on program elements such as classes, methods, and fields to provide additional information to the compiler or runtime system. In this way, the system can easily identify which parts are business logic fragments and some of their characteristics.
[0088] Second, tags or markers. In the business process model or configuration file, specific tags or markers may be used to identify business logic fragments. For example, in the XML configuration file, <logicfragment>Such tags wrap up the business logic shards and describe the specific information of the shards through the attributes and content within the tags.
[0089] Third, database fields. When business logic sharding-related data is stored in the database, it is identified by specific database fields. For example, in a business process table, there is a fragment_type field, which is used to store the type identifier of the business logic shard, and a fragment_tag field, which is used to store more specific sharding tags or names. By querying the values of these fields, the corresponding business logic shard can be found.
[0090] Fourth, unique identifier. Each business logic shard is assigned a unique identifier, such as UUID (Universally Unique Identifier). In the entire business process system, this unique identifier is used to uniquely identify a business logic shard, making it easy to reference and operate in different modules and processes.
[0091] Fifth, metadata. The identification information of the business logic shard can also be stored as metadata in a dedicated metadata repository. The metadata contains detailed information such as the name, type, function description, and applicable scenarios of the business logic shard. By querying and retrieving the metadata, you can quickly find the business logic shard that meets the requirements.
[0092] The beneficial effects of this embodiment are:
[0093] This application decouples redundant business logic by splitting business requirements, reduces the business complexity of the platform, and orchestrates the split business logic fragments to form a complete business chain, so that when business requirements change, the existing business processes can be rearranged, improving scalability and flexibility. At the same time, the existing business logic fragments are highly reused in different business processes, reducing manual development, reducing the possibility of errors, and improving the efficiency of business processing. At the same time, the separation of process models and business logic improves the maintainability of the system, facilitating subsequent upgrades and maintenance.
[0094] In one of the embodiments, the business process orchestration method may further include: collecting microservice names corresponding to each business logic slice, receiving a business request, calling a target business process that matches the business request from the orchestrated business process, obtaining each business logic slice in the target business process and the microservices corresponding to each business logic slice, executing the corresponding business logic slice through the microservices of each business logic slice to process the business request.
[0095] Among them, when collecting data, the present application not only collects the business logic shards but also collects the information of the microservices corresponding to the business logic shards, such as the microservice names. Specifically, the present application can collect the microservice names from the configuration data of the microservices.
[0096] Furthermore, the application can also verify the collected data, fill in the default values of the data, convert the data format, and finally push the data to the business process center, and orchestrate the business process through the business process center. The push of business data will not fail to identify the business logic sharding in the business process designer. The business service will only start successfully after the business data push is completed. If the business data verification is abnormal or the data push fails, there will be an error message and the service cannot be started successfully.
[0097] Specifically, the present application may establish a data storage structure. Use a database (such as a table in a relational database, which may set fields such as "business logic sharding identifier", "microservice name", and "service configuration data") or a suitable data structure in memory (such as a dictionary or mapping object, where the key is the business logic sharding identifier and the value is a composite object containing the microservice name and service configuration data) to store the corresponding relationship and configuration information.
[0098] If the business system uses a configuration file to define microservice related information, the file content is read through the corresponding parsing library to extract the microservice name corresponding to each business logic shard and the service configuration related data of the microservice (such as the service's IP address, port number, protocol type, etc.), and then store it in the prepared storage structure.
[0099] Some systems define this information through annotations in the code (such as @ServiceConfig to mark microservice-related configurations, and @LogicFragmentService to mark the association with business logic fragments). Use the reflection mechanism of the programming language to scan the annotations in the code, extract the corresponding microservice name and configuration data, and fill them into the storage structure.
[0100] When a business request is initiated externally, the interface layer receives and parses the request according to the defined rules, and obtains key request information, such as the business type, the business objects involved, etc. This information will be used for subsequent matching of the target business process.
[0101] The arranged business process data is generally stored in the database (specific business process table, recording the structure of the process, the business logic fragmentation included, etc.) or the business process model object in the memory. Through the query statement (for database storage) or traversing the business process object collection in the memory, the matching target business process is found according to the key information in the business request (such as business type matching process type, business object associated process involving scope, etc.).
[0102] Get each business logic slice in the target business process and the microservices corresponding to each business logic slice. Based on the previously collected and stored correspondence between the business logic slice and the microservice name and service configuration data, further determine the microservice corresponding to each business logic slice and its detailed service configuration data to ensure that the microservice can be accurately called later.
[0103] According to the determined microservice and its configuration data (such as IP address, port number, etc.), call the microservice corresponding to each business logic shard, and pass the corresponding parameters in the business request to let the microservice execute its corresponding business logic shard.
[0104] After receiving the request, the microservice performs the corresponding business operation internally, completes data processing, rule judgment and other tasks according to the business logic, and then returns the processing results. The results returned by each microservice can be integrated, judged and other subsequent operations can be performed according to business needs, and finally the complete business request processing results are returned to the external system or client that initiated the request.
[0105] The beneficial effects of this embodiment are:
[0106] By collecting business logic shards and dynamically calling target business processes based on business requests, it is easy to cope with frequent changes and diversified needs of business processes. There is no need to reconstruct the entire system on a large scale. New business processes can be quickly implemented by adjusting the arrangement and combination of business logic shards. Each business logic shard corresponds to an independent microservice. When the business volume grows or the function needs to be expanded, a single microservice can be easily expanded or a new microservice can be added without causing too much impact on other parts. The scalability of the system is greatly enhanced.
[0107] Business logic shards are relatively independent and can be reused in different business processes. Collecting various business logic shards and corresponding them to microservices allows these shards to be flexibly combined in multiple business scenarios, avoiding repeated code development and increasing code reuse. Microservices with the same functions in different business processes can be reused, reducing development workload and improving the stability and reliability of microservices, because microservices that have been reused and tested in practice often have better quality.
[0108] In one of the embodiments, the current task node includes multiple nodes, and the business process orchestration method also includes: during the execution of the current business process, the current task node assigns the processing result of the corresponding business logic slice to the process variable, and passes the process variable to the business logic slice in the next current task node.
[0109] Among them, process variables are carriers for transferring data between different task nodes in a business process. They can store various types of data, such as strings, numbers, objects, etc. During the execution of a business process, different task nodes can share and transfer data by operating on process variables.
[0110] When a business process is executed, there is a way to pass data based on process variables. After the current task node completes the processing using the corresponding business logic slice, it will store the result of the business logic slice in the process variable. This process variable is like a data container that carries information that can be used by subsequent links. Then, this process variable containing the processing result will be passed to the next task node for use by its internal business logic slice, thereby achieving the connection of business logic between different task nodes and the flow of data.
[0111] In the entire business process, parameters are not stored and transmitted in a conventional isolated form, but are uniformly transmitted in the form of process variables, which makes the flow of parameters in the process more standardized and orderly.
[0112] The business logic slices in any task node have the ability to operate on process variables. They can obtain the parameters they need from the process variables to support the execution of their own business logic; they can also add new parameters to the process variables according to the business execution situation to enrich the data available in subsequent links; they can also delete parameters in the process variables that are no longer needed or do not meet business requirements to ensure the validity and simplicity of the data in the process variables, which provides convenience for the flexible advancement of business processes and data processing.
[0113] In general, process variables play a key role as a "data link" in business processes, standardize parameter transmission, and enable each business logic segment to process data flexibly to ensure the smooth operation of the entire business process.
[0114] In one of the embodiments, the business process orchestration method may further include: monitoring the version information of each business logic segment in the current business process, and when new version information exists, monitoring the execution of the current business process, and if the current business process is completed, replacing the old version information with the new version information.
[0115] Among them, this application can manage different versions of the same business logic shard. Since the business process may be using a lower version of the business logic shard to carry out business execution, the new version cannot be used to replace the old version at will, otherwise it may cause problems in the ongoing business process. Based on this, a monitoring mechanism is proposed, which can monitor the version status of each business logic shard in the current business process. Once a new version is found, the execution progress of the current business process is checked. Only when the business process is fully executed, the new version information is used to replace the old version information, so as to ensure the stability of the business process and timely update the business logic shard version.
[0116] Specifically, the present application can construct a data structure for storing and monitoring business logic shard version information (such as a database table, containing fields such as business logic shard identifier and version number, or a mapping object in memory, with the key being the business logic shard-related identifier and the value being the corresponding version number). During the startup and operation of the business process, the version information of each business logic shard involved in the current business process is scanned periodically (at certain time intervals, such as every few minutes) or in real time (through an event trigger mechanism, when the business logic shard is updated), and compared with the recorded version information to determine whether new version information appears.
[0117] When new version information is detected, the execution of the current business process is tracked and monitored. This can be done by setting status marks at each key node of the business process (for example, adding a process status field in the database table to record the status of not started, in progress, completed, etc., or adding corresponding attributes to the business process object model in the memory to indicate the status), or by using mechanisms such as message queues to send corresponding messages when a task node completes the task to know the progress of the process execution and to know in real time whether the business process is still in the execution stage.
[0118] Once the current business process is monitored to be completed (confirmed by checking the status mark as completed, or receiving a related message indicating the end of the process, etc.), the corresponding new version information is extracted from the place where the new version information is stored (such as the new version of the release library, the updated version record in the configuration file, etc.), and then the old version information is replaced according to the pre-set replacement rules (such as updating the business logic shard version record field in the database, modifying the version reference of the corresponding shard in the business process configuration file, etc.), so that the new version of the business logic shard can be applied when the subsequent business process is executed again.
[0119] In one of the embodiments, the business process orchestration method may further include: placing an icon of the target business logic slice at a designated position of the current task node.
[0120] The target business logic slice is presented in an intuitive form of icon. When designing and arranging business processes, the icon representing the target business logic slice needs to be placed at a specific position of the current task node. This specific position is not fixed and can be determined according to actual business needs, usage scenarios or user settings. For example, the icon can be placed inside the box representing the current task node, so that users can more clearly and intuitively know the relationship between the current task node and the corresponding business logic slice, which is convenient for building, viewing and subsequent adjustments to the business process.
[0121] In one of the embodiments, the business process orchestration method may further include: in response to the configuration instruction of the current task node, configuring any one or more of the following of the current task node: business script configuration, business message configuration, business notification rule configuration, business authority configuration, and event trigger rule configuration.
[0122] Among them, when configuring the current task node, in addition to configuring the business logic sharding of the current task node, this application also needs to configure other properties of the current task node, such as business script configuration, business message configuration, business notification rule configuration, business authority configuration and event trigger rule configuration.
[0123] Specifically, business script configuration mainly configures specific scripts executed in business nodes. These scripts contain code snippets that implement specific business functions. For example, in an e-commerce system, the script configuration of the order business node may involve codes related to operations such as calculating the total price of goods, applying discounts, and checking inventory.
[0124] Business message configuration: used to configure the message content transmitted between nodes in the business process. Taking the logistics business as an example, the shipping node may be configured to send a message containing the express number, express company name and other shipping information to the user.
[0125] Business notification rule configuration: focuses on configuring the rules and content for sending notifications to relevant personnel or systems. For example, in a project approval process, when the approval is passed, you can configure a business notification to be sent to the applicant to inform him that his application has been approved.
[0126] Business permission configuration: mainly configures the access rights of each business node. For example, in an enterprise resource management system, business nodes related to financial statements may only be accessible and operated by financial personnel, and permission configuration will define which roles or users can perform these operations.
[0127] Event trigger rule configuration: used to configure event trigger rules and corresponding actions in business processes. For example, in an inventory management system, when the inventory quantity is lower than a certain threshold, the event mechanism is triggered, and the configuration may define the action of automatically generating a purchase requisition.
[0128] In addition, this application can also support listeners in general process engines. The main types are as follows:
[0129] Process Definition Listeners: Set at the process definition level and triggered when a process instance starts or ends.
[0130] Activity Listeners: Associated with a specific activity node and triggered when the activity starts, ends, or is executed.
[0131] Boundary Event Listeners: Attached to an activity or gateway to respond to predefined events (such as timer events, message events, etc.).
[0132] Signal Listeners: Triggered when an external signal is sent to the process engine.
[0133] Message Listeners: Triggered when a specific message is published, commonly used for communication between processes.
[0134] Error Listeners: Triggered when a specific error or exception occurs, and can be used to handle abnormal situations.
[0135] Endpoint Listeners: Used in endpoint activities such as service tasks or receiving tasks to respond to external requests or calls.
[0136] Variable Listeners: Triggered when a process variable is created, modified, or deleted.
[0137] Conditional Listeners: Trigger based on specific conditions.
[0138] Timer Listeners: triggered based on time, such as timer events
[0139] Listeners can be configured as needed and can perform various operations, such as logging, sending notifications, updating database records, etc. In actual applications, it is very important to choose the appropriate listener type and configuration parameters according to business needs.
[0140] In one of the embodiments, in response to the configuration instruction of the current task node, a target business logic shard matching the current task node is obtained according to the category of the business logic shard, including: pre-training a prediction model according to the category of the business logic shard, in response to the configuration instruction of the current task node, obtaining the key features of the current task node, inputting the key features of the current task node into the prediction model, and obtaining the target business logic shard matching the current task node, wherein the training step of the prediction model includes: collecting the dependency relationship between each business logic shard and other business logic shards and the task nodes to which each business logic shard belongs, extracting the key features of the task nodes to which each business logic shard belongs, and constructing a first feature vector, constructing a second feature vector according to the category of each business logic shard and the dependency relationship with other business logic shards, and training the prediction model based on the first feature vector and the second feature vector.
[0141] Among them, the key features are the relevant attribute information that can reflect the essential characteristics of the current task node to which the business logic shard belongs and have an important impact on matching the target business logic shard. Specifically, the key features may include business attribute features, data features, operation features, and contextual environment features. Among them, the business attribute features may include functional features: such as whether the current task node performs data entry, data processing, data analysis, or data output. Data features may include input data features and output data features. Specifically, they include the type, format, source, and data volume of input data and output data. Operation features may include operation types and operation frequencies. Contextual environment features may include the execution time requirements of the current task node, user role information related to the current task node, and environmental information such as the system platform, software version, and hardware configuration on which the current task node runs.
[0142] Dependency refers to the interrelated and restrictive relationships between business logic slices and other slices during execution, such as order, data transfer, resource sharing, and functional collaboration. For example, a data processing slice may depend on the data provided by another data collection slice, or the execution result of one task needs to be used as the input condition of another task.
[0143] The first feature vector refers to the vector extracted and constructed based on the key features of the current task node to which each business logic shard belongs. It is mainly used to describe the characteristics and attributes of the current task node itself. It is a digital representation of the current task node, including information such as business functions, business fields, data features, etc. It can reflect the essential characteristics of the current task node from one dimension and provide basic data for subsequent model training and analysis.
[0144] The second feature vector refers to the vector constructed according to the category of each business logic shard and its dependency relationship with other business logic shards. It focuses on reflecting the classification information of the business logic shard in the entire business system and its relationship with other shards. It digitally describes the business logic shard from another perspective, provides the model with information about the interconnection and collaboration between business logic shards, and helps the model learn the complex dependency patterns between different shards, so as to more accurately match and predict the target business logic shard.
[0145] Specifically, this application can traverse each business logic shard in the historical business process and analyze the dependency relationship between each shard and other shards. For example, if a data processing shard depends on another data acquisition shard to complete the task first, it is necessary to clearly record the order, data transmission and other dependencies. At the same time, determine the current task node to which each business logic shard belongs, and sort out which business logic shards are covered by each current task node in the business process.
[0146] Furthermore, for the current task node to which each business logic shard belongs, key feature information in terms of corresponding functional attributes, data features, execution sequence, resource requirements, business rule associations, etc. is extracted according to the content dimensions contained in the above key features.
[0147] Furthermore, these extracted key features are quantified, encoded, and processed (for example, functional attribute categories are digitally encoded, data size ranges are interval-divided and encoded, etc.), and combined in a certain order to form the first feature vector, ensuring that the first feature vector corresponding to each current task node has consistent dimensions and can accurately reflect its key characteristics.
[0148] Furthermore, according to the pre-defined categories of each business logic slice (such as basic data processing, core business operation, result feedback, etc.), the categories are coded and represented. Combined with the analyzed dependency relationship between the business logic slice and other business logic slices, appropriate quantization and coding are also performed (for example, the dependency relationship is represented in the form of an adjacency matrix of a directed graph, etc.), and the category coding and the dependency relationship coding are integrated to form a second feature vector.
[0149] Furthermore, the constructed first feature vector is used as a part of the input feature, the second feature vector is used as another part of the input feature, and the business logic shard is used as the corresponding output label (ie, the expected matching result), and a training data set is prepared.
[0150] This application can select a suitable machine learning algorithm (such as a neural network, support vector machine, etc.), use a training data set to train the model, and adjust the model parameters so that the model can learn the intrinsic connection between the current task node characteristics and the matching business logic shards to achieve better prediction accuracy. At the same time, it can be evaluated and optimized on the validation set and test set.
[0151] After receiving the configuration instruction of the current task node, the key features of the current task node are extracted and processed in the manner of constructing the first feature vector to obtain a corresponding feature vector representation.
[0152] This feature vector is input into the trained prediction model. The model performs calculations and judgments based on the learned rules and outputs the target business logic segment that matches the current task node, which is used for the subsequent configuration of the current task node and the orchestration of the business process.
[0153] The beneficial effects of this embodiment are:
[0154] By integrating multi-dimensional information to construct feature vectors and train prediction models, it is possible to accurately match the most appropriate business logic shard for the current task node, avoiding the subjectivity and inaccuracy of manual matching, greatly improving the accuracy of business logic matching, and ensuring the smooth operation of business processes.
[0155] In one of the embodiments, the present application can also regularly count the number of times each business logic shard is reused in different historical business processes, and merge different logic shards whose number of reuses is lower than a preset threshold and whose functional matching degree is greater than a preset threshold.
[0156] The benefit of this design is that merging business logic shards with low reuse times but high functional matching can avoid the code of the same or similar functions appearing multiple times in the system, thereby reducing code redundancy, freeing up more storage space, and improving the system's storage resource utilization efficiency.
[0157] In one of the embodiments, the present application can also analyze the dependencies between business logic shards and construct a dependency graph. When arranging business processes, ensure that the configuration and order of the current task nodes follow the dependencies to avoid logical errors. When a business logic shard is updated or changed, automatically evaluate the impact on other related shards, and make corresponding adjustments or notify related process nodes.
[0158] In one of the embodiments, the present application can also manage existing business processes, including functions such as editing, deleting, importing, exporting, publishing, and viewing details of business processes. After the business process is created, it needs to be published before it can be used. After the business process releases a new version, the old version of the business process that is already running will still be executed according to the old version of the business process and will not switch to the new version. Only after the new version of the business process is released, the business process created will execute the new version of the process. Unpublished business processes support the import function, and the imported business process will overwrite all the content previously configured in this process.
[0159] In one embodiment, the present application can also monitor the business process. Specifically, monitoring the business process mainly includes process link tracking, real-time monitoring, process analysis, and management of process variables.
[0160] Among them, process link tracking mainly records the execution status of all tasks in the entire process in series through logs. Secondly, it also includes abnormal information and audit-related log records during the process operation, such as changes in process definitions and changes in permissions. Real-time monitoring will record which node the business process is executed to, the execution status of each task, and the execution time of each task. At the same time, it will monitor the CPU and memory usage, and count the number of tasks processed per unit time, set thresholds for key performance indicators, and trigger an alarm once the threshold is exceeded. Process analysis mainly analyzes the overall efficiency of the process on a regular basis and identifies bottleneck tasks in the process so that targeted optimization can be achieved.
[0161] In one embodiment, the present application specifically executes the orchestrated business process through a business process executor. The business process executor is one of the core components of the business process center, responsible for executing process instances according to the business process definition to ensure the normal operation of each node in the business process. Different process instances of the same business process are isolated from each other.
[0162] In order to further illustrate the business process arrangement method of this application, a functional flow chart is provided, such as Figure 4 As shown. Figure 4 In the figure, microservice A receives a business request, calls the orchestrated business process from the business process center, and executes the corresponding business process. In the figure, business 1, business 2, business 3, and business 4 are each a business logic shard. Figure 4 It is also shown that the business process center collects multiple business logic slices from microservice A and microservice B, and pre-orchestrate them according to the collected business logic slices. Figure 4 It is also indicated that the execution process of the business process is monitored and the monitoring results are stored in a database or a message queue.
[0163] In a second aspect, the present application provides a business process orchestration device, such as Figure 5 As shown, the business process orchestration device includes: a collection module 51, an orchestration module 52, a configuration module 53 and a processing module 54, wherein:
[0164] The collection module 51 is used to collect multiple business logic slices from the historical business process and classify the business logic slices.
[0165] The arrangement module 52 is used to place the current task node at a corresponding position in response to a drag instruction of the current task node in the current business process.
[0166] The configuration module 53 is used to respond to the configuration instruction of the current task node and obtain the target business logic slice matching the current task node according to the category of the business logic slice.
[0167] The processing module 54 is used to configure the current task node according to the target business logic slice to arrange the current business process.
[0168] In some of the embodiments, the collection module 51 may collect multiple business logic slices from historical business processes according to preset identification information of the business logic slices.
[0169] In some of the embodiments, the collection module 51 can collect the microservices corresponding to each business logic slice, receive business requests, call the target business process that matches the business request from the orchestrated business process, obtain the business logic slices in the target business process and the microservices corresponding to each business logic slice, execute the corresponding business logic slice through the microservices of each business logic slice to process the business request.
[0170] In some embodiments, the current task node includes multiple nodes. The collection module 51 can assign the processing results of the corresponding business logic slices to the process variables during the execution of the current business process, and pass the process variables to the business logic slices in the next current task node.
[0171] In some of the embodiments, the processing module 55 can monitor the version information of each business logic segment in the current business process, and when new version information exists, monitor the execution of the current business process. If the current business process is completed, the new version information will replace the old version information.
[0172] In some of the embodiments, the processing module 55 may: place the icon of the target business logic slice at a designated location of the current task node.
[0173] In some of the embodiments, the configuration module 53 can configure any one or more of the following of the current task node in response to the configuration instruction of the current task node: business script configuration, business message configuration, business notification rule configuration, business authority configuration, and event trigger rule configuration.
[0174] In some of the embodiments, the configuration module 53 can respond to the configuration instructions of the current task node and obtain the target business logic shard that matches the current task node according to the category of the business logic shard, including: pre-training the prediction model according to the category of the business logic shard, responding to the configuration instructions of the current task node, obtaining the key features of the current task node, inputting the key features of the current task node into the prediction model, and obtaining the target business logic shard that matches the current task node, wherein the training step of the prediction model includes: collecting the dependency relationship between each business logic shard and other business logic shards and the task nodes to which each business logic shard belongs, extracting the key features of the task nodes to which each business logic shard belongs, and constructing a first feature vector, constructing a second feature vector according to the category of each business logic shard and the dependency relationship with other business logic shards, and training the prediction model based on the first feature vector and the second feature vector.
[0175] 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, wherein the processor implements the steps of the business process orchestration method provided in any one of the embodiments of the present application in the first aspect when executing the computer program.
[0176] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 6 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes 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 operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a business process orchestration method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0177] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the business process orchestration method provided in any embodiment of the present application in the first aspect.
[0178] The computer readable storage medium may be Figure 6 A computer-readable storage medium in the computer device shown.
[0179] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing related hardware through a computer program, and the above-mentioned computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), 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.
[0180] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0181] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.< / logicfragment>
Claims
1. A business process orchestration method, characterized in that: The method comprises: Collect multiple business logic slices from historical business processes and classify the business logic slices; In response to a drag command of a current task node in a current business process, placing the current task node at a corresponding position; In response to the configuration instruction of the current task node, acquiring a target business logic slice matching the current task node according to the category of the business logic slice; The current task node is configured according to the target business logic slice to orchestrate the current business process.
2. The method according to claim 1, characterized in that The collecting of multiple business logic fragments from the historical business process includes: A plurality of business logic slices are collected from the historical business process according to the identification information of the pre-set business logic slices.
3. The method according to claim 1, characterized in that The method further comprises: Collect the microservices corresponding to each business logic shard; Receive a business request and call a target business process that matches the business request from the orchestrated business process; Obtain each business logic slice in the target business process and the microservices corresponding to each business logic slice; The microservices of each business logic slice execute the corresponding business logic slice to process the business request.
4. The method according to claim 1, characterized in that: The current task node includes a plurality of nodes, and the method further includes: During the execution of the current business process, the current task node assigns the processing result of the corresponding business logic slice to the process variable, and transfers the process variable to the business logic slice in the next current task node.
5. The method according to claim 1, characterized in that The method further comprises: Monitor the version information of each business logic slice in the current business process; When new version information exists, monitoring the execution status of the current business process; When the current business process is completed, the new version information replaces the old version information.
6. The method according to claim 1, characterized in that The method further comprises: The icon of the target business logic slice is placed at the designated position of the current task node.
7. The method according to claim 1, characterized in that The method further comprises: In response to the configuration instruction of the current task node, configure any one or more of the following items of the current task node: Business script configuration, business message configuration, business notification rule configuration, business permission configuration, and event trigger rule configuration.
8. The method according to claim 1, characterized in that The step of obtaining, in response to the configuration instruction of the current task node, a target business logic slice matching the current task node according to the category of the business logic slice comprises: Pre-training a prediction model according to the categories of the business logic shards; Responding to the configuration instruction of the current task node, acquiring key features of the current task node; Inputting the key features of the current task node into the prediction model to obtain a target business logic slice matching the current task node; The training steps of the prediction model include: Collect the dependencies between each business logic shard and other business logic shards and the task nodes to which each business logic shard belongs; Extract key features of task nodes belonging to each business logic shard and construct a first feature vector; Constructing a second feature vector according to the category of each business logic shard and the dependency relationship with other business logic shards; The prediction model is trained according to the first feature vector and the second feature vector.
9. A business process arrangement device, characterized in that: The device comprises: A collection module, used to collect multiple business logic slices from historical business processes and classify the business logic slices; An arrangement module, for responding to a drag instruction of a current task node in a current business process, placing the current task node at a corresponding position; A configuration module, configured to respond to a configuration instruction of the current task node and obtain a target business logic slice matching the current task node according to the category of the business logic slice; A processing module is used to configure the current task node according to the target business logic slice to orchestrate the current business process.
10. 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, the steps of the method according to any one of claims 1 to 8 are implemented.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
Citation Information
Cited By
Process branch matching method and system based on power value coding and bit operation judgment
CN121581597A