Determination method and device of orchestration data, storage medium and electronic device
By decoupling business logic into components and generating orchestration expressions, the problem of excessive coupling of business logic in service orchestration is solved, and the rapid development and deployment of complex business logic is realized, reducing system complexity and maintenance costs.
Patent Information
- Application Number
- CN202411544848.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-03-07
AI Technical Summary
In the prior art, business logic is overcoupled in the service orchestration method, resulting in increased system complexity and maintenance costs.
By decoupling the target services into multiple sub-service fragments and performing component processing on these sub-service fragments, multiple components for orchestration are generated. When determining the combination rules of the target business, orchestration expressions are generated based on these rules and components, and the call encoding and call interfaces are determined according to the preset expression configuration strategy, and the orchestration data of the target business is finally constructed.
By splitting, reusing and orchestrating independent business components, the rapid development and deployment of complex business logic is achieved, reducing system complexity and maintenance costs.
Smart Images

Figure CN119576442A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of smart home technology, and more specifically, to a method, device, storage medium and electronic device for determining arrangement data. Background Art
[0002] In modern cloud computing environments, service orchestration is an important technical means for coordinating and managing the interactions between different services. Service orchestration technology provides a flexible and scalable way to define and manage dependencies and interactions between services. By using service orchestration tools, developers can easily define the topology, configuration requirements, and service discovery rules of applications, and then convert these rules into executable deployment instructions. In this way, developers can focus on the logic development of applications without having to pay too much attention to the underlying infrastructure management. At present, traditional service orchestration is usually oriented towards executable processes, controlling the execution order of business logic through a fixed process, but there are problems such as too much control of business logic, high coupling, and bloated business.
[0003] In view of the problem in related technologies that business logic is over-coupled in service orchestration methods, which leads to increased system complexity and maintenance costs, no effective solution has been proposed yet. Summary of the invention
[0004] The embodiments of the present application provide a method, device, storage medium and electronic device for determining orchestration data, so as to at least solve the problem in the related art that the business logic in the service orchestration method is over-coupled, resulting in increased system complexity and maintenance costs.
[0005] According to an embodiment of the present application, a method for determining orchestration data is provided, including: decoupling a target business into multiple sub-business fragments, componentizing the multiple sub-business fragments, and obtaining multiple components for orchestration; when determining a combination rule corresponding to the target business, generating a first orchestration expression corresponding to the current target business according to the combination rule and the multiple components; determining a call code and a call interface corresponding to the first orchestration expression according to a preset expression configuration strategy; and summarizing the call code, the call interface, and the first orchestration expression to construct orchestration data for calling the target business.
[0006] In an exemplary embodiment, before componentizing the multiple sub-business fragments to obtain multiple components for orchestration, the method further includes: receiving basic data items created by the development object on a component configuration page corresponding to the orchestration system, wherein the basic data items are used to control the componentization properties of the sub-business fragments, and the basic data items include at least one of the following: component coding, component scripting language, component description; and controlling component creation of the multiple components based on the basic data items.
[0007] In an exemplary embodiment, after aggregating the call code, the call interface, and the first orchestration expression to construct orchestration data for calling the target business, the method further includes: synchronizing the orchestration data to a database for storage to obtain an orchestration database; and associating and binding the orchestration database with an orchestration system and a visualization interface corresponding to the orchestration system.
[0008] In an exemplary embodiment, after associating and binding the orchestration database with the orchestration system and the visual interface corresponding to the orchestration system, the method further includes: when the target object inputs an orchestration instruction through the visual editing interface, searching the orchestration database for a second orchestration expression that matches the orchestration instruction; and feeding back the second orchestration expression to the target object.
[0009] In an exemplary embodiment, after feeding back the second orchestration expression to the target object, the method further includes: when it is determined that the target object allows the rule engine to execute the second orchestration expression, performing a permission check on the target object, wherein the permission check is used to determine whether the target object has permission to call a component; when the permission check result indicates that the check is abnormal, sending an alarm message to the target object, wherein the alarm message is used to send information prohibiting the execution of the current second orchestration expression to the target object; when the permission check result indicates that the check is not abnormal, executing the second orchestration expression to obtain a service business for serving the target object.
[0010] In an exemplary embodiment, after aggregating the call code, the call interface, and the first orchestration expression to construct the orchestration data for calling the target business, the method further includes: when it is determined that there are multiple target businesses at the same time, performing data verification on the orchestration data corresponding to each of the multiple target businesses; and determining the final online status of each target business according to the data verification result.
[0011] In an exemplary embodiment, the final online status of each target business is determined based on the data verification result, including: when the data verification result is a failure, determining that the online status of the current target business is an invalid state; when the data verification result is a success, determining that the online status of the current target business is a valid state.
[0012] According to another aspect of an embodiment of the present application, a device for determining orchestration data is also provided, including: a processing module, used to decouple a target business into multiple sub-business fragments, and componentize the multiple sub-business fragments to obtain multiple components for orchestration; a generation module, used to generate a first orchestration expression corresponding to the current target business according to the combination rule and the multiple components when determining the combination rule corresponding to the target business; a determination module, used to determine a call code and a call interface corresponding to the first orchestration expression according to a preset expression configuration strategy; and a construction module, used to summarize the call code, the call interface, and the first orchestration expression to construct orchestration data for calling the target business.
[0013] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned method for determining the arrangement data when running.
[0014] According to another aspect of an embodiment of the present application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the method for determining the arrangement data through the computer program.
[0015] According to another aspect of the embodiments of the present application, a computer program product is provided, including a computer program, and the method for determining the above arrangement data when the computer program is executed by a processor.
[0016] In an embodiment of the present application, the target business is decoupled into multiple sub-business fragments, and the multiple sub-business fragments are componentized to obtain multiple components for orchestration; when the combination rule corresponding to the target business is determined, the first orchestration expression corresponding to the current target business is generated according to the combination rule and multiple components; the call code and the call interface corresponding to the first orchestration expression are determined according to the preset expression configuration strategy; the call code, the call interface, and the first orchestration expression are aggregated to construct the orchestration data for calling the target business. The above technical solution is adopted to solve the problem of excessive coupling of business logic in the service orchestration method, which leads to increased system complexity and maintenance costs. Furthermore, the rapid development and deployment of complex business logic can be achieved by splitting, reusing and orchestrating independent business components. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0018] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0019] Figure 1 It is a hardware environment diagram of a method for determining arrangement data according to an embodiment of the present application;
[0020] Figure 2 is a flowchart of a method for determining arrangement data according to an embodiment of the present application;
[0021] Figure 3 It is a schematic diagram of a component- and rule-based visual service orchestration system structure according to an embodiment of the present application;
[0022] Figure 4 It is a flowchart of a component- and rule-based visual service orchestration method according to an embodiment of the present application;
[0023] Figure 5 It is a structural block diagram of a device for determining arrangement data according to an embodiment of the present application. DETAILED DESCRIPTION
[0024] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this application.
[0025] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0026] According to one aspect of an embodiment of the present application, a method for determining orchestration data is provided. The method for determining orchestration data is widely used in smart factories, smart homes, smart homes, smart home device ecosystems, smart residential (Intelligence House) ecosystems and other whole-house intelligent digital control application scenarios. Optionally, in this embodiment, the above-mentioned method for determining orchestration data can be applied to Figure 1 In the hardware environment composed of the terminal device 102 and the server 104 shown in FIG. Figure 1 As shown, the server 104 is connected to the terminal device 102 via a network, and can be used to provide services (such as application services, etc.) for the terminal or a client installed on the terminal. A database can be set on the server or independently of the server to provide data storage services for the server 104. Cloud computing and / or edge computing services can be configured on the server or independently of the server to provide data computing services for the server 104.
[0027] The network may include but is not limited to at least one of the following: wired network, wireless network. The wired network may include but is not limited to at least one of the following: wide area network, metropolitan area network, local area network, and the wireless network may include but is not limited to at least one of the following: WIFI (Wireless Fidelity), Bluetooth. The terminal device 102 may be but is not limited to a smart factory handheld device, PC, mobile phone, tablet computer, smart air conditioner, smart range hood, smart refrigerator, smart oven, smart stove, smart washing machine, smart water heater, smart washing equipment, smart dishwasher, smart projection equipment, smart TV, smart clothes drying rack, smart curtain, smart audio and video, smart socket, smart audio, smart speaker, smart fresh air equipment, smart kitchen and bathroom equipment, smart bathroom equipment, smart sweeping robot, smart window cleaning robot, smart mopping robot, smart air purification equipment, smart steamer, smart microwave oven, smart kitchen treasure, smart purifier, smart water dispenser, smart door lock, etc.
[0028] In this embodiment, a method for determining arrangement data is provided, which is applied to the above terminal device. Figure 2 : is a flowchart of a method for determining arrangement data according to an embodiment of the present application, the process includes the following steps:
[0029] Step S202, decoupling the target business into multiple sub-business segments, and componentizing the multiple sub-business segments to obtain multiple components for orchestration;
[0030] Optionally, an e-commerce platform needs to implement three main businesses: order management, product management, and user management. First, decouple the three main business logics and split them into order sub-business, product sub-business, and user sub-business. Then further split each sub-business. For example, the order sub-business can be split into sub-business segments such as ordering, payment, and refund. The product sub-business can be split into sub-business segments such as adding products, editing products, and deleting products. The user sub-business can be split into sub-business segments such as registering users, logging in users, and modifying user information. Finally, M*N sub-business segments are obtained. In this way, each sub-business segment can be developed, tested, and maintained separately, which improves the flexibility and maintainability of the system. At the same time, if other businesses need to be added, they can be quickly implemented by combining existing sub-business segments, which improves the scalability of the system.
[0031] Step S204, when the combination rule corresponding to the target service is determined, generating a first arrangement expression corresponding to the current target service according to the combination rule and the multiple components;
[0032] Optionally, an e-commerce platform includes functions such as product management, order management, and user management. First, split these functions into multiple sub-business segments, such as product list, product details, order list, order details, user list, user details, etc. Then componentize each sub-business segment and encapsulate it into independent components, such as product component, order component, and user component. Finally, determine the associated combination rules based on the target business needs, such as product details need to be associated with product list and user components, order details need to be associated with order list and user components, etc. According to these rules, different components can be combined to implement different business functions.
[0033] Step S206, determining the call code and call interface corresponding to the first arrangement expression according to the preset expression configuration strategy;
[0034] Step S208: Summarize the calling code, the calling interface, and the first orchestration expression to construct orchestration data for calling the target service.
[0035] For example, logically decouple M target services to obtain M*N sub-service fragments; componentize the M*N sub-service fragments to obtain M*N components, and determine the associated M combination rules according to the code structure corresponding to the M target services; generate M orchestration expressions based on the M*N components and the M combination rules, set a rule identifier and call interface information on each of the M orchestration expressions, and obtain M business service orchestration results, where M and N are positive integers. Generate M orchestration expressions based on the M*N components and the M combination rules, set a rule identifier and call interface information on each of the M orchestration expressions, and obtain M business service orchestration results, where M and N are positive integers.
[0036] Optionally, M*N components and M combination rules are set, for example, the components include database access components, cache components, log components, etc., and the combination rules include serial execution, parallel execution, conditional execution, etc. Generate M orchestration expressions according to business needs, for example, the first orchestration expression is the serial execution of the database access component and the cache component, and the second orchestration expression is the parallel execution of the log component and the database access component. Set the rule identifier and call interface information on each orchestration expression, for example, the rule identifier of the first orchestration expression is "database access + cache", and the call interface information is the database access interface and the cache interface. According to the rule identifier and the call interface information, M business service orchestration results are obtained, for example, the first business service orchestration result is to execute database access first and then cache, and the second business service orchestration result is to execute log and database access at the same time. Through the above steps, different components and rules can be flexibly combined and adjusted to generate orchestration expressions that meet business needs and obtain the most suitable business service orchestration results. This method can improve the efficiency and performance of business services, and facilitate subsequent maintenance and debugging.
[0037] Through the above steps, the target business is decoupled into multiple sub-business fragments, and the multiple sub-business fragments are componentized to obtain multiple components for orchestration; when the combination rules corresponding to the target business are determined, the first orchestration expression corresponding to the current target business is generated according to the combination rules and multiple components; the call code and call interface corresponding to the first orchestration expression are determined according to the preset expression configuration strategy; the call code, call interface, and first orchestration expression are aggregated to construct the orchestration data for calling the target business. The above technical solution solves the problem of excessive coupling of business logic in the service orchestration method, which leads to increased system complexity and maintenance costs. Furthermore, the rapid development and deployment of complex business logic can be achieved by splitting, reusing and orchestrating independent business components.
[0038] In an exemplary embodiment, before componentizing the multiple sub-business fragments to obtain multiple components for orchestration, the method further includes: receiving basic data items created by the development object on a component configuration page corresponding to the orchestration system, wherein the basic data items are used to control the componentization properties of the sub-business fragments, and the basic data items include at least one of the following: component coding, component scripting language, component description; and controlling component creation of the multiple components based on the basic data items.
[0039] As an optional implementation, before componentizing the M*N sub-business fragments to obtain M*N components, the method further includes: receiving basic data items created by the development object on a component configuration page corresponding to the orchestration system, wherein the basic data items are used to control the componentization properties of the sub-business fragments, and the basic data items include at least one of the following: component coding, component scripting language, component description; and controlling component creation of the M*N components based on the basic data items.
[0040] Optionally, in the above embodiment, if the product list page of an e-commerce website is componentized, it includes a product list display component, a filtering and sorting component, a paging component, etc. The developer creates basic data items on the component configuration page corresponding to the orchestration system, such as the component code is "productList", the component script language is JavaScript, and the component description is "product list display component". Among them, the component code refers to the unique identifier or number of each component in the system, which is used to distinguish different components. It is usually a string or a number, which is used to reference the component in the code and perform operations. The uniqueness of the component code helps the system to manage and call components to avoid confusion and conflicts. According to the basic data items, the creation of M*N components is controlled, and the product list display component, the filtering and sorting component, the paging component, etc. are created respectively. Through the above steps, the componentization of the M*N sub-business fragments of the product list page is realized, and M*N components are obtained, which improves development efficiency, improves code quality, and reduces maintenance costs.
[0041] In an exemplary embodiment, after aggregating the call code, the call interface, and the first orchestration expression to construct orchestration data for calling the target business, the method further includes: synchronizing the orchestration data to a database for storage to obtain an orchestration database; and associating and binding the orchestration database with an orchestration system and a visualization interface corresponding to the orchestration system.
[0042] As an optional implementation, M orchestration expressions are generated based on M*N components and M combination rules, and a rule identifier and calling interface information are set on each of the M orchestration expressions to obtain M business service orchestration results. The method further includes: synchronizing the M business service orchestration results to a database for storage to obtain an orchestration database; and associating and binding the orchestration database with the orchestration system and a visualization interface corresponding to the orchestration system.
[0043] Optionally, an e-commerce platform includes multiple business services such as order management, inventory management, and user management. By synchronizing the results of these orchestration data to the database for storage, the system can easily obtain and process order data in real time. The orchestration database is associated and bound with the orchestration system and the corresponding visual interface of the orchestration system, so that developers can generate rule orchestration expressions through simple drag-and-drop operations without writing complex codes, which reduces the technical threshold for development.
[0044] In an exemplary embodiment, after associating and binding the orchestration database with the orchestration system and the visual interface corresponding to the orchestration system, the method further includes: when the target object inputs an orchestration instruction through the visual editing interface, searching the orchestration database for a second orchestration expression that matches the orchestration instruction; and feeding back the second orchestration expression to the target object.
[0045] Optionally, in the above embodiment, if the target object wants to add a picture carousel function to the web page. Through the visual editing interface, the target object can select the picture carousel component and drag it to the desired position. The system will search for matching rules in the arrangement database based on the existing combination rules. For example, the picture carousel component needs to be associated with a data source component containing pictures. According to the matching rules, the system generates a second arrangement expression, including specific code and configuration information. Finally, the system feeds back the generated second arrangement expression to the target object for confirmation and review. If the target object is satisfied, it can be directly applied to the web page. In this way, the target object can quickly realize complex arrangement requirements through simple drag and edit operations, and can intuitively see the final arrangement results.
[0046] In an exemplary embodiment, after feeding back the second orchestration expression to the target object, the method further includes: when it is determined that the target object allows the rule engine to execute the second orchestration expression, performing a permission check on the target object, wherein the permission check is used to determine whether the target object has permission to call a component; when the permission check result indicates that the check is abnormal, sending an alarm message to the target object, wherein the alarm message is used to send information prohibiting the execution of the current second orchestration expression to the target object; when the permission check result indicates that the check is not abnormal, executing the second orchestration expression to obtain a service business for serving the target object.
[0047] It is understandable that when the permission check result indicates that the verification is abnormal, by sending an alarm message to the target object, the target object can be notified in time that its permission is insufficient, and the current operation is prohibited, thereby avoiding possible risks and problems. The alarm message can remind the target object to pay attention to its own permission issues, enhance its awareness of system security, help standardize operating behavior, and reduce potential risks. When the permission check result indicates that the verification is not abnormal, when executing the second arrangement expression, only the target object that passes the permission check can execute the second arrangement expression, which can ensure the legality of the operation and improve the operating efficiency and stability of the system.
[0048] In an exemplary embodiment, after aggregating the call code, the call interface, and the first orchestration expression to construct the orchestration data for calling the target business, the method further includes: when it is determined that there are multiple target businesses at the same time, performing data verification on the orchestration data corresponding to each of the multiple target businesses; and determining the final online status of each target business according to the data verification result.
[0049] In an exemplary embodiment, the final online status of each target business is determined based on the data verification result, including: when the data verification result is a failure, determining that the online status of the current target business is an invalid state; when the data verification result is a success, determining that the online status of the current target business is a valid state.
[0050] Optionally, an e-commerce platform needs to orchestrate M business services, including order management, inventory management, payment management and other services. After the orchestration is completed, data verification is performed on each business service to determine its online status. Data verification is performed on the order management service, and it is found that the order information is incomplete. The verification result is failure, and the online status of the order management service is determined to be invalid. Data verification is performed on the inventory management service, and it is found that the inventory data is abnormal. The verification result is failure, and the online status of the inventory management service is determined to be invalid. Data verification is performed on the payment management service. The data is complete and accurate, and the verification result is success. The online status of the payment management service is determined to be valid. By verifying the data of each business service, problems can be discovered in a timely manner, ensuring system stability and reliability, and ensuring effective business service launch.
[0051] In order to better understand the process of the method for determining the above-mentioned arrangement data, the implementation method flow of determining the above-mentioned arrangement data is described below in combination with an optional embodiment, but it is not intended to limit the technical solution of the embodiment of the present application.
[0052] In related technologies, service orchestration is usually oriented towards executable processes, which coordinate internal and external service interactions through an executable process and control the overall goal, operations involved, and service call sequence through the process. However, there is a problem of too much control business logic and excessive coupling, which easily makes the entire business bloated.
[0053] In order to solve the above problems, an optional embodiment of the present application proposes a visual service orchestration method based on components and rules. Specifically, the logic of the business fragment is encapsulated in the form of script components to form reusable business components. These components can be put on the component market for other developers to use. Then, these components are connected in series through an executable rule, and the executable rules are loaded through the rule engine to control the calling logic of the component. Developers drag the corresponding rules and components through a visual drag-and-drop page to generate rule orchestration expressions, and execute the relevant component logic according to the orchestration expressions associated with the rules, thereby realizing the ability of service orchestration.
[0054] Optional, Figure 3 It is a schematic diagram of a component- and rule-based visual service orchestration system structure according to an embodiment of the present application. The system at least includes: a backend microservice 32, a rule engine 34, a service orchestration service 36, and an access party 38.
[0055] Optionally, backend microservice 32. When creating a script component, it relies on the interface capabilities of related microservices to provide basic interface services for the creation of the script component. When creating a script component, it usually relies on the interface capabilities of related microservices. For example, microservice A, microservice B, microservice C, microservice D, etc. Microservice A may provide interfaces related to user authentication to verify the user's identity information; microservice B may provide interfaces related to data storage to read and write data; microservice C may provide interfaces related to message push to send notifications to users; microservice D may provide interfaces related to payment functions to process user payment requests.
[0056] Optionally, when creating a script component, you can implement various functions by calling the interface capabilities provided by the above microservices. For example, you can verify the user's identity through the interface of microservice A, read the user's data through the interface of microservice B, send a notification to the user through the interface of microservice C, and finally process the user's payment request through the interface of microservice D. By relying on the interface capabilities of related microservices, script components can obtain basic interface services, thereby realizing richer and more complex functions.
[0057] Optionally, rule engine 34. The rule engine layer mainly has two functional modules, as follows:
[0058] (1) Configuration management of components. The rule engine layer is responsible for managing the configuration information of each component, including the component's properties, parameters, trigger conditions, etc. This configuration information will be stored in the MySQL data source so that it can be called and used during the rule execution process. Through configuration management, the behavior of components can be flexibly adjusted and modified to meet different business needs.
[0059] (2) Dynamic loading and execution of rules and components. The rule engine layer supports dynamic loading and execution of rules and components. This module includes three sub-modules: rule loader, component loader, and rule executor. The rule loader is responsible for loading rule information from the database and instantiating rule objects into executable rule objects. The component loader is responsible for loading various components in the system and instantiating components into executable component objects. The rule executor is responsible for executing rule logic and calling related components to perform operations such as calculations and data processing. These modules all support dynamic loading and execution, ensuring that the system can flexibly adjust the execution logic of rules and components as needed.
[0060] Optionally, service orchestration 36. The service orchestration layer includes multiple interfaces, and different interfaces can provide multiple rules such as serial, parallel, selection, conditional, and loop. Through the visual drag-and-drop interface, drag rules and components to generate the orchestration rule expression of the service. The specific rules are as follows:
[0061] (1) Serial rules: Serial rules specify the order in which services are executed, that is, one service must be executed before the next service can be executed. This rule is usually used in service scenarios that need to be executed in a fixed order to ensure that services are executed in a certain order.
[0062] (2) Parallel rules: Parallel rules allow multiple services to be executed simultaneously without waiting for the previous service to finish. This rule can be used to improve the execution efficiency of the overall service, especially for independent services or service scenarios that do not have special requirements for execution order.
[0063] (3) Selection rules: Selection rules allow different service paths to be selected based on conditions. This type of rule is usually used to execute different services based on different conditions to achieve personalized service scenarios.
[0064] (4) Conditional rules: Conditional rules specify the execution of specific services under specific conditions. This type of rule can determine whether to execute a service based on the prerequisites for service execution, thereby achieving more flexible service combination and management.
[0065] (5) Loop rule: Loop rules allow the same service or a group of services to be executed multiple times until a certain condition is met. This rule is usually used in service scenarios where a service or a group of services needs to be executed repeatedly until a certain condition is met.
[0066] Optionally, by dragging rules and components, users can create an orchestration rule as follows: THEN(a, b, c, d), where the services corresponding to interfaces a, b, c, d are services A, B, C, D respectively. The above orchestration rule means that service A interface a is executed first, and then service B interface b, C interface c, and D interface d are executed in sequence. In addition, users can also create another orchestration rule: THEN(a, WHEN(b, c), d). This means that service A interface a is executed first, then service B interface b and C interface c are executed in parallel, and finally service D interface d is executed. This visual service orchestration method can help users manage and control the execution order of various services more intuitively, improve work efficiency and reduce the possibility of errors. At the same time, users can also adjust and modify the orchestration rules at any time to meet different business needs.
[0067] Optionally, the access party 38. The access party can complete the relevant business capabilities by calling the interface capabilities formed by the orchestration rules. These interface capabilities can be called on the mobile terminal, PC terminal or third-party service platform to meet the needs of different business scenarios.
[0068] Optional, Figure 4This is a flow chart of a component- and rule-based visual service orchestration method according to an embodiment of the present application; the entire process is divided into three parts: component configuration management, service orchestration management, and orchestration service call process. The details are as follows:
[0069] Part 1: Component configuration management. The specific steps are as follows:
[0070] Step 1: The developer fills in the basic data items for creating a component (unique component code, component script language (Java / Js / Groovy / Lua), component description, etc.) through the component configuration management page.
[0071] Step 2: Submit the data items for creating the component to the backend configuration management service.
[0072] Step 3: Verify script component data to determine whether the component code is unique, whether the script is correct, whether the component-related service is online, etc.
[0073] Step 4: If the script is verified to be correct, the component is put into storage. At this point, the component is in the shelf state and is available in the component market. A prompt indicating that the component has been successfully created is returned.
[0074] Part 2: Service orchestration management. The specific steps are as follows:
[0075] Step 1: Developers use the visual drag-and-drop page to drag corresponding rules and components to generate rule orchestration expressions and submit configuration services.
[0076] Step 2: Check the rules to determine whether the rule ID is unique, whether the components associated with the rule exist, whether the orchestration expression is correct, etc.
[0077] Step 3: The rules and orchestration expressions are stored in the database and loaded into the memory. At this time, the rules are in the shelf state and the rule creation success mark is returned.
[0078] Step 4: Scan the rule base regularly and load the rules that have not been loaded in the rule base.
[0079] Part 3: Orchestrate the service call process. The specific steps are as follows:
[0080] Step 1: After the service orchestration is completed, the generated orchestration expression is already a complete business process. The caller calls the unified rule matching interface and passes in the relevant rule ID.
[0081] Step 2: Retrieve the rule through the rule ID and execute the relevant component logic according to the orchestration expression associated with the rule.
[0082] Step 3: After all component business logics are executed, the results are returned, processed and summarized, and returned to the caller.
[0083] It should be noted that when encapsulating business fragment logic, it is necessary to ensure high cohesion and low coupling of the code so that the components are easy to call and understand. At the same time, the configurability of the components should be considered to adapt to different business scenarios. When launching components to the market, detailed documentation and examples should be provided to ensure stability and security and avoid security vulnerabilities. When designing executable rules, the complexity of business logic and the order of execution should be considered. The rule engine needs to correctly parse expressions and dynamically call components. At the same time, the performance and scalability of the rule engine should be considered to support more complex rule logic. When developing a visual rule editing page, user experience and ease of use should be considered, and a real-time preview function should be provided to facilitate debugging and verification of rule logic.
[0084] In summary, this application can achieve high code reuse and modularization by splitting business logic into components, improving development efficiency and code quality. And it provides a variety of rules such as serial, parallel, selection, conditional, and loop, which can choreograph service scenarios for multiple scenarios. Specifically, users can realize a variety of complex service scenarios by combining different rules according to specific business needs, providing a more flexible way to design business logic. And there is no need to publish components to directly manage background creation and publishing, and load in real time, that is, users can directly create and publish components in the management background without additional publishing steps, and component updates and changes can take effect in real time, improving development and debugging efficiency. In addition, users can also quickly build a flowchart of service arrangement by dragging and dropping pages, intuitively showing the execution process of business logic, making the design of business logic more intuitive and flexible.
[0085] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.
[0086] Figure 5 is a structural block diagram of a device for determining arrangement data according to an embodiment of the present application; Figure 5 As shown, including:
[0087] A processing module 52, configured to decouple the target service into a plurality of sub-service segments, and componentize the plurality of sub-service segments to obtain a plurality of components for orchestration;
[0088] A generating module 54, configured to generate a first arrangement expression corresponding to the current target business according to the combination rule and the multiple components when the combination rule corresponding to the target business is determined;
[0089] A determination module 56, configured to determine a call code and a call interface corresponding to the first arrangement expression according to a preset expression configuration strategy;
[0090] The construction module 58 is used to summarize the calling code, the calling interface, and the first orchestration expression to construct orchestration data for calling the target service.
[0091] Through the above device, the target business is decoupled into multiple sub-business fragments, and the multiple sub-business fragments are componentized to obtain multiple components for orchestration; when the combination rule corresponding to the target business is determined, the first orchestration expression corresponding to the current target business is generated according to the combination rule and multiple components; the call code and the call interface corresponding to the first orchestration expression are determined according to the preset expression configuration strategy; the call code, the call interface, and the first orchestration expression are aggregated to construct the orchestration data for calling the target business. The above technical solution solves the problem of excessive coupling of business logic in the service orchestration method, which leads to increased system complexity and maintenance costs. Furthermore, the rapid development and deployment of complex business logic can be achieved by splitting, reusing and orchestrating independent business components.
[0092] In an exemplary embodiment, the above-mentioned device also includes: a receiving module, which is used to receive basic data items created by the development object in the component configuration page corresponding to the orchestration system, wherein the basic data items are used to control the componentization properties of the sub-business fragments, and the basic data items include at least one of the following: component coding, component scripting language, component description; and controlling the component creation of the multiple components based on the basic data items.
[0093] In an exemplary embodiment, the above-mentioned device also includes: a binding module, which is used to summarize the call code, the call interface, and the first orchestration expression to construct the orchestration data for calling the target business, and then synchronize the orchestration data to the database for storage to obtain an orchestration database; and associate and bind the orchestration database with the orchestration system and the visual interface corresponding to the orchestration system.
[0094] In an exemplary embodiment, the binding module further includes: a feedback unit, which is used to, after associating and binding the orchestration database with the orchestration system and the visual interface corresponding to the orchestration system, search the orchestration database for a second orchestration expression that matches the orchestration instruction when the target object inputs the orchestration instruction through the visual editing interface; and feed back the second orchestration expression to the target object.
[0095] In an exemplary embodiment, the feedback unit further includes: a verification subunit, which is used to, after feeding back the second orchestration expression to the target object, perform a permission check on the target object when it is determined that the target object allows the rule engine to execute the second orchestration expression, wherein the permission check is used to determine whether the target object has the permission to call the component; when the permission check result indicates that the check is abnormal, send an alarm message to the target object, wherein the alarm message is used to send information prohibiting the execution of the current second orchestration expression to the target object; when the permission check result indicates that the check is not abnormal, execute the second orchestration expression to obtain a service business for serving the target object.
[0096] In an exemplary embodiment, the above-mentioned device also includes: a status module, which is used to summarize the call code, the call interface, and the first orchestration expression to construct the orchestration data for calling the target business, and when it is determined that there are multiple target businesses at the same time, perform data verification on the orchestration data corresponding to each target business in the multiple target businesses; determine the final online status of each target business according to the data verification result.
[0097] In an exemplary embodiment, the above-mentioned status module is also used to determine that the online status of the current target business is an invalid state when the data verification result is a failure; and to determine that the online status of the current target business is a valid state when the data verification result is a success.
[0098] An embodiment of the present application further provides a storage medium, which includes a stored program, wherein the program executes any of the above methods when it is run.
[0099] Optionally, in this embodiment, the storage medium may be configured to store program codes for executing the following steps:
[0100] S1, decoupling the target business into multiple sub-business segments, and componentizing the multiple sub-business segments to obtain multiple components for orchestration;
[0101] S2, when determining the combination rule corresponding to the target service, generating a first arrangement expression corresponding to the current target service according to the combination rule and the multiple components;
[0102] S3, determining the calling code and calling interface corresponding to the first arrangement expression according to the preset expression configuration strategy;
[0103] S4, summarizing the calling code, the calling interface, and the first orchestration expression to construct orchestration data for calling the target service.
[0104] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0105] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0106] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0107] S1, decoupling the target business into multiple sub-business segments, and componentizing the multiple sub-business segments to obtain multiple components for orchestration;
[0108] S2, when determining the combination rule corresponding to the target service, generating a first arrangement expression corresponding to the current target service according to the combination rule and the multiple components;
[0109] S3, determining the calling code and calling interface corresponding to the first arrangement expression according to the preset expression configuration strategy;
[0110] S4, summarizing the calling code, the calling interface, and the first orchestration expression to construct orchestration data for calling the target service.
[0111] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store program codes.
[0112] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.
[0113] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0114] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for determining arrangement data, characterized in that: include: Decoupling the target business into multiple sub-business segments, and componentizing the multiple sub-business segments to obtain multiple components for orchestration; When the combination rule corresponding to the target service is determined, a first arrangement expression corresponding to the current target service is generated according to the combination rule and the multiple components; Determine the calling code and calling interface corresponding to the first arrangement expression according to the preset expression configuration strategy; The call code, the call interface, and the first orchestration expression are aggregated to construct orchestration data for calling the target service.
2. The method for determining arrangement data according to claim 1, characterized in that: Before componentizing the multiple sub-business segments to obtain multiple components for arrangement, the method further includes: Receiving basic data items created by the development object on a component configuration page corresponding to the orchestration system, wherein the basic data items are used to control component attributes of the sub-business fragment, and the basic data items include at least one of the following: component code, component script language, and component description; Component creation of the plurality of components is controlled based on the basic data items.
3. The method for determining arrangement data according to claim 1, characterized in that: After the call code, the call interface, and the first orchestration expression are aggregated to construct orchestration data for calling the target service, the method further includes: Synchronizing the arrangement data to a database for storage to obtain an arrangement database; The orchestration database is associated and bound with an orchestration system and a visualization interface corresponding to the orchestration system.
4. The method for determining arrangement data according to claim 3, characterized in that: After associating and binding the orchestration database with the orchestration system and the visual interface corresponding to the orchestration system, the method further includes: When the target object inputs an arrangement instruction through the visual editing interface, searching the arrangement database for a second arrangement expression matching the arrangement instruction; Feedback the second arranged expression to the target object.
5. The method for determining arrangement data according to claim 4, characterized in that: After feeding back the second arrangement expression to the target object, the method further includes: In the case where it is determined that the target object allows the rule engine to execute the second orchestration expression, performing a permission check on the target object, wherein the permission check is used to determine whether the target object has permission to call a component; When the permission check result indicates that the check is abnormal, an alarm message is sent to the target object, wherein the alarm message is used to send information prohibiting the execution of the current second orchestration expression to the target object; when the permission check result indicates that the check is not abnormal, the second orchestration expression is executed to obtain a service business for serving the target object.
6. The method for determining arrangement data according to claim 1, characterized in that: After the call code, the call interface, and the first orchestration expression are aggregated to construct orchestration data for calling the target service, the method further includes: When it is determined that there are multiple target services at the same time, performing data verification on the arrangement data corresponding to each of the multiple target services; The final online status of each target service is determined according to the data verification result.
7. The method for determining arrangement data according to claim 6, characterized in that: Determine the final online status of each target service based on the data verification result, including: If the data verification result is a failure, determining that the online status of the current target service is an invalid status; When the data verification result is successful, it is determined that the online status of the current target service is a valid status.
8. A device for determining arrangement data, characterized in that: include: A processing module, used for decoupling the target business into multiple sub-business segments, and performing component processing on the multiple sub-business segments to obtain multiple components for orchestration; A generating module, configured to generate a first arrangement expression corresponding to the current target business according to the combination rule and the multiple components when the combination rule corresponding to the target business is determined; A determination module, configured to determine a call code and a call interface corresponding to the first arrangement expression according to a preset expression configuration strategy; A construction module is used to summarize the call code, the call interface, and the first orchestration expression to construct orchestration data for calling the target business.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the method described in any one of claims 1 to 7 when executed.
10. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 7 through the computer program.
Citation Information
Patent Citations
Business process arrangement method, device and equipment and readable storage medium
CN116954754A