Implementation method and device for application atomization fusion arrangement based on OPENAPI

Through the OPENAPI-based method, complex business applications are split into atomic services, a service registration center is built, a dynamic discovery of health status, semantic analysis and format conversion are carried out, multi-level authentication and authorization are adopted to encrypt data transmission, and the API gateway integration service is integrated with containerized technology for deployment and automated operation and maintenance, which solves the problems of inconsistent interfaces, inflexible orchestration, inaccurate data processing and insufficient security control in the existing technology, and efficient and flexible orchestration of application services is achieved.

CN120602545AActive Publication Date: 2025-09-05HANGZHOU HUASI COMM TECH CO LTD

Patent Information

Application Number
CN202510896611.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-01
Publication Date
2025-09-05
Estimated Expiration
2045-07-01

AI Technical Summary

Technical Problem

In the prior art application integration, there are problems such as inconsistent interfaces, inflexible orchestration, inaccurate data processing and insufficient security control, which is difficult to meet the rapidly changing business needs.

Method used

Using OPENAPI-based method, complex business applications are split into atomic services, service registration centers are built, healthy state dynamic discovery, semantic analysis and format conversion are carried out, multi-level authentication and authorization are adopted, data transmission is encrypted, and services are integrated through API gateways, and containerized technology is used for deployment and automated operation and maintenance.

Benefits of technology

It achieves efficient and flexible application service integration and orchestration, improves the scalability and reliability of the system, ensures the stability and security of services, and reduces integration costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120602545A_ABST
    Figure CN120602545A_ABST
Patent Text Reader

Abstract

The invention provides an implementation method and device for application atomization fusion orchestration based on OPENAPI, and relates to the technical field of computer application, and the method comprises the steps of service disassembly and interface definition, service registration and discovery, orchestration and adaptive execution, data processing and mapping, security management and control, and integrated deployment and operation and maintenance. According to the invention, by splitting complex services into atomization services and defining interfaces according to OpenAPI specifications, service management is facilitated, the integration cost is reduced, and the flexibility and expansibility of the system are improved; by constructing a service registration center and combining a weighted polling algorithm, load balancing is realized, and efficient and stable calling of services is guaranteed; an API gateway, a containerization technology and an automatic operation and maintenance system are utilized to realize service rapid deployment, elastic expansion and intelligent operation and maintenance; meanwhile, data are processed through semantic analysis, format conversion and the like, and multi-level identity verification and encryption are adopted to guarantee safety.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer application technology, and in particular to a method and device for implementing application atomic fusion orchestration based on OPENAPI. Background Art

[0002] With the rapid development of information technology, enterprise business systems are becoming increasingly complex, and the need for integration and collaboration between different systems is growing. Traditional application integration methods often suffer from inconsistent interfaces, high development costs, and difficult maintenance, making them difficult to meet rapidly changing business needs.

[0003] At present, although there are some API-based application integration methods, there are still deficiencies in the atomic decomposition of services, flexible orchestration, data processing and security management. For example, existing service orchestration technologies lack dynamic adaptability and cannot make intelligent adjustments based on the real-time status of services. In terms of data processing, the understanding and mapping of data semantics are not accurate enough, which can easily lead to data transmission errors. In terms of security management, it is also difficult to achieve multi-level and fine-grained permission control.

[0004] Therefore, a new technical solution is needed to solve the above problems, realize the atomic fusion orchestration of applications based on OPENAPI, improve the efficiency and flexibility of application integration, and ensure the security and reliability of the system. Summary of the Invention

[0005] The purpose of the present invention is to provide a method and device for implementing atomic fusion orchestration of applications based on OPENAPI, so as to solve the problems of inconsistent interfaces, inflexible orchestration, inaccurate data processing and insufficient security control in application integration in the prior art, and to achieve efficient integration and intelligent orchestration of application services.

[0006] To solve the above technical problems, the present invention provides a method and device for implementing application atomic fusion orchestration based on OPENAPI, comprising the following steps: S1: Service decomposition and interface definition: Decompose complex business applications into atomic services and define each service interface according to the OpenAPI specification; S2: Service Registration and Discovery: Build a service registration center to store OpenAPI documents and metadata for services. Register services when they start, and dynamically discover services based on their health status when they are called. S3: Orchestration and Adaptive Execution: Orchestrate service processes based on business needs, generate call templates based on OpenAPI, and monitor and adaptively adjust execution in real time. S4: Data processing and mapping: Perform semantic analysis when transmitting data, complete format conversion, cleaning verification and semantic mapping; S5: Security control: Use multi-level authentication and authorization, and encrypt transmitted data; S6: Integrated deployment and operation and maintenance: Integrate services through API gateway, deploy with containerization technology, and build an automated operation and maintenance system for monitoring and processing.

[0007] Preferably, based on step S1, the complex business application is split into atomic services, and each service interface is defined according to the OpenAPI specification, as follows: S11: Perform functional analysis on complex business applications and decompose them into multiple atomic services with single, clear functions. The atomic services include user authentication services, data query services, and order processing services. S12: For each atomic service, define a standardized interface according to the OpenAPI specification, describe the interface's input parameters, output results, request method, and response status code, and form the OpenAPI document of the atomic service.

[0008] As a preferred method, based on step S2, a service registration center is constructed to store OpenAPI documents and metadata of the service, register when the service is started, and dynamically discover the service in combination with the health status when calling. The specific steps are as follows: S21: A service registration center is constructed using a distributed architecture. The service registration center is used to store the OpenAPI documents and related metadata of each atomic service, including the service name, version number, endpoint address, and service health status information. The service registration center monitors the health status of the service in real time through a heartbeat mechanism. S22: When an atomic service starts, it registers its own OpenAPI document and metadata with the service registry. The registration process can be completed through the RESTful API provided by the service registry. At the same time, the service registry updates the health status information of the service in real time. If the service heartbeat information is not received within the set time, the service is marked as unhealthy. S23: When an application or service needs to call an atomic service, the service registration center dynamically discovers and selects the appropriate atomic service based on the service name, function description, or metadata information, combined with the real-time health status of the service; Among them, when selecting services, a weighted polling algorithm is used, specifically: Identify the number of all current service instances SE as n, set the weight of the i-th service instance as wi, and the index of the current request as index. The calculation formula for the selected service instance SE is: ; Traverse all server instances, accumulate weights, and select the server instance when the accumulated value is greater than or equal to index.

[0009] Preferably, based on step S4, semantic analysis is performed when the data is transmitted to complete format conversion, cleaning verification and semantic mapping, specifically: S41: Use natural language processing technology and domain ontology libraries to perform semantic analysis on data transmitted between atomic services; identify key entities and relationships in the data, and understand the meaning and purpose of the data; S42: Perform data format conversion based on the data format requirements of the source service and the target service. Data format conversion is achieved by using a data conversion tool or writing a custom script. S43: Clean and validate data to remove invalid, duplicate, and erroneous data; define data validation rules, including data type checks, length checks, and range checks; S44: Establish a semantic mapping table to semantically map data between different services.

[0010] Preferably, based on step S5, multi-level identity authentication and authorization are adopted to encrypt the transmitted data, specifically including: S51: A multi-layered authentication mechanism is used, including OAuth2.0-based token authentication and digital certificate-based authentication. Users or applications are required to provide valid identity credentials when calling atomic services. S52: Perform fine-grained authorization control on access to atomic services based on the roles and permissions of users or applications. Use a role-based access control model to define permission sets for different roles. S53: During data transmission, the data is encrypted using the SSL / TLS encryption protocol.

[0011] As a preferred method, based on step S6, the service is integrated through the API gateway, deployed using container technology, and an automated operation and maintenance system is built for monitoring and processing. The specific steps are as follows: S61: Use the API gateway to integrate the orchestrated atomic services into a unified interface layer. The API gateway is responsible for receiving external requests, forwarding them to the corresponding atomic services based on the request path and parameters, and performing unified processing on requests and responses, including logging, rate limiting, and caching. S62: Use Docker containerization technology to package atomic services into independent containers, and use Kubernetes for container orchestration and management. The containerized deployment is used to achieve rapid deployment, elastic scaling, and resource isolation of services. S63, establish an automated operation and maintenance system, use Prometheus to monitor service performance indicators, and use Grafana for data visualization; when anomalies occur or performance indicators exceed thresholds, alarms and processing mechanisms are automatically triggered, including automatic restart of services and expansion of resources.

[0012] As a preferred method, based on step S3, the service process is orchestrated according to business needs, a call template is generated according to OpenAPI, and real-time monitoring and adaptive adjustment are carried out during execution. The specific steps are as follows: S31: Business Process Orchestration Design: Visual Orchestration: Provides a visual orchestration tool. Users can drag and drop atomic service icons to the orchestration interface and use lines to represent the calling sequence between services. During the orchestration process, users can define the service calling sequence, data transfer relationships, and conditional judgment logic. Code programming and orchestration: Provides an API interface based on a specific programming language; the API interface uses code to write service orchestration logic; S32: Call module generation: Automatically generate service call templates based on the OpenAPI document of the atomic service; for each interface defined in the OpenAPI document, extract its request method, request URL, request parameters, and response format information; S33: Orchestration process execution: Sequential execution: Call each atomic service in sequence according to the service call sequence designed by the orchestration. When calling each service, use the generated call template and pass the necessary parameters to the service. Concurrent execution: For relatively independent service calls, concurrent execution is adopted; S34: During the service call process, the performance indicators of each atomic service are monitored and analyzed in real time; service status information is obtained through the health check mechanism of the service registration center or the status interface provided by the service itself, including whether the service is operating normally or has exited abnormally; the service status information is compared with the preset status to generate an execution result; Monitor and analyze the performance indicators of each atomic service in real time. If the response time is greater than the response time threshold, mark it as the service response time is too long; if the throughput is less than the throughput threshold, mark it as insufficient throughput; if the error rate is greater than the error rate threshold, mark it as the service error rate is too high; At the same time, analyze the changing trends of performance indicators and execution results, specifically: Obtain the performance indicators within the set time range before the current moment, divide the set time range into several time partitions, and use the standard deviation formula to calculate the trend value of the performance indicators in each time partition; Set a partition trend threshold. If the trend value is greater than the partition trend threshold, it is marked as an abnormal trend corresponding to the performance indicator. The number of abnormal trends in the set time range is counted as the number of abnormal trends. The trend values ​​in each time partition within the set time zone are then calculated using the standard deviation formula to obtain the total trend value. The total trend value and the number of abnormal trends are normalized and weighted to obtain the trend impact value. If the trend impact value is greater than its preset total trend threshold, the corresponding performance indicator is marked as an abnormal performance indicator. Abnormal performance indicators include service response time abnormality, throughput abnormality, and error rate abnormality. S35: If the performance indicators of each atomic service are abnormal, or if the execution results are abnormal, then the corresponding adjustment strategy is executed; S36: Adjustment effect evaluation and feedback: After implementing the corresponding adjustment strategy, collect the service performance indicators, compare them with those before the adjustment, and quantify the difference between the performance indicators after the adjustment and the performance indicators before the adjustment; Then, the difference between the adjusted performance indicator and its corresponding threshold is calculated to obtain the threshold difference corresponding to the performance indicator; The threshold difference and the degree of difference are normalized and weighted to obtain the adjustment impact value. If the adjustment impact value is greater than the adjustment effect evaluation threshold, it indicates that the performance indicator has improved. Otherwise, it indicates that the performance indicator has not improved significantly or has deteriorated. S35 is re-executed until the preset number of executions is reached. At the same time, based on the business goals and logic, the execution results of the orchestration process are evaluated to see whether they meet expectations.

[0013] Preferably, based on step S35, if the performance indicators of each atomic service are abnormal, or the execution results are abnormal, the corresponding adjustment strategy is executed, specifically: S351: If the service response time is too long or abnormal, it indicates that the response time is too long due to network fluctuations or temporary high load. An exponential backoff algorithm is used to retry and the request parameters are adjusted to optimize performance. Use the exponential backoff algorithm to determine the retry interval and set the initial retry interval to , the number of retries is m, then the time interval of the mth retry The calculation formula is: ; If any service still fails after the set number of retries, it will identify whether there is a backup service. If so, it will switch to the backup service. When selecting the backup service, a weighted polling algorithm can be used based on the performance indicators and health status of the service. S352: If the service throughput is insufficient or abnormal, it indicates that the service processing capacity is insufficient or fluctuates greatly. Increase the number of service instances using the container orchestration tool. S353: If the service error rate is too high or abnormal, indicating that the service frequently encounters errors when processing requests, check the service error log and perform error troubleshooting; and perform repairs based on the results of the error troubleshooting. S354: If an exception occurs in the execution result, indicating that the result returned by the service does not meet expectations, then: S3541 records detailed information about abnormal execution results, including request parameters, response content, and error time. S3542: Review the service's business logic and correct any logical errors. S3543: Check the consistency of service-related data. If there is any inconsistency, repair and synchronize the data. S3544, try to re-execute the operation a set number of times, and observe whether the result returns to normal within the set number of times; if it does not return to normal, it means that the execution result is unusual, and the rollback operation is performed; when an unusual exception occurs in the execution result, the early warning mechanism is triggered, and detailed information about the abnormal execution result is sent to notify the service-related operation and maintenance personnel.

[0014] Preferably, the present invention further provides a device for implementing the above-mentioned OPENAPI-based application atomic fusion orchestration, comprising: The service decomposition and interface definition module is used to perform functional analysis on complex business applications, split them into atomic services, define each service interface according to the OpenAPI specification, and generate OpenAPI documents; The service registration and discovery module is used to build a service registration center, implement atomic service registration, health status monitoring, and service discovery functions, and use a load balancing algorithm to select the appropriate service instance; The orchestration and adaptive execution module provides orchestration tools and interfaces, orchestrates service processes according to business needs, generates service call templates, monitors service execution status in real time, and performs adaptive adjustments. Data processing and mapping module, used to perform semantic analysis, format conversion, cleaning verification and semantic mapping on data transmitted between atomic services; Security control module, used to implement multi-level identity authentication, authorization management and data encryption; The integrated deployment and operation and maintenance module is used to integrate services through the API gateway, use containerization technology for deployment, and establish an automated operation and maintenance system for monitoring and processing.

[0015] Compared with related technologies, the method and device for implementing atomic fusion orchestration of applications based on OPENAPI provided by the present invention have the following beneficial effects: 1. The present invention splits complex businesses into atomic services and defines interfaces according to the OpenAPI specification, which facilitates the addition, deletion and modification of services, reduces integration costs, can quickly respond to business changes, and improve system flexibility and scalability.

[0016] 2. The present invention builds a service registration center, combines it with the dynamic discovery service of health status, and adopts a weighted polling algorithm to select instances to achieve load balancing; it monitors and adjusts in real time during orchestration execution to ensure efficient and stable operation of services and enhance service calling and management capabilities.

[0017] 3. This invention integrates atomic services using an API gateway, deploys and orchestrates them through Docker containerization and Kubernetes, and enables rapid deployment and elastic scaling of services. Prometheus and Grafana are used to build an automated operation and maintenance system, monitor performance indicators in real time, and automatically generate alerts and handle abnormalities.

[0018] To sum up, at the architectural level, atomic services and OpenAPI specification interface design improve system flexibility and scalability and reduce integration costs; in terms of service management, the service registration center combines weighted polling algorithm to achieve load balancing, and real-time monitoring and adjustment during the orchestration execution process ensure the efficiency and stability of the service; in terms of deployment and operation and maintenance, the combination of API gateway, containerization technology and automated operation and maintenance system enables rapid service deployment, elastic scaling and intelligent operation and maintenance; these advantages effectively solve the problems raised in the background technology and provide efficient and reliable solutions for the development, integration and management of complex business applications. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 A flowchart of a method for implementing application atomic fusion orchestration based on OPENAPI provided by the present invention; Figure 2 This is a principle block diagram of an implementation device for atomic fusion orchestration of applications based on OPENAPI provided by the present invention. DETAILED DESCRIPTION

[0020] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0021] The terms used in this disclosure are for the purpose of describing specific embodiments only and are not intended to limit the disclosure. As used in this disclosure and the appended claims, the singular forms "group," "class," and "the" are intended to include the plural forms, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.

[0022] It should be understood that although the terms first, second, third, etc. may be used in this disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of this disclosure, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining."

[0023] Please refer to Figure 1-Figure 2 A method for implementing application atomic fusion orchestration based on OPENAPI, comprising the following steps: S1: Service decomposition and interface definition: Decompose complex business applications into atomic services and define each service interface according to the OpenAPI specification; S2: Service Registration and Discovery: Build a service registration center to store OpenAPI documents and metadata for services. Register services when they start, and dynamically discover services based on their health status when they are called. S3: Orchestration and Adaptive Execution: Orchestrate service processes based on business needs, generate call templates based on OpenAPI, and monitor and adaptively adjust execution in real time. S4: Data processing and mapping: Perform semantic analysis when transmitting data, complete format conversion, cleaning verification and semantic mapping; S5: Security control: Use multi-level authentication and authorization, and encrypt transmitted data; S6: Integrated deployment and operation and maintenance: Integrate services through API gateway, deploy with containerization technology, and build an automated operation and maintenance system for monitoring and processing.

[0024] In the present invention, based on step S1, complex business applications are split into atomic services, and each service interface is defined according to the OpenAPI specification, as follows: S11: Perform functional analysis on complex business applications and break them down into multiple atomic services with single, clear functions. These atomic services include but are not limited to user authentication services, data query services, order processing services, etc. S12: For each atomic service, define a standardized interface according to the OpenAPI specification, describe the interface's input parameters, output results, request method, and response status code, and form the OpenAPI document of the atomic service.

[0025] It's important to note that through the above steps, the functional specificity of atomic services allows developers to focus on implementing and optimizing individual functions, reducing development complexity. Standardized OpenAPI documentation provides clear specifications for inter-service interactions. Services developed by different teams can be connected based on this documentation, reducing communication costs and errors during integration and significantly improving system maintainability and scalability. As business requirements change, atomic services can be easily added, modified, or deleted, enabling rapid response to market changes and enhancing enterprise competitiveness.

[0026] In the present invention, based on step S2, the service registration center is constructed to store service OpenAPI documents and metadata, register when the service is started, and dynamically discover the service in combination with the health status when calling. The specific steps are as follows: S21: A service registration center is constructed using a distributed architecture. The service registration center is used to store the OpenAPI documents and related metadata of each atomic service, including the service name, version number, endpoint address, and service health status information. The service registration center monitors the health status of the service in real time through a heartbeat mechanism. S22: When an atomic service starts, it registers its own OpenAPI document and metadata with the service registry. The registration process can be completed through the RESTful API provided by the service registry. At the same time, the service registry updates the health status information of the service in real time. If the service heartbeat information is not received within the set time, the service is marked as unhealthy. S23: When an application or service needs to call an atomic service, the service registration center dynamically discovers and selects the appropriate atomic service based on the service name, function description, or metadata information, combined with the real-time health status of the service; Among them, when selecting services, a weighted polling algorithm is used, specifically: Identify the number of all current service instances SE as n, set the weight of the i-th service instance as wi, and the index of the current request as index. The calculation formula for the selected service instance SE is: ; Traverse all server instances, accumulate weights, and select the server instance when the accumulated value is greater than or equal to index.

[0027] It should be noted that in the weighted polling algorithm, the weight wi can be set based on the hardware resources of the server where the service instance is located and the historical performance data of the service instance. The hardware resources include CPU, memory, disk I / O, etc. The weight setting method is an existing conventional technology and will not be described in detail. In the heartbeat mechanism, the selection of the setting time is generally set based on factors such as network latency and the average time it takes for the service to process requests. This is an existing conventional technology and will not be described in detail. By building a service registry and adopting a weighted round-robin algorithm to select service instances, we can accurately provide the appropriate service instances to the caller based on the real-time health status of the service and the preset weights. This avoids calling unhealthy or poorly performing service instances, improves the efficiency and accuracy of service discovery, and ensures the stable operation of the system. The distributed service registration center can easily handle the registration and management of a large number of atomic services. Atomic services are automatically registered when they start and dynamically discovered when they are called. This eliminates the need for large-scale code modifications when adding or removing services, enhancing the system's scalability and flexibility. The heartbeat mechanism monitors the health status of services in real time, promptly marks unhealthy services, and prevents callers from using unavailable services, thereby ensuring the high availability of the entire system. At the same time, the weighted polling algorithm can allocate requests according to different weights, rationally utilize service resources, and further improve the availability and performance of the system.

[0028] In the present invention, based on step S4, semantic analysis is performed when the data is transmitted to complete format conversion, cleaning verification and semantic mapping, specifically: S41: Use natural language processing (NLP) technology and domain ontology libraries to perform semantic analysis on data transmitted between atomic services; identify key entities and relationships in the data, and understand the meaning and purpose of the data; S42: Perform data format conversion based on the data format requirements of the source service and the target service. Data format conversion is achieved by using a data conversion tool or writing a custom script. For example, converting XML format data into JSON format. S43: Clean and validate data to remove invalid, duplicate, and erroneous data to ensure data accuracy and integrity; define data validation rules, including data type checks, length checks, and range checks; S44: Establish a semantic mapping table to semantically map data between different services. For example, between the user authentication service and the order processing service, map the user ID field to ensure data consistency.

[0029] In the present invention, based on step S5, multi-level identity authentication and authorization are adopted to encrypt the transmitted data, specifically including: S51: Adopt a multi-level authentication mechanism, including OAuth2.0-based token verification and digital certificate-based authentication; users or applications need to provide valid identity credentials when calling atomic services.

[0030] S52: Perform fine-grained authorization control on access to atomic services based on the roles and permissions of users or applications. Use the role-based access control (RBAC) model to define permission sets for different roles. S53: During data transmission, SSL / TLS encryption protocol is used to encrypt data to prevent data leakage and tampering.

[0031] In the present invention, based on step S6, the service is integrated through the API gateway and deployed using container technology to build an automated operation and maintenance system for monitoring and processing. The specific steps are as follows: S61: Use an API gateway (such as Kong or Nginx) to integrate the orchestrated atomic services into a unified interface layer. The API gateway is responsible for receiving external requests, forwarding them to the corresponding atomic services based on the request path and parameters, and performing unified processing on requests and responses, including logging, rate limiting, and caching. S62 uses Docker containerization technology to package atomic services into independent containers and uses Kubernetes for container orchestration and management. Containerized deployment is used to achieve rapid service deployment, elastic scaling, and resource isolation. It is worth mentioning that Kubernetes' advanced features in service discovery, load balancing, and rolling upgrades can be further explained. In terms of service discovery, Kubernetes provides name resolution for containers through the DNS service, enabling easy access between different containerized services. In terms of load balancing, Kubernetes provides a variety of load balancing strategies, such as round-robin and weight-based load balancing, which can be selected based on the performance and resource status of the service. During rolling upgrades, Kubernetes supports the gradual replacement of old versions of containers to ensure service continuity. At the same time, it monitors the health of the service during the upgrade process and can roll back in time if any problems occur. S63: Establish an automated operation and maintenance system, using Prometheus to monitor service performance indicators and Grafana for data visualization. When anomalies occur or performance indicators exceed thresholds, alarms and processing mechanisms are automatically triggered, including automatic service restart and resource expansion. It's important to note that Prometheus supports custom monitoring metrics. Users can collect specific performance data, such as database connection counts and thread pool usage, based on the characteristics of atomic services. Alert rules should specify how to set different alert levels and notification methods, such as sending alerts via email, SMS, or instant messaging. Furthermore, Prometheus can be integrated with other tools, such as Elasticsearch and Kibana, to centrally manage and analyze log data for better troubleshooting.

[0032] The API gateway integrates atomic services into a unified interface layer, providing a unified external access point. This simplifies the interaction between external systems and atomic services and reduces system complexity. The API gateway's unified processing functions, such as logging, rate limiting, and caching, facilitate system management and optimization, improving system performance and security. Efficient deployment and flexible expansion: Containerization technologies (Docker and Kubernetes) enable rapid deployment, elastic scaling, and resource isolation of atomic services. Rapid deployment reduces service launch time and improves development and operation efficiency. Elastic scaling can automatically adjust the number of service instances based on changes in business load, improving resource utilization and reducing costs. Resource isolation ensures the independence of different services, avoids mutual interference, and enhances system stability.

[0033] In the present invention, based on step S3, the service process is orchestrated according to business needs, a call template is generated according to OpenAPI, and real-time monitoring and adaptive adjustment are carried out during execution. The specific steps are as follows: S31: Business Process Orchestration Design: Visual Orchestration: Provides a visual orchestration tool. Users can drag and drop atomic service icons to the orchestration interface and use lines to represent the calling sequence between services. During the orchestration process, users can define the service calling sequence, data transfer relationships, and conditional judgment logic. Code programming and orchestration: Provides API interfaces based on specific programming languages ​​(such as Python, Java, and other conventional programming languages); API interfaces are used to write service orchestration logic using code; S32: Call module generation: Automatically generate service call templates based on the OpenAPI document of the atomic service; for each interface defined in the OpenAPI document, extract its request method, request URL, request parameters, and response format, such as GET and POST; S33: Orchestration process execution: Sequential execution: Call each atomic service in sequence according to the service call sequence designed by the orchestration. When calling each service, use the generated call template and pass the necessary parameters to the service. Concurrent execution: For relatively independent service calls, concurrent execution is used. It should be noted that during concurrent execution, concurrency control based on parameters such as semaphores and thread pool sizes can be used. This is a mature technical method that allows users to reasonably configure the number of concurrently executed services based on the resource consumption of the services and the performance requirements of the system. This method can effectively avoid system resource exhaustion due to excessive concurrency and ensure stable system operation. Since this is an existing mature technology, it will not be explained in detail here. S34: During the service call process, the performance indicators of each atomic service are monitored and analyzed in real time; service status information is obtained through the health check mechanism of the service registration center or the status interface provided by the service itself, including whether the service is operating normally or has exited abnormally; the service status information is compared with the preset status to generate an execution result; Real-time monitoring of the performance indicators of each atomic service and the specific process of obtaining service status information: Monitoring points are set up on both the service caller and the service side. On the service caller, the time it takes to send a request and receive a response is recorded to calculate the response time T. On the service side, the number of requests processed and the number of error requests processed per unit time are counted to calculate the throughput Q and error rate E. The response time T represents the time interval from sending a request to receiving a response, the throughput Q refers to the number of requests processed by the service per unit time, and the error rate E refers to the proportion of errors that occur when the service processes requests. The calculation formula is: ,in Indicates the number of requests that had errors. Indicates the total number of requests; at the same time, based on the service return value and business logic, it is determined whether the execution result meets expectations; Set corresponding thresholds for the performance indicators of each atomic service, including response time threshold, throughput threshold, and error rate threshold. The response time threshold sets a maximum acceptable response time for each atomic service, the throughput threshold is the minimum number of requests that the specified service must process per unit time, and the error rate threshold is the maximum error ratio allowed for the specified service. Set a reasonable threshold range for the service execution results based on the business logic of the atomic service. If the response time is greater than the response time threshold, it is marked as the service response time is too long; if the throughput is less than the throughput threshold, it is marked as insufficient throughput; if the error rate is greater than the error rate threshold, it is marked as the service error rate is too high; if the execution result is not within the set reasonable threshold range, the execution result is determined to be abnormal; At the same time, analyze the changing trends of performance indicators and execution results, specifically: Obtain the performance indicators within the set time range before the current moment, divide the set time range into several time partitions, and use the standard deviation formula to calculate the trend value of the performance indicators in each time partition; Set a partition trend threshold. If the trend value is greater than the partition trend threshold, it is marked as an abnormal trend corresponding to the performance indicator. The number of abnormal trends in the set time range is counted as the number of abnormal trends. The trend values ​​in each time partition within the set time zone are then calculated using the standard deviation formula to obtain the total trend value. The total trend value and the number of abnormal trends are normalized and weighted to obtain the trend impact value. If the trend impact value is greater than its preset total trend threshold, the corresponding performance indicator is marked as an abnormal performance indicator. Abnormal performance indicators include service response time abnormality, throughput abnormality, and error rate abnormality. S35: If the performance indicators of each atomic service are abnormal, or if the execution results are abnormal, then the corresponding adjustment strategy is executed; S36: Adjustment effect evaluation and feedback: After adjusting and executing the corresponding adjustment strategy, collect the performance indicators of the service, compare them with those before the adjustment, and quantify the degree of difference between the performance indicators after the adjustment and the performance indicators before the adjustment; then calculate the difference between the adjusted performance indicators and their corresponding thresholds to obtain the threshold difference corresponding to the performance indicators; perform normalized weighted calculation on the threshold difference and the degree of difference to obtain the adjustment impact value; if the adjustment impact value is greater than its adjustment effect evaluation threshold, it means that the performance indicator has improved; otherwise, it means that the performance indicator has not improved significantly or has deteriorated, and re-execute S35 until the preset number of executions is reached; at the same time, evaluate whether the execution results of the orchestration process meet expectations based on business goals and logic.

[0034] It should be noted that the above steps implement corresponding adjustment strategies based on the monitoring results of performance indicators, such as increasing the number of service instances and optimizing algorithm logic, which can effectively improve system performance. At the same time, the configuration of concurrency control strategies and the selection of backup services can rationally utilize system resources, avoid resource waste, improve resource utilization, and reduce system costs. By adjusting the effect evaluation and feedback mechanism, we continuously optimize the orchestration process and adjustment strategy to ensure that the execution results of the orchestration process are in line with business goals and logic.

[0035] In the present invention, based on step S35, if the performance indicators of each atomic service are abnormal, or if the execution results are abnormal, the corresponding adjustment strategy is executed, specifically: S351: If the service response time is too long or abnormal, it indicates that the response time is too long due to network fluctuations or temporary high load. An exponential backoff algorithm is used to retry and the request parameters are adjusted to optimize performance. Use the exponential backoff algorithm to determine the retry interval and set the initial retry interval to , the number of retries is m, then the time interval of the mth retry The calculation formula is: ; For example, the initial retry interval = 1 second, the first retry interval is 1 second, the second retry interval is 2 seconds, the third retry interval is 4 seconds, and so on; the initial retry interval The maximum number of retries should be adjusted dynamically according to the characteristics and business needs of different services. For example, for services with high real-time requirements, the maximum number of retries can be appropriately reduced. And reduce the maximum number of retries; for services that have lower real-time requirements but higher requirements for result accuracy, you can increase And increase the maximum number of retries; at the same time, introduce a maximum retry time limit to avoid indefinite retries; If any service still fails after the set number of retries, it will identify whether there is a backup service. If so, it will switch to the backup service. When selecting the backup service, a weighted polling algorithm can be used based on the performance indicators and health status of the service. S352: If the service throughput is insufficient or abnormal, indicating insufficient or fluctuating service processing capacity, the number of service instances is increased through container orchestration tools (such as Kubernetes) to improve processing capacity. It should be noted that when increasing the number of service instances, a throughput threshold is set based on throughput trends and historical data. When the throughput falls below the threshold, the number of service instances is increased in steps. To avoid over-scaling, an upper limit on the number of service instances can be set. S353: If the service error rate is too high or abnormal, indicating that the service frequently encounters errors when processing requests, check the service error log and perform error troubleshooting; and perform repairs based on the results of the error troubleshooting. S354: If an exception occurs in the execution result, indicating that the result returned by the service does not meet expectations, that is, the returned data format is incorrect, the data content is incorrect, or the business logic execution result does not meet regulations, then: S3541 records detailed information about the execution result exception, including request parameters, response content, error time, and service call chain information. The call chain information includes the called service name, call sequence, and execution time of each service. S3542: Review the service's business logic to ensure it complies with business requirements and rules. If any logic errors exist, correct them. S3543: Check the consistency of service-related data to ensure that the data has not been incorrectly modified or lost during the service execution process; if there is any data inconsistency, repair and synchronize the data; S3544, try to re-execute the operation a set number of times, and observe whether the result returns to normal within the set number of times; if it does not return to normal, it means that the execution result is unusual and abnormal, and a rollback operation is performed; when performing a rollback operation, for services involving database operations, the rollback can be performed through the database transaction mechanism; for services involving file operations, the files can be backed up and restored to the previous state when rolling back. After the rollback operation is completed, verification is required to ensure that the system returns to normal; when an unusual abnormality occurs in the execution result, the early warning mechanism is triggered, and detailed information about the abnormal execution result is sent to notify the service-related operation and maintenance personnel.

[0036] It should be noted that the above steps can promptly handle problems such as long service response time, insufficient throughput, high error rate, and abnormal execution results by executing corresponding adjustment strategies for different abnormal situations, thereby avoiding the impact of abnormalities in individual services on the normal operation of the entire system and improving the reliability and stability of the system; by adopting strategies such as exponential backoff algorithm retries, adjusting request parameters, and increasing the number of service instances, the system performance can be effectively optimized, the service response speed and processing capabilities can be improved, and user requirements for system performance can be met.

[0037] The present invention also provides a device for implementing the above-mentioned OPENAPI-based application atomic fusion orchestration, including: The service decomposition and interface definition module is used to perform functional analysis on complex business applications, split them into atomic services, define each service interface according to the OpenAPI specification, and generate OpenAPI documents.

[0038] The service registration and discovery module is used to build a service registration center, implement atomic service registration, health status monitoring and service discovery functions, and use a load balancing algorithm to select appropriate service instances.

[0039] The orchestration and adaptive execution module provides orchestration tools and interfaces, orchestrates service processes according to business needs, generates service call templates, monitors service execution status in real time, and performs adaptive adjustments. Data processing and mapping module, used to perform semantic analysis, format conversion, cleaning verification and semantic mapping on data transmitted between atomic services; Security control module, used to implement multi-level identity authentication, authorization management and data encryption to ensure system security; The integrated deployment and operation and maintenance module is used to integrate services through the API gateway, use containerization technology for deployment, and establish an automated operation and maintenance system for monitoring and processing.

[0040] Other embodiments of the present invention will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the invention being indicated by the following claims.

[0041] It should be understood that the present invention is not limited to the exact construction described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.

Claims

1. A method for implementing application atomic fusion orchestration based on OPENAPI, characterized in that: The steps include: S1: Service decomposition and interface definition: Decompose complex business applications into atomic services and define each service interface according to the OpenAPI specification; S2: Service Registration and Discovery: Build a service registration center to store OpenAPI documents and metadata for services. Register services when they start, and dynamically discover services based on their health status when they are called. S3: Orchestration and Adaptive Execution: Orchestrate service processes based on business needs, generate call templates based on OpenAPI, and monitor and adaptively adjust execution in real time. S4: Data processing and mapping: Perform semantic analysis when transmitting data, complete format conversion, cleaning verification and semantic mapping; S5: Security control: Use multi-level authentication and authorization, and encrypt transmitted data; S6: Integrated deployment and operation and maintenance: Integrate services through API gateway, deploy with containerization technology, and build an automated operation and maintenance system for monitoring and processing.

2. The method for implementing application atomic fusion orchestration based on OPENAPI according to claim 1, characterized in that: Based on step S1, the complex business application is split into atomic services, and the service interfaces are defined according to the OpenAPI specification, as follows: S11: Perform functional analysis on complex business applications and decompose them into multiple atomic services with single, clear functions. The atomic services include user authentication services, data query services, and order processing services. S12: For each atomic service, define a standardized interface according to the OpenAPI specification, describe the interface's input parameters, output results, request method, and response status code, and form the OpenAPI document of the atomic service.

3. The method for implementing application atomic fusion orchestration based on OPENAPI according to claim 1, characterized in that: Based on step S2, the service registration center is constructed to store OpenAPI documents and metadata for the service. The service is registered when it starts and dynamically discovers the service based on the health status when it is called. The specific steps are as follows: S21: A service registration center is built using a distributed architecture. The service registration center is used to store the OpenAPI documents and related metadata of each atomic service. The metadata includes the service name, version number, endpoint address, and service health status information. The service registration center monitors the health status of the service in real time through the heartbeat mechanism; S22: When an atomic service starts, it registers its own OpenAPI document and metadata with the service registry. The registration process can be completed through the RESTful API provided by the service registry. At the same time, the service registry updates the health status information of the service in real time. If the service heartbeat information is not received within the set time, the service is marked as unhealthy. S23: When an application or service needs to call an atomic service, the service registration center dynamically discovers and selects the appropriate atomic service based on the service name, function description, or metadata information, combined with the real-time health status of the service; Among them, when selecting services, a weighted polling algorithm is used, specifically: Identify the number of all current service instances SE as n, set the weight of the i-th service instance as wi, and the index of the current request as index. The calculation formula for the selected service instance SE is: ; Traverse all server instances, accumulate weights, and select the server instance when the accumulated value is greater than or equal to index.

4. The method for implementing application atomic fusion orchestration based on OPENAPI according to claim 1 is characterized in that: Based on step S4, semantic analysis is performed when the data is transmitted to complete format conversion, cleaning verification and semantic mapping, specifically: S41: Use natural language processing technology and domain ontology libraries to perform semantic analysis on data transmitted between atomic services; identify key entities and relationships in the data, and understand the meaning and purpose of the data; S42: Perform data format conversion according to the data format requirements of the source service and the target service; Data format conversion is achieved by using data conversion tools or writing custom scripts; S43: Clean and validate data to remove invalid, duplicate, and erroneous data; define data validation rules, including data type checks, length checks, and range checks; S44: Establish a semantic mapping table to semantically map data between different services.

5. The method for implementing application atomic fusion orchestration based on OPENAPI according to claim 1 is characterized in that: Based on step S5, multi-level authentication and authorization are used to encrypt the transmitted data, specifically including: S51: A multi-layered authentication mechanism is used, including OAuth2.0-based token authentication and digital certificate-based authentication. Users or applications are required to provide valid identity credentials when calling atomic services. S52: Perform fine-grained authorization control on access to atomic services based on the roles and permissions of users or applications. Use a role-based access control model to define permission sets for different roles. S53: During data transmission, the data is encrypted using the SSL / TLS encryption protocol.

6. The method for implementing application atomic fusion orchestration based on OPENAPI according to claim 1 is characterized in that: Based on step S6, integrate services through the API gateway, deploy using containerized technology, and build an automated operation and maintenance system for monitoring and processing. The specific steps are as follows: S61, use the API gateway to integrate the orchestrated atomic services into a unified interface layer; The API gateway is responsible for receiving external requests, forwarding them to the corresponding atomic services based on the request path and parameters, and performing unified processing of requests and responses, including logging, current limiting, and caching. S62: Use Docker containerization technology to package atomic services into independent containers, and use Kubernetes for container orchestration and management. The containerized deployment is used to achieve rapid deployment, elastic scaling, and resource isolation of services. S63, establish an automated operation and maintenance system, use Prometheus to monitor service performance indicators, and use Grafana for data visualization; when anomalies occur or performance indicators exceed thresholds, alarms and processing mechanisms are automatically triggered, including automatic restart of services and expansion of resources.

7. The method for implementing application atomic fusion orchestration based on OPENAPI according to claim 1 is characterized in that: Based on step S3, the service process is orchestrated according to business needs, a call template is generated based on OpenAPI, and real-time monitoring and adaptive adjustments are made during execution. The specific steps are as follows: S31: Business Process Orchestration Design: Visual orchestration: Provides a visual orchestration tool. Users can drag and drop atomic service icons to the orchestration interface and use lines to represent the calling sequence between services. During the orchestration process, you can define the service calling sequence, data transfer relationship, and conditional judgment logic; Code programming arrangement: providing API interface based on specific programming language; The API interface uses code to write service orchestration logic; S32: Call module generation: Automatically generate service call templates based on the OpenAPI document of the atomic service; for each interface defined in the OpenAPI document, extract its request method, request URL, request parameters, and response format information; S33: Orchestration process execution: Sequential execution: Call each atomic service in sequence according to the service call sequence designed by the orchestration. When calling each service, use the generated call template and pass the necessary parameters to the service. Concurrent execution: For relatively independent service calls, concurrent execution is adopted; S34: During the service call process, the performance indicators of each atomic service are monitored and analyzed in real time; service status information is obtained through the health check mechanism of the service registration center or the status interface provided by the service itself, including whether the service is running normally or has exited abnormally; Compare the service status information with its preset conditions to generate an execution result; Monitor and analyze the performance indicators of each atomic service in real time. If the response time exceeds the response time threshold, mark it as a service response time that is too long. If the throughput is less than its throughput threshold, it is marked as insufficient throughput; if the error rate is greater than its error rate threshold, it is marked as too high an error rate for the marking service; At the same time, analyze the changing trends of performance indicators and execution results, specifically: Obtain the performance indicators within the set time range before the current moment, divide the set time range into several time partitions, and use the standard deviation formula to calculate the trend value of the performance indicators in each time partition; Set a partition trend threshold. If the trend value is greater than the partition trend threshold, it is marked as an abnormal trend corresponding to the performance indicator. The number of abnormal trends in the set time range is counted as the number of abnormal trends; Then, the trend values ​​in each time partition in the set time zone are calculated using the standard deviation formula to obtain the total trend value; The trend impact value is obtained by normalizing and weighting the total trend value and the number of abnormal trends; If the trend impact value is greater than its preset total trend threshold, the corresponding performance indicator will be marked as an abnormal performance indicator; abnormal performance indicators include abnormal service response time, abnormal throughput and abnormal error rate; S35: If the performance indicators of each atomic service are abnormal, or if the execution results are abnormal, then the corresponding adjustment strategy is executed; S36: Adjustment effect evaluation and feedback: After implementing the corresponding adjustment strategy, collect the service performance indicators, compare them with those before the adjustment, and quantify the difference between the performance indicators after the adjustment and the performance indicators before the adjustment; Then, the difference between the adjusted performance indicator and its corresponding threshold is calculated to obtain the threshold difference corresponding to the performance indicator; The threshold difference and the degree of difference are normalized and weighted to obtain the adjusted impact value; if the adjusted impact value is greater than the adjustment effect evaluation threshold, it means that the performance indicator has been improved; On the contrary, it means that the performance indicator has not improved significantly or has deteriorated, and S35 is re-executed until the preset number of executions is reached; at the same time, based on the business goals and logic, evaluate whether the execution results of the orchestration process meet expectations.

8. The method for implementing application atomic fusion orchestration based on OPENAPI according to claim 7, characterized in that: Based on step S35, if the performance indicators of each atomic service are abnormal, or if the execution result is abnormal, the corresponding adjustment strategy is executed, specifically: S351: If the service response time is too long or abnormal, it indicates that the response time is too long due to network fluctuations or temporary high load. An exponential backoff algorithm is used to retry and the request parameters are adjusted to optimize performance. Use the exponential backoff algorithm to determine the retry interval and set the initial retry interval to , the number of retries is m, then the time interval of the mth retry The calculation formula is: ; If any service still fails after the set number of retries, it will identify whether there is a backup service. If so, it will switch to the backup service. When selecting the backup service, a weighted polling algorithm can be used based on the performance indicators and health status of the service. S352: If the service throughput is insufficient or abnormal, it indicates that the service processing capacity is insufficient or fluctuates greatly. Increase the number of service instances using the container orchestration tool. S353: If the service error rate is too high or abnormal, indicating that the service frequently encounters errors when processing requests, check the service error log and perform error troubleshooting; and perform repairs based on the results of the error troubleshooting. S354: If an exception occurs in the execution result, indicating that the result returned by the service does not meet expectations, then: S3541 records detailed information about abnormal execution results, including request parameters, response content, and error time. S3542: Review the service's business logic and correct any logical errors. S3543: Check the consistency of service-related data. If there is any inconsistency, repair and synchronize the data. S3544, try to re-execute the operation a set number of times, and observe whether the result returns to normal within the set number of times; if it does not return to normal, it means that the execution result is unusual, and the rollback operation is performed; when an unusual exception occurs in the execution result, the early warning mechanism is triggered, and detailed information about the abnormal execution result is sent to notify the service-related operation and maintenance personnel.

9. A device for implementing application atomic fusion orchestration based on OPENAPI according to any one of claims 1 to 8, characterized in that: include: The service decomposition and interface definition module is used to perform functional analysis on complex business applications, split them into atomic services, define each service interface according to the OpenAPI specification, and generate OpenAPI documents; The service registration and discovery module is used to build a service registration center, implement atomic service registration, health status monitoring, and service discovery functions, and use a load balancing algorithm to select the appropriate service instance; The orchestration and adaptive execution module provides orchestration tools and interfaces, orchestrates service processes according to business needs, generates service call templates, monitors service execution status in real time, and performs adaptive adjustments. Data processing and mapping module, used to perform semantic analysis, format conversion, cleaning verification and semantic mapping on data transmitted between atomic services; Security control module, used to implement multi-level identity authentication, authorization management and data encryption; The integrated deployment and operation and maintenance module is used to integrate services through the API gateway, use containerization technology for deployment, and establish an automated operation and maintenance system for monitoring and processing.

Citation Information

Patent Citations

  • Novel industrial APP and identifier registration analysis integration method

    CN113791586A

  • API arrangement and management method and device, electronic equipment and storage medium

    CN115857881A

  • Fusion service system based on service orchestration

    CN117201262A

  • Program, method, and system for execution of software services

    US20180113940A1

Cited By

  • Power grid supply and demand cooperative control method and system based on soft bus and atomization service

    CN121262030A