Service orchestration system and optimization method based on rule engine
Through a service orchestration system based on rules engine, using feature vector modeling and reinforcement learning to optimize path search, combined with circuit breaker model, the problems of high technical threshold, insufficient dynamic adjustment and lack of fault tolerance strategies in the existing technology are solved, and efficient and reliable service orchestration and fault tolerance capabilities are achieved.
Patent Information
- Application Number
- CN202510846679.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-24
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2045-06-24
AI Technical Summary
The existing service orchestration technology has the problems of high technical threshold, lack of dynamic adjustment mechanisms, insufficient fault tolerance strategies, and difficult to cope with sudden business scenarios and reduced efficiency in high concurrency scenarios.
The service orchestration system based on the rules engine is adopted, and path search is optimized through feature vector modeling and reinforcement learning, combined with the circuit breaker model to achieve fault tolerance, support dual-channel input of natural language and flowcharts, and dynamically balance service quality and resource consumption.
It significantly improves the system's intelligent decision-making capabilities, ensures service continuity, lowers the system design threshold, and improves efficiency and availability in complex business scenarios.
Smart Images

Figure CN120353453A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of digital services, and in particular to a service orchestration system and optimization method based on a rule engine. Background Art
[0002] Service orchestration is a technology that dynamically combines multiple independent services into a complete process according to business logic. By means of a visual rule engine, it coordinates the execution order and dependency relationships of services to achieve the flexible construction and automated operation of complex business scenarios. It allows non-technical personnel to design processes in a drag-and-drop manner, combines real-time data perception and intelligent scheduling strategies, automatically optimizes the execution path, and dynamically tolerates faults and iterates in a gray manner during operation. Ultimately, the scattered services cooperate like a symphony, being able to quickly respond to business changes while ensuring high availability and execution efficiency.
[0003] In the prior art, Chinese patent document CN113535419A discloses a service orchestration method and device. According to the interface name and service input parameters in the call request, preset service configuration information is obtained; wherein, the service configuration information includes service mapping information, service call information, and service interface execution order; according to the script address in the service mapping information, the corresponding service processing script is obtained, and according to the service interface execution order, the service interfaces in the service call information are grouped, and the service interfaces belonging to the same group are used as task nodes to generate a task queue; according to the service interface execution order of the service interfaces in the task nodes, the task nodes are pulled from the task queue, the service interfaces of the task nodes are executed to obtain a return result; the return result is processed using the service processing script, and the return result is returned. This patent document solves the technical problem that the traditional service call chain needs to modify the code to adapt to business changes, resulting in high development costs and long iteration cycles. The disadvantages are as follows: The writing, compilation, and maintenance of the proposed solution increase the technical threshold and system complexity, and there is a lack of fault tolerance mechanisms such as circuit breaker downgrading, and the standby link switching logic is not perfect when a service fails.
[0004] Chinese Patent Document CN117251141A discloses a service orchestration and service regeneration method, platform and device. It creates a table structure based on a service database, and uses a preset custom template engine to directly reference a predefined computer language based on a template language to create business logic for the table structure. After defining services through the framework custom template, the services are registered to a preset service management platform and service information and service interface information are configured to form a business tree according to business identification and classification. The service interfaces are called through a preset process management engine to achieve the creation and regeneration of service orchestration. Complex business validations and business dependencies are formed into call chain relationships through orchestration to achieve long-term reuse and more flexible orchestration at the same time. This patent document solves the problems of high development costs, poor business logic reusability, and rigid service management. The disadvantages are as follows: The proposed solution relies on preset templates and static business trees, lacks a dynamic adjustment mechanism, is difficult to cope with sudden business scenarios, and does not mention a fault tolerance strategy.
[0005] Chinese Patent Document CN117251141A discloses an intelligent orchestration technology for data sharing services, including: subdividing the data exchange business logic, abstracting each step into an independent and reusable component; performing combination and connection on the components to further form a higher-level abstract entity, namely a service; through the abstract combination of components and services, intelligent matching of databases from different manufacturers is performed to automatically generate corresponding data exchange services. Through the abstraction of components and services, the present invention effectively encapsulates the program carrier and business logic, stripping a large number of underlying implementation details, so that development and implementation personnel can focus more on the business itself, greatly simplifying the cost of writing and implementing data sharing services. This patent document solves the problem of poor cross-system compatibility. However, the proposed solution lacks a dynamic load balancing mechanism, and the parallelization efficiency may decrease in high-concurrency scenarios, and it does not mention a fault tolerance mechanism. Summary of the Invention
[0006] To solve the existing technical problems, the main object of the present invention is to provide a service orchestration system and optimization method based on a rule engine. By introducing feature vectors, the present invention performs refined modeling on service attributes, can comprehensively quantify the performance, resource consumption and their dependencies of services, and provides a scientific basis for the precise decomposition of services. With the optimal path search mechanism of reinforcement learning, the system can autonomously optimize the scheduling path during continuous exploration, dynamically balance service quality, resource consumption and risk control, and significantly improve the intelligent decision-making ability of the system. By establishing a fuse model, the fault tolerance module can quickly respond and take corresponding strategies in the face of instantaneous and persistent failures to ensure the continuity of services. It supports dual-channel input of natural language description and flowchart sketch, reducing the threshold of system design.
[0007] To overcome the problems existing in the prior art, the technical solution adopted by the present invention is: a service orchestration system based on a rule engine, including the following modules, Rule parsing module: including an atomic-level parsing unit, a combined-level parsing unit, a rule prediction unit, and a multi-modal rule input unit; The atomic-level parsing unit is used to disassemble the service and parse the service into atomic services with functional characteristics; The combined-level parsing unit is used to record the adjacent occurrence times of service pairs, judge the service relevance, and when there are consecutive high-frequency adjacent pairs, merge them into combined services; The rule prediction unit is used to detect whether there are conflicts in the combined services generated by the combined-level parsing unit; The multi-modal rule input unit is used to receive natural language input and sketch input, and perform preprocessing to obtain a cross-domain perception matrix; Service registration center module: including a service DNA fingerprint unit and a self-healing service unit; The service DNA fingerprint unit is used to generate a unique hash fingerprint for each atomic service and combined service; Self-healing service unit: used to automatically mark and remove from the available pool when the instance failure rate of a certain atomic service or combined service is greater than the threshold; Orchestration engine module: used to obtain the cross-domain perception matrix and adaptively adjust the optimization strategy through a reward function; Execution engine module: used to select multiple best service links according to the results generated by the orchestration engine module to form a multi-link parallel racing execution technical solution; Monitoring feedback module: used to execute feedback strategies on the rule parsing module, the service center registration module, and the orchestration engine module; Fault tolerance module: used to receive the real-time push status of the execution engine module, and quickly respond and take corresponding strategies when the execution engine module faces instantaneous and persistent failures.
[0008] A service orchestration optimization method based on a rule engine adopts the above-mentioned service orchestration system based on a rule engine, and the optimization method includes the following steps: S1. Perform atomic-level parsing and combined-level parsing on the service to obtain atomic services and combined services, and detect potential conflicts in the combined services; S2. Receive natural language input and sketch input and process them to obtain a cross-domain perception matrix; S3. Generate a unique hash fingerprint for each atomic service and combined service; S4. Obtain the cross-domain perception matrix, perform optimal path search based on reinforcement learning, and autonomously design a reward function according to the business; S5. Parallel testing, initiate multiple different service links simultaneously, and take the result of the first successful one; S6. Monitor and provide feedback on each step; S7. Receive the real-time push status from the execution engine module, and when the execution engine module faces instantaneous and persistent failures, respond quickly and adopt corresponding strategies.
[0009] In S1, the service is disassembled by the atomic-level parsing unit into atomic services with the following functional characteristics: functional singularity, resource independence, idempotency guarantee, and spatio-temporal determinacy; The atomic-level parsing of the service includes the following steps: Perform feature modeling on the service, and use feature vectors to describe service attributes. The formula is: ; In the formula, represents the feature vector of the service, represents the CPU consumption per unit call, represents the memory occupancy, represents the latency reference value, represents the number of explicitly dependent services, represents the cascading failure coefficient; 2) Construct the Hamiltonian to define the optimal segmentation. The formula is: ; In the formula, represents the Hamiltonian, represents the coupling degree between services, represents the service atomization tendency parameter, , represents the splitting decision variable, 0 means retaining atomicity, and 1 means splitting is required; is a preset weight coefficient; The coupling degree between services is determined by the feature vector difference. The formula is: ; In the formula, represents the natural logarithm base, represents the attenuation coefficient, represents the th vector and the th vector of the feature vector difference, represents the call timing angle.
[0010] The service atomization tendency parameter is determined by the resource consumption characteristics. The formula is: ; In the formula, represents the weight coefficient of CPU consumption by unit calls , represents the weight coefficient of memory occupancy , represents the weight coefficient of the latency reference value .
[0011] Segmentation using the quantum annealing algorithm includes the following steps: Convert the Hamiltonian parameters into the physical configuration of the quantum processor, map each service to a physical qubit, set the couplers between qubits according to the Hamiltonian, and apply a local magnetic field to each qubit; Set the time evolution path of the quantum annealing to increase the probability of the optimal solution; Execute the quantum annealing, initialize the quantum state, and initialize all qubits to the superposition state; Screen and optimize the output results of the quantum annealing, repair the broken solutions caused by insufficient chain strength, and arrange the candidate solutions in ascending order of the Hamiltonian energy; Determine the final service splitting scheme and verify its reliability, and select the candidate solution with the lowest energy and meeting the constraints.
[0012] In S1, the combined-level analysis of services includes the following steps: Construct a service co-occurrence matrix to record the adjacent occurrence times of service pairs; Construct an adaptive dynamic threshold based on the mean and variance. If the adjacent occurrence times are greater than the adaptive dynamic threshold, it is determined as a significant association; Among them, when there are consecutive high-frequency adjacent pairs, they are combined into a combination, and partially overlapping sequences are combined.
[0013] In S1, the potential conflicts in combined services include: Resource deadlock, judged by using the length of the circular wait chain; Data race, writing and then reading or reading and then writing the same data item; Permission overstep, the first service calls the second service without permission; Temporal paradox, the event order violates the causality law; Resource overload, the cumulative resource demand is greater than the node capacity; Business logic conflict, mutually exclusive rules take effect simultaneously.
[0014] In S2, receive natural language input and sketch input and process them to obtain a cross-domain perception matrix, including the following steps: Process the natural language input, including text cleaning and normalization, word segmentation and part-of-speech tagging, domain entity recognition, dependency parsing, semantic role labeling, logical predicate extraction, and intermediate representation generation; Process the sketch input, including image preprocessing, graphic element detection, text recognition, topological relationship reconstruction, semantic enhancement and conflict resolution, and intermediate representation generation; Integrate the processing results of the natural language input and the sketch input to obtain a cross-domain perception matrix.
[0015] In S4, the optimal path search based on the reinforcement learning algorithm includes constructing the state space, action space, establishing functions and network structures; By obtaining the cross-domain perception matrix and processing it to obtain the state space, the formula is: ; In the formula, represents the state space, represents flattening the three-dimensional matrix into a vector, represents vector concatenation, represents the LSTM historical state encoding; The action space uses the adjustment of discrete actions and continuous parameters to implement three types of operations: node addition and deletion, path weight adjustment, and fault switching.
[0016] The calculation formula of the total reward function is: ; In the formula, represents the total reward function, represents the basic reward function, represents the domain reward function; The formula of the basic reward function is: ; In the formula, represents the weight coefficient of the service level compliance rate of represents the weight coefficient of the resource cost, represents the risk event count of The formula of the domain reward function is: ; In the formula, represents the domain reinforcement coefficient, represents the number of industry pain point functions, represents the th industry pain point function of The network structure of the reinforcement learning algorithm adopts the Actor-Critic framework.
[0017] In S6, the monitoring feedback module feeds back data to the rule parsing module as a heat map of the rule execution path, and pre-compiles high-frequency rules into machine code; Dynamically adjust the service routing weight according to the data fed back by the service center registration module; Optimize the personalized service link according to the feedback from the orchestration engine module; By establishing monitoring metrics, threshold ranges, and feedback strategies, the system operation status is monitored in real time and dynamically optimized.
[0018] In S7, the fault tolerance module receives the real-time push status of the execution engine module. For instantaneous faults, a fast recovery strategy is adopted through short-term memory fusing. For persistent faults, the service is marked as "long-term untrusted" through long-term memory degradation and resolved by manual intervention. The specific steps are as follows: Obtain the real-time status matrix pushed by the execution engine module, as follows: ; In the formula, represents the real-time status matrix, represents the th service within the time window for the th metric value, including success rate, latency, and error rate; Calculate the weighted failure rate for each service. The formula is: ; In the formula, represents the weighted failure rate of the th service, represents the time decay weight, represents the time window, represents the indicator function, taking 1 when there is a failure, otherwise 0, represents the status of the th service at the th moment; Based on the service latency and the average latency within the window, establish the th service's abnormal volatility , and construct a health assessment index based on the abnormal volatility and the weighted failure rate. The formula is: ; In the formula, represents the health assessment index of the th service, represents the weighted failure rate 's weight coefficient, represents the weight coefficient of the abnormal volatility, represents the weight coefficient of the resource health; Judge the service status according to the health assessment index. If it is less than the health threshold, perform instantaneous fusing, call the backup link, and select the call according to its running speed. Construct a decaying abnormal integral to judge whether there is a long-term fault. The formula is: ; Among them, represents the abnormal integral of the th service at time , represents the total number of historical abnormal events, represents the time decay coefficient, represents the time difference of abnormal events, represents the time when the rd abnormal event occurs, represents the th service's health assessment index at the th abnormal event; When the decaying abnormal integral exceeds the threshold, mark it as "long-term untrustworthy" and enter the manual intervention process.
[0019] Compared with the prior art, the present invention has the following beneficial effects: 1. By introducing feature vectors to perform refined modeling on service attributes, the present invention can comprehensively quantify the performance, resource consumption and their dependencies of services, providing a scientific basis for the accurate decomposition of services. With the help of the Hamiltonian optimization model, the service coupling degree and the atomicization tendency parameter are fully considered, and a more reasonable service cutting scheme is realized. Utilizing the global search ability of the quantum annealing algorithm, it can effectively avoid the problem that traditional algorithms are prone to fall into local optima, ensuring that the division result is closer to the optimal solution; in addition, combined with the fracture solution repair mechanism and the energy ascending screening strategy, the stability and accuracy of the analysis are further improved.
[0020] 2. With the help of the optimal path search mechanism of reinforcement learning, the system can autonomously optimize the scheduling path during continuous exploration, dynamically balance service quality, resource consumption and risk control, significantly improving the intelligent decision-making ability of the system; at the same time, by introducing the domain reward function and the industry pain point function, it can adaptively adjust the optimization strategy according to the key indicators of different industries to meet personalized business needs.
[0021] 3. By establishing a fusing model, the fault-tolerant module can quickly respond and adopt corresponding strategies in the face of instantaneous and persistent faults, ensuring service continuity. The short-term memory fusing mechanism uses weighted failure rate and health assessment metrics to achieve rapid fusing and switch to the backup link, effectively reducing the impact of instantaneous faults on the system and improving the real-time response ability of the service. The long-term memory degradation mechanism accurately identifies persistent fault services and triggers manual intervention through the decay-type anomaly integration method, further avoiding the long-term damage of abnormal services to the overall system performance.
[0022] 4. The present invention supports dual-channel input of natural language description and flowchart sketches. Through deep parsing techniques such as dependency syntactic analysis and semantic role annotation, it transforms business requirements into structured rules, significantly reducing the threshold for non-technical personnel to participate in system design. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required for the description of the specific embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0024] Figure 1 It is a structural block diagram of a service orchestration system provided by the present application based on a rule engine.
[0025] Figure 2 It is a flowchart of the fault-tolerant module.
[0026] Figure 3 It is a flowchart of an optimization method for service orchestration based on a rule engine according to the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0027] To make the above objects, features, and advantages of the present invention more obvious and understandable, the following will provide a detailed description of the specific embodiments of the present invention in conjunction with the drawings of the specification.
[0028] In the following description, many specific details are set forth to fully understand the present invention. However, the present invention can also be implemented in other ways different from the description herein. Those skilled in the art can make similar generalizations without departing from the connotation of the present invention. Therefore, the present invention is not limited by the specific embodiments disclosed below.
[0029] Example 1: Refer to Figure 1, the present invention provides a service orchestration system based on a rule engine, which includes a rule parsing module, a service registry module, an orchestration engine module, an execution engine module, a monitoring and feedback module, and a fault tolerance module. Next, the functions and compositions of each module will be introduced in detail.
[0030] Rule parsing module: It includes a parsing unit, a rule prediction unit, and a multi-modal rule input unit. Among them, the parsing unit includes an atomic-level parsing unit and a combined-level parsing unit; Furthermore, the atomic-level parsing unit disassembles the service and parses the service into atomic services with the following characteristics: functional singularity, that is, each atomic service only completes one business action; resource independence, that is, it can be independently deployed in a container without sharing memory / storage; idempotency guarantee, that is, the results of any repeated execution are consistent; and spatio-temporal determinacy, that is, the execution time consumption fluctuation range ≤ 5%.
[0031] Next, how to parse and split the service will be introduced; 1) Perform feature modeling on the service, and use a 128-dimensional feature vector to describe the service attributes. The formula is: ; In the formula, represents the feature vector of the service, represents the CPU consumption per unit call, represents the memory occupancy, represents the latency reference value, represents the number of explicitly dependent services, represents the cascading failure coefficient; 2) Construct a Hamiltonian to define the optimal split. The formula is: ; In the formula, represents the Hamiltonian, represents the coupling degree between services, represents the service atomization tendency parameter, , represents the splitting decision variable, 0 means retaining atomicity, and 1 means splitting is required; is a preset weight coefficient; Among them, the coupling degree between services is determined by the difference in feature vectors. The formula is: ; In the formula, represents the natural logarithm base, represents the attenuation coefficient, represents the th vector and the th vector The difference in eigenvectors represents the included angle of call timings, calculated through the historical call chain.
[0032] Service atomization tendency parameter Determined by the resource consumption characteristics, the formula is:[[]] ; In the formula, represents the CPU consumption per unit call weight coefficient of represents the memory occupancy weight coefficient of represents the latency reference value weight coefficient of.
[0033] Furthermore, the quantum annealing algorithm is used for segmentation. The specific steps include: 1) Convert the Hamiltonian parameters into the physical configuration of the quantum processor. Each service is mapped to a physical qubit, and the couplers between qubits are set according to the Hamiltonian, and a local magnetic field is applied to each qubit; 2) Set the time evolution path of quantum annealing to increase the probability of the optimal solution; 3) Execute quantum annealing. Initialize the quantum state, and all qubits are initialized to the superposition state; in the quantum tunneling stage, it lasts for 5 μs when s(t) = 0.4, allowing quantum tunneling to break through the local optimum; in the classical annealing stage, when s(t) > 0.4, the system gradually transitions to the classical Ising model; 4) Screen and optimize the output results of quantum annealing, repair the broken solutions caused by insufficient chain strength. Example: The result of a certain service chain in 3 measurements is [1, 1, 0], which is corrected to 1; arrange the candidate solutions in ascending order of the Hamiltonian energy; 5) Determine the final service cutting scheme and verify its reliability, and select the candidate solution with the lowest energy and meeting the constraints.
[0034] By introducing eigenvectors to refine the modeling of service attributes, it is possible to comprehensively quantify the performance, resource consumption and their dependencies of services, providing a scientific basis for the precise decomposition of services; with the help of the Hamiltonian optimization model, the service coupling degree and atomization tendency parameters are fully considered, and a more reasonable service cutting scheme is realized.
[0035] Utilizing the global search ability of the quantum annealing algorithm can effectively avoid the problem that traditional algorithms are prone to falling into local optima, ensuring that the partitioning result is closer to the optimal solution.
[0036] In addition, combining the broken solution repair mechanism and the energy ascending screening strategy further improves the stability and accuracy of the solution.
[0037] Next, the composite-level parsing unit will be introduced. First, a service co-occurrence matrix is constructed to record the adjacent occurrence times of service pairs. The following Table 1 is an example matrix, where the rows represent the starting services, the columns represent the subsequent services, and the values in the cells represent the number of calls from the starting service to the subsequent service. The diagonal is 0, indicating that self-calls are not recorded. For example, the service FW3 appears 879 times after the service FW2.
[0038] Then, an adaptive dynamic threshold is constructed based on the mean and variance. If the adjacent occurrence times are greater than the adaptive dynamic threshold, it is determined as a significant association.
[0039] Furthermore, when there are consecutive high-frequency adjacent pairs, they are merged into a composite. Allowing the merging of partially overlapping sequences. For example, if composite 1 is A - B - C and composite 2 is B - C - D, they can be merged into a new composite A - B - C - D.
[0040] Table 1. Example of Service Co-occurrence Matrix
[0041] By constructing the service co-occurrence matrix, the temporal correlation between services can be quantified. Introducing an adaptive dynamic threshold based on the mean and variance effectively improves the recognition accuracy of significant association relationships, ensuring that the judgment criteria can be dynamically adjusted under different scenarios and traffic fluctuations, and enhancing the generalization of the method.
[0042] Adopting the merging strategy of consecutive high-frequency adjacent pairs and allowing the integration of partially overlapping sequences fully preserves the inherent call logic of services and avoids the problem of overly small service granularity caused by excessive decomposition.
[0043] The rule prediction unit is used to detect whether there are conflicts in the composite services generated by the composite-level parsing unit, covering six core conflict scenarios.
[0044] Including: resource deadlock, judged by the length of the circular wait chain; Data race, writing and then reading or reading and then writing the same data item; Permission overstep, the service FW1 calls the service FW2 without permission; Temporal paradox, the event order violates the causality law; Resource overload, the cumulative resource demand is greater than the node capacity; Business logic conflict, mutually exclusive rules take effect simultaneously.
[0045] Through the six core conflict scenarios, potential risks in composite services can be comprehensively identified, avoiding system instability or function failure caused by abnormal composites, which helps to optimize service orchestration and improve the stability, security, and operation efficiency of the system.
[0046] The multi-modal rule input unit is used to receive natural language input and sketch input, and perform preprocessing to obtain a cross-domain perception matrix. The specific method is as follows: First, process the natural language input, including text cleaning and standardization, word segmentation and part-of-speech tagging, domain entity recognition, dependency parsing, semantic role labeling, logical predicate extraction, and intermediate representation generation.
[0047] Among them, text cleaning and standardization is the first step in natural language processing, aiming to convert the original text into a unified and clean format. Word segmentation and part-of-speech tagging split continuous text into meaningful word units; Chinese word segmentation is particularly important. For example, "natural language processing" is segmented into "natural language / processing"; Domain entity recognition refers to identifying entities in a specific domain in the text, such as disease names in the medical field and stock codes in the financial field. Different from general named entity recognition (NER), it focuses on domain-specific vocabulary; Dependency parsing refers to analyzing the grammatical dependency relationships between words in a sentence, constructing a syntactic tree, and revealing structures such as subject-predicate and verb-object; Semantic role labeling refers to determining the semantic roles of each component in a sentence, such as the agent (who does it), the patient (what is done), time, place, etc.; Logical predicate extraction refers to converting a sentence into a logical expression, extracting the predicate (action / state) and its arguments to form a computable logical form. Intermediate representation generation refers to integrating all analysis results to generate a structured intermediate representation (such as JSON, logical expression, knowledge graph triple) for subsequent use by the rule engine or business system.
[0048] Then, process the sketch input, including image preprocessing, graphic element detection, text recognition, topological relationship reconstruction, semantic enhancement and conflict resolution, and intermediate representation generation.
[0049] Among them, image preprocessing includes grayscale conversion, denoising, binarization, and morphological optimization to eliminate sketch noise and enhance key features, providing a clear input for subsequent analysis; Graphic element detection is used to identify basic graphic elements (nodes, arrows) and their geometric attributes; Text recognition is used to identify the text inside graphic elements; Topological relationship reconstruction is used to establish the logical connection relationships between graphic elements; Semantic enhancement and conflict resolution include node type inference, conditional expression parsing, and conflict detection; Intermediate representation generation is used to generate an SVG vector diagram for manual secondary confirmation and can record the semantic differences of each modification.
[0050] By processing the input sketches, it can handle line breaks in hand-drawn sketches (automatically connect within 10 pixels), mild overlaps (no misjudgment when the element spacing > 5 pixels), quickly adapt to the graphic semantic rules of different industries such as finance, healthcare, and e-commerce, and complete the end-to-end processing from sketch scanning to intermediate representation generation within 1 second.
[0051] Integrate the processing results of natural language input and sketch input to obtain a cross-domain perception matrix.
[0052] Through integrating the processing results of natural language input and sketch input into a cross-domain perception matrix, the present invention realizes the deep fusion of multi-modal data, breaks through the limitations of a single data type, and significantly improves the comprehensiveness and accuracy of rule parsing.
[0053] The service registration center module includes a service DNA fingerprint unit and a self-healing service unit.
[0054] Among them, the service DNA fingerprint unit generates a unique hash fingerprint for each atomic service and composite service, including interface signatures, performance baselines, dependency library versions, etc., to ensure version consistency; The self-healing service unit includes that when the instance failure rate of a certain atomic service or composite service > 5%, it is automatically marked as "to be repaired" and removed from the available pool.
[0055] The orchestration engine module is used to build a "business-technology-environment" trinity perception network, including: obtaining the cross-domain perception matrix, optimal path search based on reinforcement learning, and autonomously designing a reward function according to the business to achieve a domain adaptation strategy for industry pain points.
[0056] Among them, the optimal path search based on the reinforcement learning algorithm includes constructing a state space, an action space, establishing functions and network structures; first, obtain the cross-domain perception matrix constructed above, and obtain the state space through processing. The formula is: ; Among them, represents the state space, represents flattening the three-dimensional matrix into a vector, represents vector concatenation, represents the LSTM historical state encoding.
[0057] The action space uses the adjustment of discrete actions and continuous parameters to implement three types of operations: node addition and deletion, path weight adjustment, and fault switching.
[0058] The reward function includes a total reward function, a basic reward function, and a domain reward function.
[0059] The calculation formula of the total reward function is: ; In the formula, represents the total reward function, represents the basic reward function, represents the domain reward function.
[0060] The formula for the basic reward function is: ; In the formula, represents the weight coefficient of the service level compliance rate of represents the weight coefficient of the resource cost, represents the risk event count of
[0061] The formula for the domain reward function is: ; In the formula, represents the domain reinforcement coefficient, represents the number of industry pain point functions, represents the th industry pain point function
[0062] Table 2. Example of industry pain point mapping
[0063] In this embodiment, the network structure of the reinforcement learning algorithm adopts the Actor-Critic framework.
[0064] With the optimal path search mechanism of reinforcement learning, the system can autonomously optimize the scheduling path during continuous exploration, dynamically balance service quality, resource consumption, and risk control, and significantly improve the intelligent decision-making ability of the system.
[0065] At the same time, by introducing industry pain point functions using the domain reward function, it is possible to adaptively adjust the optimization strategy according to the key indicators of different industries and meet personalized business needs.
[0066] The execution engine module is used for parallel testing. It simultaneously initiates 3 different service links, namely the main link + standby link 1 + standby link 2, and takes the result of the first successful one.
[0067] Furthermore, after the orchestration engine module generates the service links, the execution engine module selects three best service links according to the generation result to form a three-link parallel racing execution technical solution, ensuring that the three links are strictly parallel, without queue waiting delay, and automatically degrading to the dual-link mode when the rejection strategy is triggered.
[0068] The monitoring feedback module is used for the precise feedback strategy for modules. For the rule parsing module, the feedback data is the heat map of the rule execution path, and the high-frequency rules are pre-compiled into machine code; for the service center registration module, the feedback data is used to dynamically adjust the service routing weight; for the orchestration engine module, the feedback is used to optimize the personalized service link; The monitoring feedback module has established monitoring metrics, threshold ranges, and feedback strategies for the rule parsing module. Some specific and feasible strategies are shown in Tables 3, 4, and 5.
[0069] Table 3. Feedback for the rule parsing module
[0070] Table 4. Feedback for the service center registration module
[0071] Table 5. Feedback for the orchestration engine module
[0072] Through the precise feedback strategy for modules, the present invention realizes the real-time monitoring and dynamic optimization of the system operation status, can timely discover and correct potential problems, and ensures the stable and efficient operation of each module.
[0073] For the rule parsing module, the heat map feedback and pre-compilation strategy significantly improve the execution efficiency of high-frequency rules, reduce latency and optimize resource utilization.
[0074] For the service center registration module, the dynamic routing weight adjustment and anomaly self-healing mechanism effectively improve the reliability and stability of service discovery, and reduce the impact of faults on the system; For the orchestration engine module, the personalized service link optimization and dynamic scheduling mechanism improve the balance of resource utilization and the robustness of the service link, and enhance the adaptive ability of the system in a complex and changeable environment.
[0075] The above scheme constructs an efficient closed-loop monitoring and feedback system, effectively improving the stability, performance, and service quality of the system.
[0076] For the operation result of the execution engine module, it is adjusted and optimized through the fault tolerance module. The process of the fault tolerance module is as Figure 2 shown. The fault tolerance module receives the real-time push status of the execution engine module, adopts a fast recovery strategy for instantaneous faults through short-term memory fusing, and marks the continuously faulty service as "long-term untrusted" through long-term memory degradation, which is released by manual intervention. Specifically, it includes the following steps: 1) Obtain the real-time status matrix pushed by the execution engine module, as follows: ; In the formula, represents the real-time status matrix, represents the th service's th metric value within the time window , such as success rate, latency, error rate, etc.
[0077] 2) Calculate the weighted failure rate for each service. The formula is: ; In the formula, represents the weighted failure rate of the th service, represents the time decay weight, represents the time window, represents the indicator function, which takes 1 when there is a failure and 0 otherwise, represents the th service's status at the
[0078] 3) Establish the abnormal volatility of the th service based on the service latency and the average latency within the window. Construct a health assessment indicator according to the abnormal volatility and the weighted failure rate. The formula is: ; In the formula, represents the health assessment indicator of the th service, represents the weight coefficient of the weighted failure rate , represents the weight coefficient of the abnormal volatility, represents the weight coefficient of the resource health (normalized value of CPU / memory usage).
[0079] 5) Judge the service status according to the health assessment indicator. If it is less than the health threshold, perform instantaneous fusing, and call the backup link 1 and backup link 2, and select the call according to their running speeds.
[0080] 6) Construct a decaying abnormal integral to judge whether there is a long-term fault. The formula is: ; In the formula, represents the abnormal integral of the th service at time , represents the total number of historical abnormal events, represents the time decay coefficient, represents the time difference of abnormal events, represents the The time when the abnormality occurred, Indicates The service is Health assessment indicator for the next abnormality.
[0081] 7) When the decay type anomaly integral exceeds the threshold, it is marked as "long-term unreliable" and enters the manual intervention process.
[0082] The manual intervention process includes: a. Mark the service status as "Degraded"; b.Route all requests to the backup cluster; c. Triggering a three-level alarm (email + SMS + work order); d. After manual repair, the average health evaluation value of 10,000 tests must be greater than 0.98.
[0083] Through short-term memory fuse, when a transient fault occurs, it quickly switches to the backup link to ensure business continuity and reduce user experience interruption. The long-term memory degradation mechanism can effectively identify persistent problems, avoid resource waste caused by frequent triggering of fuses, and improve the overall efficiency of the system.
[0084] Embodiment 2: This application also provides a service orchestration optimization method based on a rule engine, such as Figure 3 As shown, including: S1. Perform atomic-level and composite-level analysis on services to obtain atomic services and composite services; detect potential conflicts in composite services; S2, receiving and processing natural language input and sketch input to obtain a cross-domain perception matrix; S3. Generate a unique hash fingerprint for each atomic service and composite service, including interface signature, performance baseline, dependency library version, etc., to ensure version consistency; S4. Build a "business-technology-environment" trinity perception network, including: obtaining a cross-domain perception matrix, searching for the optimal path based on reinforcement learning, and independently designing reward functions based on business to achieve domain adaptive strategies for industry pain points; S5: Parallel testing: Initiate three different service links at the same time, namely, the main link + backup link 1 + backup link 2, and take the first successful result; S6. Monitor and provide feedback on each step; S7. Receive the real-time push status of the execution engine module through the fault-tolerant module, and quickly respond and adopt corresponding strategies when the execution engine module faces transient and persistent faults. A fast recovery strategy is adopted for transient faults, and persistent fault services are marked as "long-term untrustworthy" and require manual intervention to resolve.
[0085] The present invention realizes the optimal cutting of service modules through a quantum annealing algorithm, breaking through the local optimal limit of traditional optimization methods; constructs a Hamiltonian model based on service feature vectors to quantitatively evaluate the coupling degree and atomization tendency between services, and combines the quantum tunneling effect to achieve global optimization. This technology can increase the service splitting efficiency by 3 times, reduce resource consumption, and is especially suitable for the dynamic adjustment of high-complexity microservice architectures.
[0086] The present invention supports dual-channel input of natural language description and flowchart sketches. Through deep parsing technologies such as dependency syntactic analysis and semantic role annotation, it transforms business requirements into structured rules; automatically repairs broken lines (error < 10 pixels), identifies overlapping elements (spacing > 5 pixels without misjudgment), and generates an executable service chain within 1 second, greatly reducing the threshold for non-technical personnel to participate in system design.
[0087] The present invention constructs a three-dimensional perception network of "business - technology - environment". Through self-designed industry pain point reward functions such as financial anti-fraud rate and industrial equipment OEE, it drives the dynamic optimization of service paths; this algorithm supports thousands of concurrent decisions per second, and the key indicators are improved by 15% - 38% in complex business scenarios, achieving the precise alignment of business requirements and technical execution.
[0088] The present invention adopts a parallel racing mechanism of a main link and two standby links, and uses physical isolation technology with CPU core-level binding to ensure that the three service chains are strictly parallel and there is no resource contention. Combining dual strategies of short-term fusing and long-term degradation (abnormal integral exceeding the threshold), the system availability reaches 99.999%, and the fault switching delay is controlled within 200 microseconds, perfectly supporting high-sensitivity scenarios such as financial transactions and industrial control.
[0089] The present invention establishes a module-level precise feedback network. Through technologies such as pre-compilation of rule heat maps, tracking of service DNA fingerprints, and dynamic adjustment of routing weights, it constructs a full-chain self-healing ability of "monitoring - analysis - repair". When the service failure rate > 5%, it automatically triggers a rolling update, and the recovery time is shortened by 82%; high-frequency business rules can be compiled into machine code in real time, and the execution efficiency is increased by 6 times, significantly reducing the complexity of system operation and maintenance.
[0090] Example 3: On the basis of the existing fault tolerance mechanism, it is also possible to explore the introduction of a federated learning framework to achieve the co-evolution of health assessment models across business domains. By encrypting and exchanging data on the abnormal fluctuation degree and weighted failure rate of each service, a globally shared fault mode knowledge base is constructed, enabling the system to identify new fault characteristics in advance. For example, when a certain type of database connection timeout first appears in the financial business, this mode can be quickly synchronized to the fault tolerance module of the e-commerce business to achieve cross-domain defense pre-emption.
[0091] It is also possible to consider applying the quantum random walk algorithm to the dynamic weight adjustment of decaying improper integrals. By means of quantum superposition states, different combinations of decay coefficients and health degree weights are explored in parallel to find the parameter configuration that makes the integral model have the highest fitting degree for historical faults. Compared with traditional grid search, quantum optimization can improve the parameter tuning efficiency by more than 10 times, especially suitable for real-time fault tolerance decision-making in ultra-large-scale service clusters.
[0092] Although the specific embodiments of the present invention have been described above, those skilled in the art should understand that the specific embodiments we described are illustrative rather than used to limit the scope of the present invention. Effective modifications and changes made by those skilled in the art in accordance with the spirit of the present invention should be covered by the scope protected by the claims of the present invention.
Claims
1. A service orchestration system based on a rules engine, characterized in that It includes the following modules: Rule parsing module: including atomic-level parsing unit, combined-level parsing unit, rule prediction unit and multi-modal rule input unit; The atomic-level parsing unit is used to disassemble the service and parse the service into atomic services with functional characteristics; The combined-level parsing unit is used to record the adjacent occurrence times of service pairs, judge the service correlation, and when there are continuous high-frequency adjacent pairs, merge them into combined services; The rule prediction unit is used to detect whether there are conflicts in the combined services generated by the combined-level parsing unit; The multi-modal rule input unit is used to receive natural language input and sketch input, and perform preprocessing to obtain a cross-domain perception matrix; Service registration center module: including service DNA fingerprint unit and self-healing service unit; The service DNA fingerprint unit is used to generate unique hash fingerprints for each atomic service and combined service; Self-healing service unit: used to automatically mark and remove from the available pool when the instance failure rate of a certain atomic service or combined service is greater than the threshold; Orchestration engine module: used to obtain the cross-domain perception matrix and adaptively adjust the optimization strategy through a reward function; Execution engine module: used to select multiple best service links according to the results generated by the orchestration engine module to form a multi-link parallel racing execution technical solution; Monitoring feedback module: used to execute feedback strategies for the rule parsing module, service center registration module, and orchestration engine module; Fault tolerance module: used to receive the real-time push status of the execution engine module, and quickly respond and take corresponding strategies when the execution engine module faces instantaneous and persistent failures.
2. A service orchestration optimization method based on a rule engine, characterized in that, A service orchestration system based on a rule engine described in claim 1 is adopted, and the optimization method includes the following steps: S1. Perform atomic-level parsing and combined-level parsing on the service to obtain atomic services and combined services, and detect potential conflicts in the combined services; S2. Receive natural language input and sketch input and process them to obtain a cross-domain perception matrix; S3. Generate unique hash fingerprints for each atomic service and combined service; S4. Obtain the cross-domain perception matrix, perform optimal path search based on reinforcement learning, and independently design a reward function according to the business; S5. Conduct parallel tests, simultaneously initiate multiple different service links, and take the first successful result; S6. Monitor and feedback on each step; S7. Receive the real-time push status of the execution engine module, and quickly respond and take corresponding strategies when the execution engine module faces instantaneous and persistent failures.
3. The service orchestration optimization method based on a rule engine according to claim 2, characterized in that, In S1, the service is disassembled by the atomic-level parsing unit, and the service is parsed into atomic services with the following functional characteristics. The functional characteristics include: functional singularity, resource independence, idempotency guarantee, and spatio-temporal determinacy; The atomic-level parsing of the service includes the following steps: 1) Perform feature modeling on the service, and use feature vectors to describe service attributes. The formula is: ; In the formula, represents the feature vector of the service, represents the CPU consumption per unit call, represents the memory occupancy, represents the latency reference value, represents the number of explicitly dependent services, represents the cascading failure coefficient; 2) Construct a Hamiltonian to define the optimal segmentation. The formula is: ; In the formula, represents the Hamiltonian,[[]]END]] represents the coupling degree between services,[[]]END]] represents the service atomization tendency parameter,[[]]END]] , represents the splitting decision variable, where 0 indicates retaining atomicity and 1 indicates the need for splitting;[[]]END]] is a preset weight coefficient;[[]]END]] The coupling degree between services is determined by the difference in eigenvectors, and the formula is as follows: ; In the formula, represents the natural base, represents the attenuation coefficient, represents the th vector and the th vector in terms of the difference in eigenvectors, represents the included angle of call timing; The service atomization tendency parameter Determined by the resource consumption characteristics, the formula is: ; Wherein, represents the weight coefficient of the CPU consumption of unit calls , represents the weight coefficient of the memory occupancy , represents the latency reference value and its weight coefficient.
4. A method for optimizing service orchestration based on a rule engine according to claim 3, characterized in that Using the quantum annealing algorithm for segmentation includes the following steps: 1) Convert the Hamiltonian parameters into the physical configuration of the quantum processor. Each service is mapped to a physical qubit, set the coupler between qubits according to the Hamiltonian, and apply a local magnetic field to each qubit; 2) Set the time evolution path of quantum annealing to increase the probability of the optimal solution; 3) Execute quantum annealing, initialize the quantum state, and initialize all qubits to the superposition state; 4) Screen and optimize the output results of quantum annealing, repair the broken solutions caused by insufficient chain strength, and arrange the candidate solutions in ascending order of the Hamiltonian energy; 5) Determine the final service cutting scheme and verify its reliability, and select the candidate solution with the lowest energy and meeting the constraints.
5. The service orchestration optimization method based on a rule engine according to claim 2, wherein In S1, the combined-level parsing of services includes the following steps: 1) Construct a service co-occurrence matrix to record the adjacent occurrence times of service pairs; 2) Construct an adaptive dynamic threshold based on the mean and variance. If the adjacent occurrence times are greater than the adaptive dynamic threshold, it is determined as a significant association; Among them, when there are consecutive high-frequency adjacent pairs, they are merged into combinations, and partially overlapping sequences are merged.
6. A service orchestration optimization method based on a rule engine according to claim 2, characterized in that, In S1, the potential conflicts in combined services include: Resource deadlock, judged by using the length of the circular wait chain; Data race, writing and then reading or reading and then writing the same data item; Permission overstep, the first service calls the second service without permission; Temporal paradox, the event order violates the causality law; Resource overload, the cumulative resource demand is greater than the node capacity; Business logic conflict, mutually exclusive rules take effect simultaneously.
7. The service orchestration optimization method based on a rule engine according to claim 2, wherein In S2, receive natural language input and sketch input and process them to obtain a cross-domain perception matrix, including the following steps: Process the natural language input, including text cleaning and standardization, word segmentation and part-of-speech tagging, domain entity recognition, dependency syntactic analysis, semantic role annotation, logical predicate extraction, and intermediate representation generation; Process the sketch input, including image preprocessing, graphic element detection, text recognition, topological relationship reconstruction, semantic enhancement and conflict resolution, and intermediate representation generation; Integrate the processing results of the natural language input and the sketch input to obtain a cross-domain perception matrix.
8. The service orchestration optimization method based on a rule engine according to claim 2, wherein In S4, perform optimal path search based on the reinforcement learning algorithm, including constructing the state space, action space, establishing functions, and network structure; By obtaining the cross-domain perception matrix and processing it to obtain the state space, the formula is: ; In the formula, represents the state space, represents flattening a three-dimensional matrix into a vector, represents vector concatenation, represents the LSTM historical state encoding; The action space uses the adjustment of discrete actions and continuous parameters to implement three types of operations: node addition and deletion, path weight adjustment, and fault switching; The calculation formula of the total reward function is as follows: ; In the formula, represents the total reward function, represents the basic reward function, represents the domain reward function; The formula for the basic reward function is: ; In the formula, represents the compliance rate of service level weight coefficient, represents the weight coefficient of resource cost, represents the risk event count weight coefficient; The formula for the domain reward function is: ; In the formula, represents the domain enhancement coefficient, represents the number of industry pain point functions, represents the th weight coefficient of the industry pain point function The network structure of the reinforcement learning algorithm adopts the Actor-Critic framework.
9. The service orchestration optimization method based on a rule engine according to claim 2, wherein In S6, the monitoring feedback module feeds back data for the rule parsing module as a heat map of the rule execution path, and pre-compiles high-frequency rules into machine code; Dynamically adjust the service routing weight according to the feedback data of the service center registration module; Optimize the personalized service link according to the feedback of the orchestration engine module; By establishing monitoring metrics, threshold ranges, and feedback strategies, monitor the system operation status in real time and perform dynamic optimization.
10. A method for optimizing service orchestration based on a rule engine according to claim 2, characterized in that, In S7, receive the real-time push status of the execution engine module through the fault tolerance module, adopt a fast recovery strategy for instantaneous faults through short-term memory fusing, and mark the continuously faulty services as "long-term untrustworthy" through long-term memory degradation, which is lifted by manual intervention; specifically including the following steps: 1) Obtain the real-time status matrix pushed by the execution engine module, as follows: ; In the formula, represents the real-time status matrix, represents the th service's th index value within the time window, including success rate, latency, and error rate; 2) Calculate the weighted failure rate for each service, and the formula is: ; In the formula, represents the weighted failure rate of the th service, represents the time decay weight, represents the time window, represents the indicator function, which takes 1 when there is a failure and 0 otherwise, represents the th service at the th moment; 3) Establish the abnormal fluctuation degree of the th service based on the service delay and the average delay within the window , and construct a health assessment index according to the abnormal fluctuation degree and the weighted failure rate. The formula is as follows: ; In the formula, represents the health assessment index of the th service, represents the weight coefficient of the weighted failure rate represents the weight coefficient of the abnormal fluctuation degree, represents the weight coefficient of the resource health; 4) Judge the service status according to the health assessment index. If it is less than the health threshold, perform instantaneous fusing, call the backup link, and select the call according to its running speed; 5) Construct a decaying abnormal integral to judge whether there is a long-term fault. The formula is: ; Among them, represents the abnormal integral of the th service at time , represents the total number of historical abnormal events, represents the time decay coefficient, represents the time difference of abnormal events, represents the time when the th abnormal event occurs, represents the th service's health assessment index at the th abnormal event; 6) When the decaying abnormal integral exceeds the threshold, mark it as "long-term untrustworthy" and enter the manual intervention process.
Citation Information
Patent Citations
Medical image report generation method based on visual priori and cross-modal alignment network
CN117393098A
Automatic turning method and system thereof
CN119276074A
Logistics support dynamic scheduling and emergency response system based on intelligent data fusion
CN119809226A
Industrial chain atlas modeling method and system based on deep learning
CN120012897A
Short message channel fault processing method based on dynamic routing adjustment
CN120075859A