Heterogeneous operator integration method and system based on standardized SDK and partition configuration
By standardizing the SDK and partitioning the configuration, the problem of large differences in interface definition and configuration methods and difficulty in unified encapsulation in the development of heterogeneous operators is solved. This enables unified access and dynamic routing of heterogeneous operators, and improves the efficiency of operator resource sharing and management.
Patent Information
- Application Number
- CN202611303429.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-26
- Publication Date
- 2026-11-17
AI Technical Summary
The current development of heterogeneous operators lacks unified development specifications and standardized access rules, which leads to the access process relying on manual customization, increasing workload, and making it difficult to share and reuse across teams and projects.
By adopting a standardized SDK and partition configuration approach, business requests are received through a platform-level gateway, partition configuration files are parsed, and the registration relationship between operator identifiers and business classes is established to achieve unified encapsulation and dynamic routing, separate the runtime environment from business code, and maintain instance status using a cluster-level gateway.
It reduces the cost of operator access and integration, improves the reusability across teams and projects, promotes the unified management and accumulation of operator resources, and enhances operational management efficiency.
Smart Images

Figure CN123114455A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer software development technology, and in particular to a heterogeneous operator integration method and system based on a standardized SDK (Software Development Kit) and partition configuration. Background Technology
[0002] With the development of technologies such as big data analytics, artificial intelligence reasoning, image processing, and spatial information computing, business processes are typically broken down into multiple operators with independent data processing capabilities, and complex business tasks are completed by combining these operators. Because different operators have different functional requirements, development languages, and operating environments, different R&D teams usually use different technology stacks to develop operators separately, resulting in heterogeneous operators, including Java operators, Python operators, and other types of operators.
[0003] In the current process of developing and integrating heterogeneous operators, there is often a lack of unified development specifications and standardized integration rules. Different R&D teams often determine their own code structure, project directory, interface format, configuration fields, and input / output parameter formats when developing operators, resulting in significant differences in interface definitions and configuration methods between different operators. Furthermore, existing operator development methods typically lack a unified software development kit to constrain operator base classes, data processing interfaces, input parameters, output parameters, and registration methods, making it difficult to encapsulate operators according to a unified structure.
[0004] When integrating heterogeneous operators into an operator management platform or business platform, the platform typically needs to write adaptation code for each operator's code structure, interface protocol, and configuration format, and configure interface routing, parameter conversion rules, and integration documentation separately based on the operator's characteristics. When the operator's development language, interface fields, or configuration method changes, the corresponding adaptation program also needs to be readjusted. This makes the operator integration process heavily reliant on manual customization by developers and operations personnel, increasing the workload required for operator development, debugging, and platform integration.
[0005] Furthermore, due to the lack of unified code inheritance rules, interface standards, and configuration specifications among different operators, developed operators can typically only be used within the existing project or platform. When operators need to be migrated to other projects, other business clusters, or reused by other R&D teams, interface modifications and configuration adaptations are often required again, making it difficult to achieve direct sharing of operators across teams and projects. As the number of operators increases, the problems of redundant development and adaptation are further aggravated, hindering the unified accumulation, management, and reuse of existing algorithm capabilities and computing resources. Summary of the Invention
[0006] To overcome, to some extent, the problems of inconsistent development standards, high access and adaptation costs, and difficulties in reuse of heterogeneous operators in related technologies, this application provides a heterogeneous operator integration method and system based on a standardized SDK and partition configuration.
[0007] The proposed solution is as follows:
[0008] According to a first aspect of the embodiments of this application, a heterogeneous operator integration method based on a standardized SDK and partition configuration is provided, comprising: The platform-level gateway receives service requests sent by external access terminals and determines the target operator corresponding to the service request. Obtain the operator runtime image and operator business application package of the target operator, and load the operator business application package based on the operator runtime image; the operator business application package includes operator business code and partition configuration file, the operator business code is encapsulated into operator business class that inherits the unified operator base class provided by the standardized SDK, the operator business class is implemented according to the data processing interface preset by the unified operator base class, and the registration relationship between the operator identifier and the operator business class is established through the service registration component; The partition configuration file is parsed; the partition configuration file is divided into application configuration partition, development entity configuration partition, registration configuration partition and service configuration partition according to the declarative configuration specification, which are used to record operator instance initialization information, development entity information, gateway registration parameters and operator interface information, respectively. Based on the parsed operator identifier and the registration relationship, obtain the corresponding operator business class, create a target operator object, and establish a routing mapping relationship between the interface access path in the operator interface information and the data processing interface of the target operator object; start the target operator instance based on the target operator object that has completed the routing mapping relationship; The target operator instance registers with the cluster-level gateway according to the gateway registration parameters, and the cluster-level gateway maintains the registration status of the target operator instance according to the health inspection results; The platform-level gateway forwards the service request to the cluster-level gateway, which then routes the service request to a target operator instance that is in a normal registration state, so that the target operator instance can call the data processing interface through the target operator object to process the service request.
[0009] Preferably, the encapsulation of operator business code and the establishment of the partition configuration file include: The standardized SDK is embedded as a code dependency package into the operator development environment; the standardized SDK includes the unified operator base class and the service registration component. The unified operator base class presets the data processing interface, test page interface, health detection interface and metadata acquisition interface. The service registration component receives the operator identifier and registers the operator business class with the operator identifier to the operator object registry. According to the declarative configuration specification, the partition configuration file is divided into mutually independent application configuration partition, development entity configuration partition, registration configuration partition and service configuration partition; Configure the operator application name, process listening address, service port, version information and function description in the application configuration partition; configure the development entity name and development entity contact information in the development entity configuration partition; configure the registration client name, cluster group, registration communication port and target cluster-level gateway address in the registration configuration partition. In the service configuration partition, for each operator, an operator identifier, input parameters, optional parameters, output fields, interface access path, primary business category, secondary business category, and gateway group identifier are configured, so that the operator identifier is consistent with the class identifier of the corresponding operator business class, and the data types of the input parameters, optional parameters, and output fields are configured respectively. A set of general parameter types is pre-defined, and the data types of the input parameters, optional parameters, and output fields are validated according to the set of general parameter types. When the optional parameters are not received, the parameters are filled according to the corresponding default values in the service configuration partition. When the interface access path is not configured, a default interface access path is generated according to the preset routing generation rules.
[0010] Preferably, the encapsulation of operator business code and the parsing of the partition configuration file include: Establish an operator project directory according to the standardized engineering directory rules, set up a local startup script, a container deployment script, an application startup entry directory and an operator business code directory in the operator project directory, create operator business files in the operator business code directory, and make the file identifier of the operator business files consistent with the operator identifier in the service configuration partition; In the operator business file, an operator business class that inherits from the unified operator base class is established. The operator business class is registered through the service registration component. The data processing interface, the health detection interface, the test page interface, and the metadata acquisition interface are implemented in the operator business class. Establish a service startup entry in the application startup entry directory, set the storage path and file upload directory of the partition configuration file, and create a service management object based on the storage path and the file upload directory; When starting the operator service, the partition configuration file is read, and the partition configuration file is checked for declarative configuration syntax and required configuration partitions. The application configuration partition is parsed to initialize the application service, the registration configuration partition is parsed to generate a registration configuration object, and the operator configurations in the service configuration partition are parsed in a loop. According to the operator identifier in each operator configuration, the corresponding operator business class is obtained from the operator object registry, the operator object corresponding to each operator configuration is dynamically created, and the interface access path in each operator configuration is batch bound to the data processing interface of the corresponding operator object; The parsing results of each configuration partition are summarized to generate operator metadata, including interface input information, interface output information, business classification information, version information, and interface access path, for operator retrieval and interface documentation generation. The local startup script is executed to start the operator service according to the storage path of the partition configuration file, and a test request is sent to the interface access path. The execution status of partition configuration reading, operator business class registration, operator object creation, interface route binding, and interface data sending and receiving is determined according to the response result of the test request.
[0011] Preferably, obtaining the operator runtime image and operator business application package of the target operator includes: According to the resource splitting rules, the operating system, programming language runtime environment, hardware drivers and third-party public dependencies are identified as runtime environment resources, and the operator business code, partition configuration file and project dependency description file are identified as business application resources. The runtime environment resources are constructed into an operator runtime image that does not contain the operator business code and the partition configuration file, and the business application resources are packaged into an operator business application package; Deploy mutually isolated container image services and application marketplace management services, store the operator runtime image in the container image service, and store the operator business application package in the application marketplace management service; The operator runtime image is built based on the base image, and an image version label including environment version and hardware adaptation type is set for the operator runtime image according to the image naming rules. The operator runtime image with the image version label is uploaded to the container image service, and the image version information and upload log are recorded. After completing the debugging of the operator business code, remove the runtime environment files from the business application resources, compress the business application resources into an operator business application package associated with the application version, and submit the operator business application package, application version, adapted image version and function description to the application market management service. The application market management service performs compliance verification on the partition configuration file format and directory structure of the operator business application package. If the verification passes, the operator business application package is set to a publishable state. If the verification fails, a verification failure message is generated and the operator business application package is set to an unpublishable state.
[0012] Preferably, loading the operator service application package based on the operator runtime image includes: An association index between application versions and image versions is established in the application market management service, so that the application version and the adapted image version are corresponding. Upon receiving the operator remote deployment instruction, the system queries the associated index based on the hardware environment of the target application server and the version of the application to be deployed, determines the corresponding image version, and selects the target operator running image from the container image service that has the image version and is compatible with the hardware environment. The target application server downloads the target operator runtime image from the container image service through repository authentication, and downloads the target operator business application package from the application market management service according to the application name and the version of the application to be deployed; Unzip the target operator business application package, mount the unzipped business application directory to the preset working directory of the container instance created based on the target operator runtime image, and enable the container instance to read the partition configuration file in the business application directory to complete service initialization; Perform container startup verification to check the dependency integrity of the container instance and the validity of the partition configuration file, and set the operator instance to the ready state when the verification passes; When iterating over an operator service, only the operator service code or the partition configuration file is updated, and a new version of the operator service application package is rebuilt and released. Without rebuilding the target operator runtime image, the business application directory mounted on the container instance is replaced to complete the operator version update. Archive the operator running images that have not been called by deployment tasks within the preset statistical period and meet the preset archiving conditions, and clean up the operator business application packages whose version status is marked as invalid and meet the preset cleanup conditions. Select a text parsing operator for deployment testing. Build a verification operator running image based on a base image of a preset programming language and upload it to the container image service. Package the operator business code and partition configuration file corresponding to the text parsing operator into a verification operator business application package, upload it to the application market management service, and issue a deployment instruction to the test application server after passing compliance verification. The test application server is controlled to download the verification operator runtime image and the verification operator business application package, mount the business application directory and start the verification container instance, call the interface of the text parsing operator, and determine the service running status of the verification container instance based on the interface response result. After modifying the business processing logic of the text parsing operator, only the verification operator business application package is updated and republished, and the version update of the text parsing operator is completed without rebuilding the verification operator runtime image.
[0013] Preferably, the registration of the target operator instance with the cluster-level gateway and the maintenance of the registration status of the target operator instance by the cluster-level gateway based on the health inspection results include: Configure a platform-level gateway, cluster-level gateways deployed in each business cluster, a service registration module, a health inspection module, and a memory-based dynamic service registry, so that each operator instance belongs to the management of the corresponding cluster-level gateway; wherein, the platform-level gateway is used for public network request access, global security policy execution, cross-cluster route distribution, and full-link log collection, and the cluster-level gateway is used for service registration management, instance status monitoring, internal network traffic forwarding, and load balancing scheduling within the cluster; The memory-based dynamic service registry is established in each cluster-level gateway to store the operator identifier, cluster group, access address, service port and health status of each operator instance in the corresponding business cluster. After the target operator instance completes startup, partition configuration file parsing, and service initialization, the target cluster-level gateway address, registered client name, cluster group, and registered communication port in the registration configuration partition are read, and a standardized registration message is generated by combining the operator application name, access address, service port, and health detection interface address of the target operator instance. The standardized registration message is sent to the target cluster-level gateway, which then sequentially performs message format verification, client identity authentication, and network address blacklist / whitelist verification on the standardized registration message. If the verification passes, the target operator instance's operator identifier, cluster group, access address, service port, and health status are written to the memory-based dynamic service registry, the target operator instance is marked as online and healthy, and a registration success response is returned. If the verification fails, a registration failure response is returned and the registration is terminated. Configure a periodic health inspection task in the target cluster-level gateway, set the inspection time interval, and determine the health detection interface as the probe interface; According to the inspection interval, a health detection request is sent to the operator instance in the memory-based dynamic service registry that is online. The operator instance calls the health detection interface to generate a health detection result including service running status, service runtime, and load status. The health detection results are analyzed. When the health detection request is responded to normally and the response status meets the preset conditions, the health status of the corresponding operator instance is maintained. When a request timeout, connection failure, or abnormal response status occurs, the corresponding operator instance is updated to an abnormal status or offline status, and the corresponding operator instance is removed from the traffic forwarding candidate set.
[0014] Preferably, the platform-level gateway and the cluster-level gateway route the service request to the target operator instance with a normal registration status, including: The platform-level gateway performs client identity authentication, request message legality verification, access permission verification, and network address blacklist / whitelist verification on the service requests, and blocks service requests that fail the verification. Based on the access domain name, interface access path and preset global routing rules corresponding to the verified business request, the target business cluster is determined, and the business request is forwarded to the target cluster-level gateway corresponding to the target business cluster. The target cluster-level gateway parses the interface access path, matches the operator identifier and the cluster group to which it belongs in the memory-based dynamic service registry according to the interface access path, and filters a set of available operator instances with normal health status. According to the preset load balancing strategy, the target operator instance is selected from the set of available operator instances, and the business request is forwarded to the target operator instance, which then processes the business request and generates a business processing result. The business processing result is returned to the external access terminal sequentially via the target cluster-level gateway and the platform-level gateway; Before an operator instance actively stops its service, a deregistration request is received from the operator instance, the registration information of the corresponding operator instance is deleted from the memory-based dynamic service registry, and the traffic forwarding candidate set is updated synchronously. For operator instances that lose connection due to process abnormalities or network interruptions and fail health checks within a preset number of consecutive checks, the registration information of the corresponding operator instance is cleared from the memory-based dynamic service registry. After a new operator instance completes its registration, the new operator instance is added to the corresponding traffic forwarding candidate set. Deploy the platform-level gateway and at least one cluster-level gateway in the test environment, start multiple groups of test operator instances of different types, and determine whether each test operator instance has completed automatic registration and whether it has been recognized by the corresponding cluster-level gateway based on the registration information in the memory-type dynamic service registry. The test operator instance is simulated under the following scenarios: abnormal test operator instance, active stop, and new test operator instance. The update result of the corresponding instance status is determined based on the changes in the memory-type dynamic service registry and the traffic forwarding candidate set. Test service requests are continuously sent in batches, and the request forwarding results of the platform-level gateway and the cluster-level gateway, as well as the request allocation results of each test operator instance, are recorded to determine the execution status of the preset load balancing strategy under continuous service requests.
[0015] Preferably, the method further includes: performing automated lifecycle management of the target operator instance based on standardized scripts; the automated lifecycle management includes: Build a fully automated lifecycle management pipeline consisting of local startup scripts, container deployment scripts, a three-tier application marketplace release channel, a runtime metric collection module, an elastic scaling module, a gateway traffic limiting module, and an anomaly alarm module; Configure the local startup script to integrate operating system recognition, environment variable initialization, framework dependency installation, directory navigation, and sub-script calling logic, and preset the configuration file path and project working directory; When the local startup script is executed, the currently running operating system is identified, the environment variables corresponding to the local network address and service port are read and configured, the operator runtime dependencies are installed, the project working directory is navigated to, and the internal startup script is called to start the operator service. Configure the container deployment script to integrate image repository login authentication, local image detection, remote image retrieval, and container runtime parameter assembly functions, and preset the operator running image address, host port, and image repository authentication information; When executing the container deployment script, it checks whether the specified version of the operator runtime image exists in the target application server. If it does not exist, it logs into the container image service to obtain the operator runtime image, parses the partition configuration file to obtain the internal service port of the container, configures the business application directory mount relationship, the host machine and container port mapping relationship, hardware call permissions and environment variables, so as to start the target container instance. Establish development release channels, test release channels, and production release channels in the application market management service, and configure access permissions, operation permissions, and version flow approval rules for each; According to the hierarchical release rules, the operator business application package that has completed local debugging is uploaded to the development release channel. After functional testing and approval, it is transferred to the test release channel. After performance testing, compatibility testing and approval, it is transferred to the production release channel. The release time, version transfer status and associated mirror version of each version are recorded. The processor utilization, memory usage, number of concurrent requests, interface response time and service error rate of each operator instance are continuously collected. Based on the collected operating indicators, expansion and contraction conditions are determined respectively. When the expansion conditions are met, a new operator instance is created. When the contraction conditions are met, the operator instance to be contracted is taken offline and the corresponding resources are released. Concurrency request limits are configured for individual operators and operator groups, and the platform-level gateway or the cluster-level gateway performs rate limiting on service requests that exceed the concurrency request limits. The system aggregates the access logs, operation logs, and error logs generated by the platform-level gateway, the cluster-level gateway, and each operator instance. Based on the operation metrics and the aggregated logs, it identifies service offline, resource insufficiency, error rate exceeding limits, and abnormal traffic events, and generates abnormal alarm information.
[0016] Preferably, the full lifecycle automated management and control further includes: Establish a hot upgrade and fault rollback mechanism. When upgrading operator versions, deploy new version operator instances using rolling update or blue-green deployment. After the new version operator instance meets the preset stable operation conditions, switch business requests to the new version operator instance. If an abnormal operation is detected in the new version operator instance, switch business requests to the operator instance corresponding to the historical stable version. Establish multi-environment consistency guarantee rules to ensure that the development release channel, the test release channel, and the production release channel adopt the same partition configuration specifications and operator runtime image system, and restrict the operator business application package from modifying the partition configuration file during the cross-release channel flow; Execute the local startup script in the local environment to start the operator service and call the corresponding interface. Determine the execution status of operator local debugging, service startup and interface call based on the interface response results. Upload the debugged operator business application package to the development release channel, and sequentially complete the version flow to the test release channel and the production release channel according to the preset approval process; The platform management terminal issues remote deployment commands to enable the application server to automatically execute the download of operator runtime image, download of operator business application package, container startup, operator instance registration and route access, and determine the remote deployment result based on the corresponding execution records; Simulate high-concurrency business scenarios and continuously send business requests. Determine the execution status of automatic scaling and gateway rate limiting based on the creation records, registration records, and request rate limiting records of newly added operator instances. Simulate a scenario where server resources meet the scaling-down conditions, and determine the execution status of automatic scaling-down based on the offline records and resource release records of the instance to be scaled down. Simulate code exceptions and network interruption scenarios, and determine the log aggregation and exception alarm execution status based on the summarized logs and exception alarm information; Perform operator version upgrade operation, and simulate the operation of the new version operator instance after the new version operator instance is running. Determine the execution status of version hot upgrade and fault rollback based on the routing switch record of business request.
[0017] According to a second aspect of the embodiments of this application, a heterogeneous operator integration system based on a standardized SDK and partition configuration is provided, including: an operator standardization access module, a dual resource partitioning management module, and a hierarchical gateway dynamic routing module; The operator standardization access module includes: The standardized SDK unit provides a unified operator base class and a service registration component, which encapsulates the operator business code into an operator business class that inherits from the unified operator base class. The operator business class is implemented according to the data processing interface preset by the unified operator base class, and the registration relationship between the operator identifier and the operator business class is established through the service registration component. The partition configuration unit is used to create a partition configuration file according to the declarative configuration specification. The partition configuration file includes an application configuration partition, a development entity configuration partition, a registration configuration partition, and a service configuration partition, which are used to record operator instance initialization information, development entity information, gateway registration parameters, and operator interface information, respectively. A configuration parsing unit is used to parse the partition configuration file, obtain the corresponding operator business class according to the parsed operator identifier and the registration relationship, create an operator object, and establish a routing mapping relationship between the interface access path in the operator interface information and the data processing interface of the operator object; The dual-resource warehouse management module includes: The resource acquisition unit is used to acquire the operator runtime image and operator business application package of the target operator; the operator business application package includes the operator business code and the partition configuration file; The resource loading unit is used to load the operator service application package based on the operator runtime image, and to start the operator instance based on the operator object that has completed the routing mapping relationship; The hierarchical gateway dynamic routing module includes: The platform-level gateway is used to receive service requests sent by external access terminals, determine the target operator corresponding to the service request, and forward the service request to the cluster-level gateway. The cluster-level gateway is used to receive the registration request sent by the operator instance according to the gateway registration parameters, maintain the registration status of the operator instance according to the health inspection results, and route the business request to the target operator instance with a normal registration status, so that the target operator instance can call the data processing interface to process the business request through the corresponding operator object.
[0018] The technical solution provided in this application may include the following beneficial effects: This application utilizes a standardized SDK to provide a unified operator base class, data processing interface, and service registration mechanism. Combined with a partition configuration file, it unifies operator instance initialization information, gateway registration parameters, and operator interface information. This enables heterogeneous operators developed using different technology stacks to be encapsulated according to a unified code structure, interface specifications, and configuration rules, eliminating the need to write adaptation code for each platform. This reduces operator access and integration costs and improves operator reusability across teams and projects. Furthermore, by separating the acquisition and loading of the operator runtime image from the operator business application package, the runtime environment and business code are decoupled, facilitating independent updates of business content. Moreover, by automatically registering target operator instances with the cluster-level gateway, and having the cluster-level gateway maintain instance status based on health check results, business requests can be dynamically routed to target operator instances with normal registration status, improving the reliability, adaptability, and operational management efficiency of operator calls.
[0019] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0020] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0021] Figure 1 This is a flowchart illustrating a heterogeneous operator integration method based on a standardized SDK and partition configuration provided in one embodiment of this application; Figure 2 This is a schematic diagram of the workflow of an operator standardization access module provided in one embodiment of this application; Figure 3 This is a schematic diagram of the workflow of a dual-resource warehouse management module provided in one embodiment of this application; Figure 4 This is a schematic diagram illustrating the workflow of a hierarchical gateway dynamic routing module according to an embodiment of this application; Figure 5This is a schematic diagram of the workflow of a full lifecycle automated management and control module provided in one embodiment of this application; Figure 6 This is a schematic diagram of the structure of a heterogeneous operator integration system based on a standardized SDK and partition configuration, provided in one embodiment of this application. Detailed Implementation
[0022] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0023] Example 1 Figure 1 This is a flowchart illustrating a heterogeneous operator integration method based on a standardized SDK and partition configuration, provided in one embodiment of this application. (Refer to...) Figure 1 A heterogeneous operator integration method based on a standardized SDK and partition configuration includes: S1. Receive business requests sent by external access terminals through the platform-level gateway and determine the target operator corresponding to the business request; S2. Obtain the operator runtime image and operator business application package of the target operator, and load the operator business application package based on the operator runtime image. The operator business application package includes operator business code and partition configuration file. The operator business code is encapsulated into operator business classes that inherit the unified operator base class provided by the standardized SDK. The operator business classes are implemented according to the data processing interface preset by the unified operator base class, and the registration relationship between the operator identifier and the operator business class is established through the service registration component. S3. Parse the partition configuration file; the partition configuration file is divided into application configuration partition, development entity configuration partition, registration configuration partition and service configuration partition according to the declarative configuration specification, which are used to record operator instance initialization information, development entity information, gateway registration parameters and operator interface information respectively; S4. Obtain the corresponding operator business class based on the parsed operator identifier and registration relationship, create the target operator object, and establish a routing mapping relationship between the interface access path in the operator interface information and the data processing interface of the target operator object; start the target operator instance based on the target operator object with the completed routing mapping relationship. S5. The target operator instance registers with the cluster-level gateway according to the gateway registration parameters, and the cluster-level gateway maintains the registration status of the target operator instance based on the health inspection results. S6. The platform-level gateway forwards the business request to the cluster-level gateway, which then routes the business request to the target operator instance with a normal registration status, so that the target operator instance can call the data processing interface through the target operator object to process the business request.
[0024] For ease of understanding, the following explains some key terms in this embodiment: The platform-level gateway serves as the unified entry point for the system to provide services to the outside world. It is responsible for receiving business requests from external access terminals and performing initial request processing and distribution.
[0025] A target operator refers to a computational unit that needs to execute specific business logic. It can be heterogeneous, meaning it can be developed using different technology stacks.
[0026] The operator runtime image contains the basic environment required for the operator to run, such as the operating system, programming language runtime, and necessary library files.
[0027] The operator business application package contains the specific business logic code and configuration information of the operator, such as the operator business code and partition configuration file, and is the carrier of the operator's core functions.
[0028] A standardized SDK is a software development kit that provides unified development standards and components, such as a unified operator base class and a service registration component, to standardize the development and integration of operators.
[0029] The unified operator base class is an abstract class or interface provided by the standardized SDK. It defines the common structure and interface specifications that all operator business classes need to follow, such as data processing interfaces.
[0030] The service registration component, a module in the standardized SDK, is responsible for managing the registration relationship between operator identifiers and operator business classes, enabling operators to be recognized and invoked by the system.
[0031] The partition configuration file adopts a declarative configuration specification, dividing the operator configuration information into different logical partitions for easy management and parsing, such as application configuration partition, development main configuration partition, registration configuration partition and service configuration partition.
[0032] A cluster-level gateway is a gateway deployed within a business cluster. It is responsible for managing the registration and status maintenance of operator instances within the cluster, as well as the routing and load balancing of business requests.
[0033] This embodiment provides a heterogeneous operator integration method based on a standardized SDK and partition configuration.
[0034] First, the platform-level gateway receives service requests from external clients and determines the target operator corresponding to each request. Specifically, the platform-level gateway can be configured to listen on a specific network port to receive all incoming external service requests. When a service request arrives, the gateway can identify and determine the target operator that needs to be processed based on specific fields in the request header or body, such as predefined operator names or service type identifiers. For example, the gateway can maintain a static mapping table, associating a specific identifier in the request with a target operator, thereby achieving initial identification of the target operator.
[0035] Secondly, the system obtains the operator runtime image and operator application package for the target operator, and loads the operator application package based on the operator runtime image. The operator runtime image and operator application package can be pre-stored in the file system or a simple storage service. When the target operator needs to be deployed, the system can directly copy or download the corresponding image file and application package file from these storage locations based on the target operator's name or identifier. The loading process can be achieved by manually unzipping the contents of the operator application package to a specific working directory of a container instance created based on the operator runtime image, and then starting the container instance. The operator application package includes operator business code and partition configuration files. The operator business code is encapsulated as an operator business class that inherits from the unified operator base class provided by the standardized SDK. This operator business class implements the data processing interface preset by the unified operator base class and establishes a registration relationship between the operator identifier and the operator business class through the service registration component. For example, developers can manually write the operator business code, ensuring that it inherits from a predefined base class and implements the data processing interface declared in the base class. Additionally, developers can manually specify a string as an operator identifier in the code and call a registration method of the service registration component to associate the identifier with the implemented operator business class. The partition configuration file can be a simple text file, in which developers can manually edit the configuration items.
[0036] Further, the partition configuration file is parsed. This partition configuration file is divided into application configuration, development entity configuration, registration configuration, and service configuration partitions according to a declarative configuration specification. These partitions are used to record operator instance initialization information, development entity information, gateway registration parameters, and operator interface information, respectively. Parsing of the partition configuration file can be achieved using a simple parser. This parser reads the file content line by line according to a preset text format, such as INI format or a custom delimiter format, and categorizes the content into different logical partitions based on specific identifiers at the beginning of each line. For example, specific tags can be defined to distinguish between application configuration, development entity configuration, etc., and then the corresponding information can be manually extracted.
[0037] Therefore, based on the parsed operator identifier and the registration relationship, the corresponding operator business class is obtained, a target operator object is created, and a routing mapping relationship is established between the interface access path in the operator interface information and the data processing interface of the target operator object. The target operator instance is then started based on the target operator object with the completed routing mapping relationship. During operator startup, the system can traverse all registered operator identifiers and operator business classes, and manually find the corresponding operator business class based on the operator identifier parsed from the partition configuration file. Subsequently, the target operator object is created through reflection or by directly instantiating the class. The mapping between the interface access path and the data processing interface can be a hard-coded dictionary or hash table, manually associating each interface path with a specific method in the operator object. The target operator instance can be started by executing a simple startup script, which loads the operator object and starts listening for requests.
[0038] Subsequently, the target operator instance registers with the cluster-level gateway according to the gateway registration parameters. The cluster-level gateway maintains the registration status of the target operator instance based on health check results. After the target operator instance starts, it can read the gateway registration parameters in its configuration file and then send a registration request containing its own information to a preset cluster-level gateway address. The cluster-level gateway can periodically send simple "heartbeat" requests to all registered operator instances, such as an HTTP GET request to the root path of the operator instance. If a response is received, the instance is considered healthy; otherwise, it is marked as unhealthy.
[0039] Finally, the platform-level gateway forwards the service request to the cluster-level gateway, which then routes the request to a target operator instance with a valid registration status. This allows the target operator instance to process the service request by calling the data processing interface through the target operator object. After determining the target operator, the platform-level gateway can forward the service request directly to the corresponding cluster-level gateway based on preset rules, such as operator type or service cluster ID. Upon receiving the request, the cluster-level gateway can query its internally maintained list of operator instances, select an instance with a valid registration status, and then send the request directly to that instance's network address and port. Upon receiving the request, the target operator instance, through its internal routing mapping, calls the corresponding data processing interface to perform the service processing.
[0040] This embodiment introduces a standardized SDK and partitioned configuration, providing a unified specification for the development and access of heterogeneous operators. This effectively solves the problem of significant differences in interface definitions and configuration methods, and the difficulty in unified encapsulation, in traditional operator development. Through the dynamic routing mechanism of a two-layer gateway, intelligent distribution of business requests and flexible management of operator instances are achieved, reducing the workload of manual customization and adaptation. Furthermore, the separate management of resources and standardized access processes promote the sharing and reuse of operators across teams and projects, improving the efficiency of algorithm capability and computing resource accumulation and management.
[0041] Example 2 Figure 2 This is a schematic diagram illustrating the workflow of an operator-standardized access module according to an embodiment of this application, with reference to... Figure 2 This embodiment further proposes that the encapsulation of operator business code and the establishment of partition configuration files include: The standardized SDK is embedded as a code dependency package into the operator development environment. The standardized SDK includes a unified operator base class and a service registration component. The unified operator base class has preset data processing interfaces, test page interfaces, health detection interfaces and metadata acquisition interfaces. The service registration component receives operator identifiers and registers the operator business classes with operator identifiers to the operator object registry. According to the declarative configuration specification, the partition configuration file is divided into mutually independent application configuration partition, development main configuration partition, registration configuration partition and service configuration partition; Configure the operator application name, process listening address, service port, version information and function description in the application configuration partition; configure the development entity name and development entity contact information in the development entity configuration partition; configure the registration client name, cluster group, registration communication port and target cluster-level gateway address in the registration configuration partition. In the service configuration partition, configure the operator identifier, input parameters, optional parameters, output fields, interface access path, first-level business category, second-level business category and gateway group identifier for each operator, so that the operator identifier is consistent with the class identifier of the corresponding operator business class, and configure the data type for the input parameters, optional parameters and output fields respectively. A set of general parameter types is pre-defined, and the data types of input parameters, optional parameters, and output fields are validated according to the set of general parameter types. When no optional parameters are received, the parameters are filled according to the corresponding default values in the service configuration partition. When the interface access path is not configured, a default interface access path is generated according to the preset routing generation rules.
[0042] The encapsulation of operator business code and the parsing of partition configuration files include: Establish an operator project directory according to the standardized engineering directory rules. Set up local startup scripts, container deployment scripts, application startup entry directory and operator business code directory in the operator project directory. Create operator business files in the operator business code directory and make the file identifier of the operator business files consistent with the operator identifier in the service configuration partition. In the operator business file, establish an operator business class that inherits from the unified operator base class, register the operator business class through the service registration component, and implement the data processing interface, health detection interface, test page interface and metadata acquisition interface in the operator business class; Create a service startup entry point in the application startup entry directory, set the storage path and file upload directory for the partition configuration file, and create a service management object based on the storage path and file upload directory; When starting the operator service, read the partition configuration file, perform declarative configuration syntax validation and required configuration partition validation on the partition configuration file, parse the application configuration partition to initialize the application service, parse the registration configuration partition to generate the registration configuration object, and parse each operator configuration in the service configuration partition in a loop. Based on the operator identifier in each operator configuration, the corresponding operator business class is obtained from the operator object registry, the operator object corresponding to each operator configuration is dynamically created, and the interface access path in each operator configuration is batch bound to the data processing interface of the corresponding operator object; The parsing results of each configuration partition are summarized to generate operator metadata, including interface input information, interface output information, business classification information, version information, and interface access path, for operator retrieval and interface documentation generation. Execute the local startup script to start the operator service according to the storage path of the partition configuration file, and send a test request to the interface access path. Determine the execution status of partition configuration reading, operator business class registration, operator object creation, interface route binding, and interface data sending and receiving based on the response results of the test request.
[0043] This embodiment provides a method for standardized access to heterogeneous operators based on a standardized SDK. It is used to solve the problem that when different R&D teams develop operators using different technology stacks, the lack of a unified code structure, interface specifications and configuration rules leads to the need to repeatedly develop adaptation code for operator access.
[0044] Specifically, in this embodiment, a standardized SDK is pre-built. The standardized SDK serves as a general dependency component in the operator development process, including a unified operator base class and a service registration component.
[0045] The unified operator base class defines the common interface specifications for heterogeneous operators, including data processing interfaces, test page interfaces, health detection interfaces, and metadata retrieval interfaces. When developing new operators, developers only need to inherit from the unified operator base class and implement the corresponding data processing logic according to the preset interface specifications to form operator business classes that meet the platform's access requirements.
[0046] For example, for operators developed using different programming languages, developers do not need to pay attention to the platform-side calling logic. They only need to implement the corresponding business processing methods according to the data processing interface provided by the unified operator base class, and complete the operator registration through the service registration component, so that the platform can identify the corresponding operator business class according to the operator identifier.
[0047] The service registration component is used to establish the association between operator identifiers and operator business classes. Specifically, during the creation of an operator business class, the operator identifier is written into the operator object registry through a preset registration method, so that when the service starts, it can quickly query the corresponding operator business class based on the operator identifier and complete the creation of the operator object.
[0048] Using the above method, heterogeneous operators developed by different R&D teams do not need to develop separate adaptation interfaces for the platform. They only need to follow the unified SDK specification to complete the encapsulation, which improves the consistency of heterogeneous operator development.
[0049] After completing the standardized encapsulation of operator business code, this embodiment further uses partition configuration files to uniformly describe the operator's operation information, registration information, and service interface information.
[0050] Specifically, a partition configuration file based on a declarative configuration specification is pre-established, and the partition configuration file is divided into an application configuration partition, a development entity configuration partition, a registration configuration partition, and a service configuration partition.
[0051] in: (1) The application configuration partition is used to describe the basic operating information of the operator, including the operator application name, process listening address, service port, version information and function description.
[0052] (2) The development entity configuration partition is used to describe the maintenance entity information of the operator, including the development entity name and development entity contact information, so as to manage operators from different sources in a unified manner.
[0053] (3) The registration configuration partition is used to describe the information required for operator service registration, including the registration client name, the cluster group to which it belongs, the registration communication port and the target cluster-level gateway address, so that the operator instance can automatically complete the service registration according to the configuration content.
[0054] (4) The service configuration partition is used to describe the interface service information of the operator, including operator identifier, input parameters, optional parameters, output fields, interface access path, business classification information and gateway grouping information.
[0055] Furthermore, for input parameters, optional parameters, and output fields, a preset set of parameter types is configured, such as string type, integer type, floating-point type, boolean type, array type, and object type, and the configured data types are validated during operator startup.
[0056] When no optional parameters are provided during the API call, the corresponding parameters will be automatically supplemented based on the default values in the service configuration partition; when the API access path is not configured, the API access path will be automatically generated based on the preset routing generation rules.
[0057] The above configuration method transforms the interface descriptions, parameter documents, and access rules that originally relied on manual writing into structured configuration files, enabling the platform to automatically recognize the operator's interface definition, parameter format, and service information.
[0058] During the operator service startup process, this embodiment uses a configuration resolution mechanism to achieve automatic loading of operators and interface registration.
[0059] Specifically, the application startup entry directory, operator business code directory, local startup script, and container deployment script are set in the operator project directory.
[0060] Specifically, an operator business file corresponding to the operator identifier is created in the operator business code directory, and an operator business class inheriting from the unified operator base class is created in the operator business file.
[0061] When starting the operator service at the application startup entry, the partition configuration file is first read, and the configuration syntax and required configuration items are validated on the partition configuration file.
[0062] Once the configuration verification passes, the application configuration partition is parsed to initialize the operator application service; the registration configuration partition is parsed to generate a registration configuration object for gateway registration; and the service configuration partition is parsed in a loop to obtain the interface information of each operator.
[0063] Subsequently, based on the operator identifier in the service configuration partition, the corresponding operator business class is queried from the operator object registry, and the corresponding operator object is dynamically created.
[0064] After the operator object is created, the interface access path is bound to the data processing interface of the corresponding operator object according to the interface access path in the service configuration partition, thereby forming an operator service interface that can be called by the platform.
[0065] At the same time, the parsed configuration content is summarized to generate operator metadata, including interface input information, interface output information, business classification information, version information, and interface access path.
[0066] The operator metadata can be used on the platform side for operator retrieval, interface display, and automatic generation of interface documentation.
[0067] To ensure the reliability of the operator access process, this embodiment further provides a local startup verification process.
[0068] Specifically, the operator service is started via a local startup script.
[0069] When executing the local startup script, the partition configuration file is read according to the preset configuration file path to complete the runtime environment initialization, dependency loading, and service startup.
[0070] After the operator service starts, a test request is sent to the interface access path to verify the following: Can the partition configuration file be read correctly? Can the operator business class be registered correctly? Can the operator object be created correctly? Is the interface access path correctly bound to the data processing interface? Can the operator interface receive input data and return processing results correctly?
[0071] Once the above verification is passed, it is determined that the current operator meets the standardized access requirements and can proceed to the subsequent deployment and operation phase.
[0072] The standardized SDK and partitioned configuration mechanism provided in this embodiment unify the constraints on the code structure, interface definition, and configuration format of heterogeneous operators, enabling operators developed with different technology stacks to be encapsulated according to a unified standard. At the same time, by automatically parsing configuration files, automatically creating operator objects, and automatically binding interface paths, the need for manual adaptation code is reduced, the efficiency of operator access is improved, and operators have the ability to be reused across projects and teams, providing a foundation for subsequent unified management and resource sharing of operators.
[0073] Example 3 Figure 3 This is a schematic diagram of the workflow of a dual-resource warehouse management module provided in one embodiment of this application, with reference to... Figure 3 This embodiment further proposes obtaining the operator runtime image and operator service application package of the target operator, including: According to the resource splitting rules, the operating system, programming language runtime environment, hardware drivers and third-party public dependencies are identified as runtime environment resources, and the operator business code, partition configuration file and project dependency description file are identified as business application resources. The runtime environment resources are built into an operator runtime image that does not contain operator business code and partition configuration files, and the business application resources are packaged into an operator business application package. Deploy separate, isolated container image services and application marketplace management services. Store the operator runtime image in the container image service and the operator business application package in the application marketplace management service. Build an operator runtime image based on the base image, and set an image version label for the operator runtime image according to the image naming rules, including the environment version and hardware adaptation type. Upload the operator runtime image with the image version label to the container image service, and record the image version information and upload log. After completing the debugging of the operator business code, remove the runtime environment files from the business application resources, compress the business application resources into an operator business application package associated with the application version, and submit the operator business application package, application version, adapted image version and function description to the application market management service. The application market management service performs compliance verification on the partition configuration file format and directory structure of the operator business application package. If the verification passes, the operator business application package is set to a publishable state. If the verification fails, a verification failure message is generated and the operator business application package is set to an unpublishable state.
[0074] Load the operator business application package based on the operator runtime image, including: Establish an association index between application versions and image versions in the application market management service to create a correspondence between application versions and adapted image versions; Upon receiving the operator remote deployment instruction, the system queries the associated index based on the target application server's hardware environment and the version of the application to be deployed, determines the corresponding image version, and selects the target operator running image from the container image service that has an image version and is compatible with the hardware environment. The target application server downloads the target operator runtime image from the container image service through repository authentication, and downloads the target operator business application package from the application market management service according to the application name and the version of the application to be deployed; Unzip the target operator business application package, mount the unzipped business application directory to the preset working directory of the container instance created based on the target operator runtime image, so that the container instance reads the partition configuration file in the business application directory to complete service initialization; Perform container startup verification to check the dependency integrity of the container instance and the validity of the partition configuration file, and set the operator instance to the ready state when the verification passes; When iterating over an operator business, only update the operator business code or partition configuration file, rebuild and release the new version of the operator business application package, and replace the business application directory mounted on the container instance without rebuilding the target operator runtime image to complete the operator version update. Archive the operator running images that have not been called by deployment tasks within the preset statistical period and meet the preset archiving conditions, and clean up the operator business application packages whose version status is marked as invalid and meet the preset cleanup conditions. Select a text parsing operator for deployment testing. Build a verification operator running image based on a base image of a preset programming language and upload it to the container image service. Package the operator business code and partition configuration file corresponding to the text parsing operator into a verification operator business application package, upload it to the application market management service, and issue deployment instructions to the test application server after passing compliance verification. The test application server downloads the runtime image and business application package of the verification operator, mounts the business application directory and starts the verification container instance, calls the interface of the text parsing operator, and determines the service running status of the verification container instance based on the interface response result. After modifying the business processing logic of the text parsing operator, only the business application package of the verification operator is updated and republished, and the version update of the text parsing operator is completed without rebuilding the runtime image of the verification operator.
[0075] This embodiment provides a method for separately building operator runtime images and operator business application packages, which solves the problems of low deployment efficiency and insufficient resource reuse capabilities caused by the mixed packaging of operator runtime environment, business code and configuration files during the deployment of existing heterogeneous operators.
[0076] Specifically, in the operator resource construction stage, this embodiment classifies and splits operator-related resources, decoupling the environmental resources required for operator operation from the operator business resources.
[0077] The runtime environment resources include operating systems, programming language runtime environments, hardware drivers, and third-party public dependencies; the business application resources include operator business code, partition configuration files, and project dependency description files.
[0078] Based on the above resource allocation method, the runtime environment resources are constructed into an operator runtime image.
[0079] The operator runtime image is used to provide the basic environment required for operator operation, including program runtime environment, dependent libraries and hardware access capabilities, but does not include specific operator business code and partition configuration files.
[0080] At the same time, the business application resources are packaged independently to form an operator business application package.
[0081] The operator business application package is used to describe the business logic and service configuration of a specific operator, including operator business code, partition configuration file, and project dependency description file.
[0082] In this way, the operator runtime image and the operator business application package form an independent resource structure: The operator runtime image is responsible for providing a stable runtime environment; The operator business application package is responsible for carrying the specific business logic and configuration content.
[0083] When multiple operators have the same runtime environment, the same operator runtime image can be reused, and different operators can be quickly deployed simply by replacing the different operator business application packages.
[0084] After completing the construction of the operator runtime image and the operator business application package, this embodiment further adopts a dual-warehouse separation approach for resource management.
[0085] Specifically, deploy mutually isolated container image services and application marketplace management services.
[0086] in: The container image service is used to store and manage operator runtime images; The application marketplace management service is used to store and manage operator business application packages.
[0087] After the operator runtime image is built, an image version label is set for the operator runtime image according to the preset image naming rules.
[0088] The image version tag is used to describe the runtime environment version information and hardware adaptation type, so that the corresponding operator runtime image can be selected according to the running conditions of the target application server during the deployment process.
[0089] Subsequently, the operator running image with the image version tag is uploaded to the container image service, and the corresponding image version information and upload log are recorded.
[0090] After the operator business code is developed and debugged, the business application resources are organized, runtime environment-related files are removed, and the remaining business resources are compressed into an operator business application package.
[0091] The operator business application package is associated with application version information, adapted image version information, and functional description information, and uploaded to the application market management service. After receiving the operator business application package, the application market management service performs compliance verification on the operator business application package, including: Check if the directory structure conforms to the preset format; check if the partition configuration file meets the four-segment configuration specification; check if the business application resources are complete.
[0092] When the verification passes, the operator service application package is set to a publishable state; when the verification fails, a verification failure message is generated, and the operator service application package is prohibited from entering the publishing process.
[0093] During the operator deployment phase, this embodiment uses an application version and image version association mechanism to achieve automatic matching of the operator runtime image and the operator business application package.
[0094] Specifically, an association index between application versions and image versions is established in the application market management service.
[0095] The associated index record: The application version corresponding to the operator business application package; the required operator runtime image version; and the corresponding hardware adaptation type.
[0096] When a remote deployment instruction for an operator is received, the associated index is queried based on the hardware environment of the target application server and the version of the application to be deployed.
[0097] Based on the query results, determine the corresponding operator runtime image version and obtain the matching target operator runtime image from the container image service.
[0098] At the same time, the corresponding target operator business application package is obtained from the application market management service according to the version of the application to be deployed.
[0099] Subsequently, a container instance is created on the target application server based on the target operator runtime image, and the target operator business application package is loaded into the container instance.
[0100] Specifically, the target operator business application package is decompressed, and the decompressed business application directory is mounted to the preset working directory of the container instance, so that the container instance can read the partition configuration file and complete the operator service initialization.
[0101] After initialization is complete, perform startup checks on the container instance, including: Check if runtime dependencies are complete; check if partition configuration files are valid; check if service ports are functioning correctly.
[0102] Once the above checks pass, the corresponding operator instance will be set to the ready state.
[0103] Since this application adopts the method of separating the operator runtime image from the operator business application package, there is no need to rebuild the runtime environment when the operator business logic is updated.
[0104] Specifically, when the operator business code or partition configuration file changes, only the business application resources are repackaged to form a new operator business application package.
[0105] Subsequently, the new operator business application package is uploaded to the application market management service, and the corresponding application version information is updated.
[0106] When deploying updates, keep the original operator running image unchanged, and only replace the business application directory mounted in the container instance to make the new business logic take effect.
[0107] For example, when the processing rules of a text parsing operator change, only the operator business application package containing the updated business code needs to be rebuilt, without having to recreate the operator runtime image containing the runtime environment.
[0108] This method can reduce the repeated image building and transmission process and improve operator update efficiency.
[0109] To verify the effectiveness of the above dual-resource warehouse management method, this embodiment selects a text parsing operator as the verification object.
[0110] The specific process is as follows: First, a verification operator running image is built based on the preset programming language base image and uploaded to the container image service.
[0111] Subsequently, the business code and partition configuration file of the text parsing operator are packaged into a verification operator business application package and uploaded to the application market management service.
[0112] After the application market management service completes the configuration format and directory structure verification, it sends deployment instructions to the test application server.
[0113] The test application server downloads the verification operator runtime image and the verification operator business application package respectively, creates a container instance based on the verification operator runtime image, and mounts the business application directory.
[0114] After starting the container instance for verification, call the interface of the text parsing operator and determine the service running status based on the results returned by the interface.
[0115] Furthermore, when modifying the business processing logic of the text parsing operator, only the new verification operator business application package is rebuilt and released, while the verification operator runtime image remains unchanged. The operator version update is completed by replacing the business application directory.
[0116] In this embodiment, by separately building and managing the operator runtime image and the operator business application package, the runtime environment resources and business logic resources are decoupled, avoiding the need to repeatedly build the complete runtime environment when the operator business changes. At the same time, by associating the application version with the image version through an index, resources are automatically matched during the operator deployment process, improving the deployment efficiency and version management capabilities of heterogeneous operators. In addition, the independent update mechanism of the business application package enables operators to iterate rapidly while maintaining a stable runtime environment, effectively reducing operator maintenance costs and improving operator resource reuse capabilities.
[0117] Example 4 Figure 4 This is a schematic diagram illustrating the workflow of a hierarchical gateway dynamic routing module according to an embodiment of this application. (Refer to...) Figure 4 This embodiment further proposes that the target operator instance registers with the cluster-level gateway, and the cluster-level gateway maintains the registration status of the target operator instance based on the health inspection results, including: Configure a platform-level gateway, cluster-level gateways deployed in each business cluster, service registration module, health inspection module, and memory-based dynamic service registry, so that each operator instance belongs to the corresponding cluster-level gateway for management; the platform-level gateway is used for public network request access, global security policy execution, cross-cluster route distribution, and full-link log collection, while the cluster-level gateway is used for service registration management, instance status monitoring, internal network traffic forwarding, and load balancing scheduling within the cluster. A memory-based dynamic service registry is established in each cluster-level gateway to store the operator identifier, cluster group, access address, service port, and health status of each operator instance in the corresponding business cluster. After the target operator instance completes startup, partition configuration file parsing, and service initialization, it reads the target cluster-level gateway address, registered client name, cluster group, and registered communication port from the registration configuration partition, and generates a standardized registration message by combining the operator application name, access address, service port, and health check interface address of the target operator instance. A standardized registration message is sent to the target cluster-level gateway. The target cluster-level gateway sequentially performs message format verification, client identity authentication, and network address blacklist / whitelist verification on the standardized registration message. If the verification passes, the operator identifier, cluster group, access address, service port, and health status of the target operator instance are written to the in-memory dynamic service registry. The target operator instance is marked as online and healthy, and a registration success response is returned. If the verification fails, a registration failure response is returned, and the registration is terminated. Configure periodic health inspection tasks in the target cluster-level gateway, set the inspection time interval, and determine the health detection interface as the probe interface; According to the inspection interval, a health probe request is sent to the operator instance in the memory-type dynamic service registry that is online. The operator instance calls the health detection interface to generate health detection results including service running status, service runtime and load status. The health detection results are analyzed. When the health detection request is responded to normally and the response status meets the preset conditions, the health status of the corresponding operator instance is maintained. When a request timeout, connection failure, or abnormal response status occurs, the corresponding operator instance is updated to an abnormal status or offline status, and the corresponding operator instance is removed from the traffic forwarding candidate set.
[0118] The platform-level gateway and cluster-level gateway route business requests to target operator instances that are registered and in good standing, including: The platform-level gateway performs client authentication, request message validity verification, access permission verification, and network address blacklist / whitelist verification on business requests, and blocks business requests that fail the verification. Based on the access domain name, interface access path and preset global routing rules corresponding to the verified business request, the target business cluster is determined and the business request is forwarded to the target cluster-level gateway corresponding to the target business cluster. The target cluster-level gateway resolves the interface access path, matches the operator identifier and cluster group in the memory-based dynamic service registry according to the interface access path, and filters the set of available operator instances with normal health status. According to the preset load balancing strategy, a target operator instance is selected from the set of available operator instances, and the business request is forwarded to the target operator instance, which then processes the business request and generates the business processing result. The business processing results are returned to the external access terminal sequentially via the target cluster-level gateway and the platform-level gateway. Before an operator instance actively stops its service, it receives a deregistration request from the operator instance, deletes the registration information of the corresponding operator instance from the memory-based dynamic service registry, and synchronously updates the traffic forwarding candidate set. For operator instances that lose connection due to process abnormalities or network interruptions and fail health checks within a preset number of consecutive checks, clean up the registration information of the corresponding operator instance from the memory-based dynamic service registry. After a new operator instance completes its registration, it will be added to the corresponding traffic forwarding candidate set. Deploy a platform-level gateway and at least one cluster-level gateway in the test environment, start multiple test operator instances of different types, and determine whether each test operator instance has completed automatic registration and whether it has been recognized by the corresponding cluster-level gateway based on the registration information in the memory-based dynamic service registry. The test operator instance is simulated under the following scenarios: abnormal test operator instance, active stop, and new test operator instance. The update result of the corresponding instance status is determined based on the changes in the memory-based dynamic service registry and traffic forwarding candidate set. Continuously send test service requests in batches, record the request forwarding results of the platform-level gateway and the cluster-level gateway, as well as the request allocation results of each test operator instance, in order to determine the execution status of the preset load balancing strategy under continuous service requests.
[0119] This embodiment provides a dynamic routing method for operator services based on a two-level hierarchical gateway. It addresses the problem of low service discovery efficiency and insufficient routing reliability caused by the frequent changes in the number of operator instances in existing heterogeneous operator platforms, which require manual maintenance of service addresses and routing rules.
[0120] Specifically, this embodiment constructs a two-level hierarchical gateway architecture consisting of a platform-level gateway and a cluster-level gateway.
[0121] Among them, the platform-level gateway serves as a unified entry point between external access terminals and operator services, and is used to receive external business requests, perform global access control, and complete request distribution across business clusters.
[0122] Cluster-level gateways are deployed within each business cluster to manage operator instances within their respective business clusters, including operator instance registration, instance status maintenance, internal request forwarding, and load balancing scheduling.
[0123] The two-tier gateway structure described above separates external access management from internal cluster operator scheduling. The platform-level gateway is responsible for managing the global business request entry points; The cluster-level gateway is responsible for discovering and invoking specific operator instances.
[0124] When a business request enters the system, the platform-level gateway first determines the corresponding target business cluster based on the request information, and then forwards the business request to the cluster-level gateway corresponding to the target business cluster.
[0125] The cluster-level gateway further selects the corresponding operator instance based on information such as operator identifier and interface access path, and forwards the business request to the target operator instance for execution.
[0126] To avoid manually maintaining operator service addresses, this embodiment introduces an automatic registration mechanism during the operator instance startup phase.
[0127] Specifically, this is accomplished within the target operator instance: Operator runtime image loading; operator business application package loading; partition configuration file parsing; operator service initialization; Then, the registration configuration partition in the partition configuration file is read.
[0128] The registration configuration partition includes: Register the client name; the cluster group to which it belongs; the communication port to which it is registered; and the target cluster-level gateway address.
[0129] The target operator instance generates a standardized registration message based on the above registration information.
[0130] The standardized registration message includes: Operator instance name; Operator identifier; Cluster group; Service access address; Service port; Health check interface address.
[0131] Subsequently, the target operator instance sends a registration request to the corresponding cluster-level gateway.
[0132] After receiving a registration request, the cluster-level gateway performs a validity check on the registration request, including: Registration message format verification; client identity verification; network address blacklist / whitelist verification.
[0133] Once the verification is successful, the target operator instance information will be written to the dynamic service registry.
[0134] The dynamic service registry is used to record information about callable operator instances in the current business cluster, including: Operator identifier; Cluster group; Access address; Service port; Health status.
[0135] At the same time, the target operator instance is marked as online, and a registration success response is returned to the target operator instance.
[0136] When registration verification fails, the cluster-level gateway returns a registration failure response and refuses to allow the operator instance to join the service call set.
[0137] With the self-registration method described above, newly deployed operator instances can be automatically added to the operator service system without manual configuration of service addresses.
[0138] To ensure that the operator instances invoked during dynamic routing are in an available state, this embodiment further sets up a periodic health inspection mechanism.
[0139] Specifically, configure health inspection tasks in the cluster-level gateway and set preset inspection time intervals.
[0140] The health inspection module retrieves a list of operator instances that are online from the dynamic service registry according to a preset inspection cycle.
[0141] For any online operator instance, the health inspection module sends a health detection request to the corresponding operator instance.
[0142] After receiving a health detection request, the operator instance calls its own health detection interface and returns the health detection result.
[0143] The health test results include: Service running status; service runtime; current load status.
[0144] The cluster-level gateway updates the instance status in the dynamic service registry based on the returned results.
[0145] When the health test results meet the preset health conditions: Maintain the health status of the corresponding operator instance and allow the operator instance to participate in business request routing.
[0146] When the following situations occur: Health request timed out; network connection failed; returned an abnormal status; Then the corresponding operator instance will be marked as an abnormal or offline state and removed from the traffic forwarding candidate set.
[0147] Periodic health checks can provide real-time insights into the operational status of operator instances, preventing business requests from being sent to unavailable services.
[0148] During the business request invocation process, this embodiment dynamically selects operator instances based on the dynamic service registry.
[0149] Specifically, after receiving a service request, the platform-level gateway first executes: Client authentication; request format validation; access permission validation; network address blacklist / whitelist validation.
[0150] Once the verification is successful, the target business cluster is determined based on the access domain name, interface access path, and global routing rules corresponding to the business request.
[0151] Subsequently, the business request is forwarded to the corresponding cluster-level gateway.
[0152] The cluster-level gateway parses the interface access path in the business request and queries the matching operator instance based on the dynamic service registry.
[0153] Specifically, it includes: Filter corresponding operator instances based on operator identifier; determine the target call scope based on the cluster group to which they belong; filter abnormal instances based on health status; and form a set of healthy and available operator instances.
[0154] Subsequently, according to the preset load balancing strategy, the target operator instance is selected from the set of healthy and available operator instances, and the business request is sent to the target operator instance.
[0155] After receiving a business request, the target operator instance calls the data processing interface through the corresponding operator object to complete the business processing and returns the business processing result.
[0156] To ensure routing stability during the lifecycle changes of operator instances, this embodiment further provides a dynamic online / offline management mechanism.
[0157] When an operator instance needs to actively stop its service, it sends a deregistration request to the corresponding cluster-level gateway.
[0158] After the cluster-level gateway receives the deregistration request: Delete the corresponding instance record in the dynamic service registry; The candidate set for traffic forwarding is updated synchronously. Stop sending new business requests to this operator instance.
[0159] For operator instances that lose connection due to process or network anomalies, the health inspection module will remove the operator instance from the dynamic service registry after failing the inspection for a preset number of consecutive times.
[0160] Once a new operator instance completes registration, the cluster-level gateway automatically adds it to the traffic forwarding candidate set.
[0161] Furthermore, deploy a platform-level gateway and at least one cluster-level gateway in the test environment, and start multiple test operator instances of different types.
[0162] By checking the registration records in the dynamic service registry, it can be determined whether the test operator instance has completed automatic registration.
[0163] Simulate separately: Operator instance error; operator instance voluntarily stopped; new operator instance added; detect changes in dynamic service registry and traffic forwarding candidate set.
[0164] Simultaneously, test service requests are continuously sent, and the request forwarding results of the platform-level gateway and cluster-level gateway, as well as the request allocation results of each operator instance, are recorded to determine the execution effect of the load balancing strategy in continuous request scenarios.
[0165] This embodiment employs a two-tiered gateway structure consisting of a platform-level gateway and a cluster-level gateway to decouple external request access from internal operator scheduling within the cluster, thereby improving the flexibility of heterogeneous operator service invocation. A self-registration mechanism for operator instance startup enables newly deployed operators to automatically join the service system, reducing manual configuration costs. Periodic health checks dynamically maintain the operator instance status, allowing business requests to automatically avoid abnormal instances, thus improving the reliability of operator invocation and the stability of system operation.
[0166] Example 5 Figure 5 This is a schematic diagram of the workflow of a full lifecycle automated management and control module provided in one embodiment of this application, with reference to... Figure 5 This embodiment further proposes to perform automated lifecycle management of target operator instances based on standardized scripts; the automated lifecycle management includes: Build a fully automated lifecycle management pipeline consisting of local startup scripts, container deployment scripts, a three-tier application marketplace release channel, a runtime metric collection module, an elastic scaling module, a gateway traffic limiting module, and an anomaly alarm module; Configure the local startup script to integrate operating system recognition, environment variable initialization, framework dependency installation, directory navigation, and sub-script calling logic, and preset the configuration file path and project working directory; When executing the local startup script, the operating system is identified, the environment variables corresponding to the local network address and service port are read and configured, the operator runtime dependencies are installed, the project working directory is navigated to, and the internal startup script is called to start the operator service. Configure the container deployment script to integrate image repository login authentication, local image detection, remote image retrieval, and container runtime parameter assembly functions, and preset the operator's running image address, host port, and image repository authentication information; When executing the container deployment script, it checks whether the specified version of the operator runtime image exists in the target application server. If it does not exist, it logs into the container image service to obtain the operator runtime image, parses the partition configuration file to obtain the internal service port of the container, configures the business application directory mount relationship, the host machine and container port mapping relationship, hardware call permissions and environment variables, so as to start the target container instance. Establish development release channels, test release channels, and production release channels in the application market management service, and configure access permissions, operation permissions, and version flow approval rules for each; According to the hierarchical release rules, the operator business application package that has completed local debugging is uploaded to the development release channel. After functional testing and approval, it is transferred to the test release channel. After performance testing, compatibility testing and approval, it is transferred to the production release channel. The release time, version transfer status and associated mirror version of each version are recorded. Continuously collect processor utilization, memory usage, number of concurrent requests, interface response time and service error rate of each operator instance. Determine expansion and contraction conditions based on the collected operating indicators. When the expansion conditions are met, create new operator instances. When the contraction conditions are met, take offline the operator instances to be contracted and release the corresponding resources. Configure concurrent request limits for individual operators and operator groups, and the platform-level gateway or cluster-level gateway will perform rate limiting on business requests that exceed the concurrent request limits; It aggregates access logs, operation logs, and error logs generated by platform-level gateways, cluster-level gateways, and each operator instance. Based on the operation metrics and the aggregated logs, it identifies service offline, insufficient resources, error rate exceeding limits, and abnormal traffic events, and generates abnormal alarm information.
[0167] Full lifecycle automated management also includes: Establish a hot upgrade and fault rollback mechanism. When upgrading operator versions, deploy new version operator instances using rolling update or blue-green deployment. Once the new version operator instance meets the preset stable operating conditions, switch business requests to the new version operator instance. If an abnormality is detected in the new version operator instance, switch business requests to the operator instance corresponding to the historical stable version. Establish multi-environment consistency guarantee rules to ensure that the development release channel, test release channel and production release channel adopt the same partition configuration specifications and operator runtime image system, and restrict the operator business application package from modifying the partition configuration file during the cross-release channel flow; Execute the local startup script in the local environment to start the operator service and call the corresponding interface. Determine the execution status of local operator debugging, service startup and interface call based on the interface response results. Upload the debugged operator business application package to the development release channel, and complete the version flow to the test release channel and production release channel in sequence according to the preset approval process; The platform management terminal issues remote deployment commands to enable the application server to automatically execute the download of operator runtime image, download of operator business application package, container startup, operator instance registration and route access, and determine the remote deployment result based on the corresponding execution records; Simulate high-concurrency business scenarios and continuously send business requests. Determine the execution status of automatic scaling and gateway rate limiting based on the creation records, registration records, and request rate limiting records of newly added operator instances. Simulate a scenario where server resources meet the scaling-down conditions, and determine the execution status of automatic scaling-down based on the offline records and resource release records of the instance to be scaled down. Simulate code exceptions and network interruption scenarios, and determine the log aggregation and exception alarm execution status based on the summarized logs and exception alarm information; Perform operator version upgrade operations, and simulate the occurrence of a running exception in the new version operator instance after it runs. Determine the execution status of hot version upgrade and fault rollback based on the routing switch records of business requests.
[0168] This embodiment provides an automated management and control method for the entire lifecycle of operators based on standardized scripts. It is used to solve the problems of low operator deployment efficiency, high operation and maintenance costs, and insufficient operational stability in the existing heterogeneous operator deployment and operation management process, which requires manual execution of operations such as environment configuration, image deployment, version release, and fault handling.
[0169] Specifically, this embodiment constructs an automated management pipeline consisting of a local startup script, a container deployment script, an application marketplace publishing channel, a runtime monitoring module, an elastic scaling module, a rate limiting module, and an anomaly alarm module.
[0170] The automated management pipeline enables fully automated management of the entire process, from local operator development and debugging, deployment and release, operation monitoring to version upgrades and fault recovery.
[0171] During the operator development phase, this embodiment uses a local startup script to initialize the operator runtime environment and start the service.
[0172] Specifically, the local startup script is pre-integrated: Operating system identification logic; environment variable initialization logic; framework dependency installation logic; working directory switching logic; sub-script calling logic.
[0173] When developers execute a local startup script, they first identify the operating system type corresponding to the current running environment.
[0174] Subsequently, the local network address, service port, and running parameters are read according to the preset configuration, and the corresponding parameters are written into the runtime environment variables.
[0175] Furthermore, the local startup script checks whether the current development environment has the dependencies required for the operator to run.
[0176] When missing runtime dependencies are detected, the dependency installation process is executed automatically.
[0177] After completing the environment initialization, the local startup script switches to the preset project working directory and calls the internal service startup script to start the operator service.
[0178] After the operator service starts, local debugging can be performed by calling the operator interface, including: Check if the partition configuration file can be read normally; Check if the operator business class can be loaded normally; Check whether the operator interface can respond normally.
[0179] The above method allows developers to complete local debugging of operators without manually configuring the runtime environment.
[0180] In the operator deployment phase, this embodiment achieves automated deployment through container deployment scripts.
[0181] Specifically, container deployment scripts integrate: Image repository login authentication logic; local image detection logic; remote image pull logic; container runtime parameter configuration logic.
[0182] When executing the container deployment script, the system first checks whether the specified version of the operator runtime image exists on the target application server.
[0183] When the target application server does not have a corresponding operator running image, it automatically connects to the container image service and completes authentication.
[0184] After successful authentication, obtain the corresponding version of the operator runtime image from the container image service.
[0185] Subsequently, the container deployment script parses the partition configuration file, obtains the operator service port information, and automatically configures it: Application directory mounting relationships; port mapping relationships between the host machine and containers; hardware access permissions; runtime environment variables.
[0186] Create a container instance based on the above configuration and start the corresponding operator service.
[0187] After the container starts, further startup verification is performed, including: Check if the business application directory is loaded successfully; check if the partition configuration file is valid; check if the service interface is started.
[0188] Once the test is passed, the operator instance is set to the running state and proceeds to the subsequent service registration and business invocation phase.
[0189] To ensure secure release of operator versions, this embodiment establishes a three-tiered release system consisting of a development release channel, a test release channel, and a production release channel.
[0190] in: The development and release channel is used to store operator business application packages that have been developed and debugged. The test release channel is used for functional testing, performance testing, and compatibility testing; The production release channel is used to release stable versions of operators to the actual business environment.
[0191] The specific release process is as follows: First, upload the operator business application package that has completed local debugging to the development and release channel.
[0192] After functional testing and release approval, the corresponding version will be transferred to the test release channel.
[0193] In the test release channel, execute the following on the operator: Functional integrity testing; performance stability testing; multi-environment compatibility testing.
[0194] Once the test results meet the release requirements, the operator business application package will be transferred to the production release channel.
[0195] At the same time, the corresponding versions are recorded: Release date; version status; associated operator runtime image version.
[0196] Through a three-tiered release channel, operator versions can be flowed in an orderly manner from development and testing to the production environment.
[0197] During the operation of the operator, this embodiment continuously collects the operation metrics of the operator instance.
[0198] The operational indicators include: Processor utilization; memory usage; number of concurrent requests; interface response time; service error rate.
[0199] The running status of the operator instance is determined based on the collected running indicators.
[0200] When the operating indicators continuously meet the expansion conditions, the expansion process is triggered.
[0201] Specifically: Select a target application server with available resources; invoke the container deployment script to create a new operator instance; wait for the newly added operator instance to complete service registration; add the newly added operator instance to the traffic forwarding candidate set.
[0202] When the operating metrics continuously meet the scaling-down conditions, the scaling-down process is triggered.
[0203] Specifically: Select the instance to be scaled down; send a shutdown request to the corresponding cluster-level gateway; delete the corresponding instance information from the dynamic service registry; release the corresponding runtime resources.
[0204] Furthermore, this embodiment sets concurrent request limits for individual operators and operator groups.
[0205] When a business request exceeds the preset concurrent request limit, rate limiting is performed through the platform-level gateway or cluster-level gateway.
[0206] The above methods enable the dynamic adjustment of operator resources based on business pressure.
[0207] To improve the reliability of operator operation, this embodiment further establishes an operation monitoring and anomaly alarm mechanism.
[0208] Specifically, the following were collected separately: Platform-level gateway access logs; cluster-level gateway operation logs; operator instance operation logs; operator error logs.
[0209] The collected logs are summarized and analyzed to identify abnormal events based on operational metrics and log information.
[0210] The abnormal events include: Service offline; insufficient resources; error rate exceeded; abnormal request traffic.
[0211] When an abnormal event is detected, a corresponding abnormal alarm message is generated and sent to the management terminal.
[0212] Furthermore, during the operator version upgrade process, this embodiment adopts a rolling update method or a blue-green deployment method.
[0213] in: The rolling update method is used to gradually replace older version operator instances; Blue-green deployment is used to run both old and new version operator instances simultaneously and switch business requests based on their running status.
[0214] Once the new version of the operator instance is running stably, switch business requests to the new version of the operator instance.
[0215] When an anomaly is detected in a new version operator instance, business requests will be switched back to a historically stable version operator instance to achieve fault rollback.
[0216] To ensure consistency in operator operation across different environments, this embodiment further sets up multi-environment consistency guarantee rules.
[0217] Specifically: The development release channel, test release channel, and production release channel adopt a unified partition configuration standard; All environments use a consistent operator runtime image system; When operator application packages are transferred between different release channels, modification of partition configuration files is prohibited.
[0218] By using the above methods, the interface definition, runtime environment, and configuration rules of the same operator can be kept consistent in different environments, thus avoiding deployment failures due to environmental differences.
[0219] The standardized script-based automated management method for the entire lifecycle of operators provided in this embodiment achieves automated management of heterogeneous operators from development and debugging, deployment and release, operation monitoring to upgrade and rollback. It reduces the complexity of environment configuration and deployment operations through local startup scripts and container deployment scripts; ensures secure flow of operator versions through multi-level release channels; improves operator resource utilization and service stability through operational metric collection, elastic scaling, and rate limiting mechanisms; and enhances system fault recovery capabilities through log analysis, anomaly alerts, and version rollback mechanisms, thereby achieving efficient operation and continuous management of heterogeneous operators.
[0220] Example 6 Figure 6 This is a schematic diagram of the structure of a heterogeneous operator integration system based on a standardized SDK and partition configuration, provided in one embodiment of this application. (Refer to...) Figure 6 A heterogeneous operator integration system based on a standardized SDK and partition configuration includes: an operator standardization access module, a dual resource partitioning management module, and a hierarchical gateway dynamic routing module; The operator standardization access module includes: The standardized SDK unit provides a unified operator base class and a service registration component, which encapsulates operator business code into operator business classes that inherit from the unified operator base class. The operator business classes are implemented according to the data processing interface preset by the unified operator base class, and the registration relationship between operator identifiers and operator business classes is established through the service registration component. The partition configuration unit is used to create partition configuration files according to the declarative configuration specification. The partition configuration file includes an application configuration partition, a development entity configuration partition, a registration configuration partition, and a service configuration partition, which are used to record operator instance initialization information, development entity information, gateway registration parameters, and operator interface information, respectively. The configuration parsing unit is used to parse the partition configuration file, obtain the corresponding operator business class based on the parsed operator identifier and registration relationship, create operator objects, and establish a routing mapping relationship between the interface access path in the operator interface information and the data processing interface of the operator object. The dual-resource warehouse management module includes: The resource acquisition unit is used to acquire the operator runtime image and operator business application package of the target operator; the operator business application package includes operator business code and partition configuration file; The resource loading unit is used to load the operator business application package based on the operator runtime image and start the operator instance based on the operator object that has completed the routing mapping relationship; The hierarchical gateway dynamic routing module includes: The platform-level gateway is used to receive business requests sent by external access terminals, determine the target operator corresponding to the business request, and forward the business request to the cluster-level gateway. The cluster-level gateway is used to receive registration requests sent by operator instances according to the gateway registration parameters, maintain the registration status of operator instances based on health inspection results, and route business requests to target operator instances with normal registration status, so that the target operator instances can call the data processing interface to process business requests through the corresponding operator objects.
[0221] It should be noted that this system also includes a full lifecycle automated management and control module, which is used to achieve automated management of heterogeneous operators from development, deployment, release, operation and maintenance to upgrade and recovery.
[0222] The heterogeneous operator integration system provided in this embodiment utilizes a standardized operator access module to uniformly constrain operator code structure, interface specifications, and configuration formats, enabling heterogeneous operators developed with different technology stacks to quickly access the platform. A dual-resource partitioning management module decouples runtime environment resources from business application resources, allowing operator business logic to be updated independently and improving resource reuse capabilities. A layered gateway dynamic routing module enables automatic registration, health checks, and dynamic invocation of operator instances, improving service call reliability. Furthermore, a full lifecycle automated management and control module automates operator development, deployment, release, operation monitoring, and upgrade recovery, reducing the complexity of heterogeneous operator operation and maintenance, and improving operator integration efficiency and platform resource utilization.
[0223] It is understood that the same or similar parts in the above embodiments can be referred to each other, and the contents not described in detail in some embodiments can be referred to the same or similar contents in other embodiments.
[0224] It should be noted that in the description of this application, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Furthermore, in the description of this application, unless otherwise stated, "a plurality of" means at least two.
[0225] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the function involved, as will be understood by those skilled in the art to which embodiments of this application pertain.
[0226] It should be understood that various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0227] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0228] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0229] The storage media mentioned above can be read-only memory, disk, or optical disk, etc.
[0230] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0231] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.
Claims
1. A heterogeneous operator integration method based on standardized SDK and partition configuration, characterized in that, include: The platform-level gateway receives service requests sent by external access terminals and determines the target operator corresponding to the service request. Obtain the operator runtime image and operator business application package of the target operator, and load the operator business application package based on the operator runtime image; the operator business application package includes operator business code and partition configuration file, the operator business code is encapsulated into operator business class that inherits the unified operator base class provided by the standardized SDK, the operator business class is implemented according to the data processing interface preset by the unified operator base class, and the registration relationship between the operator identifier and the operator business class is established through the service registration component; Parse the partition configuration file; The partition configuration file is divided into application configuration partition, development entity configuration partition, registration configuration partition and service configuration partition according to the declarative configuration specification. These partitions are used to record operator instance initialization information, development entity information, gateway registration parameters and operator interface information, respectively. Based on the parsed operator identifier and the registration relationship, obtain the corresponding operator business class, create the target operator object, and establish a routing mapping relationship between the interface access path in the operator interface information and the data processing interface of the target operator object; Start a target operator instance based on the target operator object that completes the routing mapping relationship; The target operator instance registers with the cluster-level gateway according to the gateway registration parameters, and the cluster-level gateway maintains the registration status of the target operator instance according to the health inspection results; The platform-level gateway forwards the service request to the cluster-level gateway, which then routes the service request to a target operator instance that is in a normal registration state, so that the target operator instance can call the data processing interface through the target operator object to process the service request.
2. The method of claim 1, wherein the method further comprises: The encapsulation of operator business code and the creation of the partition configuration file include: The standardized SDK is embedded as a code dependency package into the operator development environment; the standardized SDK includes the unified operator base class and the service registration component. The unified operator base class presets the data processing interface, test page interface, health detection interface and metadata acquisition interface. The service registration component receives the operator identifier and registers the operator business class with the operator identifier to the operator object registry. According to the declarative configuration specification, the partition configuration file is divided into mutually independent application configuration partition, development entity configuration partition, registration configuration partition and service configuration partition; Configure the operator application name, process listening address, service port, version information and function description in the application configuration partition; configure the development entity name and development entity contact information in the development entity configuration partition; configure the registration client name, cluster group, registration communication port and target cluster-level gateway address in the registration configuration partition. In the service configuration partition, for each operator, an operator identifier, input parameters, optional parameters, output fields, interface access path, primary business category, secondary business category, and gateway group identifier are configured, so that the operator identifier is consistent with the class identifier of the corresponding operator business class, and the data types of the input parameters, optional parameters, and output fields are configured respectively. A set of general parameter types is pre-defined, and the data types of the input parameters, optional parameters, and output fields are validated according to the set of general parameter types. When the optional parameters are not received, the parameters are filled according to the corresponding default values in the service configuration partition. When the interface access path is not configured, a default interface access path is generated according to the preset routing generation rules.
3. The method of claim 2, wherein the method further comprises: The encapsulation of operator business code and the parsing of the partition configuration file include: Establish an operator project directory according to the standardized engineering directory rules, set up a local startup script, a container deployment script, an application startup entry directory and an operator business code directory in the operator project directory, create operator business files in the operator business code directory, and make the file identifier of the operator business files consistent with the operator identifier in the service configuration partition; In the operator business file, an operator business class that inherits from the unified operator base class is established. The operator business class is registered through the service registration component. The data processing interface, the health detection interface, the test page interface, and the metadata acquisition interface are implemented in the operator business class. Establish a service startup entry in the application startup entry directory, set the storage path and file upload directory of the partition configuration file, and create a service management object based on the storage path and the file upload directory; When starting the operator service, the partition configuration file is read, and the partition configuration file is checked for declarative configuration syntax and required configuration partitions. The application configuration partition is parsed to initialize the application service, the registration configuration partition is parsed to generate a registration configuration object, and the operator configurations in the service configuration partition are parsed in a loop. According to the operator identifier in each operator configuration, the corresponding operator business class is obtained from the operator object registry, the operator object corresponding to each operator configuration is dynamically created, and the interface access path in each operator configuration is batch bound to the data processing interface of the corresponding operator object; The parsing results of each configuration partition are summarized to generate operator metadata, including interface input information, interface output information, business classification information, version information, and interface access path, for operator retrieval and interface documentation generation. The local startup script is executed to start the operator service according to the storage path of the partition configuration file, and a test request is sent to the interface access path. The execution status of partition configuration reading, operator business class registration, operator object creation, interface route binding, and interface data sending and receiving is determined according to the response result of the test request.
4. The method of claim 1, wherein the method further comprises: Obtain the operator runtime image and operator business application package of the target operator, including: According to the resource splitting rules, the operating system, programming language runtime environment, hardware drivers and third-party public dependencies are identified as runtime environment resources, and the operator business code, partition configuration file and project dependency description file are identified as business application resources. The runtime environment resources are constructed into an operator runtime image that does not contain the operator business code and the partition configuration file, and the business application resources are packaged into an operator business application package; Deploy mutually isolated container image services and application marketplace management services, store the operator runtime image in the container image service, and store the operator business application package in the application marketplace management service; The operator runtime image is built based on the base image, and an image version label including environment version and hardware adaptation type is set for the operator runtime image according to the image naming rules. The operator runtime image with the image version label is uploaded to the container image service, and the image version information and upload log are recorded. After completing the debugging of the operator business code, remove the runtime environment files from the business application resources, compress the business application resources into an operator business application package associated with the application version, and submit the operator business application package, application version, adapted image version and function description to the application market management service. The application market management service performs compliance verification on the partition configuration file format and directory structure of the operator business application package. If the verification passes, the operator business application package is set to a publishable state. If the verification fails, a verification failure message is generated and the operator business application package is set to an unpublishable state.
5. The method of claim 4, wherein the method further comprises: Load the operator service application package based on the operator runtime image, including: An association index between application versions and image versions is established in the application market management service, so that the application version and the adapted image version are corresponding. Upon receiving the operator remote deployment instruction, the system queries the associated index based on the hardware environment of the target application server and the version of the application to be deployed, determines the corresponding image version, and selects the target operator running image from the container image service that has the image version and is compatible with the hardware environment. The target application server downloads the target operator runtime image from the container image service through repository authentication, and downloads the target operator business application package from the application market management service according to the application name and the version of the application to be deployed; Unzip the target operator business application package, mount the unzipped business application directory to the preset working directory of the container instance created based on the target operator runtime image, and enable the container instance to read the partition configuration file in the business application directory to complete service initialization; Perform container startup verification to check the dependency integrity of the container instance and the validity of the partition configuration file, and set the operator instance to the ready state when the verification passes; When iterating over an operator service, only the operator service code or the partition configuration file is updated, and a new version of the operator service application package is rebuilt and released. Without rebuilding the target operator runtime image, the business application directory mounted on the container instance is replaced to complete the operator version update. Archive the operator running images that have not been called by deployment tasks within the preset statistical period and meet the preset archiving conditions, and clean up the operator business application packages whose version status is marked as invalid and meet the preset cleanup conditions. Select a text parsing operator for deployment testing. Build a verification operator running image based on a base image of a preset programming language and upload it to the container image service. Package the operator business code and partition configuration file corresponding to the text parsing operator into a verification operator business application package, upload it to the application market management service, and issue a deployment instruction to the test application server after passing compliance verification. The test application server is controlled to download the verification operator runtime image and the verification operator business application package, mount the business application directory and start the verification container instance, call the interface of the text parsing operator, and determine the service running status of the verification container instance based on the interface response result. After modifying the business processing logic of the text parsing operator, only the verification operator business application package is updated and republished, and the version update of the text parsing operator is completed without rebuilding the verification operator runtime image.
6. The method of claim 1, wherein the method further comprises: The registration of the target operator instance with the cluster-level gateway and the maintenance of the registration status of the target operator instance by the cluster-level gateway based on the health check results include: Configure a platform-level gateway, cluster-level gateways deployed in each business cluster, a service registration module, a health inspection module, and a memory-based dynamic service registry, so that each operator instance belongs to the management of the corresponding cluster-level gateway; wherein, the platform-level gateway is used for public network request access, global security policy execution, cross-cluster route distribution, and full-link log collection, and the cluster-level gateway is used for service registration management, instance status monitoring, internal network traffic forwarding, and load balancing scheduling within the cluster; The memory-based dynamic service registry is established in each cluster-level gateway to store the operator identifier, cluster group, access address, service port and health status of each operator instance in the corresponding business cluster. After the target operator instance completes startup, partition configuration file parsing, and service initialization, the target cluster-level gateway address, registered client name, cluster group, and registered communication port in the registration configuration partition are read, and a standardized registration message is generated by combining the operator application name, access address, service port, and health detection interface address of the target operator instance. The standardized registration message is sent to the target cluster-level gateway, which then sequentially performs message format verification, client identity authentication, and network address blacklist / whitelist verification on the standardized registration message. If the verification passes, the target operator instance's operator identifier, cluster group, access address, service port, and health status are written to the memory-based dynamic service registry, the target operator instance is marked as online and healthy, and a registration success response is returned. If the verification fails, a registration failure response is returned and the registration is terminated. Configure a periodic health inspection task in the target cluster-level gateway, set the inspection time interval, and determine the health detection interface as the probe interface; According to the inspection interval, a health detection request is sent to the operator instance in the memory-based dynamic service registry that is online. The operator instance calls the health detection interface to generate a health detection result including service running status, service runtime, and load status. The health detection results are analyzed. When the health detection request is responded to normally and the response status meets the preset conditions, the health status of the corresponding operator instance is maintained. When a request timeout, connection failure, or abnormal response status occurs, the corresponding operator instance is updated to an abnormal status or offline status, and the corresponding operator instance is removed from the traffic forwarding candidate set.
7. The heterogeneous operator integration method based on standardized SDK and partition configuration according to claim 6, characterized in that, The platform-level gateway and the cluster-level gateway route the service request to the target operator instance with a normal registration status, including: The platform-level gateway performs client identity authentication, request message legality verification, access permission verification, and network address blacklist / whitelist verification on the service requests, and blocks service requests that fail the verification. Based on the access domain name, interface access path and preset global routing rules corresponding to the verified business request, the target business cluster is determined, and the business request is forwarded to the target cluster-level gateway corresponding to the target business cluster. The target cluster-level gateway parses the interface access path, matches the operator identifier and the cluster group to which it belongs in the memory-based dynamic service registry according to the interface access path, and filters a set of available operator instances with normal health status. According to the preset load balancing strategy, the target operator instance is selected from the set of available operator instances, and the business request is forwarded to the target operator instance, which then processes the business request and generates a business processing result. The business processing result is returned to the external access terminal sequentially via the target cluster-level gateway and the platform-level gateway; Before an operator instance actively stops its service, a deregistration request is received from the operator instance, the registration information of the corresponding operator instance is deleted from the memory-based dynamic service registry, and the traffic forwarding candidate set is updated synchronously. For operator instances that lose connection due to process abnormalities or network interruptions and fail health checks within a preset number of consecutive checks, the registration information of the corresponding operator instance is cleared from the memory-based dynamic service registry. After a new operator instance completes its registration, the new operator instance is added to the corresponding traffic forwarding candidate set. Deploy the platform-level gateway and at least one cluster-level gateway in the test environment, start multiple groups of test operator instances of different types, and determine whether each test operator instance has completed automatic registration and whether it has been recognized by the corresponding cluster-level gateway based on the registration information in the memory-type dynamic service registry. The test operator instance is simulated under the following scenarios: abnormal test operator instance, active stop, and new test operator instance. The update result of the corresponding instance status is determined based on the changes in the memory-type dynamic service registry and the traffic forwarding candidate set. Test service requests are continuously sent in batches, and the request forwarding results of the platform-level gateway and the cluster-level gateway, as well as the request allocation results of each test operator instance, are recorded to determine the execution status of the preset load balancing strategy under continuous service requests.
8. The heterogeneous operator integration method based on standardized SDK and partition configuration according to claim 1, characterized in that, The method further includes: performing automated full-lifecycle management of the target operator instance based on standardized scripts; the automated full-lifecycle management includes: Build a fully automated lifecycle management pipeline consisting of local startup scripts, container deployment scripts, a three-tier application marketplace release channel, a runtime metric collection module, an elastic scaling module, a gateway traffic limiting module, and an anomaly alarm module; Configure the local startup script to integrate operating system recognition, environment variable initialization, framework dependency installation, directory navigation, and sub-script calling logic, and preset the configuration file path and project working directory; When the local startup script is executed, the currently running operating system is identified, the environment variables corresponding to the local network address and service port are read and configured, the operator runtime dependencies are installed, the project working directory is navigated to, and the internal startup script is called to start the operator service. Configure the container deployment script to integrate image repository login authentication, local image detection, remote image retrieval, and container runtime parameter assembly functions, and preset the operator running image address, host port, and image repository authentication information; When executing the container deployment script, it checks whether the specified version of the operator runtime image exists in the target application server. If it does not exist, it logs into the container image service to obtain the operator runtime image, parses the partition configuration file to obtain the internal service port of the container, configures the business application directory mount relationship, the host machine and container port mapping relationship, hardware call permissions and environment variables, so as to start the target container instance. Establish development release channels, test release channels, and production release channels in the application market management service, and configure access permissions, operation permissions, and version flow approval rules for each; According to the hierarchical release rules, the operator business application package that has completed local debugging is uploaded to the development release channel. After functional testing and approval, it is transferred to the test release channel. After performance testing, compatibility testing and approval, it is transferred to the production release channel. The release time, version transfer status and associated mirror version of each version are recorded. The processor utilization, memory usage, number of concurrent requests, interface response time and service error rate of each operator instance are continuously collected. Based on the collected operating indicators, expansion and contraction conditions are determined respectively. When the expansion conditions are met, a new operator instance is created. When the contraction conditions are met, the operator instance to be contracted is taken offline and the corresponding resources are released. Concurrency request limits are configured for individual operators and operator groups, and the platform-level gateway or the cluster-level gateway performs rate limiting on service requests that exceed the concurrency request limits. The system aggregates the access logs, operation logs, and error logs generated by the platform-level gateway, the cluster-level gateway, and each operator instance. Based on the operation metrics and the aggregated logs, it identifies service offline, resource insufficiency, error rate exceeding limits, and abnormal traffic events, and generates abnormal alarm information.
9. The heterogeneous operator integration method based on standardized SDK and partition configuration according to claim 8, characterized in that, The full lifecycle automated management and control also includes: Establish a hot upgrade and fault rollback mechanism. When upgrading operator versions, deploy new version operator instances using rolling update or blue-green deployment. After the new version operator instance meets the preset stable operation conditions, switch business requests to the new version operator instance. If an abnormal operation is detected in the new version operator instance, switch business requests to the operator instance corresponding to the historical stable version. Establish multi-environment consistency guarantee rules to ensure that the development release channel, the test release channel, and the production release channel adopt the same partition configuration specifications and operator runtime image system, and restrict the operator business application package from modifying the partition configuration file during the cross-release channel flow; Execute the local startup script in the local environment to start the operator service and call the corresponding interface. Determine the execution status of operator local debugging, service startup and interface call based on the interface response results. Upload the debugged operator business application package to the development release channel, and sequentially complete the version flow to the test release channel and the production release channel according to the preset approval process; The platform management terminal issues remote deployment commands to enable the application server to automatically execute the download of operator runtime image, download of operator business application package, container startup, operator instance registration and route access, and determine the remote deployment result based on the corresponding execution records; Simulate high-concurrency business scenarios and continuously send business requests. Determine the execution status of automatic scaling and gateway rate limiting based on the creation records, registration records, and request rate limiting records of newly added operator instances. Simulate a scenario where server resources meet the scaling-down conditions, and determine the execution status of automatic scaling-down based on the offline records and resource release records of the instance to be scaled down. Simulate code exceptions and network interruption scenarios, and determine the log aggregation and exception alarm execution status based on the summarized logs and exception alarm information; Perform operator version upgrade operation, and simulate the operation of the new version operator instance after the new version operator instance is running. Determine the execution status of version hot upgrade and fault rollback based on the routing switch record of business request.
10. A heterogeneous operator integration system based on a standardized SDK and partition configuration, characterized in that, include: Operator standardization access module, dual resource partitioning management module, and hierarchical gateway dynamic routing module; The operator standardization access module includes: The standardized SDK unit provides a unified operator base class and a service registration component, which encapsulates the operator business code into an operator business class that inherits from the unified operator base class. The operator business class is implemented according to the data processing interface preset by the unified operator base class, and the registration relationship between the operator identifier and the operator business class is established through the service registration component. The partition configuration unit is used to create a partition configuration file according to the declarative configuration specification. The partition configuration file includes an application configuration partition, a development entity configuration partition, a registration configuration partition, and a service configuration partition, which are used to record operator instance initialization information, development entity information, gateway registration parameters, and operator interface information, respectively. A configuration parsing unit is used to parse the partition configuration file, obtain the corresponding operator business class according to the parsed operator identifier and the registration relationship, create an operator object, and establish a routing mapping relationship between the interface access path in the operator interface information and the data processing interface of the operator object; The dual-resource warehouse management module includes: The resource acquisition unit is used to acquire the operator runtime image and operator business application package of the target operator; the operator business application package includes the operator business code and the partition configuration file; The resource loading unit is used to load the operator service application package based on the operator runtime image, and to start the operator instance based on the operator object that has completed the routing mapping relationship; The hierarchical gateway dynamic routing module includes: The platform-level gateway is used to receive service requests sent by external access terminals, determine the target operator corresponding to the service request, and forward the service request to the cluster-level gateway. The cluster-level gateway is used to receive the registration request sent by the operator instance according to the gateway registration parameters, maintain the registration status of the operator instance according to the health inspection results, and route the business request to the target operator instance with a normal registration status, so that the target operator instance can call the data processing interface to process the business request through the corresponding operator object.
